XibeCode

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 /mode so 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

  1. 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, and requestFormat to your profile, then moves to the API key step.
    • For Custom: you are prompted for Base URL first.
  2. Base URL (Custom path, or skipped for presets)
    • Must start with http:// or https:// (trailing slashes are trimmed).
    • If the profile had no provider, it assumes OpenAI-compatible (provider: openai, requestFormat: openai when unset).
  3. API key
    • Stored locally via ConfigManager; minimum length check (rejects very short pasted fragments).
  4. Fetch /models
    • Uses OpenAI-style GET {baseUrl}/models with Authorization: Bearer ….
  5. Pick a model (↑/↓, Enter) — same apply path as /model; on success you see Setup 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.

ItemWhat it does
Set Base URL (OpenAI format)Prompts for URL; must start with http
Set API keyPrompts for key
Pick model from /modelsRequires base URL + key; fetches models then opens the model picker
Set providerPicker: auto-detect, openai, anthropic, deepseek, openrouter, google, grok, kimi, zai, routingrun, zenllm
Set cost modenormal or economy
Set economy modelPrompts for model id
Show config summaryPrints apiKey present/missing, provider, model, costMode, baseUrl, requestFormat, sandbox/runtime
CloseReturns to chat

Nested pickers (provider, cost mode) use ↑/↓, Enter, Esc to cancel.

/format

  • No argument: prints current requestFormat and 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 default restores the default model for the session/profile.

/mode

  • No argument: opens the mode picker; filtered if you typed /mode foo before 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)

CommandWhat it doesNotes
/helpShortcuts + vision hint
/modeMode picker or /mode <id>
/clearInserts a transcript cleared divider linePrior lines stay in the scrollback; does not erase persisted session files
/formatShow or set wire formatauto, anthropic, openai
/modelModel picker or /model <id>/model default resets
/setupFull setup wizardSame steps as first-run setup
/configQuick config menuSee table above
/memorylist (default), dream, path
/hookslist (default)Manage with xc hooks
/cpullPull sandbox workspace locallysandbox_full only; --apply merges new/changed files by default
/commitgit add + commitAuto message if no text
/donate / /sponsorOpens https://ai.xibebase.in
/exitPersists session update, then exits

/cpull Examples

/cpull
/cpull --apply
/cpull --apply --full
/cpull --output .xibecode/sandbox-pull-manual
/cpull --apply --force

Behavior: 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 id

Behavior:

  • /commit runs git add ., inspects staged files, generates a short commit message, then commits.
  • /commit <message> runs git 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 /help anytime to re-check shortcuts for your build.
  • Use /mode plan for design discussions, then /mode agent to execute.
  • Use /cpull to bring validated sandbox work back to your machine without leaving chat.
Ctrl+I
Assistant

How can I help?

Ask me about configuration, installation, or specific features.