prepare-tool
Prepares a tool into the container by creating relevant directories,files and links.
$ containerbase-cli prepare tool [-d,--dry-run] <tools> ...
$ prepare-tool [-d,--dry-run] <tools> ...
- preparing node
prepare-tool node
- preparing all tools
prepare-tool all
install-tool
Installs a tool into the container.
$ containerbase-cli install tool [-d,--dry-run] <name> [version]
$ install-tool [-d,--dry-run] <name> [version]
- Installs node v14.17.0
install-tool node 14.17.0
- Installs node with version via environment variable
or
NODE_VERSION=14.17.0 install-tool node
export NODE_VERSION=14.17.0 install-tool node - Installs latest pnpm version
install-tool pnpm
install-gem
Installs a gem package into the container.
Note: requires ruby to be installed.
$ containerbase-cli install gem [-d,--dry-run] <name> [version]
$ install-gem [-d,--dry-run] <name> [version]
- Installs rake 13.0.6
install-gem rake 13.0.6
- Installs rake with version via environment variable
or
RAKE_VERSION=13.0.6 install-gem rake
export RAKE_VERSION=13.0.6 install-gem rake - Installs latest rake version
install-gem rake
install-npm
Installs a npm package into the container.
Note: requires node to be installed.
$ containerbase-cli install npm [-d,--dry-run] <name> [version]
$ install-npm [-d,--dry-run] <name> [version]
- Installs del-cli v5.0.0
install-npm del-cli 5.0.0
- Installs del-cli with version via environment variable
or
DEL_CLI_VERSION=5.0.0 install-npm del-cli
export DEL_CLI_VERSION=5.0.0 install-npm del-cli - Installs latest del-cli version
install-npm del-cli
install-pip
Installs a pip package into the container.
Note: requires python to be installed.
$ containerbase-cli install pip [-d,--dry-run] <name> [version]
install-pip [-d,--dry-run] <name> [version]
- Installs checkov 2.4.7
install-pip checkov 2.4.7
- Installs checkov with version via environment variable
or
CHECKOV_VERSION=2.4.7 install-pip checkov
export CHECKOV_VERSION=2.4.7 install-pip checkov - Installs latest pnpm version
install-pip checkov
uninstall-tool
Uninstalls a tool and deletes all files from the container.
Note: Tools that have child tools need to be uninstalled recursively using the --recursive flag.
$ containerbase-cli uninstall tool [-d,--dry-run] [-r,--recursive] [-a,--all] <name> [version]
$ uninstall-tool [-d,--dry-run] [-r,--recursive] [-a,--all] <name> [version]
-
Uninstalls node v14.17.0
uninstall-tool node 14.17.0
-
Uninstalls node v14.17.0 with all child tools
uninstall-tool node 14.17.0 --recursive
-
Uninstalls all node versions with all child tools
uninstall-tool node --recursive --all
-
Uninstalls all jb versions
uninstall-tool jb --all
-
Uninstalls tool with all child tools extended example
$ install-tool node 22.0.0 INFO (9): Installing tool node@22.0.0... v22.0.0 10.5.1 0.26.0 INFO (9): Install tool node succeeded in 4.3s. $ install-tool pnpm 10.20.0 INFO (10): Installing tool pnpm@10.20.0... v10.20.0 INFO (10): Install tool pnpm succeeded in 1.1s. $ uninstall-tool node 22.0.0 INFO (93): Uninstalling tool node@22.0.0... FATAL (93): tool version has child dependencies and cannot be uninstalled tool: "node" version: "22.0.0" childs: [ { "name": "pnpm", "version": "10.20.0" } ] FATAL (93): Uninstall tool node failed in 32ms. $ uninstall-tool node 22.0.0 -r INFO (104): Uninstalling tool node@22.0.0... INFO (104): Uninstalling child tool pnpm@10.20.0... INFO (104): Uninstall tool node succeeded in 100ms.
uninstall-gem
Uninstalls a gem package from the container.
$ containerbase-cli uninstall gem [-d,--dry-run] [-r,--recursive] [-a,--all] <name> [version]
$ uninstall-gem [-d,--dry-run] [-r,--recursive] [-a,--all] <name> [version]
- Uninstalls rake v13.0.6
uninstall-gem rake 13.0.6
- Uninstalls all rake versions
uninstall-gem rake --all
uninstall-npm
Uninstalls a npm package from the container.
$ containerbase-cli uninstall npm [-d,--dry-run] [-r,--recursive] [-a,--all] <name> [version]
$ uninstall-npm [-d,--dry-run] [-r,--recursive] [-a,--all] <name> [version]
-
Uninstalls del-cli v5.0.0
uninstall-npm del-cli 5.0.0
-
Uninstalls all del-cli versions
uninstall-npm del-cli --all
uninstall-pip
Uninstalls a pip package from the container.
$ containerbase-cli uninstall pip [-d,--dry-run] [-r,--recursive] [-a,--all] <name> [version]
uninstall-pip [-d,--dry-run] [-r,--recursive] [-a,--all] <name> [version]
- Uninstalls checkov v2.4.7
uninstall-pip checkov 2.4.7
- Uninstalls all checkov versions
uninstall-pip checkov --all
Lists all installed tools and their versions.
The tools are printed as a table, with the currently linked version and any other installed versions.
Tools and versions are sorted alphabetically, with numbers in numeric order, so 9.0.0 comes before 10.0.0.
A - is printed when no version of the tool is currently linked.
That happens when the linked version is uninstalled while other versions of the tool remain installed, as nothing relinks one of them.
With --json the list is printed as JSON, so it can be processed programmatically.
The JSON output is described by the list-tools.schema.json JSON Schema.
Because containerbase logs to stdout, use --out to write the output to a file instead.
When writing to a file, JSON output is minified.
$ containerbase-cli list tools [--json] [--out <file>]
-
Lists all installed tools
$ containerbase-cli list tools NAME VERSION OTHER VERSIONS java-jdk - 21.0.12+7 node 22.11.0 20.11.0 pnpm 10.0.1
Here
java-jdkis installed but not linked, whilenodeis linked to22.11.0and keeps20.11.0installed. -
Lists all installed tools as JSON
$ containerbase-cli list tools --json { "tools": [ { "name": "java-jdk", "version": null, "versions": [{ "version": "21.0.12+7" }] }, { "name": "node", "version": "22.11.0", "versions": [{ "version": "20.11.0" }, { "version": "22.11.0" }] }, { "name": "pnpm", "version": "10.0.1", "versions": [ { "version": "10.0.1", "parent": { "name": "node", "version": "22.11.0" } } ], "type": "npm" } ] } -
Writes the JSON output to a file
containerbase-cli list tools --json --out /tmp/tools.json