The nodetool CLI is the TypeScript command-line interface for the NodeTool platform. It manages servers, workflows, jobs, assets, and secrets. Install the project and run nodetool --help to see the top-level command list. Every sub-command exposes its own --help flag with detailed usage.
Installation
The CLI is part of the @nodetool/cli package in the monorepo. Build it with:
# From repo root
npm install
npm run build:packages
After building, you can run the CLI via:
node packages/cli/dist/nodetool.js --help
# Or via the npm script alias:
npm run nodetool -- --help
Getting Help
nodetool --helpβ list all top-level commands.nodetool <command> --helpβ show command-specific options (e.g.nodetool serve --help).nodetool <group> --helpβ list sub-commands for grouped tooling (e.g.nodetool workflows --help).
Core Commands
nodetool info
Display system and environment information including Node.js version, platform, and API key configuration.
Options:
--jsonβ output as JSON.
Example:
nodetool info
nodetool info --json
nodetool serve
Starts the TypeScript WebSocket + HTTP backend server. This serves the REST API, WebSocket endpoints, and static assets.
Options:
--host(default127.0.0.1) β bind address (use0.0.0.0for all interfaces).--port(default7777) β listen port.
Examples:
# Start the server on the default port
nodetool serve
# Bind to all interfaces on a custom port
nodetool serve --host 0.0.0.0 --port 8080
You can also start the server directly:
PORT=7777 HOST=127.0.0.1 node packages/websocket/dist/server.js
nodetool workflows run <workflow_id_or_file>
Executes a workflow by ID (from the local database) or by JSON file path.
Arguments:
<workflow_id_or_file>β workflow ID (loaded from DB) or path to a.jsonworkflow file.
Options:
--params <json>β JSON string of workflow parameters.--jsonβ output result as JSON.
Examples:
# Run workflow by ID
nodetool workflows run workflow_abc123
# Run workflow from file
nodetool workflows run ./my_workflow.json
# Run with parameters as JSON
nodetool workflows run workflow_abc123 --params '{"input": "hello"}'
# JSON output for automation
nodetool workflows run ./my_workflow.json --json
Chat
nodetool chat
Starts an interactive TUI chat session.
Options:
-p, --provider <provider>β LLM provider (e.g.,anthropic,openai,ollama).-m, --model <model>β model ID.-a, --agentβ enable agent mode with tool use.-u, --url <url>β WebSocket server URL (default: connects to local server).-w, --workspace <path>β workspace directory for file operations.--tools <tools>β comma-separated list of enabled tools.
Examples:
# Start interactive chat
nodetool chat
# Chat with a specific provider and model
nodetool chat --provider anthropic --model claude-3-5-sonnet-20241022
# Agent mode with tool use
nodetool chat --agent --provider openai
# Connect to a custom server
nodetool chat --url ws://localhost:7777
Workflow Management
nodetool workflows
Manage workflows via the API.
Subcommands: list, get, run
# List all workflows
nodetool workflows list
nodetool workflows list --api-url http://localhost:7777 --json
# Get a workflow by ID
nodetool workflows get <workflow_id>
# Run a workflow (see above for full options)
nodetool workflows run <workflow_id_or_file>
Job Management
nodetool jobs
Query job status and results.
Subcommands: list, get
Options:
--api-url <url>β API base URL (default:http://localhost:7777).--workflow-id <id>β filter by workflow ID (forlist).--limit <n>β max results (default:100).--jsonβ output as JSON.
Examples:
# List all jobs
nodetool jobs list
# Filter by workflow
nodetool jobs list --workflow-id workflow_abc123
# Get a specific job
nodetool jobs get <job_id>
Asset Management
nodetool assets
Manage uploaded files and workflow assets.
Subcommands: list, get
Options:
--api-url <url>β API base URL (default:http://localhost:7777).--query <q>β search query (forlist).--content-type <type>β filter by content type (forlist).--limit <n>β max results (default:100).--jsonβ output as JSON.
Examples:
# List assets
nodetool assets list
# Search assets
nodetool assets list --query "landscape"
# Get a specific asset
nodetool assets get <asset_id>
Secrets Management
nodetool secrets
Manage encrypted secrets stored in the local database with per-user encryption.
Subcommands: list, store, get
Examples:
# List stored secret keys
nodetool secrets list
# Store a secret (prompts for value)
nodetool secrets store OPENAI_API_KEY
# Retrieve a secret value
nodetool secrets get OPENAI_API_KEY
Settings
nodetool settings show
Display current settings from environment variables.
Options:
--jsonβ output as JSON.
Example:
nodetool settings show
nodetool settings show --json
Tips
- Use
--jsonflags for machine-readable output suitable for scripting. - Set
NODETOOL_API_URLenvironment variable to avoid specifying--api-urlon every command. - Use
nodetool serveto start the local backend server before running API commands. - See Environment Variables for a complete list of configurable variables.