# Insomnia — Open-Source API Client for REST, GraphQL & gRPC > Design, debug, and test APIs with a collaborative open-source client that supports REST, GraphQL, gRPC, and WebSocket protocols. ## Install Save as a script file and run: # Insomnia — Open-Source API Client for REST, GraphQL & gRPC ## Quick Use ```bash # macOS brew install --cask insomnia # Ubuntu / Debian sudo snap install insomnia # Or download from https://insomnia.rest/download ``` ## Introduction Insomnia is an open-source, cross-platform API client built by Kong. It gives developers a visual interface for designing, debugging, and testing HTTP-based APIs without writing throwaway scripts or wrestling with curl flags. ## What Insomnia Does - Sends REST, GraphQL, gRPC, and WebSocket requests through a polished desktop UI - Organizes requests into workspaces and folders for project-level grouping - Supports environment variables and template tags for reusable config across dev/staging/prod - Generates client code snippets in 20+ languages from any saved request - Provides a built-in response timeline and cookie jar for debugging auth flows ## Architecture Overview Insomnia is an Electron desktop app with a React frontend and a Node.js backend layer. Requests are dispatched through libcurl bindings (node-libcurl) for maximum protocol compatibility. Plugins extend the core through a hook-based system that can add authentication helpers, template tags, and custom themes. Workspace data is stored locally in NeDB, an embedded document database, making it fully offline-capable. ## Self-Hosting & Configuration - Install via Homebrew, Snap, Scoop, or direct download for macOS, Linux, and Windows - Import OpenAPI 3.x, Swagger 2.0, HAR, or Postman collections to bootstrap a workspace - Configure environment variables in JSON to switch between local, staging, and production targets - Add client certificates under Preferences for mutual-TLS endpoints - Install community plugins from the Plugin Hub for OAuth helpers, AWS Signature v4, and more ## Key Features - Built-in design mode for authoring and linting OpenAPI specs without leaving the app - Visual response viewer with JSON filtering, image preview, and raw hex mode - Git sync lets teams version-control workspaces in any Git provider - Cookie management auto-captures and replays session cookies across requests - Lightweight enough to start in under two seconds on modern hardware ## Comparison with Similar Tools - **Postman** — feature-rich but increasingly cloud-dependent; Insomnia stays local-first with optional sync - **Hoppscotch** — browser-based and lightweight; Insomnia offers deeper desktop integration and gRPC support - **Bruno** — Git-native API IDE stored as plain files; Insomnia provides a more visual workflow with plugin ecosystem - **HTTPie Desktop** — clean and minimal; Insomnia handles more protocols and has a larger plugin library - **curl** — the universal CLI baseline; Insomnia adds a visual layer while still using libcurl under the hood ## FAQ **Q: Is Insomnia fully open source?** A: The core desktop client is MIT-licensed. Kong offers a paid cloud tier for team sync and collaboration, but the local client works without it. **Q: Can I migrate from Postman?** A: Yes. Insomnia imports Postman Collection v2 and environment files directly via File > Import. **Q: Does Insomnia support automated testing?** A: Insomnia includes a test runner (Inso CLI) that executes request suites in CI pipelines using the same workspace files. **Q: How does Git sync work?** A: Each workspace can be linked to a Git repo. Insomnia serializes workspace data to YAML files and commits/pulls through its built-in Git UI. ## Sources - https://github.com/Kong/insomnia - https://docs.insomnia.rest --- Source: https://tokrepo.com/en/workflows/d4c71a18-3de3-11f1-9bc6-00163e2b0d79 Author: Script Depot