nelson-0.0.1 is not a library.
nelson
nelson is a local-first CLI AI assistant that generates shell commands, explains errors, and answers programming questions using a self-hosted LLM or an openai model.
It currently supports the following backends:
- ollama
- openai
Instalation
Install via cargo
Or build from source:
Usage
nelson has one main query command and one special command.
Most of the time, you just ask nelson a question. The way it answers is controlled by modes, which can be switched using flags placed anywhere in the prompt.
If multiple mode flags are provided, the last one wins.
Modes
--cmdGenerate a shell command-nNeat (concise answer)-lLong (detailed explanation)--codeCode-only output
A default mode is used if no flag is provided.
Examples
Configuration
nelson reads configuration from a file located at:
- Linux:
~/.config/nelson/config.toml - macOS:
~/Library/Application Support/nelson/config.toml - Windows:
%APPDATA%\nelson\config.toml
Example:
[]
= "ollama"
= "http://localhost:11434/api/chat"
[]
= "llama3.2"
[]
= "cmd"
Initialize the config file
Run:
This creates the default config file (if it doesn't exist) and prints the file path so you can edit it.
Roadmap
- v0.1.0: Out of the box experience
- wtf command
- coverage