A command-line interface for managing API monitors, schedules, SLOs, and more on the APImetrics platform, by APIContext Inc.
For more information, please visit our main documentation site, available at https://docs.apicontext.com/cli.
The binaries for the APImetrics CLI can be downloaded from the releases page. Choose the appropriate version for your operating system and put the executable in your path for easy access from the command line.
You can install the APImetrics CLI using Homebrew:
brew install apicontext/tap/apimetrics-cliNote: Coming soon, not available yet
You can install the APImetrics CLI using the Windows Package Manager (winget):
winget install APImetrics.APImetricsCLIYou can install the APImetrics CLI by downloading the binary from the releases page.
curl -LO https://github.com/APImetrics/APImetrics-cli/releases/latest/download/apimetrics-[version]-linux-amd64.tar.gz
tar -xzf apimetrics-[version]-linux-amd64.tar.gz
sudo mv apimetrics /usr/local/bin/apimetricsNote: [version] should be replaced with the specific version you want to download, e.g., 0.0.1.
apimetrics loginThis opens your browser for OAuth2 authentication. Your credentials are cached locally and refreshed automatically.
All commands require an active project. Run the following to choose one:
apimetrics project selectTo confirm which project is currently active:
apimetrics project show# List all API calls in the current project
apimetrics list-calls
# List all schedules
apimetrics list-schedulesTo see all supported commands, run
apimetrics --helpAll create and update commands read a JSON body from stdin using a heredoc. There is no --body, --data, or -d flag.
apimetrics create-call <<'EOF'
{
"meta": {
"name": "My API Check"
},
"request": {
"method": "GET",
"url": "https://api.example.com/health"
}
}
EOFYou can also use CLI Shorthand as a concise alternative to JSON:
apimetrics create-call meta.name: "My API Check", request.method: GET, request.url: https://api.example.com/healthOr pipe from a file:
apimetrics create-call < my-call.jsonUse -o / --rsh-output-format to control output:
| Format | Description |
|---|---|
auto (default) |
Pretty in terminal, JSON when piped |
json |
Standard JSON |
yaml |
YAML |
table |
Tabular layout (best for lists) |
readable |
Colorized human-readable format |
gron |
Grep-friendly flattened format |
# Table output
apimetrics list-calls -o table
# Raw JSON for scripting
apimetrics list-calls -o json
# Filter results with a query expression
apimetrics list-calls -f body[0].meta.nameWhen output is redirected to a pipe or file, color is disabled and only the body is printed as JSON automatically.
These flags work with every command:
| Flag | Short | Description |
|---|---|---|
--rsh-output-format |
-o |
Output format (auto/json/yaml/table/readable/gron) |
--rsh-filter |
-f |
Filter/project response using a query expression |
--rsh-raw |
-r |
Raw output (strips quotes from strings) |
--rsh-verbose |
-v |
Verbose logging |
--rsh-header |
-H |
Add a request header (repeatable) |
--rsh-query |
-q |
Add a query parameter (repeatable) |
--rsh-profile |
-p |
Use a named auth profile |
--rsh-server |
-s |
Override the API server base URL |
--rsh-no-cache |
Disable HTTP caching | |
--rsh-no-paginate |
Disable automatic pagination | |
--rsh-retry |
Retry count (default 2) | |
--rsh-timeout |
-t |
HTTP request timeout |
--rsh-insecure |
Disable TLS verification |
Enable tab completion for your shell:
# Bash
apimetrics completion bash >> ~/.bash_profile
# Zsh
apimetrics completion zsh >> ~/.zshrc
# Fish
apimetrics completion fish > ~/.config/fish/completions/apimetrics.fish
# PowerShell
apimetrics completion powershell >> $PROFILEOnce enabled, press tab to explore available commands and their arguments.
The CLI includes built-in skills for AI coding agents (e.g. Claude Code). These skills teach agents how to create and configure monitors using the CLI.
Install skills into Claude Code:
apimetrics skills install --claude-codePrint all skills to stdout (for any agent or model that can read context):
apimetrics onboardAvailable skills:
setup-api-monitor— Create an API (HTTP) monitor, attach a schedule, and verify itsetup-browser-monitor— Create a browser monitor, attach a schedule, and verify itsetup-mcp-monitor— Create an MCP protocol monitor with session steps
Configuration and cached tokens are stored in platform-specific locations:
| OS | Config | Cache |
|---|---|---|
| macOS | ~/Library/Application Support/apimetrics/ |
~/Library/Caches/apimetrics/ |
| Linux | ~/.config/apimetrics/ |
~/.cache/apimetrics/ |
| Windows | %AppData%\apimetrics\ |
%LocalAppData%\apimetrics\ |
Override these locations with environment variables:
export APIMETRICS_CONFIG_DIR=/path/to/config
export APIMETRICS_CACHE_DIR=/path/to/cacheapimetrics logoutThis removes cached tokens. Run apimetrics login again to re-authenticate.
For support questions, visit APImetrics Support and open a request.
For reporting bugs or requesting features, please open an issue on the GitHub repository.
We welcome contributions! Feel free to fork the repository, make changes, and submit pull requests.