Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bradydouthit/cmdr
CLI Tool that provides insights on how you use the terminal
https://github.com/bradydouthit/cmdr
bash cli developer-tools go golang wsl zsh
Last synced: 2 days ago
JSON representation
CLI Tool that provides insights on how you use the terminal
- Host: GitHub
- URL: https://github.com/bradydouthit/cmdr
- Owner: BradyDouthit
- License: mit
- Created: 2024-09-28T19:48:36.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-20T03:48:04.000Z (about 1 month ago)
- Last Synced: 2024-11-20T04:27:21.173Z (about 1 month ago)
- Topics: bash, cli, developer-tools, go, golang, wsl, zsh
- Language: Go
- Homepage:
- Size: 1.88 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cmdr
`cmdr` is a CLI tool with a goal of helping develpers understand their CLI usage in order to improve efficiency.> [!NOTE]
> I hope to make this a tool developers like myself can use regularly to improve CLI usage a little every day. After all, we use the terminal so much we should be good at it. That said, I don't have much time for projects like this so it is pretty basic as of now but contributions are welcome (no strict rules or anything like that just make a PR)!## Examples
1. **Top Commands**: By default, cmdr displays the top 5 most frequently used commands along with their usage count.
Example:
```
$ cmdr
You have used git 150 times
You have used ls 120 times
You have used cd 100 times
You have used npm 80 times
You have used docker 50 times
```2. **Customizable Results**: Use the `-t` or `--top` flag followed by a number to specify how many top commands you want to see.
Example:
```
$ cmdr --top=10
```
This will display the top 10 most frequently used commands.3. **Most Commonly Invalid Commands**: Use the or `invalid` command to see commands that you've attempted to run but don't exist or have failed.
Example:
```
$ cmdr invalid --top=2
You have used gti 5 times but it does not exist
You have used sl 3 times but it does not exist
```
4. **Valid Commands**: Use the `valid` command to see commands that you've attempted to run but don't exist or have failed.Example:
```
$ cmdr valid
You ran go 143 times
You ran ls 124 times
You ran clear 105 times
You ran cd 96 times
You ran git 67 times
```
5. **Include or Exclude Arguments**: Use the `-a` or `--args` flag to include arguments. They are excluded by default.Example:
```
$ cmdr valid --args
You have used git push 10 times
You have used ls -l 5 times
```
6. **Combine Flags**: You can combine flags to get the desired output.Example:
```
$ cmdr valid --args --top=3
You ran go run . 45 times
You ran cd .. 21 times
You ran npm run dev 14 times
```## Installation
To install cmdr, you'll need to have Go installed on your system. Follow these steps:
### Linux
1. Clone the repository:
```
git clone https://github.com/BradyDouthit/cmdr.git
cd cmdr
```2. Build the project:
```
go build -o cmdr
```3. Add the compiled binary to your system's PATH:
```
export PATH=$PATH:/path/to/cmdr
```4. You can now run `cmdr` from anywhere in your terminal.
### Windows
1. Clone the repository:
```
git clone https://github.com/BradyDouthit/cmdr.git
cd cmdr
```2. Build the project:
```
go build -o cmdr.exe
```3. Add the directory containing `cmdr.exe` to your system's PATH
4. You can now run `cmdr` from anywhere in your command prompt or PowerShell.
Note: Make sure you have Go installed and properly configured on your system before following these steps.
## Dependencies
cmdr uses the following dependencies:
- [Lipgloss](https://github.com/charmbracelet/lipgloss)## Currently Supported Terminal Emulators
- `zsh`
- `bash`## Contributing
Feel free to contribute to cmdr by submitting a pull request or opening an issue. Your contributions and ideas are welcome!