ApiCourier.CLI 0.6.0-insider

This is a prerelease version of ApiCourier.CLI.
dotnet tool install --global ApiCourier.CLI --version 0.6.0-insider
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local ApiCourier.CLI --version 0.6.0-insider
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ApiCourier.CLI&version=0.6.0-insider&prerelease
                    
nuke :add-package ApiCourier.CLI --version 0.6.0-insider
                    

ApiCourier CLI

Run API requests, collections, flows and SQL queries from the terminal or CI, using the same execution pipeline as the ApiCourier desktop app.

ApiCourier is Git-native and local-first: your requests, collections and environments are plain YAML files in your repository. The CLI reads that same workspace, so anything you can run in the app you can run in a pipeline, with no export step and no account required.

Install

dotnet tool install -g ApiCourier.CLI

Then:

apicourier --help

Requires the .NET 10 runtime. Windows, macOS and Linux.

Running things

apicourier run request "Get User"
apicourier run collection "Smoke Tests"
apicourier run flow "Checkout"
apicourier run query "Active Accounts" --profile staging

Useful options:

Option What it does
--workspace Path to the workspace. Defaults to searching upward from the current directory.
--env, -e Environment to use for this run. Does not change the workspace's saved selection.
--reporter, -r console, json, junit, or a comma-separated combination. Defaults to console.
--out, -o Directory for reporter output files (results.json, junit.xml).
--fail-fast On run collection, stop at the first failure instead of running everything.

Running SQL queries

run query runs a saved SQL query headlessly against a connection profile — the same execution the app uses, including pre-request and post-response scripts. It takes the shared options above and adds its own:

Option What it does
--profile Connection profile to run against, by name or id. Required.
--format table, json, csv, or insert. Defaults to table on a terminal, json when output is piped or redirected.
--insert-table Target table name for the generated INSERT statements. Required when --format insert.
--row-limit Cap how many rows are returned (applied after fetch).
apicourier run query "Active Accounts" --profile "Orders DB" --env staging --format csv --row-limit 500

Connection passwords are never stored in the workspace. In a headless run the CLI reads them from the OS secret store or from an APICOURIER_SECRET_<connectionId> environment variable; if the secret is missing it exits with code 3 and prints the exact variable name to set.

In CI

The JUnit reporter is understood by most CI systems, so failed requests and failed script assertions show up as test results rather than as a wall of log output:

apicourier run collection "Smoke Tests" --env ci --reporter junit --out ./test-results

Exit codes are stable, so the process status is meaningful on its own.

Workspaces

apicourier workspace init ./my-workspace --git
apicourier workspace info
apicourier workspace validate
apicourier workspace sync
apicourier env list

workspace sync reloads the local cache from the YAML on disk — run it after a git pull. workspace validate is a useful pipeline gate: it fails when a workspace file is malformed, which catches unresolved merge conflict markers before a run does.

Scripts

Pre-request and post-response scripts run in the CLI as they do in the app, in both C# and JavaScript. C# scripts execute in a sandboxed worker process and are blocked in a workspace you have not trusted; pass --trust-scripts (or set APICOURIER_TRUST_SCRIPTS=1) to allow them in automation. A declared script that was blocked and never ran fails the run rather than being silently skipped.

Licensing

ApiCourier is commercial software with a free tier that covers the desktop app and this CLI for personal or internal business use — no subscription, no account, no time limit. Paid tiers unlock additional features.

See apicourier.dev/license for the licensing model and apicourier.dev/terms for the Terms of Service, which are the controlling agreement.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.6.0-insider 48 9/26/2026
0.5.0-insider 67 9/19/2026
0.3.5-insider 96 8/22/2026
0.3.1-insider 106 7/31/2026
0.3.0-insider 97 7/30/2026