Ductape CLI
The Ductape CLI (@ductape/cli) is the terminal counterpart to the Workbench. It uses the same APIs:
- REST + Bearer token for account, workspaces, products, and apps
- Encrypted proxy (
x-access-token+ AES payload) for component CRUD and runtime DB/graph operations
Install
cd cli
npm install && npm run build && npm link
Quick reference
| Area | Commands |
|---|---|
| Auth | login, logout, whoami |
| Workspaces | workspaces list, workspaces use, workspaces current |
| Profiles | profiles list, profiles use local|cloud |
| Products | products list|get|create|update|delete |
| Apps | apps list|get|create|update|delete|import |
| Project | init, link, unlink |
| Local stack | install, start, stop, status |
| Components | resources <type> <verb> |
| Cloud | cloud connections …, cloud resources … |
| DB runtime | db connect, db query, db context |
| Graph runtime | graph connect, graph query |
| Secrets | secrets create|list|get|update|delete |
| Snippets | generate payload, generate snippet |
| Shell | completion bash|zsh |
SDK runtime defaults
In app code (@ductape/sdk), set product and env on the constructor only. The CLI uses .ductape/config.json instead. See SDK runtime defaults.
Documentation map
- Authentication — login, OAuth, profiles
- Workspaces — select and switch workspace at login
- Project linking —
.ductape/config.jsonandlink - Local platform —
ductape start/ Docker stack - Products — workspace product CRUD
- Apps — integration app CRUD
- Resources — component CRUD via sdk-proxy
- Cloud — connections and cloud resources
- Database runtime — db-proxy queries
- Graph runtime — graph-proxy queries
- Secrets — workspace secrets
- Generate — payloads and code snippets
- Troubleshooting — common errors
API parity
CLI REST commands use the same Nest routes as the Workbench (/apps/v1, /integrations/v1, etc.) via the API gateway. See cli/API_PARITY.md in the repo.
CLI vs MCP server
| CLI | MCP server | |
|---|---|---|
| Auth | User JWT + encryption | publishable_key per call |
| Payload | AES encrypted | Plain JSON |
| Use case | Developers, CI, local ops | AI agents with scoped keys |
Development
cd cli
npm run build
npm test
npm run dev -- whoami