CLI for Sealevel — the Solana-specialized coding LLM. Chat, generate Anchor programs, review code, decode errors.
Project description
Sealevel CLI
Command-line interface for Sealevel — the Solana-specialized coding AI.
Interactive terminal session with agent mode, slash commands, and Solana/Anchor developer tools.
Install
pip install sealevel
Requires Python 3.10+.
Quick Start
slm login # Authenticate via browser (OAuth device flow)
slm # Start interactive session
Or set your key manually:
slm config --api-key slm_xxxxxxxxxxxx
Interactive Session
❯ How do I derive a PDA in Anchor?
◆ SEALEVEL
[streaming response with markdown rendering]
❯ /review @src/lib.rs
◆ REVIEWING src/lib.rs
[security + deprecated pattern analysis]
❯ /explain-error 0x1771
[error decode + fix suggestion]
❯ /gen escrow with atomic token swap -o src/lib.rs
✓ WROTE src/lib.rs
Agent Mode
Toggle with /agent — the LLM can read, edit, and create files, and run commands:
❯ /agent
✓ Agent mode ON
❯ read src/lib.rs and add an authority check to increment
╭─ 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.rs
Done. Added authority check.
Tools: read_file, write_file, edit_file, run_command, glob_files, grep_files. Read-only tools auto-approve. Write/execute asks permission. Type a to approve all.
Features
- @file references —
@src/lib.rsinlines file content into chat - Project memory —
SEALEVEL.mdin project root auto-injects context - AI-powered
/compact— summarizes old conversation to free context - Auto-upgrade — notifies when newer version is available
- File checkpoints —
/undorestores files modified by agent - Persistent history — input history persists across sessions (Ctrl+R to search)
- Progressive streaming — live markdown rendering with Rich
Modes
slm # Interactive session (default)
slm -p "prompt" # One-shot pipe mode
slm -c # Continue most recent session
slm login # Authenticate via browser
slm logout # Clear credentials
slm config --show # View configuration
Pipe mode
slm -p "What is a PDA?"
cat src/lib.rs | slm -p "review this code"
Slash Commands
Type / for live dropdown. 25 commands:
Code
| Command | Description |
|---|---|
/review <file> |
Security + deprecation review |
/migrate <file> [--write] |
Migrate to Anchor 0.30+ |
/gen <description> [-o file] |
Generate Anchor program |
/tests <file> [-o out.ts] |
Generate TypeScript tests |
Explain
| Command | Description |
|---|---|
/explain-tx <signature> |
Decode a Solana transaction |
/explain-error <code> |
Decode an error code |
Session
| Command | Description |
|---|---|
/sessions |
List past sessions |
/resume <id> |
Resume a past session |
/rename <name> |
Rename current session |
/history |
Show conversation history |
/search <query> |
Search conversation |
/compact [focus] |
AI-summarize old history |
/export [file] |
Export as markdown |
/clear |
Clear history (with confirmation) |
/undo |
Undo last turn + restore files |
/retry |
Redo last turn |
Info
| Command | Description |
|---|---|
/status |
API health + config |
/usage |
Token usage + limits |
/copy |
Copy last response to clipboard |
System
| Command | Description |
|---|---|
/agent |
Toggle agent mode |
/login |
Authenticate via browser |
/config [--show] |
View/set config |
/rotate-key |
Rotate API key |
/help |
Show all commands |
/exit |
Exit session |
Configuration
slm config --api-key slm_xxxx # Set API key
slm config --api-url https://... # Custom endpoint
slm config --mode quality # 'quality' (temp=0.0, 4096 tokens) or 'fast' (temp=0.3, 2048)
slm config --show # Show current config
Config: ~/.sealevel/config.toml (chmod 600). API key: OS keyring.
License
MIT
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sealevel-0.3.0.tar.gz.
File metadata
- Download URL: sealevel-0.3.0.tar.gz
- Upload date:
- Size: 73.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5841f48007f22358acdd654c4ce2c835c485ea9f3761c2e3c52e15f45b2e605a
|
|
| MD5 |
d0851d90f6b4018e1b8755097344328b
|
|
| BLAKE2b-256 |
d1dc2a818ef574913bd18f90df00d2e98a844d0426c6e766537c8727090eccde
|
Provenance
The following attestation bundles were made for sealevel-0.3.0.tar.gz:
Publisher:
cli-publish.yml on e-man07/slm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sealevel-0.3.0.tar.gz -
Subject digest:
5841f48007f22358acdd654c4ce2c835c485ea9f3761c2e3c52e15f45b2e605a - Sigstore transparency entry: 1393353683
- Sigstore integration time:
-
Permalink:
e-man07/slm@8f28980b3d71a5b061f9d46650d1951005b2d231 -
Branch / Tag:
refs/tags/cli-v0.3.0 - Owner: https://github.com/e-man07
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cli-publish.yml@8f28980b3d71a5b061f9d46650d1951005b2d231 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sealevel-0.3.0-py3-none-any.whl.
File metadata
- Download URL: sealevel-0.3.0-py3-none-any.whl
- Upload date:
- Size: 48.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
656d29fb6bddb4759afa9ee329f688ea10530b9258b62000bd3d093a613b5bb4
|
|
| MD5 |
aeb9048c171b7c2792f694d15b35e177
|
|
| BLAKE2b-256 |
1a31038fee1bba417b1a77188f8784182ca2568f52891027452e9e43b62cdbf7
|
Provenance
The following attestation bundles were made for sealevel-0.3.0-py3-none-any.whl:
Publisher:
cli-publish.yml on e-man07/slm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sealevel-0.3.0-py3-none-any.whl -
Subject digest:
656d29fb6bddb4759afa9ee329f688ea10530b9258b62000bd3d093a613b5bb4 - Sigstore transparency entry: 1393353705
- Sigstore integration time:
-
Permalink:
e-man07/slm@8f28980b3d71a5b061f9d46650d1951005b2d231 -
Branch / Tag:
refs/tags/cli-v0.3.0 - Owner: https://github.com/e-man07
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cli-publish.yml@8f28980b3d71a5b061f9d46650d1951005b2d231 -
Trigger Event:
push
-
Statement type: