Quickstart
Zero-to-first-prompt in about five minutes. Assumes a ScaiGrid
endpoint and either a ScaiKey account or a ScaiGrid sgk_live_...
API key.
1. Install#
Pick one. Both end up with a scaiflux command on your $PATH.
Option A — standalone binary (no Python needed)#
The simplest option for end users. One file, no dependencies.
1 2 3 4 5 6 7 8 9 10 11 12 | |
Make sure ~/.local/bin is on $PATH (most shells already do this;
if not, add export PATH="$HOME/.local/bin:$PATH" to your rc file).
Linux x86_64 only at v0.1.0 — see Install for full
details and troubleshooting.
Option B — Python install (devs / contributors)#
Use this if you want to hack on ScaiFlux itself, or if you need the MCP client or plugin entry-point discovery (neither is in the binary).
1 2 3 4 5 | |
Or via pipx for the wheel without cloning:
1 | |
2. Setup#
Recommended — run the wizard:
1 | |
Three prompts: pick an endpoint (defaults to ScaiLabs ScaiGrid at
https://scaigrid.scailabs.ai), paste a ScaiGrid API key
(sgk_live_...), pick a default model from the discovered catalog,
and optionally scaffold .scaiflux.json + SCAIFLUX.md in the
current directory. The session is cached in
~/.scaiflux/credentials.json (mode 0600). scaiflux logout wipes
it.
Already have an OAuth-capable ScaiKey account and prefer the browser
flow? Skip the wizard and run scaiflux login directly:
1 2 3 4 5 | |
Or fully headless with an API key (no wizard prompts):
1 2 3 | |
3. Verify#
1 | |
Expect a report along these lines:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
Counts vary by host — git_available and sandbox_available flip to
warnings if the binary isn't installed. mcp_servers and plugins
report the configured surface; both are empty until you add servers /
plugins.
4. First prompt#
1 | |
You'll see the response stream to stdout.
5. Scaffold a workspace#
1 2 | |
Creates:
.scaiflux.json— starter config (model,permissions.mode,hooks).SCAIFLUX.md— project memory file, loaded into every system prompt..gitignore— appends.scaiflux/sessions/and.scaiflux/settings.local.json.
Open .scaiflux.json to see the defaults; open SCAIFLUX.md to write
project-specific guidance for the assistant.
6. First tool invocation#
Default permission mode from scaiflux init is workspace-write. Try:
1 2 | |
The assistant invokes write_file inline; you'll see a tool_use block
roundtrip, then the synthesis.
7. REPL#
1 | |
Inside:
1 2 3 4 5 | |
Tab completion covers slash commands, the models discovered at login, permission modes, and recent session IDs.
8. Permission modes#
Lock the assistant down:
1 2 | |
Interactive approval per call:
1 2 | |
Unattended danger mode (skips all prompts):
1 | |
9. JSON output#
For scripts / pipelines:
1 | |
The JSON envelope includes message, model, iterations,
stop_reason, tool_uses, tool_results, usage, estimated_cost,
and auto_compaction (non-null when the token window filled).
10. Resume / replay / fork a session#
Every run persists to .scaiflux/sessions/<id>.jsonl. Resume the most
recent:
1 | |
Or by id: --resume session_1745....
Inspect or branch a stored session without resuming it:
1 2 3 | |
Inside the REPL, the same actions live under /session {list,resolve,replay,fork}.
10b. Edit project memory#
1 2 3 4 | |
Three memory files are recognized: SCAIFLUX.md, SCAIFLUX.local.md,
.scaiflux/instructions.md. They're loaded into the system prompt in
that order on every turn.
10c. Workflow run mode#
Each workflow that has a clear action accepts a run argument that
executes the generated artifact (opt-in, never automatic):
1 2 3 4 5 | |
Without run, the workflows are read-only.
11. Add a plugin (optional)#
Plugins are directories with a plugin.json manifest. Minimal example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
Register it in .scaiflux.json:
{
"plugins": {"externalDirectories": ["./external-plugins"]},
"enabledPlugins": {"hello@external": true}
}
Verify:
1 2 | |
The hello_echo tool is now in the registry and the model can invoke
it like any built-in tool.
12. Configure an MCP server (optional)#
If you installed with [mcp], add a server to .scaiflux.json:
{
"mcp": {
"servers": {
"search": {"command": "uvx", "args": ["mcp-search"]}
}
}
}
Verify startup:
1 2 | |
Its tools appear as search__<tool> in the registry.
Where to go next#
USAGE.md— full subcommand + flag table + slash command inventory.PARITY.md— parity harness overview; runpytest tests/parity -q.CLAUDE.md— architecture map for contributors.ROADMAP.md— post-v0.1.0 backlog.
Troubleshooting#
| Symptom | Fix |
|---|---|
No inference credentials found |
Run scaiflux login, or set SCAIGRID_API_KEY + SCAIGRID_BASE_URL. |
Stored ScaiKey token is expired |
scaiflux login --refresh (or scaiflux login for a full re-auth). |
No model configured |
Pass --model <slug>, set model in .scaiflux.json, or re-run scaiflux login and pick a default. |
| Tool blocked unexpectedly | scaiflux status — check active permission mode. Raise with --permission-mode workspace-write. |
| MCP server not listed | pip install -e ".[mcp]" then scaiflux mcp status to see the failure reason. |
| Prompt hangs on an interactive approval | You passed --permission-mode prompt. Type y<Enter> / n<Enter> on stdin. |
auto_compaction never fires |
Lower the threshold: export SCAIFLUX_AUTO_COMPACT_INPUT_TOKENS=5000. |