Installation
Install cademi with a one-line script on macOS, Linux, or Windows. The CLI then keeps itself up to date and verifies the signature of every release before installing it.
macOS and Linux
curl -fsSL https://cli.cademi.dev/install.sh | bashThe script:
- Detects the system (
darwinorlinux) and the architecture (amd64orarm64). On an Apple silicon Mac, it installs thearm64build even when the shell runs under Rosetta. - Downloads the latest stable release and checks the package against the release's SHA-256 checksums.
- Installs the binary at
~/.cademi/bin/cademi, withoutsudo. - Adds
~/.cademi/binto yourPATH, once, in the startup file of your shell:
| Shell | File |
|---|---|
| zsh | ~/.zshrc (or $ZDOTDIR/.zshrc) |
| bash | ~/.bash_profile on macOS, ~/.bashrc on Linux |
| fish | ~/.config/fish/conf.d/cademi.fish |
| Other | ~/.profile |
- Prints the installed version.
Open a new terminal to use cademi, or add the directory to the current session:
export PATH="$HOME/.cademi/bin:$PATH"The script requires curl.
Windows
In PowerShell:
irm https://cli.cademi.dev/install.ps1 | iexThe script downloads the amd64 or arm64 build, checks its SHA-256 checksum, installs cademi.exe in %USERPROFILE%\.cademi\bin, and adds that directory to your user PATH. Open a new terminal to use cademi.
Installer options
Both scripts read these environment variables:
| Variable | Effect |
|---|---|
CADEMI_VERSION | Version to install, for example 0.1.1. Defaults to the latest version of the channel. |
CADEMI_CHANNEL | stable (default) or beta. |
CADEMI_INSTALL_DIR | Directory for the binary. Defaults to ~/.cademi/bin (%USERPROFILE%\.cademi\bin on Windows). |
CADEMI_NO_MODIFY_PATH | Set to 1 to leave your shell startup files unchanged. macOS and Linux only. |
CADEMI_DOWNLOAD_URL | Base URL of a mirror that serves the same release files. Defaults to https://cli.cademi.dev. |
The variable must reach the shell that runs the script, not curl:
curl -fsSL https://cli.cademi.dev/install.sh | CADEMI_VERSION=0.1.1 bash$env:CADEMI_VERSION = '0.1.1'; irm https://cli.cademi.dev/install.ps1 | iexInstall the CLI where you can write to the directory. Updates replace the binary in place, so cademi update fails in a directory that needs sudo or administrator rights.
Checking the installation
cademi versioncademi 0.1.4 (api 3.4.5, commit f4cdf2e)The output shows the CLI version, the API release the CLI was built for, and the build commit. Run cademi env to see the path of the executable and the rest of the effective configuration (Environment and diagnostics).
Shell completion
cademi completion <shell> prints a completion script for bash, zsh, fish, or powershell. Completion covers commands, flags, and the allowed values of enum flags.
# zsh, current session
source <(cademi completion zsh)
# fish, every new session
cademi completion fish > ~/.config/fish/completions/cademi.fishcademi completion powershell | Out-String | Invoke-Expressioncademi completion <shell> --help explains how to load the script in every new session for each shell. The bash script requires the bash-completion package.
Updating
cademi update # install the latest version of your channel
cademi update --check # only report whether a newer version exists
cademi update --version 0.1.1 # install a specific version, also to roll backcademi update --check prints either cademi 0.1.4 is the latest stable version or the newer version that is available.
--force installs the latest version even when you already have it.
Automatic updates
At most once every 24 hours, when you run a command in a terminal, cademi checks for a newer release of your channel in the background, without delaying the command. When it finds one, it downloads, verifies, and installs it, and the next command tells you which version it updated from and to. If the update cannot be installed, the next command tells you that a newer version is available and suggests cademi update.
Automatic updates are off when any of these applies:
| Condition | How to set it |
|---|---|
| Turned off in the configuration | cademi update --auto off (turn back on with cademi update --auto on) |
CADEMI_DISABLE_AUTOUPDATE has any value | export CADEMI_DISABLE_AUTOUPDATE=1 |
CI has any value | Set by most CI services |
cademi env auto_update shows whether automatic updates are on and why.
To stay on a specific version, install it with cademi update --version <version> and turn off automatic updates. Otherwise, the next automatic check moves you to the latest version again.
Channels
stable is the default channel. beta also receives pre-release versions.
cademi update --channel beta--channel saves the channel and installs its latest version. Switching back to stable does not downgrade a newer beta version: install a stable version with --version.
Release verification
Every release publishes, for each platform, a package named cademi_<version>_<os>_<arch>.tar.gz (.zip on Windows), a checksums.txt file with the SHA-256 of every package, and checksums.txt.sig, an ed25519 signature of checksums.txt.
- The install scripts check the package against
checksums.txtand stop on a mismatch. cademi updateand automatic updates also verifychecksums.txt.sigwith the Cademí release key built into the binary before checking the package. If the signature or the checksum does not match, nothing is installed.
To verify a package yourself, download it together with checksums.txt from https://cli.cademi.dev/download/v<version>/:
curl -fsSLO https://cli.cademi.dev/download/v0.1.1/cademi_0.1.1_linux_amd64.tar.gz
curl -fsSLO https://cli.cademi.dev/download/v0.1.1/checksums.txt
sha256sum --ignore-missing -c checksums.txt # on macOS: shasum -a 256 --ignore-missing -c checksums.txtchecksums.txt.sig contains the base64-encoded ed25519 signature of the exact bytes of checksums.txt. The release public key, base64-encoded, is 4olluf48ZsVOQPpH0+EXhZwkLP5Mn3XOynPuPiKkhCI=.
Uninstalling
- Sign out of every profile.
cademi auth logoutrevokes the OAuth session of a human-mode profile, removes the profile's secrets from the keychain, and deletes the profile:
cademi profiles list
cademi auth logout --profile <name>- Find the configuration directory with
cademi env config_dirand delete it. It holds the profiles (without secrets) and the update state. - Delete the binary directory:
~/.cademion macOS and Linux,%USERPROFILE%\.cademion Windows. - Remove the
PATHentry. On macOS and Linux, delete the# cademicomment and the line after it from your shell startup file (listed in macOS and Linux). On Windows, remove%USERPROFILE%\.cademi\binfrom thePathuser environment variable.
Signing out does not revoke the API credential itself. Revoke it in the Cademí dashboard or with cademi credentials delete <credential_id> if you no longer need it.