Installation and sign-in
This page explains how to install the OmicsBox Engine CLI on Linux or macOS and how to sign in with a Personal Access Token so that you can run tools.
Early access
The OmicsBox Engine CLI is in early access. Package names and installation steps may change before the general release.
Requirements
- Linux: a 64-bit x86 (amd64) system running Debian or Ubuntu. Ubuntu 22.04 and later are supported.
- macOS: an Intel or Apple Silicon Mac.
- Subscription: an OmicsBox subscription that includes the Engine add-on. To add it, see the OmicsBox subscription page, or contact support@biobam.com to join the early access.
You do not need to install Java. Each package includes its own Java runtime.
Download the package
The download link for the installation packages will be published here. Choose the package for your system:
| System | Package |
|---|---|
| Linux (Debian, Ubuntu) | omicsbox-cli_<version>_amd64.deb |
| macOS, Intel | omicsbox-cli_<version>_macos-x86_64.tar.gz |
| macOS, Apple Silicon | omicsbox-cli_<version>_macos-arm64.tar.gz |
Install on Linux
Install the .deb package with apt, which also installs any system libraries it needs:
sudo apt install ./omicsbox-cli_<version>_amd64.deb
Write the path with the leading ./. Without it, apt searches its online repositories for a package with that name instead of using the local file.
The package installs:
- the
omicsboxcommand, on yourPATH; bashauto-completion, active in new terminal sessions;- a manual page, available with
man omicsbox.
To remove the Engine:
sudo apt remove omicsbox-cli
Removing the package keeps your personal settings and saved token in ~/.omicsboxEngine. Delete that folder as well for a full reset.
Install on macOS
Extract the archive from the Terminal and run the installer. In the commands below, replace <arch> with x86_64 on an Intel Mac or arm64 on Apple Silicon. The archive extracts to a folder whose name has hyphens instead of underscores:
tar xzf omicsbox-cli_<version>_macos-<arch>.tar.gz
cd omicsbox-cli-<version>-macos-<arch>
./install.sh
By default, the Engine is installed in /usr/local, and the installer asks for your password through sudo. To install it without administrator rights, choose a folder in your home directory and make sure its bin subfolder is on your PATH:
./install.sh --prefix ~/.local
Extract with tar, not Finder
Finder marks every file it extracts as downloaded from the internet, and macOS may then refuse to run them. The installer clears this mark for the files it installs, but extracting with tar from the Terminal avoids the problem altogether.
Shell auto-completion on macOS
On macOS, auto-completion is optional. The installer prints the exact commands at the end. For zsh, the default macOS shell, add these 2 lines to ~/.zshrc, replacing /usr/local with your installation prefix if you changed it:
autoload -Uz bashcompinit && bashcompinit
source /usr/local/share/omicsbox/omicsbox_completion
For bash, add the source line to ~/.bash_profile instead.
Uninstall on macOS
Run uninstall.sh from the extracted folder. Pass the same --prefix you used to install, if any:
./uninstall.sh
Your personal settings and saved token in ~/.omicsboxEngine are kept. Add --purge to delete them too.
Sign in
The CLI authenticates with a Personal Access Token, a key linked to your OmicsBox account and subscription. OmicsBox Web calls these tokens Engine API keys. You create a token once and save it on each machine where you use the CLI.
Create a token
- Go to omicsbox.biobam.com/admin, the Settings page of OmicsBox Web, and sign in with your OmicsBox account.
- In the Engine API Keys section, enter a name for the token, choose when it expires, between 30 days and 1 year, and create it.
- Copy the token straight away. This is the only time it is shown in full.
The token is linked to the subscription that was active when you created it. The Engine API Keys section is shown only when your subscription includes the Engine add-on. When a token expires, create a new one and save it again with omicsbox auth.
Tokens are personal
Each token is linked to your own OmicsBox account, and anyone who has it can run analyses billed to your subscription. Never share a token with other people: each person must use their own account and their own token.
Save the token
Run omicsbox auth and paste the token when prompted:
omicsbox auth
The Engine checks the token with OmicsCloud before saving it. A mistyped or revoked token is rejected straight away, and nothing is saved. On success, the command shows the account the token belongs to and whether its subscription can run the Engine.
If the token is valid but the subscription is inactive or lacks the Engine add-on, the token is still saved and the command explains what is missing. Once the subscription is fixed, the saved token works without running omicsbox auth again.
To check your sign-in at any time:
omicsbox whoami
whoami shows your email, a masked version of the token and where it was read from, your subscription and its modules, whether the Engine add-on is included, and the subscription end date.
What needs a token
These commands work without signing in: list, describe, version, config and --help. The exception is describe --full or describe --param on a cloud-backed option such as --database: it needs a token to show that option's values, and without one it prints a warning instead of the values.
Running a tool needs a valid token, whether it runs locally or on OmicsCloud. So do whoami and the commands that manage cloud runs and files: status, logs, cancel and cloud-files. The remaining commands, such as logout, export, export-report and refresh-catalog, do not need a token.
Servers and automated pipelines
On machines without an interactive terminal, supply the token without typing it. Choose one of these options:
-
Token file. Save the token in a file and make it readable only by you, then run
omicsbox auth. Keep the file out of shared folders and out of any repository, so that it is never committed:chmod 600 token.txt omicsbox auth --token-file token.txt -
Standard input. Pipe the token into
omicsbox auth, for example from the private file above:cat token.txt | omicsbox auth -
Environment variable. Set
OMICSBOX_API_KEY, for example from a secret in your continuous integration (CI) system. The Engine then uses it for every command, and you do not need to runomicsbox authat all.
When OMICSBOX_API_KEY is set, it takes priority over the token saved by omicsbox auth.
omicsbox auth saves the token unencrypted in ~/.omicsboxEngine, readable only by your user. On a short-lived CI runner or container, setting OMICSBOX_API_KEY is preferable to running omicsbox auth, because nothing is written to disk.
You can also pass the token directly as omicsbox auth <token>. Avoid this form: the token then appears in your shell history and is visible to other users of the same machine while the command runs.
You can use one token on several of your own machines, such as the nodes of a compute cluster. The Engine does not reserve a licence seat per machine. Tokens are still personal: never share yours with other people.
Sign out
omicsbox logout
logout deletes the saved token from this machine only. The token itself stays valid on any other machine that uses it. To disable it everywhere, revoke it.
If OMICSBOX_API_KEY is set in your shell, commands keep authenticating with it after logout. Run unset OMICSBOX_API_KEY to sign out fully.
Revoke a token
To revoke a token, for example because it may have been exposed, click Revoke next to it in the Engine API Keys section of omicsbox.biobam.com/admin. It stops working on every machine at once.
For the full option list of each command on this page, see Built-in Commands.