Notebook Commands: notebook
bohr notebook manages interactive Notebook Servers, edits local .ipynb files, runs notebooks as Batch Jobs, and publishes notebook articles.
Commands
| Command | Usage | Description |
|---|---|---|
cell | bohr notebook cell [command] | Inspect and edit cells in a local .ipynb file |
collaborator | bohr notebook collaborator [command] | Manage collaborators of a Notebook article |
comment | bohr notebook comment [command] | Read or add comments on a Notebook article |
history | bohr notebook history [flags] | List Notebook articles created by the current user |
private | bohr notebook private <article-id> [flags] | Change a published Notebook article to private |
publish | bohr notebook publish <file.ipynb> [flags] | Upload a local notebook and publish it as an article |
run | bohr notebook run <file.ipynb> [flags] | Execute a local notebook as an asynchronous Batch Job |
search | bohr notebook search <keyword> [flags] | Search public Notebook articles by keyword |
server | bohr notebook server [command] | Manage interactive Notebook instances associated with projects |
For subcommands inside a command group, run bohr notebook <group> --help.
Notebook Server
bohr notebook server resources
bohr notebook server start [flags]
bohr notebook server status [flags]
bohr notebook server list
bohr notebook server usage [flags]
bohr notebook server restart [flags]
bohr notebook server stop [flags]
bohr notebook server delete [flags]
Common server parameters include --project-id, --image-version-id, --sku-id, repeatable --dataset <dataset-id>:<version-id>, and --wait-timeout (default 30m).
Edit and run notebooks
bohr notebook cell list <file.ipynb>
bohr notebook cell add <file.ipynb> [flags]
bohr notebook cell show <file.ipynb> <index>
bohr notebook cell update <file.ipynb> <index> [flags]
bohr notebook cell delete <file.ipynb> <index> [index...]
bohr notebook run <file.ipynb> [flags]
Cell indexes start at 1. Running a notebook requires --project-id, --image, and --machine; --execution-timeout defaults to 600 seconds per cell.
Articles and collaboration
bohr notebook history
bohr notebook search "molecular dynamics"
bohr notebook collaborator list <notebook-id>
bohr notebook collaborator add <notebook-id> [flags]
bohr notebook comment list <notebook-id>
bohr notebook comment add <notebook-id> [flags]
Use bohr notebook publish --help and bohr notebook private --help for the exact arguments of publishing and unpublishing.
Examples
bohr notebook server resources -o json
bohr notebook server start --project-id 123 --image-version-id 456 --sku-id 789
bohr notebook cell add analysis.ipynb --type code --source 'print("hello")'
bohr notebook run analysis.ipynb --project-id 123 --image <image> --machine <machine>
Starting or restarting a server and running a notebook can incur charges. A Batch Job run is separate from an interactive server and does not share its kernel state or temporary packages.