Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amauryd/ai-cli
https://github.com/amauryd/ai-cli
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/amauryd/ai-cli
- Owner: AmauryD
- Created: 2024-05-18T09:15:06.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-26T12:05:02.000Z (7 months ago)
- Last Synced: 2024-12-16T07:55:34.365Z (7 days ago)
- Language: Rust
- Size: 108 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AI-CLI
AI-CLI is a command-line interface (CLI) tool designed to help users find the best command for their terminal. It leverages the power of artificial intelligence to provide the most suitable command based on the user's input.
## How to Use
Actually used for my own personal use and to learn Rust, on MacOS with zsh.
I'm running LocalAI bare metal to avoid sending data to the cloud.Every request sends:
- The current directory
- All available commands
- The env variables
- The 10 last shell commands
- The files in the current directory
- The question## Build localy
1. Install a local AI endpoint.
2. Clone the repository.
3. Build the project.```bash
cargo install --path cli
```The endpoint and the model are configurable in `$HOME/.gpt-cli.toml`.
```toml
gpt_url="http://localhost:8080/v1/chat/completions"
model="llama3-8b-instruct"
```Example :
```bash
ai get my public ip
>> curl -4 icanhazip.com
>> Do you want to run this command ? (y/n):
>> 81.XXX.XXX.XXX
``````bash
./ai show all volumes
>> diskutil list
>> Do you want to run this command ? (y/n)
>> /dev/disk0 (internal, physical): ...
```![Always has been](./8rnkmh.jpg)
## License
AI-CLI is licensed under the MIT License. See the `LICENSE` file for more details.