[Feature Request] Command line switches for Insomnia
See original GitHub issueAs agreed with Insomnia support I’m creating this feature request with list of commands line switches I want you to implement in the first iteration. #479 is indeed too vague and is more like an epic which has to be split in smaller tasks.
- Insomnia Version: 5.x
- Operating System: macOS, Linux, Windows
Details
What about implementing the following functionality as part of the first commandline-related iteration:
insomnia --workspace|-w "Foo Bar" --request-id|-r 00000000aaabbbbccccc0000000`
with these switches I would expect Insomnia to open and switch to workspace Foo Bar (not sure if it’s really needed) and send the request with the following ID req_00000000aaabbbbccccc0000000
I would also like to have the second option for cases when I haven’t created any workspace / request in Insomnia, so I could explicitly indicate the URL, HTTP request type, headers etc
# Calls https://api.acme.com/v1.0/users URL with Accept: application/json header
insomnia --header|-H "Accept: application/json" https://api.acme.com/v1.0/users
# Sends a PUT request to https://api.acme.com/v1.0/users URL with
# Content-Type: application/json header and some JSON-encoded data
insomnia --request-type|-X PUT \
--header|-H "Content-Type: application/json" \
--data|-d '{"name":"john","email":"j@acme.com"}' \
https://api.acme.com/v1.0/users
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Introduction to Inso CLI - Insomnia Docs
Inso CLI (Command Line Interface) for Insomnia is built on Node.js and the Insomnia core libraries. It allows you to use Insomnia application...
Read more >Use Insomnia for API Requests
In this topic, you will learn how to set up the popular Insomnia HTTP client to make requests to the Brightcove RESTful APIs....
Read more >Powercfg command-line options - Microsoft Learn
Sets a security descriptor associated with a power setting, power scheme, or action. /hibernate, /H, Enables and disables the hibernate feature.
Read more >Insomnia REST Client Intro - KishStats
Insomina offers several nice options for exporing requests. You can generate CURL commands to run using the command line. You can also generate ......
Read more >Insomnia REST Client Tutorial - YouTube
Your browser can't play this video. Learn more. Switch camera.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

So do you have any ETA on this? I’m willing to donate or pay for a subscription etc if you implement this feature 👍
@gschier personally I like cURL syntax more, please read my proposal more carefully. IMO cURL’s command line options have a cleaner and better documented options.
As for why I need it:
I would like to be able to set Insomnia as “browser” while debugging APIs in Visual Studio / VS Code / Atom, so that it IDE will use it in its post build scripts
Additionally I would like to be able to include some scripts into my repositories. In this scripts I could call APIs using the awesome Insomnia software and fallback on cURL if Insomnia is not installed.