Command Line Interface (CLI)

We provide a command line interface (CLI) which should be available after installing the package. You can access the help message by running:

snip Usage: snip [OPTIONS] COMMAND [ARGS]... Command line tool for snip - our digital lab book. ╭─ Options ────────────────────────────────────────────────────────────────────╮ --verbose-vVerbose output. --install-completionInstall completion for the current shell. --show-completionShow completion for the current shell, to    copy it or customize the installation.       --helpShow this message and exit. ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─ Commands ───────────────────────────────────────────────────────────────────╮ token   Manage your tokens for authentication with a snip instance.        snippet Upload or validate snippets.                                       ╰──────────────────────────────────────────────────────────────────────────────╯

Troubleshooting

If the snip command is not available, make sure that the package is installed in the correct environment. Alternatively, you can run the command using the Python interpreter:

python -m snip --help

Features

The CLI provides the following features:

  • Tokens: Store, remove and retrieve API tokens in a secure keyring or in a configuration file.

  • Snippets: Validate snippets or upload them to your lab books using the CLI.