Alan is a minimal coding agent written in Rust. It runs in your terminal and uses an LLM to answer questions, inspect files, edit files, and run shell commands.
Note: Alan is currently in an early prototype stage. Some basic features are still missing and will be added soon.
- Interactive terminal UI built with Ratatui
- OpenRouter provider support
- File read, file write, file edit, and shell tools
- Optional OpenRouter web search and web fetch tools
- Tool-call execution with configurable round limits
- Plan mode toggled with
/planorShift+Tab - Interactive provider login overlay
- File/folder path completion in the prompt (
@) - Configurable reasoning effort
- Session history persisted under
~/.alan/sessions
- Rust 1.88 or newer
- OpenRouter API key
OPENROUTER_API_KEY=... cargo run -p alanDefault model is openai/gpt-4o-mini. Override it with:
OPENROUTER_API_KEY=... \
ALAN_MODEL=openai/gpt-4o-mini \
cargo run -p alanAlan stores credentials at ~/.alan/auth.json by default. Set ALAN_HOME to change its home directory. You can also run /login inside Alan to authenticate interactively.
- Type a prompt and press
Enterto run it. UseShift+Enter,Alt+Enter,Ctrl+J, orCtrl+Mfor a newline. - Type
@in the prompt to complete file and folder paths (@popup.rsmatches anywhere;@src/comatches by directory). - Slash commands:
/login— sign in to a provider interactively/plan— toggle plan mode (alsoShift+Tab)/help— list available commands
- Key bindings:
Escclears input/selection,Ctrl+Cinterrupts the agent,Ctrl+Udeletes to line start,Ctrl+Zundoes an edit,Up/Down/PageUp/PageDownscroll the transcript or navigate the completion popup. Mouse scrolling and bracketed paste are supported.
All variables are optional:
| Variable | Purpose | Default |
|---|---|---|
ALAN_MODEL |
Model id | openai/gpt-4o-mini |
ALAN_HOME |
Alan home directory | $HOME |
ALAN_REASONING_EFFORT |
none, minimal, low, medium, high, xhigh, max |
unset |
ALAN_OPENROUTER_WEB_SEARCH |
Enable web search tool (1, true, yes, on) |
off |
ALAN_OPENROUTER_WEB_FETCH |
Enable web fetch tool (1, true, yes, on) |
off |
ALAN_LOG |
Log filter (falls back to RUST_LOG) |
unset |
ALAN_LOG_DIR |
Where daily log files go | $ALAN_HOME/.alan/logs |
Files live under $ALAN_HOME/.alan/: auth.json (credentials),
sessions/ (conversation history), and logs/.
Run commands from repository root:
cargo fmt --all
cargo check --workspace
cargo test --workspaceRun Alan locally:
cargo run -p alancrates/llm— provider-independent LLM protocol types and API clientscrates/providers— provider bindings, model catalog, and authenticationcrates/tools— file and shell tool implementationscrates/agent— conversation state, skills, tools, and agent loopcrates/alan— interactive Ratatui frontend