@nexagent-cli/cli
v0.8.4
Published
NexAgent — locally-runnable AI agent CLI with file editing, tools, and beautiful TUI
Readme
@nexagent-cli/cli
NexAgent — a locally-runnable AI agent CLI with file editing, tool execution, and a beautiful TUI.
Quick Start
# Requires Node.js 22+
npm install -g @nexagent-cli/cli
# First-run wizard (interactive setup)
nexagent chat
# Or set your API key manually
nexagent config api-key openai
# Start an interactive chat session
nexagent chat
# Or run a single prompt
nexagent run "Refactor src/utils.ts to use async/await"Installation
Via npm (recommended for developers)
npm install -g @nexagent-cli/cliVia Go Launcher (recommended for end users)
Download the latest binary for your platform from GitHub Releases:
| Platform | Download |
|----------|----------|
| Windows AMD64 | nexagent-v0.5.1-windows-amd64.zip |
| macOS AMD64 | nexagent-v0.5.1-darwin-amd64 |
| macOS ARM64 | nexagent-v0.5.1-darwin-arm64 |
| Linux AMD64 | nexagent-v0.5.1-linux-amd64 |
| Linux ARM64 | nexagent-v0.5.1-linux-arm64 |
Extract and run:
# Windows
nexagent.exe --version
# macOS / Linux
chmod +x nexagent
./nexagent --versionPrerequisite: Node.js v22+ must be installed. The Go launcher will verify this on startup.
Shell Completion
# Bash
eval "$(nexagent completion bash)"
# Zsh
eval "$(nexagent completion zsh)"
# Fish
nexagent completion fish > ~/.config/fish/completions/nexagent.fish
# PowerShell
nexagent completion powershell | Out-String | Invoke-Expression
# Show setup instructions for all shells
nexagent completion installCommands
| Command | Alias | Description |
|---------|-------|-------------|
| nexagent chat | c | Interactive chat with the agent |
| nexagent run <prompt> | r | Single-shot prompt execution |
| nexagent memory | mem | Manage agent memory blocks |
| nexagent session | sess | Manage chat sessions |
| nexagent agent | | Manage agent profiles |
| nexagent config | | Manage configuration |
| nexagent models | | List available LLM models |
| nexagent update | | Update to latest version |
| nexagent changelog | | Show release notes |
| nexagent doctor | | Diagnose installation health |
| nexagent server | srv | Manage proxy gateway |
| nexagent dashboard | dash | Start web dashboard |
| nexagent mcp | | Manage MCP tools |
| nexagent completion <shell> | | Generate shell completion script |
Global Flags
| Flag | Description |
|------|-------------|
| --no-color | Disable colour output |
| --json | Output machine-readable JSON |
| --debug | Enable verbose debug logging |
| --data-dir <path> | Override agent data directory |
| -h, --help | Show help |
| -v, --version | Show version |
Quick Commands (in chat)
During an interactive chat session, type:
| Command | Description |
|---------|-------------|
| /help | Show available quick commands |
| /models | List available models |
| /config | Show current configuration |
| /memory | Show memory blocks |
| /session | Show session stats |
| /undo | Remove last turn |
| /cost | Show session cost |
| /status | Check proxy gateway status |
| /clear | Clear chat history |
| /compact | Summarize and compact context |
| /subagent <persona> <task> | Spawn a subagent |
| /exit | End session and exit |
Requirements
- Node.js ≥ 22
- An API key for at least one provider: OpenAI, Anthropic, Google, or Ollama
- (Optional) Go 1.23+ — only needed if building the launcher from source
Safety
NexAgent includes an 8-check Safety Gate for all tool executions:
- Tool exists and is enabled
- Required parameters present
- Workspace scope enforced (no path traversal)
- Global shell blocklist (
rm -rf /, fork bombs, etc.) - Risk level vs safety mode (
strict/standard/permissive) - Loop guard (max 8 tool calls per turn)
- Rate limit (max 60 calls per minute)
- Audit logging for
shell_exec
See docs/shell-exec-safety.md for full details.
License
MIT
