Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seakayone/chat
A simple natural language to shell command translator using an LLM running locally in Ollama.
https://github.com/seakayone/chat
command-line-tool macos ollama zsh
Last synced: about 1 month ago
JSON representation
A simple natural language to shell command translator using an LLM running locally in Ollama.
- Host: GitHub
- URL: https://github.com/seakayone/chat
- Owner: seakayone
- License: apache-2.0
- Created: 2024-07-16T08:53:47.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-16T09:59:42.000Z (4 months ago)
- Last Synced: 2024-09-28T07:40:39.841Z (about 2 months ago)
- Topics: command-line-tool, macos, ollama, zsh
- Language: Rust
- Homepage:
- Size: 1.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chat
A simple natural language to shell command translator using Ollama with the `codestral` LLM.
Currently it supports only zsh and MacOS.
## Demo
![Demo of chat in action](./assets/demo.gif)
## Pre-requisites
[Ollama must be installed](https://ollama.com/) and up and running.
The [`codestral`](https://ollama.com/library/codestral) model must be available.Run Ollama in the background and pull the `codestral` LLM before using the chatbot:
```zsh
ollama serve &ollama pull codestral
```## Build and Run
Build the project by running:
```zsh
cargo build --release
```Run the chat from cargo:
```zsh
cargo run
```Install the chatbot by placing the binary from `target/release/chat` in your path.
## Usage
For now the chat is a simple terminal chatbot.
You can chat with it by running:```zsh
chat
```## Future Work
- Add a non-interactive mode and execute the commands directly
- Add chat history
- Add a feature which explains the generated command
- Make it configurable to use different LLMs
- Make it configurable to support different additional tools installed on the machine
- Add support for more shells
- Add support for other OSs## Know Issues
These are known issue and will be fixed in the future:
- Sometimes the model will not return only the command but also some explanation.
- Very complex workflows might fail to generate the correct command.