Quick-reference table for every nyz command and flag.
Main Modes
nyz # Interactive TUI
nyz run "<prompt>" # Non-interactive, human-readable output
nyz exec "<prompt>" # CI/scripting mode, supports stdin + JSON
Global Flags
| Flag | Short | Type | Description |
|---|---|---|---|
--provider | -p | string | Override default provider |
--model | -m | string | Override model |
--trust | -y | string | Trust mode: off, limited, autoedit, full |
--continue | -c | bool | Resume most recent session |
--session | -s | string | Resume session by ID or title |
--team-name | string | Run as team lead for this team |
nyz run
Non-interactive single-prompt execution.
nyz run "add error handling to api.rs"
nyz run -i screenshot.png "analyze this UI"
nyz run --format json "generate JSONL events"
nyz run -o result.md "summarize the codebase"
| Flag | Short | Type | Description |
|---|---|---|---|
--image | -i | path | Attach image (repeatable) |
--format | text/json | Output format (default: text) | |
--output | -o | path | Write response to file |
Sandbox: full access.
nyz exec
CI/scripting mode with stdin support and sandbox control.
nyz exec "fix lint errors"
cat ci.log | nyz exec --json "explain failure"
nyz exec --sandbox read-only --ephemeral "audit repo"
nyz exec --full_auto "update deps and test"
| Flag | Short | Type | Description |
|---|---|---|---|
--image | -i | path | Attach image (repeatable) |
--json | bool | JSONL event stream output | |
--quiet | -q | bool | Suppress non-essential output |
--ephemeral | bool | Don’t persist session | |
--full_auto | bool | Trust=full + sandbox=workspace-write | |
--sandbox | string | read-only, workspace-write, full-access | |
--output | -o | path | Write response to file |
Sandbox: workspace-write (default). Aliases: readonly, workspace, full, danger-full-access.
Auth
Preferred interactive path:
nyz → /connect
CLI fallback:
nyz login # interactive provider picker
nyz login <provider> # direct login
nyz logout <provider> # remove stored credentials
nyz whoami # show auth status
Config & Init
nyz config # print merged runtime config
nyz init # scaffold .nyzhi/ directory
nyz deepinit # advanced project initialization
MCP
nyz mcp add <name> -- <command> [args...] # add stdio server
nyz mcp add <name> --url <url> # add HTTP server
nyz mcp add <name> --scope global -- ... # add to global config
nyz mcp list # list servers
nyz mcp remove <name> [--scope global] # remove server
Default scope: project (writes to <project>/.nyzhi/config.toml).
Sessions
nyz sessions [query] # list/search
nyz session delete <id-or-title> # delete
nyz session rename <id-or-title> "New Title" # rename
nyz export <id-or-title> [-o output.md] # export markdown
nyz replay <id> [--filter <event-type>] # replay events
Lookup matches on ID prefix or title substring. Ambiguous queries show candidates.
Analytics
nyz stats # usage statistics
nyz cost [daily|weekly|monthly] # cost breakdown
Period aliases: day, week, month.
Teams
nyz teams list # list teams
nyz teams show <name> # show details
nyz teams delete <name> # delete team
Skills
nyz skills # list available skills
CI Fix
nyz ci-fix [--log-file <path>] [--format auto|junit|tap|plain]
nyz ci-fix --commit # auto-commit fix
cat ci.log | nyz ci-fix # from stdin
Update & Uninstall
nyz update # check and install update
nyz update --force # force reinstall
nyz update --list-backups # list backup binaries
nyz update --rollback latest # rollback to previous version
nyz uninstall [--yes] # remove everything
Misc
nyz wait # wait for background processes
nyz skills # list skills
Exit Codes
| Code | Meaning |
|---|---|
0 | Success |
| Non-zero | Validation error, missing input, ambiguous query |
Next Steps
- Slash Commands — TUI command reference
- Commands — detailed command guide
- Configuration — config reference