Skip to main content

hitspec import

Import API specifications from various formats and convert them to hitspec .http files.

Supported Formats


hitspec import openapi

Import from an OpenAPI/Swagger specification.

Flags

Examples


hitspec import postman

Import from a Postman Collection v2.1 file.

Flags

Features

  • Converts Postman folders into request groups
  • Maps Postman dynamic variables to hitspec built-in functions ({{$guid}} becomes {{$uuid()}})
  • Converts Bearer, Basic, and API Key authentication
  • Supports raw, URL-encoded, and form-data bodies

Examples


hitspec import curl

Convert curl commands to hitspec format.

Flags

Supported curl flags

Examples

Use @filename syntax to read curl commands from a file. The file supports line continuations with \.

hitspec import insomnia

Import from an Insomnia export file (v4 format).

Flags

Features

  • Request folders as file separators
  • Environment variables
  • Authentication (Bearer, Basic, API Key)
  • Request bodies (JSON, form data, raw)
  • Headers

Examples


hitspec export curl

Export hitspec requests as executable curl commands.

Flags

The --exec flag requires exactly one matching request. Use --name to filter to a single request when using --exec.

Auth Conversion

Examples

Sample Output

Use Cases

  • Debug failing tests by running the raw curl command
  • Share API calls with teammates who do not use hitspec
  • Use exported commands in shell scripts or other tools
  • Quickly test an endpoint outside the test framework
Last modified on February 9, 2026