CLI
The Nouto CLI lets you run API collections from the terminal for CI/CD pipelines, automated testing, and scripting workflows. It uses the same core engine as the VS Code extension and desktop app.
Installation
Section titled “Installation”The CLI is not on npm yet. Build it from the repo:
git clone https://github.com/frostybee/nouto.gitcd noutopnpm installpnpm run build:clinode packages/cli/dist/bin/cli.js --helpThe examples below use nouto as the command name. From a source checkout, run the same command as node packages/cli/dist/bin/cli.js <command> after building the CLI.
Commands
Section titled “Commands”| Command | Description |
|---|---|
nouto run |
Run a collection with data-driven testing and report export |
nouto benchmark |
Benchmark a request with percentile statistics |
nouto import |
Import from Postman, Insomnia, OpenAPI, HAR, cURL, and more |
nouto export |
Export to Nouto native or HAR format |
nouto codegen |
Generate code from a request across HTTP clients and TypeScript type output |
Quick Start
Section titled “Quick Start”Run a collection:
nouto run my-collection.nouto.jsonRun with an environment and data file:
nouto run my-collection.nouto.json \ --env environments.json \ --env-name Production \ --data test-data.csvExport results as JUnit XML for CI:
nouto run my-collection.nouto.json \ --reporter junit \ --output results.xmlGlobal Options
Section titled “Global Options”These flags are shared across run and benchmark commands:
| Option | Description |
|---|---|
--env-var <KEY=VALUE> |
Override a variable (repeatable) |
--env-file <file> |
Load variables from a .env file |
--insecure |
Disable SSL certificate verification |
--cacert <file> |
Custom CA certificate file |
--proxy <url> |
HTTP/HTTPS/SOCKS5 proxy URL |
--noproxy |
Disable all proxy settings |
--verbose |
Show detailed request/response information |
Exit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
0 |
All requests passed |
1 |
One or more requests failed assertions or scripts |
2 |
Collection or data file not found |
3 |
Environment file not found or invalid |
4 |
Invalid collection format |
5 |
Request not found (benchmark, codegen) |
6 |
Import format detection failed |
7 |
Other error |
Use the exit code in CI pipelines to fail the build when API tests fail.
Collection Files
Section titled “Collection Files”The CLI operates on Nouto native JSON files (.nouto.json). Export collections from the VS Code extension or desktop app using Export > Nouto Native, or use nouto import to convert from other formats.
