System requirements
Before installing loaf, ensure your system meets these requirements:Node.js version: loaf requires Node.js
>=20. Check your version with node --version.- Node.js: Version 20 or higher
- npm: Comes with Node.js
- Git: For cloning the repository
- Terminal: Any modern terminal emulator
Platform support
loaf runs on:- macOS (Intel and Apple Silicon)
- Linux (most distributions)
- Windows (with WSL or native)
Installation steps
Install dependencies
Install all required packages:This installs dependencies including:
- Ink: Terminal UI framework
- OpenAI SDK: Model API client
- node-pty: PTY support for shell tools
- keytar: Secure credential storage
Configuration directory
loaf creates a data directory on first run to store configuration, credentials, and chat history:- macOS/Linux:
~/.loaf - Windows:
%USERPROFILE%\.loaf
auth.json— OAuth tokens and API keysstate.json— Saved settings and model selectionchat-sessions/— Chat history recordstools/— Custom tool scripts (see Custom Tools)skills/— Custom skill definitions (see Creating Skills)
Running loaf
loaf has two modes:TUI mode (default)
Run the interactive terminal UI:RPC mode
Run loaf as a JSON-RPC 2.0 server over stdio:Development commands
The following npm scripts are available:| Command | Description |
|---|---|
npm run dev | Start loaf TUI |
npm run rpc | Start RPC server |
npm run typecheck | Run TypeScript type checking |
npm run test | Run test suite |
npm run test:coverage | Run tests with coverage report |
npm run spinners | View spinner gallery (dev tool) |
First run
On your first launch, loaf will:- Create the
~/.loafdata directory - Display the onboarding flow
- Prompt you to connect an AI provider (OpenAI, OpenRouter, or Antigravity)
- Optionally configure web search via Exa API
You can re-run onboarding at any time with the
/onboarding command.Next steps
Once installed, proceed to the Quickstart guide to authenticate and start using loaf.Quickstart
Complete your first setup and run your first commands
Authentication
Learn about provider authentication options