Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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.