# keys > A private secrets vault at https://keys.pagan.dev. Secrets live at > project -> environment -> folder -> KEY. Every page but this one, the > login form and the CLI downloads requires a login; every API call requires > a token. Nothing here can be read without one. If you are an agent that was pointed at this site: you cannot log in to the web pages. Use the `keys` CLI with a token the owner gives you. ## 1. Install the CLI curl -fsSL https://keys.pagan.dev/install.sh | sh Linux and macOS, amd64 and arm64. The binary goes to /usr/local/bin when that is writable, otherwise ~/.local/bin (set KEYS_INSTALL_DIR to choose). Checksums: https://keys.pagan.dev/dist/SHA256SUMS. `keys version` compares the binary against the server's build. ## 2. Authenticate You need an API token (it starts with `kys_`). Only the owner can mint one, at https://keys.pagan.dev/tokens/new or with `keys tokens new`. If you do not have one, stop and ask for it: a read-only token scoped to the one project you need. Either store it on this machine: keys auth login --url https://keys.pagan.dev --token kys_... keys auth status or pass it per process without writing it to disk: export KEYS_TOKEN=kys_... Never print a token or a secret value into logs, commits or chat. ## 3. Pick what to talk about Most commands need a project and an environment: keys projects list keys envs list -p Set them per command (-p -e [--path /folder]), in the environment (KEYS_PROJECT, KEYS_ENV, KEYS_PATH), or in a .keys.json at the root of a repository: {"project": "", "env": ""} Later sources win: ~/.config/keys/config.json, then .keys.json, then KEYS_* variables, then flags. ## 4. Common commands keys ls list keys in a folder (values masked) keys ls --reveal ...with values keys folders list folders under --path keys get KEY print one value keys run -- [args] run a command with the folder's secrets as env vars keys export --format dotenv whole folder; also shell, json, yaml keys set KEY=VALUE write (needs a token with write access) keys import --file .env load a dotenv file (needs write access) keys history KEY list a secret's versions keys help usage for any command Add --json to any command for machine-readable output. Prefer `keys run` over exporting values into files. Every read of a value is recorded in the owner's activity log with the token's name. ## 5. Errors - "not authenticated" / 401: no token, a wrong one, or it expired. - 403: the token's scope does not cover that project or environment, or it is read-only and you tried to write. - 404: no such project, environment, folder or key. Check `keys projects list`. ## HTTP API The CLI is a thin client over https://keys.pagan.dev/api/v1/, with `Authorization: Bearer kys_...` on every call. For example: GET /api/v1/projects/{project}/envs/{env}/secrets/{KEY}?path=/ GET /api/v1/export/{env}/{project}