The demi CLI is a single program called demi. It works with pages, blocks, links, events and the demi assistant, in your terminal, in scripts and in your CI.
- Systems
- macOS (Apple silicon and Intel), Linux (x64 and arm64), Windows (x64)
- Version
- 1.25.0
- Requirements
- None. You do not need Node.js.
Install
curl -fsSL https://download.godemi.com/cli/install.sh | shirm https://download.godemi.com/cli/install.ps1 | iexThe script detects your system, downloads the matching file, checks its SHA-256 checksum and puts demi into ~/.local/bin. Set another target with DEMI_INSTALL_DIR. Then check the install:
demi --versionSign in
demi auth login # sign in through the browserdemi auth whoami # who am I, in which tenant?demi auth status # token and reachabilitySign-in uses the OAuth device flow: the CLI shows a code, you confirm it in the browser. The token then lives in ~/.demi/credentials.json and refreshes automatically. Manage several accounts with demi auth list and demi auth switch.
In CI and scripts
printf '%s' "$DEMI_API_KEY" | demi auth login --api-key-stdinThis way the key lands neither in your shell history nor in the process list. How to create a key: Sign-in and keys.
Pick a tenant
demi tenants listdemi config set-tenant @your-workspacedemi docs list --tenant @other-workspace # for this call onlyEdit pages as files
In the CLI, pages are called docs. Pull a page as Markdown, edit it in your editor and push it back:
demi docs listdemi docs pull <page-id> --out ./pages# edit the Markdown in your editordemi docs diff <local-path> <page-id>demi docs push ./pagesEach page becomes two files: doc.md with the content and _doc.yaml with title, kind and links. demi docs verify <local-path> checks a pair without the network.
More commands for pages:
demi docs get <page-id> --format ddmddemi docs create --helpdemi docs move <page-id> --helpdemi docs publish <page-id>demi docs delete <page-id> # to the trashdemi docs restore <page-id> # bring it backBlocks and links have their own commands: demi blocks and demi links.
Real-time events
demi events subscribe --workspacedemi events subscribe --docs <page-id> --json--workspace reports new, moved, renamed and deleted pages in the tenant. --docs follows single pages down to their blocks. --json prints one line of JSON per event, --once exits after the first match: handy for scripts.
Ask the assistant
demi ask "Summarise the open items in the Nordhafen project."This is the same assistant as in the app's chat, with your tenant's permissions, policies and usage. The answer streams into your terminal. Pick a model with -m <alias>; the default is auto, and the AI gateway then picks one that fits the task. More under Models.
Check the connection
demi doctordemi doctor checks network, proxy and firewall between your machine and demi and tells you what is missing. That helps your IT team on the first setup.
For scripts
--format jsonprints lists and records as JSON, for exampledemi docs list --format json.--jsonprints errors as JSON so your script can read them.--yesskips the confirmation prompt on deleting commands.--no-colorturns colours off. In pipes this happens by itself.demi helplists help topics,demi <command> --helpshows examples for every command.
Local MCP bridge
For syncing pages there is also a local MCP bridge. It runs on your machine, needs an API key and can pull, compare and sync pages:
demi mcp install claude-desktopdemi mcp install vscode --workspaceFor everything else use the hosted MCP server: more tools, browser sign-in, no key on your machine.
