Package CLI commands
Work with packages in your registries using Bytesafe CLI
Bytesafe CLI complements your regular tools (npm
/ yarn
/ pnpm
/ mvn
) with actions to manage Bytesafe registries and the packages stored within.
For instance, you may use the Bytesafe CLI to create new registries, push packages from a registry to upstreams, pull packages from upstreams into a registry and more. Many Bytesafe actions can be performed either from the CLI or in the web application.
The Bytesafe CLI is available for macOS, Linux and Windows:
The Bytesafe CLI is distributed as a stand-alone statically linked binary. On Linux and macOS it might be necessary to change the access permissions to enable execution.
# make the file executable
$ chmod 755 ./bytesafe
# run Bytesafe CLI
$ ./bytesafe
Usage: bytesafe [options...]
For detailed help, run 'bytesafe help'
The main difference between Bytesafe CLI and npm
/ yarn
/ pnpm
/ mvn
in terms of package actions, consist of the scenarios where you would use them.
Bytesafe CLI is for managing packages in Bytesafe registries. Like pulling packages into a specific registry from an upstream.
While npm install
, as an example, is for fetching and installing packages (and dependencies) into your local project workspace.
To be able to login to Bytesafe using the CLI for the first time, first use the bytesafe configure
command.
$ bytesafe configure
You will then be prompted to enter your endpoint which is your Bytesafe workspace, for example https://example.bytesafe.dev
Enter endpoint: https://{WORKSPACE}.bytesafe.dev
Successfully configured the endpoint. Continue with login: 'bytesafe login'
Endpoint set by the configure command on first use will be stored in the .bytesaferc
file as the default endpoint.
To connect Bytesafe CLI to another endpoint, use the --endpoint
flag.
For login to Bytesafe, use the bytesafe login
command.
$ bytesafe login
Login to endpoint: 'https://example.bytesafe.dev'
Visit 'https://example.bytesafe.dev/console/cli' to retrieve a new token
Enter token: {CLI-TOKEN}
Login successful. Logged in as: ...
This action requires a token, which is fetched from the Access tokens page in Bytesafe. The CLI will provide an workspace specific link to the CLI token.
You are now logged in with the Bytesafe CLI. The CLI login token is valid for 30 days.
With the Bytesafe CLI you are able to execute the most important commands related to registries and packages for your Bytesafe workspace.
Available bytesafe commands can always be displayed by using the help
function.
$ bytesafe help
Usage: bytesafe [options...] command [options...] [args...]
Work with packages in your registries using Bytesafe CLI
Manage registries in your workspace using Bytesafe CLI