CLI Installation
The pakyas CLI wraps your jobs and talks to the Pakyas API. It provides:
- Start, success, and failure pings with the job’s exit code
- The tail of the job’s error output attached to failure pings
- Check, project, and API key management from the terminal
- A local slug cache so pings by slug don’t call the API every time
Installation
Section titled “Installation”macOS & Linux
Section titled “macOS & Linux”curl -fsSL https://pakyas.com/install.sh | shThe script downloads the release for your platform (macOS or Linux, x86_64 or ARM64), verifies its SHA-256 checksum, and installs pakyas to ~/.local/bin. If ~/.local/bin is not on your PATH, the script prints the line to add to your shell profile.
Installer options are environment variables, set on the sh side of the pipe:
| Variable | Description |
|---|---|
PAKYAS_INSTALL_DIR | Install directory (default ~/.local/bin) |
PAKYAS_VERSION | Install a specific version, for example 0.1.9 (default: latest) |
PAKYAS_NO_VERIFY | Skip checksum verification (not recommended) |
# Install system-wide (for example in a Docker image, running as root)curl -fsSL https://pakyas.com/install.sh | PAKYAS_INSTALL_DIR=/usr/local/bin sh
# Pin a versioncurl -fsSL https://pakyas.com/install.sh | PAKYAS_VERSION=0.1.9 shWindows is not supported by the installer; use WSL.
Manual Installation
Section titled “Manual Installation”Download pakyas-<version>-<target>.tar.gz for your platform from the releases page, extract it, and put the pakyas binary on your PATH. Each archive has a matching .sha256 file.
From Source
Section titled “From Source”cargo install --git https://github.com/Pakyas-Monitoring/pakyas-cliVerify Installation
Section titled “Verify Installation”pakyas --versionUpdating
Section titled “Updating”pakyas update # install the latest versionpakyas update --check # only report whether an update is availableThe CLI also checks for updates in the background (at most once a day) and prints a notice on stderr after the command finishes. The check is skipped for ping, monitor, and completion, when stderr is not a terminal, when CI is set, and with --no-update-check or PAKYAS_NO_UPDATE_CHECK=1. See update.
Authentication
Section titled “Authentication”Browser Login (Recommended)
Section titled “Browser Login (Recommended)”pakyas loginOpens your browser, lets you pick an organization, and stores an API key for it in the CLI’s config directory. The first project of the organization becomes the default project.
API Key
Section titled “API Key”pakyas login --api-key pk_live_xxxStores the key for the organization it belongs to. For CI and other non-interactive environments you don’t need to log in at all: set PAKYAS_API_KEY, or use --public-id to ping without any key. See CLI and Cron Setup.
Check what the CLI will use:
pakyas whoamiSee auth for logout, auth status, and managing keys for several organizations.
Configuration
Section titled “Configuration”State lives in one directory per user:
| Platform | Directory |
|---|---|
| macOS | ~/Library/Application Support/com.pakyas.pakyas/ |
| Linux | ~/.config/pakyas/ (or $XDG_CONFIG_HOME/pakyas/) |
| Windows | %APPDATA%\pakyas\pakyas\config\ |
It contains config.toml (active organization, default project, preferences), credentials.json (API keys per organization), and cache/ (slug cache and update check). Set PAKYAS_CONFIG_DIR to use another directory.
Common environment variables:
| Variable | Description |
|---|---|
PAKYAS_API_KEY | API key; overrides stored credentials |
PAKYAS_ORG | Organization ID or name |
PAKYAS_PROJECT | Project ID, slug, or name |
PAKYAS_FORMAT | Default output format |
PAKYAS_CONFIG_DIR | Config directory |
Settings are resolved in this order: command-line flag, environment variable, config.toml, built-in default. The full list is on CLI Configuration.
Global Flags
Section titled “Global Flags”| Flag | Env Var | Default | Description |
|---|---|---|---|
--org <ORG> | PAKYAS_ORG | saved org | Organization ID or name (an ID avoids a lookup) |
--project <PROJECT> | PAKYAS_PROJECT | default project | Project ID, slug, or name |
--format <FMT> | PAKYAS_FORMAT | table | table, json, ndjson, or yaml |
-v, --verbose | - | off | Extra diagnostics on stderr |
--no-update-check | PAKYAS_NO_UPDATE_CHECK | off | Skip the background update check |
--ignore-env | - | off | Ignore PAKYAS_API_KEY for this command |
--display-tz <TZ> | PAKYAS_DISPLAY_TZ | local | Timezone for timestamps: local or utc |
--time <MODE> | PAKYAS_TIME | both | Time display: relative, absolute, or both |
--no-color | NO_COLOR | off | Disable colored output |
--plain | - | off | ASCII labels instead of symbols |
--debug-http | - | off | Print API requests, statuses, and response bodies to stderr (never headers or keys) |
Global flags can go before or after the subcommand. Which commands honor --format is listed under Output Formats.
Commands
Section titled “Commands”| Command | Description |
|---|---|
login, logout, whoami, auth | Authentication and stored credentials |
org | List and switch organizations |
project | List and create projects, set the default |
check | List, create, show, update, pause, resume, delete, logs, sync |
check inspect | Current state and configuration of a check |
check doctor | Diagnose a check |
check tail | Show and follow timeline events |
ping | Send a single ping |
monitor | Run a command and report start, success, or failure |
api-key | Create, list, and revoke API keys |
completion | Shell completion scripts |
update | Update the CLI |
Quick Tour
Section titled “Quick Tour”# Pick a project for new checkspakyas project listpakyas project default production
# Create checkspakyas check create backup-nightly --cron "0 2 * * *" --tz Asia/Manilapakyas check create api-heartbeat --every 5m
# List all checks in the organizationpakyas check list
# Wrap a jobpakyas monitor backup-nightly -- /usr/local/bin/backup.sh
# Send a ping manuallypakyas ping api-heartbeatmonitor passes the job’s stdout and stderr through unchanged and writes nothing to stdout itself, so redirects work as expected:
pakyas monitor db-dump -- pg_dump -h localhost mydb > backup.sqlExit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Other errors, or check doctor findings at or above --fail-on |
| 2 | Usage error |
| 3 | Not found |
| 4 | Temporary failure (network, rate limit, server error): safe to retry |
| 5 | Not logged in, or the API key was rejected |
| 6 | Permission denied |
| 7 | Unexpected response from the API |
See Exit Codes for details. CLI versions before 0.1.10 exit 1 for every error.
pakyas monitor exits with the wrapped command’s own exit code, or 3 if the run could not be recorded in Pakyas. See monitor exit codes.
Next Steps
Section titled “Next Steps”- CLI Configuration - Flags, environment variables, config files, CI setup
- check - Create and manage checks
- monitor - Wrap commands
- External Monitors - Run alongside healthchecks.io or Cronitor during a migration