Norexus CLI (nrx) is the developer operating layer for Norexus. It routes
prompts to installed local CLIs (Codex, Claude, Gemini CLI, GitHub Copilot,
Antigravity, Hermes), manages local stack orchestration, auth sessions, MCP
servers, and developer utilities — all from one terminal-first interface.
CLI-to-CLI only: no desktop apps, no required API keys for basic usage.
v0.1.0 — Developer Preview. Requires a Norexus account and GitHub repository access. Contact jack@norexus.app for access or licensing.
npm install -g github:JacquesPerrin/norexus.cli
nrx --versionOr link locally for development:
git clone https://github.com/JacquesPerrin/norexus.cli norexus.cli
cd norexus.cli
npm install
npm link
hash -r
which nrx
nrx --versionnrx loginYour browser opens https://auth.norexus.app/cli/<code>. Sign in and approve. The CLI polls and stores a session automatically.
nrx whoami # verify session
nrx stripe statusNo environment variables, database passwords, or Supabase keys are required on your machine.
If the CLI reports that Auth is not ready, the service is temporarily unavailable — try again shortly or contact Norexus support.
nrx
nrx --theme mono
nrx --theme noir
nrx --banner full
nrx dashboard
nrx --no-header
nrx --version
nrx chat
nrx chat --run
nrx chat --simple
nrx chat --tool claude
nrx chat --tool hermes
nrx chat --mcp shadcn --mcp supabase
nrx ask "fix the login bug"
nrx route "plan the repo architecture"
nrx doctor
nrx dev-up
nrx stack up
nrx stack status
nrx stack down
nrx multitask --task "pnpm dev" --optional --task "stripe listen"
nrx dev:stack
nrx ping
nrx account
nrx login
nrx logout
nrx env
nrx env prod
nrx app list
nrx app open hotel
nrx mcp list
nrx mcp presets
nrx mcp add-preset shadcn
nrx mcp auto
nrx mcp status
nrx stripe status
nrx stripe login
nrx stripe listen
nrx stripe trigger checkout.session.completed
nrx stripe openRun several shell commands in parallel from your current working directory. Each line of child stdout/stderr is prefixed with [taskName] so logs stay readable.
Task syntax
--task "<shell command>"— runs in a login shell ($SHELL -lcon macOS/Linux). Tasks are required by default (non-zero exit fails the command after shutdown).--task "name::command"— sets a shortnameused in the prefix. Only the first::splits name and command (so URLs and single:stay inside the command).--optional— marks the next--taskwhen placed immediately before--task. If the next token is not--task, it marks the previous task (the one you just defined with--task "<...>").
Interrupts
- First Ctrl+C sends SIGINT to all children, waits for them to exit, then prints a summary (succeeded vs failed, including which required tasks failed).
- Second Ctrl+C within about two seconds SIGKILLs stragglers (local dev escape hatch).
Examples
nrx multitask --task "run platform dev" --task "run auth dev" --task "stripe listen"
nrx multitask --optional --task "stripe listen" --task "pnpm dev"
nrx multitask --task "api::cd apps/api && npm run dev" --task "web::pnpm dev"Runs the same multitask runner with repo paths resolved from the Norexus workspace (parent of norexus.cli by default, or NOREXUS_WORKSPACE_ROOT if set):
- Platform —
NOREXUS.MONO-main/personal/web, port 1001 (package.jsondevscript when present, otherwise same Next dev invocation asnrx stack). - Auth —
NOREXUS.AUTH-main, port 1003 (same discovery). - Hotels —
NOREXUS.HOTEL-main, port 1006, only if that folder has apackage.json. - Stripe —
stripe listenwith the same default--forward-toasnrx stripe listenwhen the Stripe CLI is onPATH; otherwise skipped with a log line. - Supabase — one-shot
supabase statusin the workspace root when the Supabase CLI is onPATH; always optional (failure does not faildev:stack).
This preset is local development only; it does not open shells against remote production.
nrx stripe forwards to the Stripe CLI binary on your PATH (stripe). nrx stripe status runs stripe whoami (account identity). Use this for local webhook development against apps that expose POST /api/stripe/webhook (typical Next.js route), including work under the Norexus AI LLC Stripe business profile—log into the intended account with stripe login first.
Install the Stripe CLI if which stripe fails; the wrapper prints a short install link.
Commands:
nrx stripe status
nrx stripe login
nrx stripe listen
nrx stripe listen --forward-to http://127.0.0.1:3000/api/stripe/webhook
nrx stripe trigger checkout.session.completed
nrx stripe openWhen --forward-to is omitted, nrx stripe listen defaults to:
http://localhost:3000/api/stripe/webhook
All other flags and arguments are passed through to stripe listen. The wrapper does not print or persist secret keys; avoid piping Stripe CLI output into logs.
Example env placeholders for application repos (not required for the CLI itself) live in this package as .env.example.
The active terminal header is Node-based and lives in ui/header.js. The older
Python ui/header.py file is not used by the linked nrx command.
The default command header is compact and monochrome:
nrxThe full dashboard is a Norexus control pane with Account, Environment, Norexus Apps, and Router Status sections:
nrx --banner full
nrx dashboardInside chat, the full dashboard is shown once at startup. Use /dashboard to
render it again on demand.
config.json supports:
{
"showHeader": true,
"theme": "mono",
"defaultMode": "dry-run"
}Themes:
mono
noir
gold
pistachio
amber
Examples:
nrx --theme mono
nrx --theme gold doctor
nrx --no-header ping
NO_COLOR=1 nrxNormal user setup does not require NOREXUS_SUPABASE_* or any Supabase anon key on your machine. The CLI talks to Norexus Auth over HTTPS (https://auth.norexus.app by default): POST /api/cli/start, GET /api/cli/poll, POST /api/cli/revoke, GET /api/cli/whoami, and POST /api/cli/audit. Pairing and bearer tokens are enforced in the Auth project database (see NOREXUS.AUTH-main/supabase/migrations/).
| Variable | Purpose |
|---|---|
| (none required) | Production login uses the default Auth origin below. |
NOREXUS_AUTH_URL |
Dev only. Point the CLI at a local Auth app (e.g. http://localhost:1003). |
NOREXUS_CLI_SESSION_PATH |
Optional. Override session JSON path (default ~/.config/norexus/cli-session.json, or %APPDATA%\\Norexus\\cli-session.json on Windows). |
Default Auth base: https://auth.norexus.app. Override with NOREXUS_AUTH_URL only (no other env aliases).
Developers run Auth locally with Supabase env on the Auth process only — nrx login does not use a DB password or service role on your laptop. Apply schema from the Auth repo:
NEXT_PUBLIC_SUPABASE_URL,NEXT_PUBLIC_SUPABASE_ANON_KEY— browser session +/clipage.SUPABASE_SERVICE_ROLE_KEY— server only for/api/cli/*routes (mint bearer, poll, revoke, audit).
Apply migrations from NOREXUS.AUTH-main (supabase db push). CLI bearer support: 20260513120000_cli_http_bearer_poll.sql (extends 20260512120000_cli_device_session_audit.sql).
nrx login— Calls AuthPOST /api/cli/start, prints a user code, opens{authBase}/cli/<user_code>(path-based verification URL) in your browser, then pollsGET /api/cli/polluntil the device is approved. The CLI stores a short-lived bearer-style session token (plus user id, email, role, expiry metadata) in the session file with mode 0600 (and tries 0700 on the parent config directory on Unix). Scope: developer/product access for privileged local commands — not ops tier controls or production shells.nrx whoami— Prints session fields from disk. Pass--liveto verify the token withGET /api/cli/whoamion Auth.nrx logout— CallsPOST /api/cli/revokewhen asessionTokenis present (server revoke + audit), then deletes the local session file.
These fail with a clear message until nrx login has completed successfully:
nrx dev-up, nrx stack …, nrx env prod, nrx multitask …, nrx dev:stack
nrx stripe … does not require a Norexus CLI session; it only shells out to the Stripe CLI on your PATH (use stripe login for Stripe’s own auth).
Valid sessions emit a server-side cli_audit_events row via POST /api/cli/audit when possible, and append a local line to logs/cli_privileged.jsonl.
- Auth app: pairing UI lives at
/cli/<user_code>(legacy/cli?user_code=redirects there). Unsigned users hit/login?redirect=/cli/<user_code>(safe internal path). - Database: RPCs (
nrx_claim_cli_device,nrx_cli_user_approve_device, etc.) exist only after migrations are applied to the Auth Supabase project (supabase db pushfromNOREXUS.AUTH-main— no DB password on CLI workstations).
Norexus platform scaffold state is stored locally in:
config/norexus.json
This is scaffold-only. It does not implement real authentication, launch apps, or require API keys.
Local scaffold (see config/norexus.json) only affects nrx account when no CLI session exists. After nrx login, nrx account reflects the Auth-backed CLI session instead.
nrx accountTo sign out of the paired CLI session (server revoke + delete session file) and reset the scaffold account row in config/norexus.json, use nrx logout (or /logout inside nrx chat).
Environment mode commands:
nrx env
nrx env dev
nrx env prodnrx env prints the current Norexus platform mode. dev and prod persist to
config/norexus.json.
App shortcut commands:
nrx app list
nrx app open ai
nrx app open platform
nrx app open auth
nrx app open hotel
nrx app open vault
nrx app open audit
nrx app open memory
nrx app open network
nrx app open apiFor now, app shortcuts only return scaffold messages. Route targets will be added later.
nrx dev-up
nrx stack up
nrx stack status
nrx stack downnrx dev-up starts the local Norexus showcase stack, seeds mock demo data, and
opens the core apps in browser tabs. It sets NOREXUS_DEV_SHOWCASE=true for
local development only.
Ports:
Platform platform.norexus.localhost:1001
AI ai.norexus.localhost:1002
Auth auth.norexus.localhost:1003
Vault vault.norexus.localhost:1004
Audit audit.norexus.localhost:1005
Hotels hotels.norexus.localhost:1006
Relations relations.norexus.localhost:1007
API api.norexus.localhost:1008
CLI cli.norexus.localhost:1009
The showcase bypass is guarded to localhost-style hostnames, disabled in
production and Vercel environments, and writes local audit events under
logs/stack/.
nrx chatChat shows the header once, prints a short welcome, keeps one compact status line, then routes normal messages automatically.
Fallback mode for basic terminals:
nrx chat --simpleRun mode and forced tools:
nrx chat --run
nrx chat --dry-run
nrx chat --tool claudeAttach MCP context:
nrx chat --mcp shadcn --mcp supabasePlain prompt example:
nrx> fix the Supabase auth bug
Selected: Codex
Confidence: 95%
Mode: dry-run
Command: codex "..."
Shell commands are blocked by default for safety:
nrx> cd ..
This looks like a shell command. Run it in your terminal, or use /shell if enabled.
/shell <command> is intentionally non-executing unless shell support is added
later.
Slash commands are grouped in /help:
Core: /help /commands /exit /clear
Routing: /tool /mode /last /rerun /theme
Account: /login /logout /account
Env: /env /env dev /env prod
Tools: /ping /doctor /tools
MCP: /mcp /attach /detach /attachments
Logs: /logs /history
Apps: /ai /platform /auth /hotel /vault /audit /memory /network /api
All slash commands:
/help
/commands
/dashboard
/exit
/clear
/shell
/tool
/mode
/last
/rerun
/theme
/env
/login
/logout
/account
/tools
/doctor
/ping
/mcp
/attach
/detach
/attachments
/logs
/history
/ai
/platform
/auth
/hotel
/vault
/audit
/memory
/network
/api
Norexus App shortcuts are scaffolded for now. They do not launch apps or route to AI yet:
nrx> /vault
Opening vault is scaffolded. Route target will be added later.
Local scaffold auth and environment mode are also available inside chat:
nrx> /login
Logged in with local scaffold auth as local-dev.
nrx> /env prod
Environment mode set to prod.
nrx> /account
Status : logged_in
nrx> /hotel
Opening hotel is scaffolded. Route target will be added later.
Autocomplete behavior:
- Type
/to show the visible command menu. - Type
/pto filter to/ping. - Type
/mcto filter to/mcp. - Type
/mto show/mcpand/memory. - Type
/meto filter to/memory. - Type
/auto show/authand/audit. - Use arrow up/down to move through suggestions.
- Press Tab to complete the selected command.
- Press Enter on a partial slash command to run the selected match.
- Exact commands such as
/mcprun directly and stop showing suggestions.
Autocomplete also covers tool names, MCP server names, themes, and common flags:
--run
--dry-run
--tool
--mcp
--json
--verbose
--no-header
--theme
nrx ask, nrx route, and plain chat messages default to dry-run mode unless
config.json sets "defaultMode": "run" or you pass --run.
Routing currently uses local keyword scoring:
- Coding/debugging tasks route to Codex.
- Repo-wide architecture and planning route to Claude.
- Quick CLI/local command tasks route to Gemini CLI.
- GitHub-specific workflows route to GitHub Copilot.
- Autonomous, tool-heavy, MCP-heavy, browser/file/research/delegation, and orchestration tasks route to Hermes when available.
- Unknown/general prompts stay with Norexus Router.
MCP servers are stored locally in:
config/mcp.json
Commands:
nrx mcp list
nrx mcp presets
nrx mcp add <name> <command>
nrx mcp add-preset supabase
nrx mcp add-preset shadcn
nrx mcp add-preset vercel
nrx mcp add-preset git
nrx mcp add-preset notion
nrx mcp auto
nrx mcp status
nrx mcp remove <name>Built-in presets:
git: enabled,npx @modelcontextprotocol/server-gitgithub: enabled,npx @modelcontextprotocol/server-github— requiresGITHUB_TOKENshadcn: enabled,npx shadcn@latest mcpsupabase:needsConfig— requires project credentials/configvercel:needsConfig— requires Vercel login/tokennotion:needsConfig— requiresNOTION_API_KEY(Notion integration token)
Project-aware suggestions:
.gitsuggestsgit..githubsuggestsgithub.components.jsonor shadcn dependencies suggestshadcn.supabase/directory orSUPABASE_URLenv suggestssupabase.vercel.json,.vercel, ornextdependency suggestsvercel.NOTION_API_KEYin env or env file suggestsnotion.
Use:
nrx mcp autoMCP is attachment context only for now. Norexus does not execute MCP servers yet.
In chat, /mcp shows attached MCP servers, available configured MCP servers,
and suggested MCP servers. Use /mcp --verbose to include config-file discovery.
nrx doctor
nrx ping
nrx ping --json
nrx ping --verboseDoctor checks Node, npm, Codex, Claude, Gemini, gh, Antigravity, and Hermes.
Ping runs lightweight health checks for Claude, Gemini CLI, Codex, gh copilot,
Antigravity, and Hermes with a 5 second timeout per tool. Hermes detection uses
hermes --version, falling back to hermes-agent --version.
Routes:
logs/routes.jsonl
Chat prompts:
logs/chat_history.jsonl
Inside chat:
/logs
/history
/last
/rerun
Refresh the global command after changes:
cd /path/to/norexus.cli
npm link
hash -r
which nrx
nrx --versionIf the header color is hard to read:
nrx --theme mono
NO_COLOR=1 nrxIf a tool is missing:
which codex
which claude
which gemini
which gh
which antigravity
which hermes
which hermes-agentIf --run fails, inspect the dry-run command first:
nrx route "your prompt here"npm test
node ./bin/nrx.js doctorThis section is not relevant to CLI users. If you downloaded and installed nrx, start with nrx login — no steps below are required.
Detailed migration diagnostics are available to platform operators via server logs on the Auth deployment (GET /api/cli/health returns full detail outside production or with the internal admin token).
Database migrations live in NOREXUS.AUTH-main. Apply them once before deploying auth.norexus.app:
cd ../NOREXUS.AUTH-main
npm run apply-cli-migrationsThis requires DATABASE_URL or SUPABASE_DB_URL pointing at the Auth project database (Supabase Dashboard → Database → URI). CLI users never need this.
Most users approve in the browser on /cli/<user_code>. For automation or recovery, an owner can approve a claimed device using service role credentials (never commit secrets):
cd norexus.cli
NOREXUS_OWNER_EMAIL='owner@your-domain.example' \
SUPABASE_URL='https://YOUR_PROJECT.supabase.co' \
SUPABASE_SERVICE_ROLE_KEY='YOUR_SERVICE_ROLE_KEY' \
NOREXUS_CLI_ROLE=owner \
npm run approve-cli -- [--device=<uuid>]Pass a device UUID via --device=<uuid> to approve a specific row, or omit to approve the latest claimed device for that user.
Proprietary — Copyright © 2025 Norexus AI LLC. All rights reserved.
Use requires a valid license issued by Norexus AI LLC. No redistribution, sublicensing, or modification without written permission. See LICENSE.
Licensing inquiries: jack@norexus.app