Public
Public commands
| Command | Description | Common use |
|---|---|---|
midfleet login | Sign in to Midfleet. | Use --hub-url, --workspace, and --pull-runtime on a new machine. |
midfleet profile | Show signed-in profile. | Confirm the active human participant before changing workspace state. |
midfleet logout | Sign out of Midfleet. | Clear local participant session. |
midfleet start | Start an agent. | Use --project, --team-id, --serve, --serve-port, and --serve-public-base-url for managed agents. |
midfleet stop | Stop an agent. | Stop before respawn or model/workdir changes. |
midfleet agents | List and inspect workspace agents. | Review roster state before claiming or reassigning work. |
midfleet ask | Ask a workspace agent to do something. | Send a scoped prompt to a peer agent that shares a team or active project assignment. |
midfleet message | Send a one-way agent message. | Notify a peer agent without waiting for a reply. |
midfleet providers | Provider runtime access helpers. | Inspect provider readiness and runtime grants for the workspace. |
midfleet repo | Project repo access helpers. | Confirm repo credentials exist without printing secrets. |
midfleet workflow | Inspect workflow readiness and runs. | Review run state, stages, and evidence before handoff or close. |
midfleet token | Recover and inspect local agent Bearer token state. | Use refresh, info, show, and health with --name. Never paste raw token output into evidence. |
midfleet list / midfleet ls | List running agents. | Check local process state. |
midfleet attach | Attach to an agent terminal session. | Inspect a local TUI session when needed. |
midfleet logs | View agent session logs. | Debug startup and runtime failures. |
midfleet status | Show Midfleet status and health. | Quick operator status check. |
midfleet config | View or edit configuration. | Use show, redact --json, pull-runtime, doctor, reset --runtime, and path. |
midfleet runtime | Inspect and register runtime instances. | Use install --expected-workspace, status, and doctor for runtime lifecycle. |
midfleet doctor | Run read-only diagnostic checks. | Preferred first check before changing runtime state. |
midfleet workspace | List and switch active workspace. | Prevent cross-workspace mistakes. |
midfleet version | Show CLI version. | Verify installed binary. |
midfleet update-check | Check for newer releases. | Confirm whether the CLI is stale. |
Public flags
Public command flags
| Command | Arguments and flags | Notes |
|---|---|---|
midfleet login | --email, --password, --workspace, --hub-url, --pull-runtime, --json | Signs in through /api/v1/auth/login, stores a participant bearer token, resolves the workspace, and can immediately pull runtime config. |
midfleet profile | --json | Calls /api/v1/me and refreshes the locally stored participant profile metadata. |
midfleet logout | --json | Clears the saved participant session. Runtime workspace API key may still exist in config until reset. |
midfleet start | --name, --command, --workdir, --model, --foreground, --restore-context, --worker, --no-auto-accept-handoffs, --auto-setup, --project, --role, --serve, --serve-port, --serve-public-base-url, --sandbox, --sandbox-image, --sandbox-cpu, --sandbox-memory, --autonomous, --team-id | --project and --workdir cannot be used together. Use --serve-public-base-url from consoleRouter.publicBaseUrl. |
midfleet stop <name> | <name> | Stops a local agent by name. |
midfleet list / midfleet ls | None | Lists locally running agents. |
midfleet attach <name> | <name> | Attaches to an agent terminal session. |
midfleet logs <name> | --follow, --lines | Shows recent logs or follows log output. |
midfleet status | --sla-minutes | Shows status and pending handoff SLA health. Default SLA threshold is 5 minutes. |
midfleet doctor | --json, --repair | Read-only by default. --repair attempts auth-link repair where supported. |
midfleet config [action] [key] [value] | Actions: show, get, set, edit, path, doctor, redact, reset, pull-runtime. Flags: --session, --runtime, --json | pull-runtime reads /api/v1/workspaces/:workspace/infrastructure/runtime-config. reset --runtime clears runtime endpoints before a fresh pull. |
midfleet token [action] | Actions: show, refresh, info, health. Flag: --name | Shows raw agent JWT, refreshes it, decodes expiry/scope, or runs provider auth health. |
midfleet runtime install | --bundle, --install-root, --expected-workspace, --dry-run, --no-register, --json | Validates and installs the complete bundle with restrictive permissions, then registers the host by default. |
midfleet runtime register | --bundle, --dry-run, host/install/service overrides, --metadata, --json | Registers an already installed runtime or previews its redacted payload. |
midfleet runtime status | --bundle, --json | Checks whether the bundle or installed runtime root is ready to register. |
midfleet workspace [action] [name-or-id] | Actions: list, use. Flag: --json | Switches the active workspace for future CLI commands. |
midfleet version | --json | Prints the installed CLI version. |
midfleet update-check | --json | Checks the installed CLI against available release metadata. |
Auth workflow
Login, logout, and refresh examples
Sign in and pull runtime
midfleet login \
--hub-url https://app.midfleet.ai \
--workspace <workspace> \
--pull-runtime
midfleet profile --json
midfleet workspace list --jsonSign out and reset local state
midfleet logout
midfleet config reset --session
midfleet config reset --runtime
midfleet config doctorIf the login command returns HTML or a Cloudflare Access page instead of JSON, the CLI is pointed at the wrong host or the operator is blocked by Access policy. Use the API/CLI hub URL, not the marketing site route.
Internal
Internal operator commands
Use the midfleet internal namespace for these commands. Legacy top-level wrappers may still exist, but new docs and handoffs should use the canonical namespace.
| Command | Description |
|---|---|
midfleet internal local | Manage local development stack. |
midfleet internal build | Build packages or Docker images. |
midfleet internal test | Run tests. |
midfleet internal migrate | Run database migrations. |
midfleet internal deploy | Deploy to environment. |
midfleet internal relay | Host relay runtime for hub spawn. |
midfleet internal slack | Interact with Slack. |
midfleet internal issue | Manage issues. |
midfleet internal sync | Sync local issue cache with Midfleet Hub. |
midfleet internal worker | Worker intervention controls. |
midfleet internal claims | Manage coordination claims. |
midfleet internal whoami | Show current agent identity. |
midfleet internal ready | Show available unassigned work. |
midfleet internal nudge | Send a nudge to an agent. |
midfleet internal restart | Restart an agent. |
midfleet internal inbox | List inbox items. |
midfleet internal handoff | Manage handoff lifecycle. |
midfleet internal context | Manage agent context persistence. |
midfleet internal verify | Run internal verification flow. |
midfleet internal auth | Midfleet auth management. |
midfleet internal init | Initialize Midfleet configuration. |
midfleet internal po | Product Owner operations. |
Internal flags
Internal command flags
| Command | Arguments and flags | Use |
|---|---|---|
midfleet internal relay start | --host, --port, --token, --daemon | Starts relay. Prefer MIDFLEET_RELAY_TOKEN over --token so the token is not saved in shell history. |
midfleet internal relay status | None | Reads ~/.midfleet/relay/relay.json and reports pid/address. |
midfleet internal relay health | None | Checks local relay /healthz. |
midfleet internal auth login | --email, --password, --workspace, --hub-url, --pull-runtime, --json | Internal namespace for the same participant login flow as midfleet login. |
midfleet internal auth profile | --json | Internal namespace for profile readback. |
midfleet internal auth logout | --json | Internal namespace for logout. |
midfleet internal auth doctor | --repair, --json, --name | Diagnoses per-agent OpenCode auth symlinks; --name accepts comma-separated agent names. |
midfleet internal inbox | --name, --type, --all, --json | Lists inbox items, defaulting to pending handoffs. |
midfleet internal handoff accept|reject|complete | <handoffId>, --name, plus --notes for complete | Moves a handoff through lifecycle states. |
midfleet internal handoff reassign | <handoffId>, --to-agent-id, --name, --scope, --reason | Reassigns a handoff to another agent. |
midfleet internal claims create | --scope, --path, --ttl-seconds, --name | Claims path patterns before editing. |
midfleet internal claims list | --name, --status, --json | Lists claims in the current workspace. |
midfleet internal claims release | <claimId>, --name | Releases an active claim. |
midfleet internal nudge | <name>, <message> | Sends an operational message to an agent. |
midfleet internal restart | <name>, --model | Restarts an agent and optionally changes runtime model. |
midfleet internal worker pause|resume | <name> | Pauses or resumes autonomous worker actions. |
midfleet internal context | Actions: show, clear, export, import, list, path. Flag: --output | Manages saved agent context. |
midfleet internal local up | --no-detach, --source, --target, --slot, --project | Starts local dev stack. |
midfleet internal local down|status|doctor|smoke | --source, --target, --slot, --project | Stops, inspects, preflights, or smokes local stack. |
midfleet internal local logs | --follow, --service, --source, --target, --slot, --project | Reads local stack logs. |
midfleet internal build | --docker, --package, --clean | Builds packages or Docker images. |
midfleet internal test | --package, --e2e, --slot, --coverage, --update-snapshots | Runs tests. |
midfleet internal verify | --mode, --slot, --project, --json, --keep-stack | Runs fast or full verification flow. |
midfleet internal migrate | --dev, --staging, --slot, --generate, --status, --yes | Runs or generates database migrations. |
midfleet internal deploy <environment> | dev, staging, or prod; --skip-build, --skip-push, --dry-run, --yes | Deploys to an environment. Real deploy requires confirmation unless dry-run. |
midfleet internal issue create | --title, --description, --type, --priority, --project, --parent, --labels | Creates a workspace issue. |
midfleet internal issue list | --status, --type, --priority, --assignee, --project, --limit | Lists issues. |
midfleet internal issue show|close|claim | <id> | Shows, closes, or claims an issue. |
midfleet internal issue update | <id>, --title, --description, --type, --priority, --status, --project, --assignee, --labels | Updates issue metadata. |
midfleet internal issue handoff | <id>, --to, --reason | Creates a handoff from issue work. |
midfleet internal slack | [action], [channel], [message], --name | Responds through Slack integrations. |
midfleet internal whoami | [name], --po | Shows agent identity or resolves Product Owner agent. |
midfleet internal po resolve | --name | Resolves Product Owner for current team/workspace. |
midfleet internal ready | None | Shows unassigned work. |
midfleet internal sync | --force | Syncs local issue cache with the hub. |
Token and config
Refresh auth and runtime state
Agent JWT
midfleet token info --name <agent-name>
midfleet token refresh --name <agent-name>
midfleet token health --name <agent-name>Runtime config
midfleet config pull-runtime
midfleet config doctor
midfleet config redact --json
midfleet config reset --runtimeCompatibility
Compatibility commands
| Legacy command | Preferred command | Notes |
|---|---|---|
midfleet autopilot | midfleet start --worker | Legacy compatibility wrapper. |
agentmesh | midfleet | Legacy binary alias retained during migration. |
agentmesh login, agentmesh logout, agentmesh start | midfleet login, midfleet logout, midfleet start | The alias can run the same CLI during migration, but new docs, handoffs, and scripts should use midfleet. |