Chat Slash Commands
Reference for interactive chat slash commands in XibeCode, including setup, config, cloud pull, and commit shortcuts.
This page mirrors interactive chat behavior in packages/cli/src/ui/claude-style-chat.tsx (command list, setup wizard, and config menu).
Autocomplete and input
- Type
/and a prefix: ↑/↓ cycles matching commands; Tab fills in the highlighted command. - Tab adds a trailing space after
/model,/format, and/modeso you can type an argument immediately. - While the agent is running, your next line is queued (you see
Queued message — will run next.) instead of interrupting; after the run finishes, that line is sent automatically. - During a run, Esc aborts the current turn (not the whole session).
- Ctrl+C exits the chat app.
Status line
The footer shows model, format (auto | openai | anthropic), mode, and provider, plus idle vs working state (spinner and elapsed time when busy).
/setup — guided setup
Runs when you type /setup, or automatically on first launch if no API key is configured (needsFirstRunSetup).
Flow
- Provider preset (↑/↓, Enter to confirm, Esc cancels and returns to chat)
- Routing.run, zenllm.org, OpenAI, Anthropic, OpenRouter, Groq, DeepSeek, Google (Gemini), xAI (Grok), Moonshot (Kimi), Zhipu AI (z.ai), or Custom (you paste your own base URL).
- For a preset (not Custom): the CLI writes
provider,baseUrl, andrequestFormatto your profile, then moves to the API key step. - For Custom: you are prompted for Base URL first.
- Base URL (Custom path, or skipped for presets)
- Must start with
http://orhttps://(trailing slashes are trimmed). - If the profile had no
provider, it assumes OpenAI-compatible (provider: openai,requestFormat: openaiwhen unset).
- Must start with
- API key
- Stored locally via
ConfigManager; minimum length check (rejects very short pasted fragments).
- Stored locally via
- Fetch
/models- Uses OpenAI-style
GET {baseUrl}/modelswithAuthorization: Bearer ….
- Uses OpenAI-style
- Pick a model (↑/↓, Enter) — same apply path as
/model; on success you seeSetup complete. Type a prompt to start.
On model-list failure, you see the error and Type /setup to restart setup.
/config — quick config menu
Opens a menu: ↑/↓, Enter to choose, Esc closes.
| Item | What it does |
|---|---|
| Set Base URL (OpenAI format) | Prompts for URL; must start with http |
| Set API key | Prompts for key |
Pick model from /models | Requires base URL + key; fetches models then opens the model picker |
| Set provider | Picker: auto-detect, openai, anthropic, deepseek, openrouter, google, grok, kimi, zai, routingrun, zenllm |
| Set cost mode | normal or economy |
| Set economy model | Prompts for model id |
| Show config summary | Prints apiKey present/missing, provider, model, costMode, baseUrl, requestFormat, sandbox/runtime |
| Close | Returns to chat |
Nested pickers (provider, cost mode) use ↑/↓, Enter, Esc to cancel.
/format
- No argument: prints current
requestFormatand the effective wire (Anthropic Messages vs OpenAI chat completions), plus usage hint. /format auto | anthropic | openai— updates format and clears the cached model list (you may refetch with/model).
/model
- No argument: loads models (via your configured loader), opens the interactive picker (↑/↓, Enter), or type
/model <id>directly. /model defaultrestores the default model for the session/profile.
/mode
- No argument: opens the mode picker; filtered if you typed
/mode foobefore Enter. /mode <id>switches directly if<id>matches a known mode (e.g.agent,plan).
/help
Prints the shortcut list (/help, /mode, /format, …), reminds that normal prompts run agent mode, and notes vision: image paths or @path can attach pixels when the file exists.
/memory
/memory or /memory list — lists up to 10 auto-memories for the project (full list: xc memory list).
/memory dream— runs dream consolidation (shows created/merged/pruned counts)./memory path— prints the memory directory path.
/hooks
/hooks or /hooks list — lists registered lifecycle hooks (up to 10). Full add/remove: xc hooks CLI.
/cpull and /commit
See sections below; /cpull requires a cloud sandbox_full session with onCloudPullCommand wired. /commit requires the commit handler for that session.
Available Slash Commands (summary)
| Command | What it does | Notes |
|---|---|---|
/help | Shortcuts + vision hint | |
/mode | Mode picker or /mode <id> | |
/clear | Inserts a transcript cleared divider line | Prior lines stay in the scrollback; does not erase persisted session files |
/format | Show or set wire format | auto, anthropic, openai |
/model | Model picker or /model <id> | /model default resets |
/setup | Full setup wizard | Same steps as first-run setup |
/config | Quick config menu | See table above |
/memory | list (default), dream, path | |
/hooks | list (default) | Manage with xc hooks |
/cpull | Pull sandbox workspace locally | sandbox_full only; --apply merges new/changed files by default |
/commit | git add + commit | Auto message if no text |
/donate / /sponsor | Opens https://ai.xibebase.in | |
/exit | Persists session update, then exits |
/cpull Examples
/cpull
/cpull --apply
/cpull --apply --full
/cpull --output .xibecode/sandbox-pull-manual
/cpull --apply --forceBehavior: Without --apply, /cpull downloads the full workspace to a timestamped directory (same as the CLI). With --apply, the default is a merge: only files that are new or differ from your local copy are written; identical files are skipped. Use --apply --full to extract the entire archive over the current directory (legacy overwrite-all behavior).
/commit Examples
/commit
/commit fix: handle missing cloud session idBehavior:
/commitrunsgit add ., inspects staged files, generates a short commit message, then commits./commit <message>runsgit add .and commits with the provided message.- If no staged changes remain after
git add ., no commit is created.
Plan mode questions
When the agent asks structured questions in plan-style flows, use ↑/↓ to highlight an option and Enter to choose. If you pick custom / type yourself, type your answer and Enter. Esc from custom mode returns to the option list.
Tips
- Use
/helpanytime to re-check shortcuts for your build. - Use
/mode planfor design discussions, then/mode agentto execute. - Use
/cpullto bring validated sandbox work back to your machine without leaving chat.