CLI Runner
rosty-cli lets you run Rostyman collections from the command line — useful for CI/CD pipelines, automated testing, and scripting. It ships bundled inside the Rostyman desktop app — no separate install or build step needed.
Full parity with the app
rosty-cli runs requests through the same engine cores as the desktop app, so a collection behaves identically in CI and in the GUI:
- All auth types — Bearer, Basic, API Key, OAuth 2.0, OAuth 1.0 (HMAC-SHA1 / PLAINTEXT), Digest (401 challenge), AWS Signature v4, NTLM (NTLMv2 handshake), Hawk, JWT Bearer, Akamai EdgeGrid, and ASAP, plus
inheritup the folder/collection chain. - Dynamic variables —
{{$timestamp}},{{$randomUUID}},{{$guid}},{{$randomInt}}, and the rest, resolved exactly as in the app. - Cookie jar — Set-Cookie responses are stored and replayed across the run (domain/path/secure/expiry aware).
- Scripts — pre-request and post-response scripts run with the full
rm.*API and Postman-compatiblepm.*aliases (pm.response.headers.get(),pm.test,pm.environment/pm.globals/pm.variableswith.has(),pm.request,pm.info). - Raw-body Content-Type — auto-set from the body language when no explicit header is present.
- TLS, redirects & proxy — skip TLS verification, cap or disable redirects, and route through HTTP/HTTPS/SOCKS5 proxies.
- mTLS client certificates — honored in database mode from the workspace's configured certificates.
Location
rosty-cli is available as a global command after installing Rostyman. On Windows it is added to PATH automatically by the installer. On macOS and Linux, symlink it or call it directly from the app bundle if needed.
Supported inputs
rosty-cli run <collection> accepts:
- A native
.rostymancollection export - A Postman v2.1 JSON collection export
- A collection stored directly in the live
rostyman.dbdatabase (use--db-path+--workspace; list available collections withrosty-cli list)
If the argument ends in .json/.rostyman or contains a path separator it is treated as a file; otherwise it is looked up by name in the database.
Basic Usage
Run a collection file:
rosty-cli run my-collection.rostyman
Run a collection from the database with an environment:
rosty-cli run "Users API" --environment Staging --db-path /shared/rostyman.db --workspace Production
List collections saved in the database:
rosty-cli list --workspace Staging
Options
| Flag | Description | Default |
|---|---|---|
--environment <name|file> | Activate an environment by name (DB) or path to a Postman environment JSON | None |
--globals <file> | Path to a Postman globals JSON file | None |
--iteration-data <file> | CSV or JSON file for data-driven runs — iterates the collection once per row | None |
--iteration-count <n> | Number of times to run the full collection (ignored when --iteration-data is set) | 1 |
--delay-request <ms> | Pause between requests in milliseconds | 0 |
--timeout <ms> | Per-request timeout in milliseconds | 30000 |
--bail | Abort the run on the first test failure | false |
--insecure | Skip TLS certificate verification (self-signed / internal hosts) | false |
--max-redirects <n> | Maximum redirects to follow | 10 |
--no-follow-redirects | Do not follow redirects (same as --max-redirects 0) | — |
--proxy <url> | Route requests through a proxy (http://, https://, socks5://) | None |
--reporters <list> | Comma-separated reporters: cli, json, junit | cli |
--reporter-json-export <file> | Write the JSON report to a file | None |
--reporter-junit-export <file> | Write the JUnit XML report to a file | None |
--db-path <path> | Path to rostyman.db (database mode) | App data dir |
--workspace <name|id> | Target a specific workspace by name or ID | Default workspace |
-v, --version | Print version number and exit | — |
-h, --help | Print help and exit | — |
In database mode, rosty-cli also reads the workspace's request settings — ssl_verify, follow_redirects, http_timeout, the configured proxy, and client certificates — so runs match the app's behavior without extra flags.
Reporters
Combine reporters with a comma. The CLI reporter prints to stdout; JSON/JUnit can print to stdout or be written to a file.
rosty-cli run "Users API" --reporters cli,json,junit \
--reporter-json-export results.json \
--reporter-junit-export results.xml
CLI Reporter (default)
Human-readable output with colors and pass/fail indicators:
Running: My Collection (3 requests)
GET /users ...................... 200 OK (45ms)
✓ Status is 200
✓ Response has users array
POST /users ..................... 201 Created (62ms)
✓ User created successfully
GET /users/1 ................... 200 OK (38ms)
✓ Response contains user data
Results: 4/4 passed | 0 failed | 145ms total
JSON Reporter
Machine-readable JSON, suitable for parsing in scripts:
rosty-cli run collection.rostyman --reporters json --reporter-json-export results.json
JUnit Reporter
XML output compatible with CI systems (Jenkins, GitHub Actions, GitLab CI):
rosty-cli run collection.rostyman --reporters junit --reporter-junit-export results.xml
Test Scripts
The CLI executes pre-request and post-response scripts defined in your collection using the same rm.* API as the desktop app, with Postman-compatible pm.* aliases:
// Pre-request script
rm.environment.set("timestamp", Date.now());
// Test script (full Chai BDD supported)
rm.test("Status is 200", () => {
rm.expect(rm.response.code).to.equal(200);
});
// pm.* aliases work too — collections written against Postman run unchanged
pm.test("Response has id", () => {
const body = pm.response.json();
pm.expect(body).to.have.property("id").that.is.a("number");
});
Data-Driven Runs
Pass a CSV or JSON file with --iteration-data to iterate the collection once per row, substituting column values as variables:
rosty-cli run collection.rostyman --iteration-data test-cases.csv
CSV example (test-cases.csv):
email,expectedStatus
user@example.com,200
invalid@,400
,422
Each row runs the full collection with {{email}} and {{expectedStatus}} resolved from that row's values.
Iterations
Run a collection multiple times with --iteration-count:
rosty-cli run load-test.rostyman --iteration-count 100 --delay-request 500
Runs the collection 100 times with a 500ms delay between requests.
CI/CD Integration
Example GitHub Actions step (pointing at a committed .rostyman export or a copy of rostyman.db):
- name: Run API tests
run: |
rosty-cli run tests/api-collection.rostyman \
--environment ci \
--reporters junit \
--reporter-junit-export test-results/api.xml \
--bail
- name: Publish test results
uses: mikepenz/action-junit-report@v3
with:
report_paths: test-results/api.xml
Exit Codes
| Code | Meaning |
|---|---|
0 | All tests passed |
1 | One or more tests/requests failed |
2 | Runtime error (file not found, invalid config, etc.) |