Kong / insomnia
Kong / Insomnia
Insomnia API Client is an open-source, cross-platform API client for GraphQL, REST, WebSockets, Server-Sent Events (SSE), gRPC, and any other HTTP-compatible protocol. With Insomnia, you can: debug APIs using the most popular protocols and formats; design APIs using the native OpenAPI editor and visual preview; test APIs using native test suites and collection runners; mock APIs using a cloud or self-hosted mocking server; build CI/CD pipelines using the native Insomnia CLI for linting and testing; collaborate with others using the many collaboration features; and more, including the ability to use 3rd-party plugins.
Insomnia API Client 是一款开源、跨平台的 API 客户端,支持 GraphQL、REST、WebSockets、Server-Sent Events (SSE)、gRPC 以及任何其他兼容 HTTP 的协议。使用 Insomnia,你可以:使用最流行的协议和格式调试 API;使用原生 OpenAPI 编辑器和可视化预览设计 API;使用原生测试套件和集合运行器测试 API;使用云端或自托管的 Mock 服务器模拟 API;使用原生 Insomnia CLI 构建 CI/CD 流水线以进行 Lint 和测试;利用多种协作功能与他人合作;以及更多功能,包括使用第三方插件的能力。
The following storage options are supported for your Insomnia projects, collections, design specs, and all other resources: Local Vault (for 100% local storage of collections, design specs, and every other resource), Git Sync (for Git storage using any 3rd-party Git repository, without going through the cloud), and Cloud Sync (for cloud collaboration, optionally end-to-end encrypted (E2EE) in the cloud).
Insomnia 为你的项目、集合、设计规范及所有其他资源提供了以下存储选项:本地仓库(Local Vault,用于 100% 本地存储集合、设计规范及所有其他资源)、Git 同步(Git Sync,使用任何第三方 Git 仓库进行存储,无需经过云端)以及云端同步(Cloud Sync,用于云端协作,并可选端到端加密 (E2EE))。
Get started for free. Insomnia is available for Mac, Windows, and Linux and can be downloaded from the website: https://insomnia.rest
免费开始使用。Insomnia 支持 Mac、Windows 和 Linux,可从官网下载:https://insomnia.rest
Account & Subscriptions
账户与订阅
You can use Insomnia without an account with the local Scratch Pad, or you can create an account for free to get access to the full capabilities of the product. Even with an account, Insomnia only stores your projects and files according to the storage backend that you have selected, which can be Local Vault, Cloud Sync, Git Sync, or any combination of them. As such—for example—you have the freedom to choose to store sensitive projects 100% locally or in a Git repository, while still being able to collaborate on others in the cloud. It’s the best of both worlds. For added security, Insomnia also offers a Private Environments feature, where your environment configuration is always stored locally and never in the cloud, independently from the storage option that you have chosen for your project.
你可以通过本地的“草稿板”(Scratch Pad)在无需账户的情况下使用 Insomnia,也可以免费创建一个账户以获取产品的全部功能。即使拥有账户,Insomnia 也只会根据你选择的存储后端(本地仓库、云端同步、Git 同步或它们的组合)来存储你的项目和文件。因此,你可以自由选择将敏感项目 100% 本地存储或存放在 Git 仓库中,同时仍能通过云端协作处理其他项目,实现两全其美。为了增加安全性,Insomnia 还提供了“私有环境”(Private Environments)功能,无论你为项目选择了哪种存储方式,环境配置始终存储在本地,绝不会上传至云端。
Premium features and support
高级功能与支持
Insomnia has a very generous free plan that will be satisfactory for most users, but if you need to get access to premium capabilities like unlimited collaboration, the Git Sync feature, the ability to create organizations for your projects, using a 3rd-party IDP for logins (SAML, OIDC), and many other features, then you can explore the other subscription plans. You can compare all subscription plans and get started for free.
Insomnia 提供了非常慷慨的免费计划,足以满足大多数用户的需求。但如果你需要使用高级功能,如无限协作、Git 同步功能、为项目创建组织、使用第三方 IDP 登录(SAML、OIDC)以及其他许多功能,可以查看其他订阅计划。你可以对比所有订阅计划并免费开始使用。
Why does Insomnia require an account?
为什么 Insomnia 需要账户?
Insomnia does not require an account if you decide to use the local Scratch Pad, but to access most capabilities of the product, we require an account. Your account data is securely stored in compliance with ISO27001, SOC 2 Type II, ISO27018, Gold CSA STAR regulations and in accordance with our terms of service and privacy policy. We require an account to sustainably build and improve the product, and to make sure we can continue to offer the many core capabilities in a free and open-source distribution. While open-source software is free to use, it is unfortunately not free to build, and our ability to continue working on Insomnia is dependent on our ability to convert a subset of free users (that need premium features) to become paying customers of our product.
如果你决定使用本地的“草稿板”,则无需账户;但要访问产品的大部分功能,我们需要你注册账户。你的账户数据根据 ISO27001、SOC 2 Type II、ISO27018、Gold CSA STAR 法规以及我们的服务条款和隐私政策进行安全存储。我们需要账户来可持续地构建和改进产品,并确保我们能够继续在免费开源版本中提供许多核心功能。虽然开源软件可以免费使用,但开发它并非免费,我们持续开发 Insomnia 的能力取决于能否将一部分(需要高级功能的)免费用户转化为付费客户。
If you are a user that cannot share API data like collections and design specifications to the cloud, this is still possible by selecting “Local Vault” as the storage of your Insomnia projects: having an Insomnia account is not tied to how you wish to store your sensitive API data (which can be stored 100% locally via Local Vault, on a 3rd-party Git repository without any cloud storage via Git Sync, or in the cloud for ease of collaboration via Cloud Sync).
如果你无法将集合和设计规范等 API 数据共享到云端,通过选择“本地仓库”作为 Insomnia 项目的存储方式依然可以实现:拥有 Insomnia 账户与你希望如何存储敏感 API 数据无关(数据可以通过本地仓库 100% 本地存储,通过 Git 同步存储在无需云存储的第三方 Git 仓库中,或者为了方便协作存储在云端)。
Bugs and Feature Requests
错误报告与功能请求
Have a bug or a feature request? First, read the issue guidelines and search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue. For more generic product questions and feedback, join the Slack Team.
遇到 Bug 或有功能请求?请先阅读 Issue 指南并搜索现有及已关闭的 Issue。如果你的问题或想法尚未得到解决,请提交一个新的 Issue。对于更通用的产品问题和反馈,请加入 Slack 团队。
Contributing
贡献
Please read through our contributing guidelines and code of conduct. Included are directions for opening issues, coding standards, and notes on development.
请阅读我们的贡献指南和行为准则。其中包含了提交 Issue 的说明、编码规范以及开发注意事项。
Documentation
文档
Check out our official Insomnia Documentation.
请查看我们的官方 Insomnia 文档。
Develop Insomnia
开发 Insomnia
Development on Insomnia can be done on Mac, Windows, or Linux as long as you have Node.js and Git. See the .nvmrc file located in the project for the correct Node version.
只要安装了 Node.js 和 Git,就可以在 Mac、Windows 或 Linux 上进行 Insomnia 的开发。请查看项目中的 .nvmrc 文件以获取正确的 Node 版本。
Initial Dev Setup
初始开发设置
This repository is structured as a monorepo and contains many Node.JS packages. Each package has its own set of commands, but the most common commands are available from the root package.json and can be accessed using the npm run … command. Here are the only three commands you should need to start developing on the app.
该仓库采用 Monorepo 结构,包含许多 Node.js 包。每个包都有自己的一套命令,但最常用的命令可以在根目录的 package.json 中找到,并可通过 npm run … 命令访问。以下是开始开发应用所需的三个核心命令:
# Install and Link Dependencies
npm i
# Run Lint
npm run lint
# Run type checking
npm run type-check
# Run Tests
npm test
# Start App with Live Reload
npm run dev
# Start App with both renderer process live reload and main process auto restart
npm run dev:autoRestart
Linux
If you are on Linux, you may need to install the following supporting packages:
如果你在 Linux 上,可能需要安装以下支持包:
# Update library
sudo apt-get update
# Install font configuration library & support
sudo apt-get install libfontconfig-dev
# Fedora: Install libcurl for node-libcurl
sudo dnf install libcurl-devel
Also on Linux, if Electron is failing during the install process, run the following:
同样在 Linux 上,如果 Electron 在安装过程中失败,请运行:
# Clear Electron install conflicts
rm -rf ~/.cache/electron
Windows
If you are on Windows and have problems, you may need to install Windows Build Tools.
如果你在 Windows 上遇到问题,可能需要安装 Windows Build Tools。
Editor Requirements
编辑器要求
You can use any editor you’d like, but make sure to have support/plugins for the following tools: ESLint (for catching syntax problems and common errors) and JSX Syntax (for React components).
你可以使用任何喜欢的编辑器,但请确保安装了以下工具的支持/插件:ESLint(用于捕获语法问题和常见错误)和 JSX 语法(用于 React 组件)。
Develop Inso CLI
开发 Inso CLI
npm i
# Start the compiler in watch mode:
npm run inso-start
# Run:
./packages/insomnia-inso/bin/inso -v
Plugins
插件
Search for, discover, and install plugins from the Insomnia Plugin Hub!
从 Insomnia 插件中心搜索、发现并安装插件!