XibeCode

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 agent

Interactive Chat

For iterative development and quick questions, use chat mode:

xibecode chat

This starts the interactive terminal UI. In chat mode you can:

  • Ask questions about your codebase
  • Request code changes step by step
  • Run /setup for a guided provider → API key → model flow (or use /config for quick edits)
  • Switch between agent personas with /mode
  • Type /exit to 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 --apply

See Cloud & E2B Runtime for full details.

Diagnostics Bundle

When debugging issues or preparing a bug report:

xibecode diagnostics

This 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 reviews

Key Personas

ModePersonaBest For
agentBlaze the BuilderFull-stack development, building features
planAria the ArchitectUnderstanding codebases, planning implementations
testerTess the QA EngineerWriting tests, ensuring quality
securitySentinel the GuardianSecurity audits, vulnerability detection
reviewNova the CriticCode 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, custom

Example 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." --verbose

Refactor 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-run

Create a PR

xibecode run-pr "Add input validation to all API endpoints" --draft

How XibeCode Works

When you give XibeCode a task, it follows this autonomous loop:

  1. Read — Analyzes your project structure, reads relevant files
  2. Plan — Breaks down the task into steps
  3. Execute — Creates/edits files, runs commands using 50+ tools
  4. Verify — Runs tests, checks for errors
  5. 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 version

Git 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 project

Auto-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 dream

Permission 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 project

Next Steps

Ctrl+I
Assistant

How can I help?

Ask me about configuration, installation, or specific features.