AI Lab Command Line Interface¶
Notebook Connector installs the ai-lab command line interface for working
with the bundled Jupyter notebooks.
The top-level ai-lab command exposes exactly two subcommands:
startstarts JupyterLab and deploys the bundled notebooks into the notebook root directory if they are not present yet.deploy-notebookscopies the bundled notebooks to a target directory without starting JupyterLab through Notebook Connector.
Help¶
Use --help on the top-level command or any subcommand to inspect the
current option set.
ai-lab --help
ai-lab start --help
ai-lab deploy-notebooks --help
Command start¶
Command start launches JupyterLab by invoking python -m jupyter lab.
Before JupyterLab starts, Notebook Connector copies the bundled notebooks into
the notebook root directory leaving existing files unchanged, and exports
NOTEBOOKS for the launched JupyterLab session.
ai-lab start
Common options:
Option |
Meaning |
|---|---|
|
JupyterLab listen port. Default: |
|
Bind address. Default: |
|
JupyterLab root directory. If omitted, the current working directory is used as the notebook root. Missing directories are created. |
|
Prevent JupyterLab from opening in the default browser. |
Examples:
ai-lab start --port 9999 --ip 0.0.0.0
ai-lab start --notebook-dir ~/work/notebooks --no-browser
Failure cases:
If JupyterLab is not installed, the command exits with an install hint for
poetry install --all-extras.If
--notebook-dirpoints to a file instead of a directory, the command exits with an error.
Command deploy-notebooks¶
Command deploy-notebooks copies the packaged notebooks to a target
directory and reports how many files were copied or skipped. Use it when you
already manage your own JupyterLab environment and want to make the bundled
notebooks available there.
ai-lab deploy-notebooks --target-dir ~/notebooks
Options:
Option |
Meaning |
|---|---|
|
Required destination directory. |
|
Overwrite existing files in the target directory. Default:
|
If --overwrite is not set, existing files are preserved and counted as
skipped.