The Deepnote CLI is a command-line tool for working with Deepnote projects outside the browser. It
reads and writes the open .deepnote file format, runs notebooks locally
or in Deepnote Cloud, mirrors a whole workspace to your machine, and publishes apps and Streamlit apps to
a project. It is open source and lives in the
deepnote/deepnote repository.
Use the CLI when you want to:
- Run notebooks from scripts, cron jobs, CI or AI coding agents instead of clicking Run in the editor.
- Keep notebooks in Git and inspect, diff, lint or validate
.deepnotefiles in pull requests. - Convert between
.ipynb,.py,.qmdand.deepnote. - Mirror your Deepnote Cloud workspace locally with
deepnote syncand push edits back. - Publish an app or a Streamlit app to a project with
deepnote publishordeepnote streamlit publish. - Give AI coding agents the Deepnote skill.
deepnote install-skillsgives Claude Code, Codex, Cursor, Gemini CLI and other agents the.deepnoteformat and CLI reference, so they can write notebooks and check their work withdeepnote lintanddeepnote run -o llm.
The CLI is published to npm as @deepnote/cli and runs on Node.js.
npm install -g @deepnote/cli
# or
pnpm add -g @deepnote/cli
# or run it without installing
npx @deepnote/cli --helpIf you would rather not install Node.js, pip install deepnote-cli bundles a native binary and
exposes the same deepnote command.
Running notebooks locally with deepnote run additionally needs a Python interpreter with the
deepnote-toolkit package
(pip install "deepnote-toolkit[server]"). The CLI picks up a .venv or venv next to the notebook
automatically, or point it at an interpreter with --python.
Commands that talk to Deepnote Cloud (run --cloud, schedule, sync, publish,
static-site access, streamlit publish, integrations pull) need an API key. Create one in your workspace under
Settings & members → Security → API keys (see the Deepnote API docs) and
pass it in one of three ways:
| Method | Example | When to use |
|---|---|---|
| Environment variable | export DEEPNOTE_TOKEN="<your-token>" |
Interactive shells, CI secrets |
.env file |
DEEPNOTE_TOKEN=<your-token> in .env |
Project directories you sync or run from |
--token flag |
deepnote sync ./workspace --token "<your-token>" |
One-off commands |
Prefer the environment variable or a .env file: a token passed as --token ends up in your shell
history. Without a token, cloud commands exit with code 2 and print these options.
inspect, cat, lint, validate, convert and run without --cloud work on local files and
need no token. deepnote open, and the --open flag on run and convert, upload the file to
Deepnote Cloud and open it in your browser, where you sign in; they need no token either.
Every command accepts --help. The full reference with all options, output schemas and examples is
the package README on npm.
# Run the first .deepnote file in the current directory
deepnote run
# Run a notebook in Deepnote Cloud with an input value
DEEPNOTE_TOKEN=... deepnote run report.deepnote --cloud --input name="Alice"
# Convert a Jupyter notebook to the Deepnote format
deepnote convert notebook.ipynb
# Check a project for issues before committing it
deepnote lint my-project.deepnote
# Schedule a daily run in Deepnote Cloud
deepnote schedule report.deepnote --daily --at 09:00
# Mirror your whole workspace to ./workspace
deepnote sync ./workspace
# Publish a Vite build to a project
deepnote publish ./dist --project-id <project-id>The CLI is built for scripts and AI agents.
- Exit codes are consistent across commands:
0success,1runtime error,2invalid usage (bad arguments, missing file, missing token). - Machine-readable output is available with
-o jsonon most commands.-o toonemits TOON, a compact format for LLMs, and-o llmpicks the best of the two for each command. -q, --quietsuppresses progress output; errors still go to stderr.- Colors follow the NO_COLOR and FORCE_COLOR
conventions, and
--no-colordisables them explicitly.
# Fail a CI step if the notebook has lint errors
deepnote lint my-project.deepnote -o json || exit 1- Syncing a workspace with the Deepnote CLI
- Publishing apps and Streamlit apps with the Deepnote CLI
- Deepnote file format — what is inside a
.deepnotefile - Deepnote file sync — the in-product Git-linked feature
- Deepnote API — the HTTP API the CLI talks to
- Deepnote MCP — connect AI agents to your workspace
