Skip to main content

Insomnia

A feature-rich desktop API client by Kong for REST, GraphQL, gRPC, and WebSocket development. Design APIs with OpenAPI, manage environments, write unit tests, and automate collection runs with the inso CLI.

✓ REST, GraphQL, gRPC, WebSocket ✓ OpenAPI design mode ✓ Environment management ✓ Unit testing built-in ✓ inso CLI for CI/CD ✓ Plugin system

What is Insomnia?

Insomnia is a desktop API development environment maintained by Kong. It provides a clean, minimal interface for sending HTTP/REST, GraphQL, gRPC, and WebSocket requests. Beyond basic request management, Insomnia includes an OpenAPI design editor, a plugin system for custom behavior, built-in unit testing, and Git-based sync for version-controlled collaboration.

The inso CLI makes Insomnia a CI-friendly tool — you can run test suites, lint OpenAPI specs, and export design documents directly from your pipeline. Combined with Git Sync, Insomnia collections live alongside your codebase and are treated as versioned artifacts.

Key Features

Installation

# Download Insomnia from the official site
# https://insomnia.rest/download
# Available for macOS, Windows, and Linux (.deb, .rpm, AppImage)

# Install the Insomnia CLI (inso) for CI/CD automation
npm install -g insomnia-inso

# Verify CLI installation
inso --version

Using the inso CLI

The inso CLI reads from an Insomnia workspace export file or a Git-synced workspace directory. Use it to run tests and lint specs as part of your automated pipeline.

# Run unit tests from a collection using inso CLI
inso run test "My API Tests" --env "Staging" --reporter junit

# Lint an OpenAPI specification file
inso lint spec openapi/my-api.yaml

# Export a design document to OpenAPI YAML
inso export spec "My API" --output openapi/my-api.yaml

# Run tests non-interactively in CI
inso run test "Regression Suite"   --env "CI Environment"   --ci   --reporter junit   --output results/junit.xml

Environment Variables

Insomnia uses a template syntax with double curly braces {{ variable }} to reference environment values anywhere in a request — URL, headers, body, or auth fields.

// Insomnia environment — stored per workspace
// Switch environments via the dropdown in the top bar

{
  "base_url": "https://api.example.com",
  "api_key": "{{ process.env.API_KEY }}",   // injects from process env in inso CLI
  "user_id": 42,
  "timeout": 5000
}

// Reference in request URL:
// GET {{ base_url }}/users/{{ user_id }}

// Reference in headers:
// Authorization: Bearer {{ api_key }}

Writing Unit Tests

Open any request, click the Test tab, and write Chai-style assertions. Tests run in the app UI or via inso run test in CI. Group related tests under named test suites for organized reporting.

// Insomnia unit test — written in the Test tab of a request
const response = await insomnia.send();

expect(response.status).to.equal(200);
expect(response.headers['content-type']).to.include('application/json');

const body = JSON.parse(response.body);
expect(body).to.have.property('id');
expect(body.id).to.be.a('number');
expect(body.name).to.be.a('string').with.length.above(0);

Plugin System

Install plugins from npm (insomnia-plugin-*) via Preferences or build your own. Plugins can add request/response lifecycle hooks, custom auth methods, and new themes.

// insomnia-plugin-add-timestamp/index.js
// A simple Insomnia plugin that injects a request timestamp header

module.exports.requestHooks = [
  async (context) => {
    context.request.setHeader(
      'X-Request-Time',
      new Date().toISOString()
    );
  }
];

// package.json for the plugin
{
  "name": "insomnia-plugin-add-timestamp",
  "version": "1.0.0",
  "insomnia": {
    "name": "Add Timestamp Header",
    "description": "Injects X-Request-Time on every request"
  }
}

Insomnia vs Postman

Feature Insomnia Postman
gRPC supportYes (native)Limited
OpenAPI design modeYes (built-in)Via API Network
Git SyncYes (built-in)Partial (paid)
Mock serverNoYes
Plugin marketplaceSmall (npm)Large
UI cleanlinessMinimal, fastFeature-dense

Pros and Cons

Pros

  • ✓ Clean, fast interface that stays out of your way
  • ✓ First-class gRPC support
  • ✓ OpenAPI design mode with live validation
  • ✓ Git Sync for version-controlled collaboration
  • ✓ inso CLI enables full CI/CD integration

Cons

  • ✗ No built-in mock server
  • ✗ Smaller plugin ecosystem than Postman
  • ✗ E2E encrypted cloud sync requires a paid plan
  • ✗ Desktop-only — no web app equivalent
  • ✗ Team sharing features require a paid plan

Frequently Asked Questions

What is Insomnia?▼

Insomnia is a desktop API client by Kong that supports REST, GraphQL, gRPC, and WebSocket. It provides a rich GUI for building and organizing HTTP requests, managing environments, writing unit tests, and designing APIs with OpenAPI. The inso CLI enables running collections and linting specs in CI/CD pipelines.

How does Insomnia compare to Postman?▼

Insomnia and Postman are both full-featured desktop API clients. Insomnia is known for its clean, minimal interface and strong gRPC support — an area where Postman has historically been weaker. Postman has a larger plugin marketplace and more mature team collaboration features. Insomnia's design (OpenAPI) mode gives it an advantage for API-first development workflows. Both have free tiers with optional cloud sync.

What is the inso CLI and how do I use it?▼

inso (Insomnia CLI) is a Node.js command-line tool for automating Insomnia operations. You can run unit tests (inso run test), lint OpenAPI specs (inso lint spec), and export design documents (inso export spec). It reads from local Insomnia workspace export files or the cloud-synced workspace and is designed for CI/CD integration with JUnit XML output.

Does Insomnia support OpenAPI / API design?▼

Yes. Insomnia has a Design mode where you can write or import OpenAPI 3.x specifications. The spec editor has live validation, syntax highlighting, and a rendered preview. You can generate request collections directly from the spec and keep the spec in sync as you add requests. The inso CLI can lint and export these specs as part of your pipeline.

How does Insomnia handle authentication?▼

Insomnia supports OAuth 2.0, OAuth 1.0, Bearer Token, Basic Auth, Digest Auth, NTLM, AWS v4 signing, and API Keys as first-class auth types configurable per-request or inherited at the folder level. For OAuth 2.0, it can open a browser to complete the authorization code flow and automatically refresh tokens. Auth configurations can reference environment variables for secrets.

Can Insomnia sync collections across machines?▼

Yes. Insomnia offers cloud sync through your Insomnia account (free tier includes basic sync, paid plans include team sharing and E2E encryption). Alternatively, you can store the workspace export file in a Git repository and use Git Sync, which commits workspace changes directly to a repo — providing version history, branching, and team collaboration without a cloud account.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

GraphQL Query Builder OpenAPI Validator GraphQL Fragment Generator GraphQL Schema Validator v2 GraphQL Query Formatter API Request Builder API Response Mock Generator API Response Time Tester CSS Clip-Path Generator OpenAPI Schema Validator OpenAPI Mock Generator GraphQL Client Configurator API Test Case Generator HTTP API Tester API Mock Server Config Generator Jest Testing Framework Guide API Rate Limit Calculator API Response Formatter & Analyzer LLM Cost Calculator WebSocket Test Client AI Prompt Cost Calculator REST API Request Builder Vitest Guide — Vite-native Testing Cypress Frontend Testing Guide Mock Service Worker (MSW) API Mocking Guide LLM Prompt Cost Calculator API Response Mocker AI Rate Limit Calculator Turso Edge DB Explorer API Key Generator AI Doc Generator — Pro Tool AI Unit Test Generator — Pro Tool Git Command Builder HTTP Methods Reference HTTP Code Snippet Generator HTTP Status Code Reference HTTP Status Code Reference JSON Diff Viewer JSON Diff WebSocket Tester JSON Path Finder Rate Limiter Tester API Changelog Generator HTTP Mock Response Builder Rate Limit Calculator CORS Policy Builder Redis Command Tester HTTP Status Code Lookup Docker Run Command Builder HTTP Status Code Lookup Vue Component Generator HTTP Status Code Reference LLM Context Window Calculator LLM Token Counter k6 Load Test Script Generator NATS Connection String Builder Playwright E2E Test Generator OAuth2 Flow Visualizer mTLS Certificate Chain Builder Prompt Token Estimator Playwright E2E Testing Guide Pulumi Modern IaC Guide AES Encryptor / Decryptor ArgoCD Application Generator HTML5 Canvas API Playground Prompt Injection Tester Token Context Calculator OpenAI Function Calling Generator Token Counter & Cost Estimator AI API Rate Limit Calculator

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →