From 38f82193b88c790e5faab480845553e7c75a52b3 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 30 May 2025 04:59:02 +0000 Subject: [PATCH 1/2] I've created a comprehensive README.md for the project. The new README includes: - Project title and description - Installation instructions (building from source) - Detailed usage instructions for all commands and subcommands (`codeowners`, `completion`, `config`) including examples. - Information on global options. - A section on configuration. - Links to contributing guidelines and license. --- README.md | 88 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index e35fb1c..76c455a 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,76 @@ -

codeinput

-
- - codeinput CLI - -
-
+# codeinput (ci) -[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/CodeInputCorp/cli/blob/master/LICENSE) -[![Tests](https://github.com/CodeInputCorp/cli/actions/workflows/tests.yml/badge.svg)](https://github.com/CodeInputCorp/cli/actions/workflows/tests.yml) -[![Build](https://github.com/CodeInputCorp/cli/actions/workflows/build.yml/badge.svg)](https://github.com/CodeInputCorp/cli/actions/workflows/build.yml) +`codeinput` is a command-line interface (CLI) tool designed for managing and analyzing `CODEOWNERS` files and other source code related tasks. It helps developers understand code ownership, track changes, and maintain codebase health. -`codeinput` is a CLI for [codeinput](https://codeinput.com). +## Installation - - -**Table of Contents** +1. Clone the repository: + ```bash + git clone https://github.com/CodeInputCorp/cli.git + cd cli + ``` +2. Build the project: + ```bash + cargo build --release + ``` + The executable `ci` will be available in `target/release/`. You may want to add this directory to your system's PATH or copy the executable to a directory in your PATH (e.g., `~/.local/bin` or `/usr/local/bin`). -- [About](#about) -- [How to Contribute](#how-to-contribute) - - [Versioning](#versioning) -- [License](#license) +Alternatively, if the project were published to crates.io, you could install it with: +```bash +# cargo install codeinput # Uncomment if published +``` - +## Usage -## About +The `ci` tool provides several commands to interact with your codebase. Here are some of the main commands: -`codeinput` is a CLI for [codeinput](https://codeinput.com). +### General Commands +* `ci --help`: Display help information and a list of all commands. +* `ci --help`: Display help for a specific command. +* `ci config`: Show the current configuration being used by the CLI. -## How to Contribute +### CODEOWNERS Management +The `codeowners` subcommand provides tools for working with `CODEOWNERS` files: +* `ci codeowners parse [--path ] [--cache-file ] [--format ]`: Parses `CODEOWNERS` files in the specified directory (default: current) and builds an ownership map, optionally caching it. +* `ci codeowners list-files [--path ] [--tags ] [--owners ] [--unowned] [--show-all] [--format ] [--cache-file ]`: Lists files and their owners, with various filtering options. +* `ci codeowners list-owners [--path ] [--format ] [--cache-file ]`: Displays aggregated owner statistics. +* `ci codeowners list-tags [--path ] [--format ] [--cache-file ]`: Analyzes and shows tag usage within `CODEOWNERS` files. -Details on how to contribute can be found in the [CONTRIBUTING.md](.github/CONTRIBUTING.md) file. +Example: +```bash +# Parse CODEOWNERS in the current directory and save to default cache +ci codeowners parse -### Versioning +# List all files owned by @username or team/name +ci codeowners list-files --owners "@username,team/name" -codeinput adheres to the [SemVer](https://semver.org/) Semantic Versioning. +# List unowned files in JSON format +ci codeowners list-files --unowned --format json +``` + +### Shell Completion +You can generate shell completion scripts for `bash`, `zsh`, or `fish`: +* `ci completion bash`: Generate bash completion script. +* `ci completion zsh`: Generate zsh completion script. +* `ci completion fish`: Generate fish completion script. + +Example for bash: +```bash +ci completion bash > /etc/bash_completion.d/ci +# or source it in your .bashrc +# echo "source <(ci completion bash)" >> ~/.bashrc +``` + +### Global Options +* `--config `: Use a custom configuration file. +* `--log-level `: Set the logging level (e.g., `debug`, `info`, `warn`, `error`). +* `--debug`: Enable debug mode (provides more verbose output). + + +## Contributing + +We welcome contributions! Please see our [Contributing Guidelines](.github/CONTRIBUTING.md) for more details on how to get involved. ## License -`codeinput` is licensed under the MIT license. Please read the [LICENSE](LICENSE) file in this repository for more information. +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. From 1770d6e0b92c5437855701c3c872fd4a12d12de3 Mon Sep 17 00:00:00 2001 From: omarabid Date: Fri, 30 May 2025 04:59:13 +0000 Subject: [PATCH 2/2] chore(docs): update TOC --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 76c455a..13834a1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,19 @@ + + +**Table of Contents** + +- [codeinput (ci)](#codeinput-ci) + - [Installation](#installation) + - [Usage](#usage) + - [General Commands](#general-commands) + - [CODEOWNERS Management](#codeowners-management) + - [Shell Completion](#shell-completion) + - [Global Options](#global-options) + - [Contributing](#contributing) + - [License](#license) + + + # codeinput (ci) `codeinput` is a command-line interface (CLI) tool designed for managing and analyzing `CODEOWNERS` files and other source code related tasks. It helps developers understand code ownership, track changes, and maintain codebase health.