CLI
Use the CoCalc CLI for automation
Use the CoCalc CLI for authenticated docs, browser, notebook, and project automation.
Automate CoCalc from a terminal or an agent
The CoCalc CLI provides commands for projects, files, collaborative documents, notebooks, agent sessions, browser actions, and long-running operations. Use it from your own computer or from a CoCalc environment with supplied project or agent credentials.
Start here
- Install and run your first command: install the CLI, sign in on your own computer, and list a project's files.
- Check authentication and targets: choose the site, account, project, and browser deliberately.
- Find the right command: navigate the available command families and typed APIs.
- Use the CLI in scripts: parse JSON, check remote results, and recover existing operations.
Practical workflows
- Edit collaborative text with the CLI
- Run and save notebooks with the CLI
- Test browser workflows with the CLI
- Schedule agent tasks with the CLI
- Manage workspaces and notices with the CLI
- Build documents and track CLI versions
- Upload, run, and retrieve a research analysis
- Run and continue remote Codex tasks
- Launch a private research dashboard
Read documentation from the CLI
These commands read the docs bundled with the installed CLI and need no login:
cocalc docs list --category CLI
cocalc docs search "project secrets"
cocalc docs show projects/project-secrets
Prefer the task-specific CLI command when one exists. For ordinary automation, start with the authentication flow appropriate to your environment rather than creating a broad API key. The HTTP API guide covers narrow external integrations.