Skip to content

Commit 38f8219

Browse files
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.
1 parent f50e0a3 commit 38f8219

1 file changed

Lines changed: 62 additions & 26 deletions

File tree

README.md

Lines changed: 62 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,76 @@
1-
<h1 align="center">codeinput</h1>
2-
<div align="center">
3-
<strong>
4-
codeinput CLI
5-
</strong>
6-
</div>
7-
<br/>
1+
# codeinput (ci)
82

9-
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/CodeInputCorp/cli/blob/master/LICENSE)
10-
[![Tests](https://github.com/CodeInputCorp/cli/actions/workflows/tests.yml/badge.svg)](https://github.com/CodeInputCorp/cli/actions/workflows/tests.yml)
11-
[![Build](https://github.com/CodeInputCorp/cli/actions/workflows/build.yml/badge.svg)](https://github.com/CodeInputCorp/cli/actions/workflows/build.yml)
3+
`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.
124

13-
`codeinput` is a CLI for [codeinput](https://codeinput.com).
5+
## Installation
146

15-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
16-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
17-
**Table of Contents**
7+
1. Clone the repository:
8+
```bash
9+
git clone https://github.com/CodeInputCorp/cli.git
10+
cd cli
11+
```
12+
2. Build the project:
13+
```bash
14+
cargo build --release
15+
```
16+
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`).
1817

19-
- [About](#about)
20-
- [How to Contribute](#how-to-contribute)
21-
- [Versioning](#versioning)
22-
- [License](#license)
18+
Alternatively, if the project were published to crates.io, you could install it with:
19+
```bash
20+
# cargo install codeinput # Uncomment if published
21+
```
2322

24-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
23+
## Usage
2524

26-
## About
25+
The `ci` tool provides several commands to interact with your codebase. Here are some of the main commands:
2726

28-
`codeinput` is a CLI for [codeinput](https://codeinput.com).
27+
### General Commands
28+
* `ci --help`: Display help information and a list of all commands.
29+
* `ci <command> --help`: Display help for a specific command.
30+
* `ci config`: Show the current configuration being used by the CLI.
2931

30-
## How to Contribute
32+
### CODEOWNERS Management
33+
The `codeowners` subcommand provides tools for working with `CODEOWNERS` files:
34+
* `ci codeowners parse [--path <DIR_PATH>] [--cache-file <FILE_PATH>] [--format <json|bincode>]`: Parses `CODEOWNERS` files in the specified directory (default: current) and builds an ownership map, optionally caching it.
35+
* `ci codeowners list-files [--path <DIR_PATH>] [--tags <TAGS>] [--owners <OWNERS>] [--unowned] [--show-all] [--format <text|json|bincode>] [--cache-file <FILE_PATH>]`: Lists files and their owners, with various filtering options.
36+
* `ci codeowners list-owners [--path <DIR_PATH>] [--format <text|json|bincode>] [--cache-file <FILE_PATH>]`: Displays aggregated owner statistics.
37+
* `ci codeowners list-tags [--path <DIR_PATH>] [--format <text|json|bincode>] [--cache-file <FILE_PATH>]`: Analyzes and shows tag usage within `CODEOWNERS` files.
3138

32-
Details on how to contribute can be found in the [CONTRIBUTING.md](.github/CONTRIBUTING.md) file.
39+
Example:
40+
```bash
41+
# Parse CODEOWNERS in the current directory and save to default cache
42+
ci codeowners parse
3343

34-
### Versioning
44+
# List all files owned by @username or team/name
45+
ci codeowners list-files --owners "@username,team/name"
3546

36-
codeinput adheres to the [SemVer](https://semver.org/) Semantic Versioning.
47+
# List unowned files in JSON format
48+
ci codeowners list-files --unowned --format json
49+
```
50+
51+
### Shell Completion
52+
You can generate shell completion scripts for `bash`, `zsh`, or `fish`:
53+
* `ci completion bash`: Generate bash completion script.
54+
* `ci completion zsh`: Generate zsh completion script.
55+
* `ci completion fish`: Generate fish completion script.
56+
57+
Example for bash:
58+
```bash
59+
ci completion bash > /etc/bash_completion.d/ci
60+
# or source it in your .bashrc
61+
# echo "source <(ci completion bash)" >> ~/.bashrc
62+
```
63+
64+
### Global Options
65+
* `--config <FILE>`: Use a custom configuration file.
66+
* `--log-level <LEVEL>`: Set the logging level (e.g., `debug`, `info`, `warn`, `error`).
67+
* `--debug`: Enable debug mode (provides more verbose output).
68+
69+
70+
## Contributing
71+
72+
We welcome contributions! Please see our [Contributing Guidelines](.github/CONTRIBUTING.md) for more details on how to get involved.
3773

3874
## License
3975

40-
`codeinput` is licensed under the MIT license. Please read the [LICENSE](LICENSE) file in this repository for more information.
76+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

0 commit comments

Comments
 (0)