Quick Start
Get productive with XibeCode in minutes. Run your first autonomous coding session.
Get productive with XibeCode in minutes. This guide walks you through your first autonomous coding session and introduces key features.
Your First Task
The run command lets XibeCode autonomously complete coding tasks. Just describe what you want:
xibecode run "Create a Python script that prints hello world"XibeCode will read your project, create the file, and verify it works — all autonomously.
For a more realistic first task:
# Add a simple healthcheck endpoint to an Express API
xibecode run "Add GET /health that returns { status: 'ok' } and tests for it" --mode agentInteractive Chat
For iterative development and quick questions, use chat mode:
xibecode chatThis starts the interactive terminal UI. In chat mode you can:
- Ask questions about your codebase
- Request code changes step by step
- Run
/setupfor a guided provider → API key → model flow (or use/configfor quick edits) - Switch between agent personas with
/mode - Type
/exitto leave
Full command reference: Chat slash commands.
Local-first default
If you run xc or xibecode with no subcommand, it starts local chat behavior by default.
Cloud Runtime Quickstart
Use cloud mode when you want E2B-backed execution:
# Start cloud chat
xibecode cloud
# Resume an existing sandbox by sandbox id
xibecode cloud resume <sandbox-id>
# Pull sandbox workspace changes back to local
xibecode cloud pull --session <session-id>In cloud sandbox_full chat sessions, you can also use:
/cpull
/cpull --applySee Cloud & E2B Runtime for full details.
Diagnostics Bundle
When debugging issues or preparing a bug report:
xibecode diagnosticsThis generates a redacted markdown diagnostics bundle you can share safely.
Agent Modes (Personas)
XibeCode features 13 agent personas, each optimized for different tasks. Switch modes to get specialized assistance:
# In chat mode, switch personas
/mode plan # Aria the Architect - planning and analysis
/mode agent # Default mode - full coding capabilities
/mode debugger # Dex the Detective - bug hunting and fixing
/mode tester # Tess the QA Engineer - testing and quality
/mode security # Sentinel the Guardian - security audits
/mode review # Nova the Critic - code reviewsKey Personas
| Mode | Persona | Best For |
|---|---|---|
agent | Blaze the Builder | Full-stack development, building features |
plan | Aria the Architect | Understanding codebases, planning implementations |
tester | Tess the QA Engineer | Writing tests, ensuring quality |
security | Sentinel the Guardian | Security audits, vulnerability detection |
review | Nova the Critic | Code quality checks without modifications |
Currently enabled for user selection: agent, plan, review. Other modes are defined internally.
Run Command Options
xibecode run [prompt] [options]
Options:
-f, --file <path> Read prompt from a file
-m, --model <model> AI model to use
-b, --base-url <url> Custom API base URL
-k, --api-key <key> API key (overrides config)
-d, --max-iterations <num> Maximum iterations (default: 150)
-v, --verbose Show detailed logs
--dry-run Preview changes without making them
--changed-only Focus only on git-changed files
--mode <mode> Start in a specific agent mode
--cost-mode <mode> normal or economy
--provider <provider> anthropic, openai, google, groq, customExample Tasks
Build a Feature
xibecode run "Add user authentication to the Express API:
- POST /auth/register
- POST /auth/login
- JWT token generation
- Middleware to protect routes"Fix a Bug
xibecode run "The tests in test/user.test.js are failing.
Debug and fix the issues." --verboseRefactor Code
xibecode run "Refactor src/ to use TypeScript:
- Convert all .js files to .ts
- Add type annotations
- Create types.ts for shared types"Generate Tests
xibecode run "Write comprehensive tests for userController.js:
- Test all endpoints
- Test error cases
- Use Jest
- Achieve >80% coverage"Preview Changes (Dry Run)
xibecode run "Refactor authentication module" --dry-runCreate a PR
xibecode run-pr "Add input validation to all API endpoints" --draftHow XibeCode Works
When you give XibeCode a task, it follows this autonomous loop:
- Read — Analyzes your project structure, reads relevant files
- Plan — Breaks down the task into steps
- Execute — Creates/edits files, runs commands using 50+ tools
- Verify — Runs tests, checks for errors
- Iterate — Fixes any issues until the task is complete
The entire process is autonomous — XibeCode continues iterating until the task is done or it reaches the maximum iteration limit. It has built-in loop detection to prevent infinite loops.
Key Features
Smart Context Discovery
XibeCode automatically discovers related files by following imports, finding tests, and understanding project configuration.
Automatic Backups
Every file edit creates a timestamped backup. You can revert to any previous state:
# In chat mode
/revert src/app.ts # Revert to previous versionGit Integration
XibeCode can create checkpoints before making changes:
xibecode run "Refactor the database layer (create checkpoint first)"Test Integration
XibeCode auto-detects your test runner (Vitest, Jest, pytest, Go test, etc.) and runs tests to verify changes.
Safety Controls
Dangerous commands are blocked, and risky operations are flagged:
- Dry-run mode for safe previews
- Risk assessment before execution
- Command blocking for destructive operations
- Path sandboxing prevents access outside working directory
Neural Memory
XibeCode learns from your project over time. It remembers patterns, preferences, and lessons learned:
# The agent automatically stores lessons
# You can also manually teach it
xibecode chat
> Remember that we use Prisma for database access in this projectAuto-Memory (v1.1)
XibeCode automatically extracts and persists project-specific memories across sessions. Relevant memories are injected into context when you start a new task:
# View all project memories
xc memory list
# Search for specific memories
xc memory search "authentication"
# Run dream consolidation to merge and prune stale entries
xc memory dreamPermission Rules (v1.1)
Control which tools the agent can use with allow/deny/ask rules:
# Allow git commands, deny dangerous deletes, ask for other shell commands
xc settings set permissions.allow '["Bash(git *)","Read(*)","Write(*)"]'
xc settings set permissions.deny '["Bash(rm -rf *)"]'
xc settings set permissions.ask '["Bash(*)"]'Lifecycle Hooks (v1.1)
Run custom scripts at key agent events:
# Log every tool use
xc hooks add PreToolUse command "echo 'Using: $TOOL_NAME' >> audit.log"
# Notify on session end
xc hooks add SessionEnd http "https://hooks.example.com/done"Multi-Source Settings (v1.1)
Configuration is merged from multiple sources with clear priority:
# View merged settings
xc settings list
# Set a global default
xc settings set agent.defaultMode plan
# Set a project-specific override
xc settings set agent.defaultMode agent --source projectNext Steps
- Agent Modes — Deep dive into the core personas
- Configuration — Configure XibeCode for your workflow
- Tools Reference — Explore all 50+ available tools
- Cloud & E2B Runtime — Understand cloud execution, resume, and pull flows
- Chat Slash Commands —
/cpull,/commit, and other shortcuts - MCP Integration — Set up extended capabilities
- Settings — Multi-source layered configuration
- Lifecycle Hooks — Custom logic at agent events
- Auto-Memory — Persistent project memory
- Permissions — Fine-grained tool execution rules
- Examples — See more real-world tasks