Commands
Bahulam has three command surfaces: slash commands typed in the REPL, CLI flags passed when launching Bahulam, and top-level subcommands for common tasks.
Slash Commands
Type these at the > prompt. Commands are grouped by function. Many flat
commands have namespaced replacements — both forms work, but namespaced
versions are preferred.
Plan
| Command | Description |
|---|---|
/plan | Plan and task overview |
/plan status | Plan owner and task files |
/plan edit | Show editable task/plan paths |
/tasks | List project tasks |
/tasks add <text> | Add a backlog task |
/tasks active|blocked|done <text> | Append to a task list |
Status & Usage
| Command | Description |
|---|---|
/status | Session snapshot (model, auth, system info) |
/status context | Loaded .bahulam context files |
/status metrics | Progress bars and runtime metrics (aliased from /stats) |
/status cost | Credits and usage breakdown (aliased from /cost) |
/status budget <amount|clear> | Set or clear a session cost cap (aliased from /budget) |
/model | Open the interactive per-role model picker |
/model <model> | Override the coding model for the session |
/model <role> <model> | Override a specific role (reasoning, fast, orchestrator, explore, plan, verify, debug, refactor) |
/model fast|thinking|extra|max | Set a named mode; the platform maps it to a pinned model |
/model list | Show the curated (harness-validated) platform catalog |
/model status | Show active session overrides, effective backend defaults, catalog source, model counts, and last refresh time |
/model refresh | Re-pull /api/models, report backend/snapshot source and model counts, and keep session overrides unchanged |
/model clear [role] | Clear all overrides, or a single role, and return to backend defaults |
/attach <path> | Attach an image file to the next prompt |
/attach clipboard | Attach the OS clipboard image |
/attachments | List pending image attachments |
/attachments clear | Clear pending image attachments |
The live slash-command hint under the input dock includes /model status,
/model refresh, /model list, and /model clear. For example, typing
/model r suggests /model refresh.
History
| Command | Description |
|---|---|
/history | Recent conversation transcript |
/history approvals | Approval decision log |
/history last | Expand the last tool output |
/history expand [n|all] | Expand a specific tool output |
/history fold | Hide a previously expanded output |
/history checkpoint | List recent file checkpoints |
/history undo | Restore the latest file checkpoint |
/history report | Save the mission report as markdown |
Settings & Auth
| Command | Description |
|---|---|
/settings policy | Show the effective project policy |
/settings login | Sign in via browser |
/settings logout | Sign out and clear credentials |
/settings whoami | Show the currently logged-in user |
/settings quiet | Hide sub-agent inner tools |
/settings verbose | Show sub-agent inner tools |
/settings surgical | Show everything including reasoning |
Approvals
| Command | Description |
|---|---|
/auto | Session autopilot: auto-approve routine tools (dangerous still prompts) |
/auto full | Full autopilot — auto-approve every tool including dangerous tiers (mid-session equivalent of --dangerously-skip-permissions); hard safety blocks still enforced |
/auto off | Restore approval prompts |
/approvals | List session approval grants |
/approvals allow <tool> | Auto-approve one specific tool for this session |
/approvals remove <tool> | Remove one session grant |
/approvals clear | Revoke all session auto-approvals |
Worktree
| Command | Description |
|---|---|
/git | Git status |
/diff | Git diff |
/map | Show the registered project tree |
/preflight | Re-run the onboarding diagnostic |
/safety | Show safety guardrail status |
Agents
| Command | Description |
|---|---|
/agents | List built-in and local agents |
/subagents | Alias of /agents |
/agents create <name> | Scaffold .bahulam/agents/<name>.yaml |
/agents edit <name> | Open the local agent YAML for editing |
/agents sync [name] | Optionally publish local agents to the backend for account/cloud reuse |
/explore <instruction> | Spawn a read-only code explorer agent |
/review <instruction> | Spawn a code review agent |
/architect <instruction> | Spawn an architecture planning agent |
Skills
| Command | Description |
|---|---|
/skills | Open the interactive picker — ↑↓ move, Enter view SKILL.md, r remove, Esc close |
/skills list [--project|--all] | Print the installed-skills table |
/skills install <git-url|path> [--project] [--force] | Install a skill bundle |
/skills view <name> [resource] | Render SKILL.md, or a bundled resource file |
/skills remove <name> [--project] | Uninstall a skill |
/skills update <name> [--project] | Reinstall from the recorded source |
Session
| Command | Description |
|---|---|
/sessions | List resumable sessions |
/resume [id] | Resume a previous session |
/compact | Compact the conversation context |
/new | Start a fresh session |
/clear | Clear the conversation history |
/exit, /quit | Exit the Bahulam REPL |
Utility
| Command | Description |
|---|---|
/help | Show available commands |
/help all | Show every available command |
/help <group> | Show commands for a specific group |
/why | Print the agent’s reasoning for the last decision |
/map | Show the registered project file tree |
Legacy Aliases
These flat commands still work but show a hint to use the namespaced version:
| Legacy | Preferred |
|---|---|
/stats | /status metrics |
/cost | /status cost |
/budget | /status budget |
/last | /history last |
/expand | /history expand |
/fold | /history fold |
/undo | /history undo |
/checkpoint | /history checkpoint |
/report | /history report |
/login | /settings login |
/logout | /settings logout |
/whoami | /settings whoami |
/quiet | /settings quiet |
/verbose | /settings verbose |
/surgical | /settings surgical |
Top-Level Subcommands
Run these directly from your terminal shell:
| Command | Description |
|---|---|
bahulam | Start the interactive REPL |
bahulam dashboard | Open the local analytics dashboard for sessions, stats, and prompt history |
bahulam workspace open [path] | Open a local browser workspace for a folder or document |
bahulam workspace list | List recent local browser workspace sessions |
bahulam local open [path] | Alias for bahulam workspace open [path] |
bahulam sessions | List recent local sessions |
bahulam stats | Show aggregate local session statistics |
bahulam history | Show recent prompt history |
bahulam init | Scaffold .bahulam/, including .bahulam/BAHULAM.md, settings, tasks, a starter skill, and a starter command |
bahulam login | Sign in via browser (callback to bahulam.ai) |
bahulam logout | Sign out and clear credentials |
bahulam version | Show the installed version |
bahulam help | Show help text |
Agent Subcommands
| Command | Description |
|---|---|
bahulam agent list | List backend-published user-defined agents |
bahulam agent get <slug> | Show one backend-published agent definition |
bahulam agent sync | Optionally publish .bahulam/agents YAML files to the backend |
bahulam agent sync --dir <path> | Publish agent definitions from a custom directory |
Skills Subcommands
| Command | Description |
|---|---|
bahulam skills list [--all|--project] [--json] | List installed skills (aligned table by default) |
bahulam skills view <name> [resource] | View a skill’s details |
bahulam skills install <path-or-git-url> [--project] [--force] | Install a skill from a path or Git URL |
bahulam skills update <name> [--project] | Reinstall from the recorded source |
bahulam skills remove <name> [--project] | Remove a skill |
Inside the REPL, /skills opens an interactive picker with the same
subcommands available inline — see the Skills slash section above.
Local Browser Workspace Subcommands
Full walkthrough in Local Browser Workspace.
| Command | Description |
|---|---|
bahulam workspace open [path] | Start a localhost browser workspace for the selected file or folder |
bahulam workspace start [path] | Alias for open |
bahulam workspace serve [path] | Alias for open |
bahulam workspace list | List recent local browser workspace sessions |
bahulam workspace status | Alias for list |
bahulam local open [path] | Short alias for bahulam workspace open [path] |
Options:
| Option | Description |
|---|---|
--port <n> | Bind a specific 127.0.0.1 port |
--kind <name> | Override inferred kind: coding, documents, or workspace |
--no-open | Start the service without opening a browser |
--json | Print session JSON and the workspace URL |
Remote Session Subcommands
Full walkthrough in Remote Sessions.
| Command | Description |
|---|---|
bahulam daemonize [prompt] | Fork a detached background daemon; prints new session id |
bahulam list | List running daemon sessions (cwd, model, pid) |
bahulam attach <sess_id> | Attach to a running daemon; mirror events, approve/deny with a/d, Ctrl-D to detach |
bahulam stop <sess_id> | SIGTERM a daemon; flushes event log and exits |
bahulam pair get-code [name] | Ask the gateway for a 6-digit pairing code |
bahulam pair <code> [name] | Register THIS device with a code from another paired device |
bahulam pair status | Show local pairing state |
bahulam device list | List paired devices for the current user |
bahulam device revoke <device_id> | Revoke a device (kill switch) |
bahulam device whoami | Print this device’s id + pubkey fingerprint |
bahulam remote enable | Daemon dials the relay on next session start |
bahulam remote disable | Kill switch — running daemon drops relay in ≤10s |
bahulam remote status | Show current relay-connection intent |
CLI Flags
Pass these when launching Bahulam from the terminal.
| Flag | Description |
|---|---|
--model, -m <id> | Override the model for explicit-route headless or local runs |
--route, --model-route <platform|byok> | Explicit billing/credential route for backend headless --model |
--permission-mode <mode> | Set permission mode: bypassPermissions, acceptEdits, plan, auto, dontAsk |
--print, -p <prompt> | Non-interactive mode: run a single prompt and exit |
--output-format <fmt> | Output format: text (default), json, stream-json |
--system-prompt <text> | Override the system prompt |
--add-dir <dir> | Additional directory to search for CLAUDE.md |
--max-turns <n> | Maximum conversation turns before stopping |
--timeout <n> | Timeout in seconds |
--allowedTools <tools> | Comma-separated list of allowed tools |
--disallowedTools <tools> | Comma-separated list of denied tools |
--resume, --continue, -r [sessionId] | Resume the last session (or a specific session) |
--headless | Non-interactive mode: auto-approve, JSONL output to stdout |
--cache-report <file> | Write prompt-cache summary JSON to a file (headless only) |
--local | Use the bundled local runtime for agent execution; model calls still route through Bahulam Gateway |
--dangerously-skip-permissions | Skip ALL approval prompts, including dangerous tiers; hard safety blocks still apply |
--verbose, -v | Verbose output |
--debug, -d | Debug mode |
--plan | Start in planning mode (read-only, block all writes) |
--no-index | Skip project indexing on startup |
--help, -h | Show help text and exit |
--version | Print the installed version and exit |
Examples:
# Non-interactive: run a single prompt
bahulam -p "What is the entry point of this project?"
# Headless mode with a platform model override
bahulam platform --headless --timeout 300 --model deepseek/deepseek-v4-flash "Fix the bug"
# Headless mode with a BYOK model override
bahulam byok --headless --timeout 300 --model anthropic/claude-sonnet-4-6 "Fix the bug"
# Resume the last session
bahulam --resume
# Skip all approvals (use with caution)
bahulam --dangerously-skip-permissions
# Force bundled local runtime execution
bahulam --local --model claude-sonnet-4-6Backend headless --model requires an explicit route. platform uses
Bahulam-managed credentials and credit billing; byok uses your configured
provider key and records usage without platform model-credit deduction.
Interactive mode uses the model configured in Bahulam settings. Use the dashboard
or /settings to inspect or change the interactive default.
Environment Variables
See Reference → Environment Variables for the full list.
Common ones:
| Variable | Purpose |
|---|---|
BAHULAM_HOME | Override the Bahulam config directory (default: ~/.bahulam) |
BAHULAM_TOKEN | Auth token for CI/CD pipelines |
BAHULAM_PRODUCT | Product variant |
BAHULAM_NO_PREFLIGHT | Skip onboarding diagnostic on startup (1 or true) |
BAHULAM_MODEL_CATALOG_OFFLINE | Skip the background /api/models refresh; use the shipped snapshot only (1 to enable) |
BAHULAM_DAEMON_EVENTLOG | 1 starts a socket server on session_info so other terminals / paired devices can attach (Remote Sessions) |
BAHULAM_AUTO_ATTACH | 1 makes bahulam (no args) auto-attach to a live daemon for the current cwd |
BAHULAM_APPROVAL_TIMEOUT | Approval policy for unattended runs: hold (default), deny:<sec>, or allow:<sec> |
BAHULAM_RELAY_KILL | 1 prevents the daemon from dialing the relay regardless of bahulam remote enable |
BAHULAM_GATEWAY_URL | Override the gateway base URL (default https://gateway.bahulam.ai) |
BAHULAM_RELAY_URL | Override the relay base URL (default wss://relay.bahulam.ai) |
BAHULAM_LIBREOFFICE_PATH | Path to the local LibreOffice soffice executable for DOCX/PPTX preview conversion |
BAHULAM_LOCAL_SAVE_MAX_BYTES | Maximum text-backed file size the browser workspace can save |
BAHULAM_LOCAL_UPLOAD_MAX_BODY_BYTES | Maximum browser workspace upload request size |
ANTHROPIC_API_KEY / ANTHROPIC_MODEL | Direct Anthropic access + default model |
OPENAI_API_KEY / OPENAI_BASE_URL | Direct OpenAI access + endpoint override |
OPENROUTER_API_KEY | OpenRouter for BYOK |
GEMINI_API_KEY / GOOGLE_API_KEY | Google AI (Gemini) access |
DEBUG / MCP_DEBUG | Enable verbose logging |