Global entrypoint
Global options
mibyan-agent (legacy single-query runner)
The install also ships mibyan-agent, a minimal runner that sends one query and exits: mibyan-agent --query "summarize README.md" (or mibyan-agent "summarize README.md"). mibyan-agent --help lists its options (--model, --base-url, --max-turns, --enabled-toolsets, --disabled-toolsets, --list-tools, --save-trajectories, …) and mibyan-agent --version prints the version; neither starts the agent. Run with no query, it prints the same help and exits. For anything else use mibyan (mibyan -z <prompt> is the scripted one-shot).
Top-level commands
mibyan chat
Examples:
--format stream-json — structured JSONL output
Use --format stream-json when a program needs to consume progress without
scraping terminal output. It requires -q / --query (or --query-file), implies
quiet non-interactive CLI mode, and rejects an explicit --tui request. Every
stdout line is one JSON object; diagnostics and the session_id: line stay on stderr.
timestamp (Unix epoch milliseconds).
Once a conversation starts, its terminal record is always
result — including
exit_code: 130 when it is interrupted with Ctrl-C. Treat that record as the
completion signal; the process exit code matches its exit_code.
Exit codes for one-shot runs
When chat answers and exits (-Q, chat --oneshot, or a query with non-TTY
stdio) the process exit code reports the turn’s outcome, on both the quiet and
the non-quiet path: 0 the turn completed; 1 it failed, stopped partway
(partial), hit the iteration budget, or never ran (credentials / agent init
failed); 130 it was interrupted. A Kanban dispatcher-spawned worker
(mibyan_KANBAN_TASK set) whose turn failed only because the provider was
rate-limited, overloaded, returning 5xx, timing out, or the account hit a
billing/quota wall, exits
75 (EX_TEMPFAIL) so the dispatcher requeues the task without counting a
failure. With --format stream-json the terminal result record carries the
same exit_code.
Delegation in finite chat runs
When chat answers and exits (-Q, chat --oneshot, or a query with non-TTY
stdio), delegate_task waits for its children and returns their results to the
parent in the same turn. Batch children still run in parallel, subject to
delegation.max_concurrent_children. The parent can use those results in its
final response before the CLI exits.
- Automatic joining: no opt-in or background-mode override is needed. Interactive TTY chat and messaging sessions keep background delegation.
- Existing safeguards: delegation limits, timeouts, cancellation, and
approvals.single_query_modestill apply. Joining does not auto-approve commands or guarantee successful child outcomes. Inspect results and verify artifacts. - Terminal completions: this does not change background terminal notification
behavior or the bounded
terminal.oneshot_completion_wait_secondsexit wait. That setting is not a delegation timeout.
mibyan -z <prompt> — scripted one-shot
For programmatic callers (shell scripts, CI, cron, parent processes piping in a prompt), mibyan -z is the purest one-shot entry point: single prompt in, final response text out, nothing else on stdout or stderr. No banner, no spinner, no tool previews, no Session: line — just the agent’s final reply as plain text.
~/.mibyan/config.yaml):
mibyan chat --oneshot -q instead; -z is explicitly for “I only want the final answer”.
Exit codes: 0 the turn completed; 2 it failed or stopped partway (partial,
iteration budget, completed: false) — even when an explanation was printed;
130 it was interrupted; 1 a completed turn produced no text at all; 2 also
for usage errors (bad flags) before the run starts. These codes intentionally
differ from chat -q/-Q above (which exit 1 for failed/partial/budget and
0 for a completed turn with no text): -z reserves 1 for “answered nothing”.
Judge the run by the exit code (or the --usage-file flags), not by whether
stdout is non-empty.
--usage-file — JSON usage report for pipelines
mibyan -z "…" --usage-file /path/report.json writes a machine-readable usage report after the run: estimated_cost_usd, input_tokens / output_tokens / cache_read_tokens / cache_write_tokens / reasoning_tokens / total_tokens, api_calls, model, provider, session_id, service_tier, the completed / failed / partial / interrupted flags and turn_exit_reason (why completed is false, e.g. max_iterations_reached(3/3)). Those top-level counters cover the main agent loop only. Auxiliary LLM calls made on the same run (title generation, vision, context compression, web_extract, background review, …) are reported separately under auxiliary — the same totals plus a per-task by_task map — and total_including_auxiliary (estimated_cost_usd, total_tokens, api_calls) is the grand total to bill on. The report is written even when the run fails, so batch pipelines can always account for spend. It has no effect outside -z/--oneshot, and a broken usage write never masks the run’s own outcome.
mibyan model
Interactive provider + model selector. This is the command for adding new providers, setting up API keys, and running OAuth flows. Run it from your terminal — not from inside an active Mibyan chat session.
- add a new provider (OpenRouter, Anthropic, Copilot, DeepSeek, custom, etc.)
- log into OAuth-backed providers (Anthropic, Copilot, Codex, Nous Portal)
- enter or update API keys
- pick from provider-specific model lists
- configure a custom/self-hosted endpoint
- save the new default into config
/model slash command (mid-session)
Switch between already-configured models without leaving a session:
/model changes apply to the current session only. Add --global to persist the change to config.yaml (or set model.persist_switch_by_default: true to make every switch persist):
What if I only see OpenRouter models?If you’ve only configured OpenRouter,
/model will only show OpenRouter models. To add another provider (Anthropic, DeepSeek, Copilot, etc.), exit your session and run mibyan model from the terminal.--global switch, provider and base URL changes are persisted to config.yaml alongside the model. When switching away from a custom endpoint, the stale base URL is cleared to prevent it leaking into other providers.
mibyan gateway
Options:
--external-supervisor is a restart-policy contract: an in-chat restart,
mibyan gateway restart, or service-restart update exits with status 75
(the CLI then waits for the supervisor’s fresh PID instead of running a
foreground gateway of its own), so the wrapper’s supervisor must
relaunch the gateway after that nonzero exit. For systemd, use
Restart=on-failure or Restart=always and do not include 75 in
RestartPreventExitStatus; for launchd, configure KeepAlive to relaunch after
unsuccessful exits. Without that policy, a requested restart leaves the gateway
stopped.
mibyan gateway enroll accepts --token, --connector-url, --gateway-id, and --wake-url. It exchanges the enrollment token with the connector and writes the resulting GATEWAY_RELAY_ID, GATEWAY_RELAY_SECRET, GATEWAY_RELAY_DELIVERY_KEY, optional GATEWAY_RELAY_URL, and (when --wake-url is given) GATEWAY_RELAY_WAKE_URL values to the active profile’s .env.
mibyan lsp
write_file and patch. Gated on git workspace detection
— LSP only runs when the cwd or edited file is inside a git
worktree.
Subcommands:
See LSP — Semantic Diagnostics for
the full guide, supported languages, and configuration knobs.
mibyan setup
mibyan setup --portal — OAuth into Nous Portal and opt into the Tool Gateway in one shot.
First run: launches the first-time wizard.
Returning user (already configured): drops straight into the full reconfigure wizard — every prompt shows your current value as its default, press Enter to keep or type a new value. No menu.
Jump into one section instead of the full wizard:
Options:
mibyan portal
status.
For configuration of the gateway itself, see Tool Gateway. For the one-shot setup path, see
mibyan setup --portal above.
mibyan whatsapp
mibyan slack
COMMAND_REGISTRY (/btw, /stop, /model, …) as a first-class
Slack slash command — matching Discord and Telegram parity. Paste the
output into your Slack app config at
https://api.slack.com/apps → your app →
Features → App Manifest → Edit, then Save. Slack prompts for
reinstall if scopes or slash commands changed.
Run
mibyan slack manifest --write again after mibyan update to pick
up any new commands.
mibyan send
~/.mibyan/.env + ~/.mibyan/config.yaml) so ops scripts, cron jobs, CI hooks, and monitoring daemons can post status updates without reimplementing each platform’s REST client.
For bot-token platforms (Telegram, Discord, Slack, Signal, SMS, WhatsApp-CloudAPI) no running gateway is required — mibyan send talks directly to the platform’s REST endpoint. Plugin platforms that need a persistent adapter still require a live gateway.
If neither a positional
message argument nor --file is provided, mibyan send reads from stdin when it is not a TTY. Exit codes: 0 on success, 1 on delivery/backend failure, 2 on usage errors.
Sending images and other media
--file is for text bodies only. To deliver an image, document, video, or audio file as a native platform attachment, reference it inside the message text with the MEDIA:<local_path> directive:
[[as_document]] to the message to deliver them as uncompressed file attachments instead:
mibyan peer
api_server platform) as a peer, then message its agents:
mibyan peer dm resolves the remote agent’s canonical Bot Chat session
over the peer’s API server, runs one agent turn there, and prints the reply
on stdout — the cross-machine twin of the local
mibyan -p <bot> chat --in ~ -c "Bot Chat" … bot-messaging command.
<peer> alone targets the peer gateway’s main agent;
<peer>/<agent> targets a named profile on a multiplexed peer (routed via
its /p/<profile>/ mirror).
When at least one peer is registered, the Bot Mode messaging protocol
(
agent.bot_mode_protocol) taught to every canonical Bot Chat automatically
includes the peer roster and the mibyan peer dm pattern, so agents discover
cross-machine teammates without SOUL edits. See
Bot Mode.
Exit codes: 0 on success, 1 on delivery/peer failure, 2 on usage errors.
mibyan secrets
~/.mibyan/.env. Currently supports Bitwarden Secrets Manager. See the full guide: Bitwarden integration.
bitwarden (alias bw) subcommands:
mibyan migrate
config.yaml to replace references to retired models or deprecated settings. A timestamped backup of the original config.yaml is taken before any rewrite (skip with --no-backup).
Common flags for migration subcommands:
Not to be confused withmibyan claw migrate(one-shot import of OpenClaw configuration into Mibyan) —mibyan migrateis the top-level config-rewrite command.
mibyan codex-runtime
~/.codex/config.toml migration that /codex-runtime codex_app_server triggers, without a chat session: Mibyan’ mcp_servers (plus installed codex plugins and the default_permissions default) are projected into the managed block for the selected profile (mibyan -p <name> codex-runtime migrate). User text outside the block is kept verbatim; a user-owned [mcp_servers.<name>] with the same name as a Mibyan server is preserved and the Mibyan projection for that name skipped (reported as preserved_user_servers). The result is validated as TOML before an atomic write; exit code is 1 when the report contains errors.
mibyan proxy
mibyan security
~/.mibyan/plugins/, and pinned npx/uvx MCP servers in config.yaml. Does NOT scan globally-installed packages or editor/browser extensions.
audit flags:
mibyan login / mibyan logout (Deprecated)
mibyan auth
Manage credential pools for same-provider key rotation. See Credential Pools for full documentation.
add, list, remove, reset, priority, refresh, status, logout, spotify. When called with no subcommand, launches the interactive management wizard.
mibyan usage
The account-limits block of the /usage slash command — Codex 5-hour / weekly windows, plan and banked
resets; Anthropic OAuth windows; OpenRouter credits — without starting a session, so shell scripts and cron
jobs can read it.
Credentials resolve exactly as they do for
/usage in a session with no live agent (the auth store, then
the credential pool); the command never adds or refreshes a credential it would not use for chat. Exit code
0 on success; 1 with a single stderr line when no credential is configured for the provider, the provider
has no usage endpoint, or the fetch fails (stdout stays empty).
--json schema (keys are stable; new keys may be added):
used_percent is null when the provider did not report the window; resets_at is ISO-8601 UTC or null
(some windows carry a free-text detail instead); plan is null when unknown.
mibyan status
mibyan cron
The cron trigger is pluggable via the
cron.provider config key. Empty
(the default) uses the built-in in-process ticker. Set it to chronos (the
NAS-managed provider for scale-to-zero hosted gateways) — configured via the
cron.chronos.* keys (portal_url, callback_url, expected_audience,
nas_jwks_url) — or name a custom provider under plugins/cron/<name>/ or
$mibyan_HOME/plugins/<name>/. An unknown or unavailable provider falls back to
the built-in, so cron is never left without a trigger. See the
cron internals doc.
mibyan kanban
default, whose DB is ~/.mibyan/kanban.db for back-compat; additional boards live at ~/.mibyan/kanban/boards/<slug>/kanban.db. The gateway-embedded dispatcher sweeps every board per tick.
Global flags (apply to every action below):
This is the human / scripting surface. Agent workers spawned by the dispatcher drive the board through a dedicated
kanban_* toolset (kanban_show, kanban_complete, kanban_request_review, kanban_request_changes, kanban_block, kanban_create, kanban_link, kanban_comment, kanban_heartbeat; orchestrator profiles also get kanban_list and kanban_unblock) instead of shelling to mibyan kanban. Workers have mibyan_KANBAN_BOARD pinned in their env so they physically cannot see other boards.
Examples:
--board <slug> flag → mibyan_KANBAN_BOARD env var → ~/.mibyan/kanban/current file → default.
All actions are also available as a slash command in the gateway (/kanban …), with the same argument surface — including boards subcommands and the --board flag.
For the full design — comparison with Cline Kanban / Paperclip / NanoClaw / Gemini Enterprise, eight collaboration patterns, four user stories, concurrency correctness proof — see the Kanban user guide.
mibyan egress
Outbound credential-injection firewall for remote terminal sandboxes. Wraps the iron-proxy daemon — a TLS-intercepting proxy that swaps opaque proxy tokens for real upstream API credentials at the network boundary, so sandboxes never hold real keys. Disabled by default; see the full Egress proxy page for setup + architecture.
Common flows
Diagnostic shortcuts
mibyan project
mibyan webhook
mibyan webhook subscribe
Subscriptions persist to
~/.mibyan/webhook_subscriptions.json and are hot-reloaded by the webhook adapter without a gateway restart. Re-running subscribe for an existing name keeps its secret and profile binding unless you pass --secret / --route-profile.
mibyan doctor
Exit status:
0 when the report lists no unresolved problems, 1 when at least one remains (including problems --fix could not repair), so a health gate or CI step can trust mibyan doctor as a check.
The API Connectivity section includes an IPv6 route check: it opens one short (2 s) IPv6 TCP connection to a known dual-stack host. A route that is advertised but only times out (a blackholed IPv6 prefix) is reported as a warning naming the remedy, network.force_ipv4: true. Having no IPv6 route at all is healthy and reported as OK; the check is skipped when force_ipv4 is already set.
Custom-endpoint config checks (both warn-only; --fix does not rewrite them):
custom_providersthat is not a YAML list (for example a string left by a badconfig set) is reported as an error naming the key and the received type — the runtime ignores every custom endpoint until it is a list again.- A legacy
custom_providerslist entry with no matchingproviders:entry (same endpoint URL) is reported with the move to make: such an entry is still served from the retired list store (the model picker and the Custom Endpoints page dual-read it) rather than theproviders:map every other surface edits, and the one-shot v12 migration that moved the list intoproviders:does not run again.
plugins.enabled: '["a","b"]', model_catalog.excluded_providers: '["openai-api"]' — the shape older config set versions wrote): every reader ignores such a string, so the plugins silently stay unmounted and the exclusion never applies. The finding names the key and the mibyan config set <key> '<literal>' command that stores a real list; the same warning appears in the startup banner. --fix does not rewrite the file.
mibyan dump
What it includes
Example output
When to use
- Reporting a bug on GitHub — paste the dump into your issue
- Asking for help in Discord — share it in a code block
- Comparing your setup to someone else’s
- Quick sanity check when something isn’t working
mibyan debug
The report includes system info (OS, Python version, Mibyan version), recent agent, gateway, GUI/dashboard, and desktop logs (512 KB limit per file), plus the update and Desktop update hand-off logs when present, and redacted API key status. By default, uploads are redacted so secrets are not included; this covers the system dump (including config values such as
fallback_providers entries and credentials in their URLs) as well as the logs, and the gateway /debug report too.
Default uploads use public paste services tried in order: paste.rs, dpaste.com.
Examples
mibyan backup
backups/, state-snapshots/) — each of those already contains its own copy of state.db.
The backup uses SQLite’s
backup() API for safe copying, so it works correctly even when Mibyan is running (WAL-mode safe).
Exit status: 0 only when every selected file landed in the archive. If some files could not be added (Backup incomplete: …), the zip is kept so the rest can still be restored, but the command exits 1 — a cron or systemd timer will not report a partial archive as success, and --keep pruning is skipped so older complete archives survive. 2 means another backup was already running.
What’s excluded from the zip:
*.db-wal,*.db-shm,*.db-journal— SQLite’s WAL / shared-memory / journal sidecars. The*.dbfile already got a consistent snapshot viasqlite3.backup(); shipping the live sidecars alongside it would let a restore see a half-committed state.checkpoints/— per-session trajectory caches. Hash-keyed and regenerated per session; wouldn’t port cleanly to another install anyway.models/,runtimes/,node/at the root of~/.mibyan(and of eachprofiles/<name>/) — regenerable runtime downloads, often tens of GB. Deeper directories with the same names (a skill’smodels/) are kept.- Browser profiles:
browser-profile/(the real-profile snapshot — copied Cookies / Login Data),browser-profiles/(live CDP profiles) at any depth, andbrowser_profiles/(the Browser Use CLI backend’s Chromium user-data dir, with its own Login Data / Cookies) at the root of~/.mibyanand of eachprofiles/<name>/. Credential stores that must never enter an archive; all are regenerated on the next launch. - Regenerable entries of
cache/at those same roots — model/plugin catalogs, stamps, browser profiles, tool-output spill. Durable artifacts stay in:cache/images,cache/audio,cache/videos,cache/documents,cache/screenshots(media delivered to or received from you) andcache/citations(the grounded-citations ledger). A deepercache/(inside a skill) is kept whole. - Unix sockets, devices, and symlinks — a zip cannot hold them; before they were excluded, a stray
gateway.sockmade every full backup reportBackup incomplete. - The
mibyan-agentcode itself (this is a user-data backup, not a repo snapshot).
Examples
mibyan checkpoints
~/.mibyan/checkpoints/ — the storage layer behind the in-session /rollback command. Safe to run any time; does not require the agent to be running.
Options
Examples
/rollback for the full architecture and the in-session commands.
mibyan import
--force only skips the confirmation prompt that fires when the target already has a Mibyan installation.
Exit status:
1 when the archive is damaged — before anything is written, every member is decompressed once and its CRC checked; if any fail, the command prints Error: backup archive is damaged (N member(s) …) with the offending members and stops with the Mibyan home untouched. Also 1 when any file from the archive could not be restored (listed under Warnings (N files skipped) and summarised as Import incomplete: …). The files that did land stay in place, but a script or the dashboard will not report a partial restore as success. Runtime files the import deliberately keeps from this machine (gateway.pid, gateway_state.json, …) and the older-backup session warning below do not change the exit status.
SQLite databases
.db members (state.db, kanban.db, response_store.db, …) are not published with a rename like ordinary files. Renaming would replace the file’s inode while a gateway, dashboard, or WebUI process still holds the old one open: that process would keep reading pre-import pages and keep writing sessions nobody else can see, and those sessions would simply be absent from the database everyone opens next — with nothing logged. Instead the imported pages are written into the existing database file, the same way /snapshot restore does it, so every open connection converges on the imported data.
If the live database cannot be replaced safely — the page copy failed and another process still holds the file open — the import leaves that database untouched and lists it under Warnings (N files skipped). Stop the holding processes and re-run.
Importing an older backup over newer work is still allowed, but it is no longer silent. When the imported state.db holds fewer messages than the one it replaced, the summary reports it:
Examples
mibyan logs
~/.mibyan/logs/ (or <profile>/logs/ for non-default profiles).
Log files
Options
A line without its own timestamp, such as a traceback frame or the rest of a multi-line message, is shown or hidden together with the timestamped line above it.
Examples
Filtering
Filters can be combined. When multiple filters are active, a log line must pass all of them to be shown:--since is active (they may be continuation lines from a multi-line log entry). Lines without a detectable level are included when --level is active.
Log rotation
Mibyan uses Python’sRotatingFileHandler. Old logs are rotated automatically — look for agent.log.1, agent.log.2, etc. The mibyan logs list subcommand shows all log files including rotated ones.
mibyan prompt-size
- System prompt total — full assembled prompt (identity, guidance, skills index, context files, memory, profile, timestamp).
- Skills index — the
<available_skills>block. This is often the largest single block when many skills are installed. - Memory and user profile — your
MEMORY.md/USER.mdsnapshots. - Prompt tiers — stable / context / volatile, matching how Mibyan layers the prompt for cache-friendliness.
- Tool schemas — the JSON for all enabled tools (the other half of the fixed per-call payload).
mibyan config
config set model.provider <provider> keeps the model: block on one route: a model.base_url /
model.api_mode left over from the previous provider is removed (and listed) when it is another
provider’s endpoint — otherwise the new provider’s key would be posted to the old endpoint and fail
with a credential error naming the wrong provider. A URL that is the new provider’s own endpoint, a
named custom_providers entry’s endpoint, or any URL under custom/local aliases stays; an
unrecognised host (a proxy, a LAN server) stays with a warning that it still applies.
Dots inside key names
mibyan config set/get/unset use . as the nesting separator, but many real
key names contain literal dots — model IDs (grok-4.6, glm-5.3-flash),
Matrix room IDs (!room:example.org), versioned provider names. Two rules
make these addressable:
- Existing keys just work. When navigating an existing mapping, an
existing literal key that matches the dotted remainder is preferred over
splitting.
mibyan config set providers.p.models.grok-4.6.supports_vision trueupdates the realgrok-4.6entry (andget/unsetresolve the same way). - Creating a new dotted key requires escaping. Escape literal dots with a
backslash:
mibyan config set 'providers.p.models.grok-4\.7.context_length' 128000creates the literalgrok-4.7key. (Quote the key so your shell keeps the backslash.)
grok-4 next to an existing grok-4.6), the
command fails with an error instead of silently writing a phantom entry the
runtime would never read.
mibyan pairing
mibyan skills
Common examples:
--forcecan override non-dangerous policy blocks for third-party/community skills.--forcedoes not override adangerousscan verdict.--source skills-shsearches the publicskills.shdirectory.--source well-knownlets you point Mibyan at a site exposing/.well-known/skills/index.json.--source browse-shsearches browse.sh’s catalog of 200+ site-specific browser-automation skills. Identifiers look likebrowse-sh/airbnb.com/search-listings-ddgioa.- Passing an
http(s)://…/*.mdURL installsSKILL.mdplus explicitly referenced files underreferences/,templates/,scripts/,assets/, andexamples/. When frontmatter has noname:and the URL slug isn’t a valid identifier, an interactive terminal prompts for a name; non-interactive surfaces (/skills installinside the TUI, gateway platforms) require--name <x>instead.
mibyan bundles
/<bundle-name> slash command. Invoking the bundle loads every referenced skill into a single combined user message. Storage: ~/.mibyan/skill-bundles/<slug>.yaml. See Skill Bundles for the YAML schema and behavior.
Subcommands:
Examples:
/bundles lists installed bundles and /<bundle-name> loads one.
mibyan curator
On a fresh install the first scheduled pass is deferred by one full
interval_hours (7 days by default) — the gateway will not curate immediately on the first tick after mibyan update. Use mibyan curator run --dry-run to preview before that happens.
See Curator for behavior and config.
mibyan moa
Configure named Mixture of Agents presets. Presets appear as selectable models under a Mixture of Agents provider in every model picker; /moa <prompt> runs one prompt through the default preset.
mibyan moa configure reuses Mibyan’ provider → model picker for each reference model and the aggregator. A preset is an execution-mode configuration, not a primary model or provider.
mibyan fallback
See Fallback Providers.
mibyan hooks
~/.mibyan/config.yaml, test them against synthetic payloads, and manage the first-use consent allowlist at ~/.mibyan/shell-hooks-allowlist.json.
See Hooks for event signatures and payload shapes.
mibyan memory
mibyan plugins install hindsight. Only one external provider can be active at a time. Built-in memory (MEMORY.md/USER.md) is always active.
Subcommands:
Provider-specific subcommandsWhen an external memory provider is active, it may register its own top-level
mibyan <provider> command for provider-specific management (e.g. mibyan honcho when Honcho is active). Inactive providers do not expose their subcommands. Run mibyan --help to see what’s currently wired in.mibyan acp
mibyan mcp
See MCP Config Reference, Use MCP with Mibyan, and MCP Server Mode.
mibyan plugins
mibyan plugins with no subcommand opens a composite interactive screen with two sections:
- General Plugins — multi-select checkboxes to enable/disable installed plugins
- Provider Plugins — single-select configuration for Memory Provider and Context Engine. Press ENTER on a category to open a radio picker.
Provider plugin selections are saved to
config.yaml:
memory.provider— active memory provider (empty = built-in only)context.engine— active context engine ("compressor"= built-in default)
config.yaml under plugins.disabled.
Git installs also record only their canonical source, exact installed revision, and
pin status in the profile-local plugins/.install-metadata.json sidecar. It does
not contain plugin config, environment values, secrets, or capability grants.
See Plugins and Build a Mibyan Plugin.
mibyan tools
Without
--summary, this launches the interactive per-platform tool configuration UI.
mibyan computer-use
mibyan computer-use install is the stable entry point for installing the
cua-driver binary used by the
computer_use toolset. It runs the same upstream installer that
mibyan tools invokes when you first enable Computer Use, so it’s safe
to use for re-running the install if the toolset toggle didn’t trigger
it (for example, on returning-user setups).
If cua-driver is already present, Mibyan checks its version and runtime
manifest. A compatible 0.20.0 or newer installation is left in place. An old or
incomplete standard installation is repaired with the current upstream
installer. Mibyan never replaces a custom binary selected through
mibyan_CUA_DRIVER_CMD; update that binary directly or remove the override.
mibyan computer-use status reports when repair is required.
The built-in computer_use toolset is the recommended Mibyan integration.
Registering raw Cua MCP tools is an alternative when you need Cua’s low-level
tool vocabulary. cua-driver skills install detects Mibyan and links Cua’s
skill pack into the Mibyan skills directory automatically.
Permission mode and capability-manifest approval
belong to runtime launch. In bounded mode Mibyan passes Cua’s canonical
--capability-manifest and --approve-capability-manifest flags. Every MCP
transport owns a private lifecycle session inside its runtime. Public session
names label cursor and session state; they do not own or share the runtime.
mibyan update automatically re-runs the upstream installer at the end
of the update if cua-driver is on PATH, so most users will not need to
call --upgrade manually. Use it when upstream ships a fix you want
right now without waiting for the next Mibyan update.
mibyan pets
You can also generate a brand-new pet from a text description with the
/hatch slash command. See Pets.
mibyan sessions
mibyan insights
mibyan claw
~/.openclaw (or a custom path) and writes to ~/.mibyan. Automatically detects legacy directory names (~/.clawdbot, ~/.moltbot) and config filenames (clawdbot.json, moltbot.json).
What gets migrated
The migration covers 30+ categories across persona, memory, skills, model providers, messaging platforms, agent behavior, session policies, MCP servers, TTS, and more. Items are either directly imported into Mibyan equivalents or archived for manual review. Directly imported: SOUL.md, MEMORY.md, USER.md, AGENTS.md, skills (4 source directories), default model, custom providers, MCP servers, messaging platform tokens and allowlists (Telegram, Discord, Slack, WhatsApp, Signal, Matrix, Mattermost), agent defaults (reasoning effort, compression, human delay, timezone, sandbox), approval rules, TTS config, browser settings, tool settings, exec timeout, command allowlist, gateway config, and API keys from 3 sources. Archived for manual review: Cron jobs, plugins, hooks/webhooks, memory backend (QMD), skills registry config, UI/identity, logging, multi-agent setup, channel bindings, IDENTITY.md, TOOLS.md, HEARTBEAT.md, BOOTSTRAP.md. API key resolution checks three sources in priority order: config values →~/.openclaw/.env → auth-profiles.json. All token fields handle plain strings, env templates (${VAR}), and SecretRef objects.
For the complete config key mapping, SecretRef handling details, and post-migration checklist, see the full migration guide.
Examples
mibyan import-agent
~/.claude) or OpenAI Codex CLI (~/.codex) setup into Mibyan. Maps CLAUDE.md/AGENTS.md instructions to memory entries, Bash(...) permission allow/deny rules to command_allowlist/approvals.deny, MCP servers to mcp_servers in config.yaml, and skill directories into ~/.mibyan/skills/. Always previews before applying; API keys and credentials are never imported.
Every successful import registers its source in
~/.mibyan/import-sync.json; mibyan import-agent --sync then re-imports any registered source whose files changed (a cron-friendly way to keep an imported Claude Code / Codex setup current). See the import guide for the full mapping tables.
mibyan serve
mibyan dashboard runs, but headless: it never opens a browser UI. The desktop app launches its own mibyan serve backend; use this command directly when you want a headless backend on a remote host. Accepts the same --host / --port / --insecure / --skip-build / --stop / --status options as mibyan dashboard below (a non-loopback bind engages the same auth gate). Requires the [web] extra; the embedded Chat socket additionally needs [pty] on a POSIX host.
Port conflicts: if the requested port (default 9119) is already held by another process (e.g. a second mibyan serve or the gateway), the command prints a machine-readable sentinel line BACKEND_PORT_IN_USE port=<port> to stdout, a human hint naming the likely holder, and exits with code 75 (EX_TEMPFAIL) instead of a generic error — so scripts and the desktop app can tell “port occupied” apart from “backend broken”. Pass --port 0 to bind a free ephemeral port (the successful boot announces the chosen port via mibyan_BACKEND_READY port=<port>).
mibyan dashboard
mibyan serve. FastAPI, Uvicorn, and the platform PTY helper are core dependencies. The web extra adds exact HTTP-stack constraints and is selected by standard PM setup through all. If dependencies are damaged, run mibyan pm repair. The embedded Chat tab requires a POSIX PTY environment, such as Linux, macOS, or WSL2. See Web Dashboard.
mibyan dashboard register
Register this install as a self-hosted dashboard with your Nous Portal account. Creates an OAuth client, writes mibyan_DASHBOARD_OAUTH_CLIENT_ID into ~/.mibyan/.env, and prints how to engage the login gate. Requires being logged in (mibyan setup).
mibyan profile
Examples:
mibyan completion
mibyan pm
Manage pinned tools, Python dependency environments, and their diagnostics.
This command does not update the Mibyan application itself.
source ./activate or PowerShell . .\activate.ps1.
Use deactivate to restore the previous shell environment. See the
developer workflow for preparation,
daily commands, dependency refresh, and test environments.
See Package management for every subcommand,
source-versus-bundle behavior, lazy-install policy, and maintainer commands.
mibyan update
--check to compare with its configured source target without applying
the update. Desktop bundles, Docker, Nix, and Termux packages retain their
external update owner. See Updating & Uninstalling.
mibyan update pulls the configured update branch (default: main). If your checkout is on another branch, Mibyan may check out the update branch before pulling. Commit branch work before updating when you want to keep it outside the update autostash flow.
Additional behavior:
- Gateway restart. After a successful update, Mibyan attempts to restart all running gateway profiles of the home being updated (its root and every
profiles/<name>under it) automatically so they pick up the new code. Gateways andmibyan-gateway*services that belong to a differentmibyan_HOMEon the same machine — another install, or a scratch home runningmibyan update— are named in the output and left alone. Usemibyan gateway restartwhen you want to restart a gateway without applying an update. - Restart-phase recovery. If the in-process restart phase aborts while importing the freshly pulled tree, supervised gateway profiles are retried through a clean Python process. Only restarts independently confirmed by systemd (
systemctl --user is-active) are reported as verified; a relaunch that merely exited 0 is recorded asrelaunch_attemptedand still fails the update conservatively. Manual gateways and serve/dashboard runtimes are never killed without a relaunch authority; they are recorded as skipped with a reason and remain in the incomplete-update report with the exact restart command. - Update receipts + fleet version check. Every run writes a machine-readable receipt to
~/.mibyan/logs/update_receipts/(pre-update fleet plan, steps, skips with reasons, restart outcome;latest.jsonpoints at the newest). After the restart phase the updater verifies each live gateway’s running code against the updated checkout and prints a per-profile version matrix; a gateway still on pre-update code fails the update (exit 1) with the exact restart command. - Local source changes. For git installs, dirty tracked files and untracked files are auto-stashed before branch checkout or pull (
git stash push --include-untracked). Interactive terminal updates ask before restoring the stash. Non-interactive updates restore it by default; setupdates.non_interactive_local_changes: discardonly on managed installs where local source edits should be thrown away after a successful pull. If stash restore conflicts or the pull fails, the stash is left in place for manual recovery. - npm lockfile churn. Before stashing or switching branches, Mibyan makes a best-effort cleanup of tracked
package-lock.jsondiffs produced by npm install/build steps. Commit or manually stash intentional lockfile edits before runningmibyan update. - Pairing data snapshot. Even when
--backupis off,mibyan updatetakes a lightweight snapshot of~/.mibyan/pairing/and the Feishu comment rules beforegit pull. You can roll it back withmibyan backup restore --state pre-updateif a pull rewrites a file you were editing. - Legacy
mibyan.servicewarning. If Mibyan detects a pre-renamemibyan.servicesystemd unit (instead of the currentmibyan-gateway.service), it prints a one-time migration hint so you can avoid flap-loop issues. - Exit codes.
0on success,1on pull/install/post-install errors,2on unexpected working-tree changes that blockgit pull.
Maintenance commands
|
mibyan uninstall [--full] [--gui] [--data] [--dry-run] [--yes] | Remove owned source-install files. --gui selects source-built desktop removal; --full also removes data. --data removes user data without deleting package-owned code. Sealed installs use their package owner for application removal. --dry-run previews the scope; --yes skips confirmation. |

