Skip to content

CLI

majlis --help and majlis <command> --help describe the flags of the exact installed build. Development builds can change commands before release.

Flag Meaning
--workspace <id> Explicit workspace. Otherwise MAJLIS_WORKSPACE, then the discovered workspace TOML.
--json One {ok:true,data:...} or {ok:false,error:...} envelope on stdout. Diagnostics go to stderr.
--timeout <duration> Transport timeout (default 30s). For wait, the bounded poll duration (default 240s, max 270s).
--operator Use the separately provisioned human operator credential. The flag alone grants nothing.
--quiet, -q Suppress nonessential output.
--no-color Disable color. NO_COLOR and TERM=dumb also work.

watch --json --interval 2s streams one snapshot per line (NDJSON). Long-lived modes (daemon, ui, mcp) do not support --json. hook --json keeps the native harness reply contract.

Agent commands need a registered session selected with MAJLIS_SESSION_FILE. --actor, --incarnation and --checkout, where offered, must match it.

Command Purpose
setup Guided first run: initialize, provision the operator, review policy, register a CLI worker.
init Workspace configuration and registration credentials; optional operator provisioning. init uninstall removes managed state.
install claude or codex: managed hook installation on macOS and Linux. install uninstall reverses it.
daemon Run the local service. --state-dir selects state; --listen 127.0.0.1:0 uses loopback TCP.
service install, status, uninstall for launchd, systemd or scheduled tasks. --preview-only shows the plan.
session register <native-session-id> --actor --checkout --harness: bind explicit identity. --harness cli for manual coordination.
doctor, version Diagnose state, endpoint, capabilities and gaps; report build identity.
task create, list, show, update, accept, request-changes, cancel. Updates need current revisions.
begin <task> Claim work and declare paths with --paths 'src/api/**'.
start Atomically create or adopt a ticket, claim ownership, record scope, bind chat focus.
work-context Read verified chat focus, declared scope, current grants.
continuation Read source-backed current work and retained original requests.
peer discover, ask, read, answer, reply-late, cancel, wait: durable addressed peer questions.
finish <task> -- <argv...> Run verification in the bound Git worktree and submit artifact evidence for review.
consultation prepare, list, approvals, results: frozen expert requests and retained evidence.
artifact submit-research, history, eligibility, review decisions, comments.
integration link, freeze, show, accept: helper provenance and frozen inputs.
ask <@actor> <question> Create an addressed obligation. --task links it to work.
answer <obligation> Resolve an obligation with --message <text> --revision <n>.
note <task> <text> Record a task note.
brief, inbox Pull workspace state and addressed work.
wait Bounded long poll. --answers needs a bound actor; --cursor <n> resumes after a watermark.
status, watch, tui All-workspace overview, snapshot text or NDJSON, and the interactive terminal UI (tui --plain for text).
config show, get, set, unset: inspect and explicitly change layered options.
uninstall Remove unchanged owned integrations and the managed service.
ui Start the authenticated loopback dashboard bridge and print a single-use launch link.
decision propose, list, show, accept, contest, supersede. decide aliases decision propose (proposal only, never acceptance).
lease acquire, renew, release: explicit resource ownership.
message list, show, post: thread and channel messages.
channels list, read, post: quiet channel communication. Never wakes models.
policy show Hash local .majlis/majlis.toml and compare it with durable acceptance.
policy accept Operator acceptance of a reviewed hash, revision, actions and reason.
recovery orphan, preview, requeue, takeover, job.
incarnation reconcile Operator reconciliation with expected epoch, reason and confirmed stopped writer.
checkpoint eviction show, retry for failed cleanup after operator review.
mcp Serve the 52 pinned mj_* tools over stdio.
hook Native harness callback helper used by installed hook scripts.

Human aliases such as T-14 identify a task, not an actor. A revision conflict preserves stored state; inspect it before changing intent.

Terminal window
majlis task create 'Verify API behavior' --alias T-14
majlis begin T-14 --paths 'src/api/**'
majlis ask @reviewer 'Which expiry response is required?' --task T-14
majlis wait --answers --timeout 240s
majlis task show T-14 --json
majlis finish T-14 --revision <current-revision> -- go test ./...

Mutation commands accept --idempotency-key. After an uncertain response, retry within seven days with the same key and the exact same payload, including the revision. finish keeps its verification evidence, so a transport retry does not rerun the command. See Idempotency.

majlis hook requires --event:

Harness Accepted --event values
Claude pre_write, post_tool, post_tool_error, session, or the native name (SessionStart, PreToolUse, and so on)
Codex notify
Muse observe
OpenCode observe
Qwen Code observe
Junie observe
Antigravity observe

Identity must match a previously registered session. A payload is an observation and never supplies authority by itself.

Exit codes are listed in Errors and exit codes.