跳到主要内容

Install Bohrium CLI

Preparation​

  • A registered Bohrium account.
  • Node.js and npm available in your terminal.
  • macOS, Linux, or Windows on x64 or arm64.

Check the local environment:

node --version
npm --version

Install​

npm install -g @dptech-corp/bohr-cli@latest

If your npm mirror has not synchronized the latest release, use the official registry:

npm install -g @dptech-corp/bohr-cli@latest --registry https://registry.npmjs.org

Verify the installation without accessing Bohrium services:

bohr version
bohr doctor --offline

If bohr is not found after installation, reopen the terminal and confirm that npm's global executable directory is in PATH.

Log in​

The recommended login method opens Bohrium SSO in your browser:

bohr auth login
bohr auth status --verify

In SSH, CI, or another headless environment, start a device flow and open the returned verification URL in your browser:

bohr auth login --device --no-wait --json
bohr auth login --resume

If you already have an AccessKey, authenticate in a trusted terminal:

bohr auth login --ak "<AccessKey>"

For an ephemeral automation process on macOS or Linux, set BOHR_ACCESS_KEY for the current shell:

export BOHR_ACCESS_KEY="<AccessKey>"
bohr auth status --verify

In Windows PowerShell:

$env:BOHR_ACCESS_KEY = "<AccessKey>"
bohr auth status --verify

Do not paste credentials into chats, commit them to a repository, or write them into shared scripts. Use BOHR_ACCESS_KEY for temporary automation and clear it when the process finishes.

Update​

On macOS or Linux:

bohr update
bohr version

On Windows, update through npm:

npm install -g @dptech-corp/bohr-cli@latest
bohr version

If your current version is v2.6.1 or earlier, use the npm command above on every operating system to complete the upgrade.

Uninstall​

npm uninstall -g @dptech-corp/bohr-cli