@decodetool/cli
v0.15.19
Published
Decode is a whiteboard for you and your coding agents
Maintainers
Readme
@decodetool/cli
Decode is a whiteboard & browser for working with coding agents.
This build runs locally on your computer, but can be accessed remotely if you use its tunneling feature.
Please report issues to us here.
Installation
npm install -g @decodetool/cliUsage
Start the Server
# Start server and open browser
decode serve
# Specify port
decode serve --port 4000
# Expose to local network (access from phone/tablet)
decode serve --host
# Bind to specific IP
decode serve --host 192.168.1.5
# Don't open browser automatically
decode serve --no-openBuilt-in Easy to Use Tunneling
With one command you can run Decode on your computer where all of the work gets done, but access it on the go.
Use this for whiteboarding with an Apple Pencil on your iPad or firing off new agent runs from your phone in a simplified interface.
** USE AT YOUR OWN RISK ** While the connection is encrypted and the url unguessable, you are still risking someone else controlling your computer if you expose the url.
Every time you rerun decode tunnel a new domain is generated, use this as one defence mechanism.
# Start server and create a tunnel
decode tunnel
# Specify local port port
decode tunnel --port 4000
# Don't open browser automatically
decode tunnel --no-openConfiguration (decode.json)
Optionally add a decode.json file to your repo root to configure a setup and run scripts. The setup command is run once when you create a new workspace (worktree), and run can be triggered from the UI to start (or kill) your dev server.
{
"scripts": {
"setup": "cp $DECODE_REPO_PATH/.env .env && pnpm install",
"run": "pnpm dev"
}
}Scripts
| Script | When it runs | Purpose |
| ------- | ----------------------------------- | --------------------------------------- |
| setup | Once when worktree is created | Copy .env files, install dependencies |
| run | Toggled via Cmd+P or Run button | Start dev server |
Environment Variables
Decode injects these into all script executions:
| Variable | Description |
| ---------------------- | ---------------------------- |
| DECODE_WORKTREE | Worktree name |
| DECODE_WORKTREE_PATH | Absolute path to worktree |
| DECODE_REPO_PATH | Absolute path to parent repo |
Examples
Next.js:
{
"scripts": {
"setup": "cp $DECODE_REPO_PATH/.env.local .env.local && pnpm install",
"run": "pnpm dev"
}
}Python / Django:
{
"scripts": {
"setup": "cp $DECODE_REPO_PATH/.env .env && pip install -r requirements.txt",
"run": "python manage.py runserver"
}
}Data Storage
By default, Decode stores data in ~/decode/. Set $DECODE_DATA_DIR environment variable when launching decode to change the data location.
