Skip to content

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.

The CLI is not on npm yet. Build it from the repo:

Terminal window
git clone https://github.com/frostybee/nouto.git
cd nouto
pnpm install
pnpm run build:cli
node packages/cli/dist/bin/cli.js --help

The 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.

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

Run a collection:

Terminal window
nouto run my-collection.nouto.json

Run with an environment and data file:

Terminal window
nouto run my-collection.nouto.json \
--env environments.json \
--env-name Production \
--data test-data.csv

Export results as JUnit XML for CI:

Terminal window
nouto run my-collection.nouto.json \
--reporter junit \
--output results.xml

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
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.

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.