AgentDock CLI provides a local interactive environment for testing agents, tools, sessions, and workspace operations through the AgentDock harness.
- Interactive Agent Sessions: Run prompts continuously in a local REPL.
- Session Persistence: Save, inspect, and resume sessions.
- Workspace Tools: Read, search, list, write, and update files inside a workspace.
- Workspace File Tools: Execute approved file operations inside the workspace.
- TypeScript First: Fully typed and built for Node.js applications.
Install the dependencies and build the CLI:
yarn install
yarn buildCreate a .env file in this directory:
OPENROUTER_API_KEY=your-key
# Optional: overrides the CLI's explicit catalog default.
OPENROUTER_MODEL=your-model-idThe CLI loads this file automatically. Do not commit it.
Run the CLI directly from TypeScript:
yarn devRun the typecheck and production build:
yarn typecheck
yarn buildStart an interactive AgentDock session using the current working directory as the workspace:
yarn startyarn dev uses a local .sandbox workspace for safe testing. The installed agentdock command uses the directory where it is launched as the workspace.
Once running, enter prompts continuously. Use /help for interactive commands. Use /model or /models to browse and select a model; the selected model is shown in the header.
Sessions are stored under .agentdock/sessions/ in the directory where the CLI is launched.
Resume a saved session from the command line:
yarn dev --resume <session-id>
agentdock --resume <session-id>Inside the CLI, use /resume to list saved sessions and /resume <session-id> to switch to one.
Readable, colorized logs are written to logs/agentdock-cli.log when logging is enabled. Entries include their source module, such as main or agent:
INFO [main] agentdock-cli starting workspace=/Volumes/Code/Github/my-project
DEBUG [agent] tool started tool=list_files
INFO [agent] agent prompt completed durationMs=8312 chunks=17 tools=1
AGENTDOCK_LOGGING=true
tail -f logs/agentdock-cli.logSet AGENTDOCK_LOGGING=false to disable file logging.
Reset the active log file when starting a fresh debugging session:
yarn logs:clear