Clients
CLI
Interactive terminal session with slash commands for Solana/Anchor development.
Install
pip install sealevel
# Requires Python 3.10+Authenticate
slm login # Opens browser, authenticates via OAuth device flow
slm logout # Clear stored credentials
slm config --show # Verify your key is setYour API key is stored securely in the OS keyring. You can also set it manually with slm config --api-key slm_YOUR_KEY.
Interactive session
Run slm with no arguments to start an interactive session. Type plain text to chat, or use slash commands:
$ slm
❯ How do I derive a PDA in Anchor?
◆ SEALEVEL
To derive a PDA, use seeds and bump in your #[account] attribute...
❯ /review src/lib.rs
◆ REVIEWING src/lib.rs
...
❯ /gen counter with increment and decrement -o src/lib.rs
✓ WROTE src/lib.rsSlash commands
Type / to see the live dropdown. 25 commands:
- Code
/review <file>— Security + deprecation review for Solana/Anchor code/migrate <file> [--write]— Upgrade to modern Anchor 0.30+ patterns/gen <description> [-o file]— Generate a complete Anchor program/tests <file> [-o out.ts]— Generate TypeScript tests- Explain
/explain-tx <signature>— Decode a Solana transaction/explain-error <code>— Decode a Solana/Anchor error code- Session
/sessions— List past sessions/resume <id>— Resume a past session/rename <name>— Rename current session/history— Show conversation history/search <query>— Search conversation history/compact [focus]— AI-summarize old history to free context/export [file]— Export session as markdown/clear— Clear conversation history (with confirmation)/undo— Undo last turn + restore modified files/retry— Redo last turn with a fresh response- Info
/status— API health + config overview/usage— Token usage and limits/copy— Copy last response to clipboard- System
/agent— Toggle agent mode — experimental/login— Authenticate via browser/config [--show]— View or change settings/rotate-key— Rotate API key/help— Show all commands/exit— Exit the session
Agent mode (experimental)
Toggle with /agent. The model can read files, search code, and run commands. Best with one action at a time:
❯ /agent
✓ Agent mode ON
❯ read src/lib.rs and add an authority check
╭─ read_file ──────────────╮
│ path: src/lib.rs │
│ ✓ 38 lines │
╰──────────────────────────╯
╭─ edit_file ──────────────╮
│ path: src/lib.rs │
│ -2 / +5 lines │
╰──────────────────────────╯
▸ Allow edit? [y/N/a] y
✓ EDITED src/lib.rsRead-only tools auto-approve. Write and execute tools ask permission. Type a to approve all of that type for the session. Use /undo to revert file changes.
Inline file references
Use @path/to/file.rs in chat to include file contents inline:
❯ What's wrong with @src/lib.rs?
# File content is automatically injected into the promptProject memory
Create a SEALEVEL.md file in your project root (or ~/.sealevel/SEALEVEL.md) to inject project-specific context into every prompt. The CLI walks from cwd to root looking for it.
Pipe mode
For scripting and CI, use -p for one-shot prompts:
slm -p "What is a PDA?" # one-shot
cat src/lib.rs | slm -p "review this code" # pipe stdin
slm -c # continue last sessionFirst-run onboarding
On first launch without an API key, the CLI prompts you to authenticate:
$ slm
◆ Sealevel v0.3.0 · sealevel.tech
Sign in to get started:
1. Browser login (recommended)
2. Paste API key manually
Choose [1/2]:Option 1 runs the device flow (same as slm login). Option 2 prompts for a key with masked input. You can skip and authenticate later with /login inside the session.
Modes
Switch between quality and fast inference:
slm config --mode quality # temp=0.0, 4096 max tokens (default)
slm config --mode fast # temp=0.3, 2048 max tokensShell completion
slm --install-completion bash # or zsh | fish