@notis_ai/cli
Agent-first Notis CLI for Spaces, Skills and generic tool execution.
Install
Requires Node.js 22.12.0 or newer (Node 24 LTS recommended). Update Node.js before installing or running the CLI; the CLI never upgrades your host runtime.
Use the Notis CLI through NPX; do not rely on an installed notis command. Run notis login once to authorize a scoped, revocable OAuth credential in the browser — that is how the CLI signs in everywhere, including on a machine that also runs Notis Desktop.
After local login, the CLI idempotently adds static Notis guidance to detected Codex and Claude Code user instruction files without changing their hooks. Run notis agents install when you explicitly want memory hooks that load the user's profile at session start, recall only new relevant memories before prompts, and save completed turns as automatic cross-session context. Codex then asks you to review and trust those hooks once in /hooks.
For CI, hosted agents, or internal scripts, pass a non-persisted token with NOTIS_JWT=<token>.
Quick Start
npx --package @notis_ai/cli@latest -- notis --help
npx --package @notis_ai/cli@latest -- notis login
npx --package @notis_ai/cli@latest -- notis doctor
npx --package @notis_ai/cli@latest -- notis spaces list
npx --package @notis_ai/cli@latest -- notis tools search "list Notis databases"
Use notis login --paste-code for the HTTPS copy-paste fallback on a remote machine.
Release channels
@latest is the only tag worth documenting, for beta accounts too.
The npm tag has to be chosen before the CLI starts, and the CLI only learns which Notis it talks to once it reads the profile — so no single install command can be right for both environments on its own. Instead the deployment answers the question: /.well-known/oauth-protected-resource/cli reports its channel, notis login pins it on the profile, and any later run that finds itself on the wrong build hands the whole invocation to the right one before it does anything else.
notis doctor reports release_channel, cli_version, and a channel check.
--api-base <url> decides the build for that one run, so a one-off call against another environment uses the matching CLI.
./dev.sh profiles and source checkouts are never re-executed: whatever you started stays in control.
NOTIS_CLI_AUTO_CHANNEL=0 disables the hand-off; doctor then reports the mismatch instead of correcting it.
Profiles
A profile is one account paired with one API endpoint. Every profile keeps its own credential, so switching between them never signs any of them out.
npx --package @notis_ai/cli@latest -- notis login --profile work
npx --package @notis_ai/cli@latest -- notis profile list
npx --package @notis_ai/cli@latest -- notis profile use work
npx --package @notis_ai/cli@latest -- notis --profile default tools search "..."
notis logout revokes and removes the OAuth grant for one profile; --all-profiles clears every one.
Credential precedence within the selected profile is: an active ./dev.sh worktree credential, then NOTIS_JWT, then the profile's OAuth grant.
./dev.sh exposes its test account as a lease-backed dev-<workspace>-<hash> profile bound to its loopback backend. The credential stays in the worktree rather than the shared account config. That synthetic profile is the default only inside its active worktree; naming any stored profile with --profile runs against that real account instead.
The CLI defaults to json output in agent or non-TTY contexts and table output in interactive terminals.
Global Flags
--json — Shortcut for --output json
--output <table|json|yaml|ndjson> — Output mode override
--non-interactive — Disable prompts
--profile <name> — Run as a stored profile instead of the active one
--api-base <url> — Override the API base for one invocation
--timeout-ms <n> — Time limit in milliseconds for each call, automatic retries included
--idempotency-key <key> — Override the generated idempotency key for mutating commands
--no-retry (or NOTIS_NO_RETRY=1): turn off automatic retries. By default the CLI retries an interrupted tool call (network error, timeout, 502, 503 or 504) when repeating it is safe: a read, or a write with an idempotency key. It makes up to 3 attempts within --timeout-ms and reports the count in meta.attempts, or error.details.attempts on a failure.
--agent-name <name>, --agent-id <id>, --agent-thread <thread>, --agent-thread-name <name> (or NOTIS_AGENT_NAME, NOTIS_AGENT_ID, NOTIS_AGENT_THREAD, NOTIS_AGENT_THREAD_NAME): the agent making the call. See Agents declare themselves.
Agents declare themselves
An agent using the CLI (Claude Code or Codex on your computer, a script, a session on your Cloud Computer) says who it is on every call, so what it writes is its own and not yours: a comment's Author is its name, the comment never counts as yours, and it never wakes the agent that wrote it. Set the variables once for the agent's session, or pass the flags on a call (a flag wins over its variable):
export NOTIS_AGENT_NAME="fred-and-the-machine" # a fresh imaginary rock-band name, shown as "Fred And The Machine"
export NOTIS_AGENT_ID="<your session id>" # your own unique id, such as your T3 thread or Codex session id
export NOTIS_AGENT_THREAD_NAME="PR #3851" # the name of the thread you work in, shown after your name
- Every agent, and every sub-agent, picks a fresh lowercase imaginary rock-band name of its own, so the person sees which one wrote: lowercase letters and digits in at least two words joined by hyphens, 3 to 60 characters, such as
fred-and-the-machine. A harness or product name (claude, claude-code, codex, cursor, cursor-agent, gemini, notis, t3, t3-code, opencode, agent, assistant, bot, also with -cli or -agent) is no band name. Anything else stops the command before it is sent (usage_error; the server answers invalid_agent_identity).
- The name is only a name; an id decides which comments are the agent's own. Set
NOTIS_AGENT_ID (or --agent-id) to your own unique id, such as your session id: 3 to 128 letters, digits and . _ : @ / + -. Without one, the CLI generates a random id the first time a name is used on a computer, keeps it in agents.json next to the CLI config file and sends it with that name on every call, so two agents with the same name on two computers are two agents.
NOTIS_AGENT_THREAD_NAME (or --agent-thread-name) names the thread you work in, whatever you call it (a T3 thread title, PR #3851): at most 80 characters on one line, shown after your name on your comments and on the Goes to line.
- The CLI tells Notis which harness runs it (Claude Code, Codex, Cursor...) from the variables that harness sets, so your comments show its logo;
NOTIS_AGENT_HARNESS (claude_code, codex, cursor_agent...) overrides it.
- The name is required whenever an id, a thread or a thread name is set. The thread is an id or link of up to 512 characters without spaces. A Notis thread of yours named in
NOTIS_AGENT_THREAD gets the replies to the agent's comments. A Notis thread you do not own is ignored; any other value (another tool's session id or link) is kept as a label.
- The declaration names the writer; it never grants access, and Notis records it as declared. A Notis agent's own Cloud Computer command already carries a signed identity, which wins over a declaration.
- A comment thread you wrote in last is yours: when the person replies or answers there, Notis wakes no agent of its own; you read the reply the next time you check (
list, thread or waiting of LOCAL_NOTIS_SPACE_COMMENT_THREADS), and until then the person sees that you have not read it yet. The person can hand the thread to a Notis thread with Change.
- Comments are being rolled out: on an account without them the comment tool is not available. Where they are on, comments written through the CLI always need a name, even when you type the command yourself: without one the comment is refused with
agent_name_required, and a declaration without an id with agent_id_required. Other writes made with your own sign-in and no declaration count as yours. The Notis assistant itself never writes comments: it starts a sub-agent, whose comments carry the sub-agent's name.
Authentication
npx --package @notis_ai/cli@latest -- notis login
Authorize a CLI profile in a browser with scoped OAuth access.
When to use: Run this once per account you want the CLI to reach. Pass --profile to add a second account without signing the first one out.
Options:
--no-browser — Print the authorization URL without opening a browser.
--print-url — Print the authorization URL even when opening a browser.
--mode <mode> — auto (default) hands the browser callback to a background listener when this command cannot wait; browser waits in-process; code shows a one-time code to copy.
--paste-code — Alias for --mode code.
--timeout-seconds <n> — Authorization lifetime in seconds (default 300 while waiting in a terminal; 1800 for detached or code hand-offs).
--scope <scope> — OAuth permission to request (repeatable). Default: every permission Notis offers the CLI.
--code <code> — Redeem the code shown in the browser after a non-interactive login.
Examples:
npx --package @notis_ai/cli@latest -- notis login
npx --package @notis_ai/cli@latest -- notis login --profile work
npx --package @notis_ai/cli@latest -- notis login --profile nightly --api-base https://api-nightly.notis.ai
npx --package @notis_ai/cli@latest -- notis login --no-browser --print-url
npx --package @notis_ai/cli@latest -- notis login --mode browser
npx --package @notis_ai/cli@latest -- notis login --mode code
npx --package @notis_ai/cli@latest -- notis login --code 4f3c2b1a
npx --package @notis_ai/cli@latest -- notis logout
Sign this computer out of one CLI profile: revoke and remove its OAuth credential.
When to use: Use this to disconnect a single account on this computer. Its sign-ins on other computers stay, and other profiles keep their credentials unless you pass --all-profiles.
Options:
--all-profiles — Clear OAuth credentials and pending authorizations from every CLI profile.
Examples:
npx --package @notis_ai/cli@latest -- notis logout
npx --package @notis_ai/cli@latest -- notis logout --profile work
npx --package @notis_ai/cli@latest -- notis logout --all-profiles
Coding-agent context
npx --package @notis_ai/cli@latest -- notis agents install
Install Notis instructions and recall/capture hooks for local Codex and Claude Code.
When to use: Run after login to give local coding agents durable Notis CLI guidance, session-start profile context, deduplicated relevant recall, and automatic completed-turn capture. Hosted Notis sandboxes are skipped unless --recall-only is given: that mode installs only recall hooks into the hosted agent's own config folder, signed in with the session's injected credential.
Options:
--codex-only — Configure only Codex.
--claude-only — Configure only Claude Code.
--no-memory-hooks — Install static instructions and remove Notis recall/capture hooks.
--recall-only — Hosted coding agents: install only recall hooks (no capture, no instructions) into CODEX_HOME or CLAUDE_CONFIG_DIR, signed in with the injected NOTIS_JWT.
--env-file <path> — With --recall-only: a shell file each hook sources first to pick up the current injected sign-in.
Examples:
npx --package @notis_ai/cli@latest -- notis agents install
npx --package @notis_ai/cli@latest -- notis agents install --codex-only
npx --package @notis_ai/cli@latest -- notis agents install --claude-only
npx --package @notis_ai/cli@latest -- notis agents install --no-memory-hooks
npx --package @notis_ai/cli@latest -- notis agents install --recall-only --codex-only
Skills
npx --package @notis_ai/cli@latest -- notis skills list
List every Skill you can see, with its kind, editability and Space links.
When to use: Find a Skill and its exact edit target before reading or editing it, or see what a Space and its sub-Spaces list. Links to Spaces you cannot open are omitted; an unavailable link gives no access.
Options:
--space <id> — Only Skills listed by this Space and, by default, its sub-Spaces.
--no-child-spaces — With --space: direct links of that Space only.
--include-disabled — Include Skills you disabled.
--after <cursor> — Continue from the next cursor of the previous page.
--limit <n> — Page size between 1 and 100 (default 50).
Examples:
npx --package @notis_ai/cli@latest -- notis skills list
npx --package @notis_ai/cli@latest -- notis skills list --space <space-id> --no-child-spaces --json
npx --package @notis_ai/cli@latest -- notis skills create <file>
Create a native Skill, standalone or linked to an editable Space.
When to use: Create complete instructions or files without provider installation. Choose an optional Space destination, dry-run, and keep the exact request key on retry.
Options:
--request-id <key> — Stable creation intent key; reuse after an uncertain reply.
--dry-run — Validate without creating an identity or uploading files.
Examples:
npx --package @notis_ai/cli@latest -- notis skills create ./skill.json --request-id create-1 --dry-run
npx --package @notis_ai/cli@latest -- notis skills settings read <skill-id>
Read a native Skill personal enablement, agent targets and settings revision.
When to use: Inspect direct-owner preferences without changing shared instructions or Space access.
Examples:
npx --package @notis_ai/cli@latest -- notis skills settings update <file>
Update personal native Skill settings with a current revision and stable retry key.
When to use: Enable or disable your agents without changing a shared Skill definition or another Space.
Options:
--request-id <key> — Stable settings intent; reuse after a lost reply.
--dry-run — Validate current ownership and revision without changing settings.
Examples:
npx --package @notis_ai/cli@latest -- notis skills read [skill-id]
Inspect a native Skill through direct ownership or an editable Space link.
When to use: Read the exact target and content version before editing. A Skill ID opens your own Skill, or a Space Skill through a Space where you are an Editor, and answers that link as its target; a Space target uses its current Editor authority, never a personal fallback. A refusal names the Skill and what is missing.
Options:
--files — Include every verified supporting file as base64.
--target <json> — Exact {skill_id} or {space_id,binding_id} read target; do not combine with a Skill ID.
Examples:
npx --package @notis_ai/cli@latest -- notis skills read <skill-id> --files
npx --package @notis_ai/cli@latest -- notis skills read --target '{"space_id":"<id>","binding_id":"<binding>"}' --files
npx --package @notis_ai/cli@latest -- notis skills update <file>
Edit a native Skill through its direct or Space target, preserving its ID and supporting files.
When to use: Use the target/version from skills list or skills read, dry-run, then reuse the same request key and bytes to save or recover a lost reply. The same edit file works for a standalone or a Space target; an optional links key changes where the Skill is listed in the same transaction.
Options:
--request-id <key> — Stable edit intent key; reuse after lost replies.
--dry-run — Check current access, content and revisions without uploading or saving.
Examples:
npx --package @notis_ai/cli@latest -- notis skills update ./skill-edit.json --request-id edit-1 --dry-run
npx --package @notis_ai/cli@latest -- notis skills links <skill-id>
Add, remove or move a Skill between Spaces; the Skill keeps its ID.
When to use: Change where a Skill is listed without editing its content. A move is one add plus one remove in one transaction. You must be an Editor of every Space you touch and able to edit the Skill; removing its last available link keeps it as your own standalone Skill.