Docs menu

Commands

Commands

Install

deno run -A jsr:@fathym/fai/install

Installs fai globally. Deno is required. After install, fai is available on your PATH.


fai

Start your AI workbench. Opens a session where your AI remembers everything from past sessions and helps you build.

fai

Flags:

FlagDescription
--dry-runPreview what your workbench will do without making changes
--autoNo prompts and no session picker. Continues the most recently started session on this machine (it can belong to another project), or creates one if there are none. Use --sessionId to pick one
--mcp-session=stdioRun the session MCP server over stdio, for MCP clients that start fai themselves. Pair with --auto
--previewLaunch MCP Inspector to explore all active tools
--shareOpen a public relay tunnel - share your workbench remotely
--sessionId <id>Skip the session picker and open a specific session

fai detect

Scan for AI tools, local models, and synthesis providers installed on your system.

fai detect
fai detect --models
fai detect --agents
fai detect --verify
FlagDescription
--modelsFilter results to models only
--agentsFilter results to agents only
--verifyVerify each detected item is reachable

fai orient

Orient an AI agent with your project context. Generates the agent's context file from your current workbench state.

fai orient
fai orient [content]
FlagDescription
--sourceSource type for orientation content
--fileFile input for orientation
--modeOrientation mode
--fileSuffixFile suffix to use for generated context file

fai synthesize

Configure your synthesis provider - the AI model that distills session captures into project knowledge.

fai synthesize
fai synthesize --non-interactive
FlagDescription
--non-interactiveAuto-configure without prompts
--context-window <tokens>Token budget per synthesis step. Overrides the provider default; match it to your model's context

Supported providers: ollama, lmstudio, localai, azure-openai, openrouter, groq, openai, a custom OpenAI-compatible endpoint, or capture-only

Note: ANTHROPIC_API_KEY is not supported — the Anthropic API is not OpenAI-compatible. To use Claude models, set OPENROUTER_API_KEY instead.

See Local Models → for setup with Ollama, LM Studio, and cloud API keys.


fai mcp

Manage other MCP servers: install them into every detected agent, generate skill files, and inspect them. These commands don't control fai's own two servers - those start with fai and fai serve (see MCP Server).

CommandWhat it does
fai mcp installAdd a third-party MCP server to every detected agent's config
fai mcp uninstallRemove one again
fai mcp previewOpen MCP Inspector against an installed or ad-hoc server
fai mcp generateWrite .md skill files from fai's prompts

fai mcp generate

Generate .md skill files from the fai MCP server's prompts.

fai mcp generate
fai mcp generate --output <dir>
FlagDescription
--outputDirectory to write skill files into (default: .claude/commands)
--serverMCP server binary to connect to (default: current fai binary)

Connects to the general server (fai serve --mcp=stdio), lists all prompts, and writes one .md file per prompt. Prompt / separators map to subdirectories: holonic/explain → <output>/holonic/explain.md. Claude Code reads .claude/commands/ as slash commands.

This runs automatically in the background on each fai session start for Claude Code.


fai mcp install

Install a third-party MCP server into all detected coding agent config files.

fai mcp install <url> [--name <name>] [--auth <token>] [--task <cmd>]
FlagDescription
--nameServer name/key in configs (default: URL hostname)
--authBearer auth token
--auth-headerCustom auth header name to send --auth in (e.g. LANGSMITH-API-KEY)
--taskDeno task name or command for auto-start on fai boot
--globalInstall to the global registry (~/.fai) instead of the project
--sessionInstall only for the active fai session; removed when the session ends

Writes the server's URL and auth into each agent's native MCP config. When --task is provided, the server auto-starts on every fai session.

fai mcp install https://mcp.example.com/api --name my-server --auth sk-abc123
fai mcp install http://localhost:3000/mcp --name github --task "npx @mcp/server-github"

fai mcp uninstall

Remove a third-party MCP server from every detected agent's config and from fai's registry.

fai mcp uninstall <name>
fai mcp uninstall            # pick from installed servers
FlagDescription
--globalTarget the global registry (~/.fai)
--sessionTarget the active fai session
--remove-taskAlso remove the fai:mcp:<name> deno task (default: on)

fai mcp preview

Launch MCP Inspector to preview an installed or ad-hoc MCP server.

fai mcp preview                                     # interactive selector
fai mcp preview <mcpName>                            # named server
fai mcp preview --host https://host.mcp/server       # ad-hoc
FlagDescription
--hostMCP server URL for ad-hoc preview (no registry lookup)
--authBearer auth token for ad-hoc preview

When no flags or name are provided, shows an interactive selector of installed servers. If the selected server has an auto-start task, it is spawned automatically. Inspector runs until Ctrl+C.


fai petname

Manage memorable names for sessions.

fai petname
fai petname [name] [meaning]
FlagDescription
--scopeScope for the petname
--listList all petnames
--removeRemove a petname

fai sessions

Work with session history.

fai sessions list
fai sessions list --status <status>
fai sessions list --json

fai sessions [id] capture [content]
fai sessions [id] watch

sessions list flags:

FlagDescription
--statusFilter by session status (active, sealed, archived)
--jsonOutput as JSON

sessions [id] capture flags:

FlagDescription
--fileFile to capture
--modeCapture mode
--fileSuffixFile suffix for capture
--sourceSource type
--agentTypeAgent type context

sessions [id] watch:

Captures a session's agent logs on a loop, the same way fai does while it runs, until you press Ctrl+C. Use it to keep a session capturing without the full fai start-up. With no [id], it uses FAI_SESSION_ID or asks you to pick a session.

FlagDescription
--intervalSeconds between reads (default: 30)

fai serve

Start fai's general MCP server on its own, with no session. It serves fai's workflow prompts, docs, and skills, and appears in agent configs as fai-g.

fai serve              # HTTP on port 4966
fai serve --mcp=stdio  # stdio, for MCP clients that start it themselves
fai serve --share      # HTTP plus a public tunnel

fai already starts this server alongside your session, so you only need fai serve when you want the prompts without a session. See Running the loop with fai's MCP.


fai telemetry

Turn anonymous usage analytics on or off, or check the current setting.

fai telemetry on
fai telemetry off
fai telemetry status
SubcommandDescription
onEnable usage analytics
offDisable usage analytics
statusShow whether analytics are on and your device ID prefix

Analytics are on by default. See Privacy and Telemetry for what's sent and every way to turn it off.


fai uninstall

Remove fai from your system.

fai uninstall

fai workstreams compact

Compact workstream history.

fai workstreams compact
fai workstreams compact --source <path>
FlagDescription
--sourceSource path for compaction

Coming soon

As fai evolves, new commands appear - not from a release schedule, but from how you and the community work. When patterns become common enough, they become commands.

Even the CLI grows with you.

On this page