Insomnia logo
  • Documentation
  • Download
  • Upgrade
    • Introduction to Insomnia
    • Install Insomnia
    • Send Your First Request
    • Import and Export Data
    • Environment Variables
    • Insomnia Workspaces
    • Insomnia Accounts
    • Forgotten Passwords
    • Change Password
    • Insomnia Teams
    • Insomnia Subscriptions
    • Insomnia Subscription Management
    • Requests
    • Responses
    • Request Collections
    • Request Timeouts
    • Chaining Requests
    • Post CSV Data
    • SOAP Requests
    • gRPC
    • WebSocket Support
    • Get Started with Documents
    • Design Documents
    • Linting
    • GraphQL for OpenAPI
    • Migrate from Designer
    • Unit Testing
    • Stress Testing
    • Sign into Insomnia Cloud
    • Sync Collections with Insomnia Cloud
    • Teams
    • End to End Data Encryption
    • Sync with Git
    • Key Security Features
    • Security Standards
    • Signup and Authentication
    • Analytics Collected
    • Authentication
    • Client Certificates
    • Generate Code Snippet
    • Cookie Management
    • Encoding
    • GraphQL Queries
    • Run in Insomnia Button
    • Key Maps
    • HTTP(S) Proxy
    • Insomnia Configuration File
    • Introduction to Plugins
    • Context Object Reference
    • Template Tags
    • Hooks and Actions
    • Custom Themes
    • FAQ
    • Application Data
    • SSL Validation
    • Password Recovery
    • Introduction to Inso CLI
    • Install Inso CLI
    • CLI Command Reference
      • inso generate config
      • inso run test
      • inso lint spec
      • inso export spec
      • inso script
      • OpenAPI Spec Reference
    • Configuration
    • Inso CLI on Docker
    • Continuous Integration
    • Publish API to Dev Portal
    • Kong Declarative Config (for decK)
    • Kong for Kubernetes

inso generate config

The inso generate config command generates a configuration from an API specification by using openapi-2-kong. The command works similarly to generating a declarative configuration file or Kubernetes manifest from within Insomnia.

For more in-depth information on working with other Kong products, see:

  • Kong Declarative Config (for decK)
  • Kong for Kubernetes

Command

inso generate config [identifier]

identifier is a specification name, or id, or a file path.

Options

Option Alias Description
--type <type> -t type of configuration to generate, options are kubernetes and declarative (default: declarative)
--output <path> -o save the generated config to a file in the working directory. When not specified, will write the config to /dev/stdout without logging extraneous usage information.
--format -f output format, either yaml or json. This option only applies to type declarative, and will be ignored for type kubernetes (default: yaml)
--tags <tags>   comma-separated list of tags to apply to each entity

Global Flags

Option Alias Description
--output <path> -o Save the specification to a file in the working directory.
--workingDir <path>   Specify a working directory.
--src <path>   Specify the V4 export file or the Insomnia app data directory. You can use this option to set a Git data directory. If not specified, inso-cli looks for an .insomnia folder in the working directory by default.

Examples

The following commands work when running in the example git-repo directory.

When you don’t specify any arguments, you’ll be prompted with:

inso generate config

Scope configuration generation by the Document name or ID:

inso generate config spc_46c5a4
inso generate config "Sample Specification"

Scope configuration generation by a file on the filesystem:

inso generate config spec.yaml
inso generate config spec.yaml --workingDir another/dir

Save the configuration output to a file:

inso generate config spc_46c5a4 --output output.yaml
inso generate config spc_46c5a4 > output.yaml

Save the configuration output to a file with json output:

inso generate config spc_46c5a4 --output output.json --format json

Add tags to your generated configuration: inso generate config spec.yaml --workingDir another/dir

inso generate config spec.yaml --tags first
inso generate config spec.yaml --tags "first,second"

Change the generated configuration output type to either declarative or kubernetes:

inso generate config spc_46c5a4 --type declarative
inso generate config "Sample Specification" --type kubernetes
Edit this page
Report an issue
    COMPANY
  • Insomnia
  • Blog
  • Changelog
  • Pricing
  • Careers
    PRODUCTS
  • Insomnia
  • Inso (CLI)
    RESOURCES
  • Sign In
  • Documentation
  • Support
    LEGAL
  • Privacy Policy
  • Terms & Conditions
© Kong Inc. 2021