Skip to main content

๐Ÿš€ Fetch Client CLI

Fetch Client CLI is a command-line tool. It lets you run requests, folders, and collections from the Fetch Client VS Code extension - without opening VS Code.

It is built for developers, testers and CI/CD pipelines. Use it when you need a fast, light and scriptable way to run API requests.

You can use Fetch Client CLI to test APIs during development, run automated tests, create reports, or run load tests. It gives you the same features as the extension, right from your terminal.

โ“ Why use Fetch Client CLI?โ€‹

Many development workflows need API testing outside an IDE. Fetch Client CLI lets you:

  • ๐Ÿ–ฅ๏ธ Cross-platform (Windows, macOS, and Linux)
  • โ–ถ๏ธ Run requests, folders, collections, all collections, or exported collections
  • ๐Ÿ“ฆ Execute exported collections without requiring the Fetch Client database
  • โšก Performance testing with configurable virtual users and load models
  • ๐Ÿ“Š Data-driven testing using CSV or JSON data files
  • ๐Ÿงช Execute API tests and validate responses
  • ๐Ÿ“ฆ Execute exported collections without requiring the Fetch Client database
  • ๐Ÿ”— Automatically execute Pre-Requests
  • โš™๏ธ Configure and override variable sets
  • ๐Ÿ”„ Import and execute raw cURL commands
  • ๐Ÿ“„ Generate JSON, XML, HTML, CSV, and NUnit reports
  • ๐Ÿค– CI/CD friendly with appropriate exit codes
  • ๐Ÿš€ Lightweight with no additional server or services required

You don't need separate collections for your IDE and your automation. The CLI works directly with your existing Fetch Client database.

One Source of Truth

The CLI and the VS Code extension share the same database. Any change you make in one shows up in the other right away.

NEW FEATURE : Database-free execution

Running an exported collection is completely self-contained.

  • โœ… No Fetch Client database required
  • โœ… No VS Code extension required
  • โœ… Perfect for CI/CD pipelines
  • โœ… Easy to share with teammates
  • โœ… Great for running APIs on build agents or remote machines

โœจ Key Featuresโ€‹

FeatureWhat it does
Run RequestsRuns a single request
Run FoldersRuns every request inside a folder
Run CollectionsRuns an entire collection
Run Exported CollectionsExecutes requests directly from exported collection JSON files
VariablesUse global, collection, and environment variables
Pre-RequestsRuns dependent (PreFetch) requests automatically before the main request
TestsValidates API responses using test assertions
Performance TestingLoad test requests, folders, and collections with configurable virtual users
Data-Driven TestingExecute requests repeatedly using CSV or JSON data files
Report ExportExport reports in JSON, CSV, HTML, XML, and NUnit formats
cURL SupportExecute raw cURL commands directly from the CLI
CI/CD SupportWorks with GitHub Actions, Azure DevOps, Jenkins, GitLab CI, and more
Cross PlatformRuns on Windows, macOS, and Linux

โš™๏ธ How It Worksโ€‹

The CLI reads the same database as the VS Code extension. This means you can switch between the two anytime - nothing needs to be copied or re-created.

                    +----------------------+
| Fetch Client |
| VS Code Extension |
+----------+-----------+
|
Shared Database Files
|
+------------------+------------------+
| |
+-----------v-----------+ +----------v-----------+
| Fetch Client CLI | | VS Code Extension |
| | | |
| Run Requests | | Create Requests |
| Run Collections | | Edit Requests |
| Run Performance Tests | | Manage Variables |
| Generate Reports | | Organize Collections |
+------------------------+ +-----------------------+

๐Ÿ”„ A Typical Workflowโ€‹

  1. Create requests in the Fetch Client VS Code extension.
  2. Organize them into folders and collections.
  3. Set up variables and environments.
  4. Test requests interactively.
  5. Run the same collection with Fetch Client CLI.
  6. Generate a report.
  7. Add the CLI to your CI/CD pipeline.
Create Request โ†’ Configure Variables โ†’ Link Pre-Requests โ†’ Add Tests โ†’ Run Using fc-cli โ†’ Generate Report