Before you start
Make sure you’ve completed the Installation steps:- Node.js
>=20installed - Repository cloned and dependencies installed with
npm install
Launch loaf
Start loaf in TUI mode:Onboarding flow
loaf guides you through a two-step setup:Connect an AI provider
loaf supports multiple AI providers. Choose one to authenticate:
- OpenAI
- OpenRouter
- Antigravity
Best for: ChatGPT models (GPT-4, o1, o3)
- Select OpenAI from the onboarding menu
- loaf opens a browser window for OAuth login
- Sign in with your OpenAI account
- Grant access when prompted
- Return to the terminal — authentication is complete
loaf uses OpenAI’s OAuth flow. Your credentials are stored securely in your system keychain.
Configure web search (optional)
loaf can perform web searches using the Exa API.Option 1: Add Exa API key
- Enter your Exa API key when prompted
- Press Enter to save
- The
search_webtool is now available
skip and press Enter. You can add the key later with /auth.Get a free Exa API key at exa.ai. The free tier includes 1,000 searches/month.
Choose a model
Before your first prompt, select an AI model:Open the model selector
Type
/model and press Enter.You’ll see a list of available models based on your connected providers.Select a model
Use arrow keys to navigate:
- ↑/↓: Move through the list
- Enter: Select a model
- Type to search: Filter models by name
Configure thinking level
For reasoning models (o1, o3), loaf prompts you to select a thinking level:
- OFF: No extended reasoning (fastest)
- MINIMAL: Very light reasoning
- LOW: Fast with lighter reasoning
- MEDIUM: Balanced depth and speed
- HIGH: Maximum reasoning depth
- XHIGH: Extra high reasoning (for hardest tasks)
Thinking level controls reasoning effort for extended-reasoning models. For standard models, it’s ignored.
/model.
Your first commands
Send a message
Type a message at the prompt and press Enter:loaf sends your message to the selected model and streams the response.
Execute a tool
Ask loaf to perform an action:loaf calls the
bash tool to run ls and shows you the output.loaf has built-in tools for shell commands, file operations, JavaScript execution, and web search. See Tools for details.
Read and edit files
loaf can read and modify files:Or make changes:loaf uses the
read_file and apply_patch tools to inspect and edit files.Essential commands
loaf includes slash commands for common operations:/help — Show all commands
/help — Show all commands
Displays a list of all available slash commands.
/model — Change model
/model — Change model
Opens the model selector to switch AI models or adjust thinking levels.
/auth — Manage providers
/auth — Manage providers
Add or update authentication for AI providers.
/history — Resume chats
/history — Resume chats
Load a previous chat session:
/clear — Clear conversation
/clear — Clear conversation
Clears the current conversation history to start fresh.
/tools — List tools
/tools — List tools
Shows all registered tools (built-in and custom).
/skills — List skills
/skills — List skills
Displays available skills from:Use skills with
- Repository
.agents/skills - User directory
~/.loaf/skills - Global directory
~/.agents/skills
$skill-name syntax in your messages./onboarding — Re-run setup
/onboarding — Re-run setup
Re-runs the onboarding flow to reconfigure providers.
/quit or /exit — Exit loaf
/quit or /exit — Exit loaf
Exits the loaf TUI.Or press
Ctrl+C (or Cmd+C on macOS).Using skills
Skills are reusable instruction bundles. To use a skill, mention it with the$ prefix:
Interrupting and steering
Interrupt active inference
PressCtrl+C (or Cmd+C on macOS) while loaf is generating a response to interrupt it.
Steer during inference
Type a message while loaf is working to queue a steering message. loaf processes it after the current inference completes.Keyboard shortcuts
| Shortcut | Action |
|---|---|
↑ / ↓ | Navigate command history |
Ctrl+C / Cmd+C | Interrupt inference or exit |
Tab | Autocomplete slash commands |
Ctrl+V / Cmd+V | Paste clipboard content (including images) |
Configuration files
loaf stores state in~/.loaf (or %USERPROFILE%\.loaf on Windows):
- auth.json: OAuth tokens and API keys
- state.json: Model selection, thinking level, input history
- chat-sessions/: Saved chat sessions
Reset configuration
To wipe all local config and restart onboarding:Next steps
Now that you’re up and running, explore more:Core concepts
Learn about skills, tools, and models
Commands
Master all slash commands
Custom tools
Extend loaf with your own JavaScript tools
RPC mode
Integrate loaf programmatically