0.0
The project is in a healthy, maintained state
manage curl requests
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 0.8
~> 1.0
~> 0.7
~> 0.12
 Project Readme

Poke (poke-your-api)

Manage your curl requests with ease

Usage

  1. install poke-your-api gem by running gem install poke-your-api
  2. run poke init (generates ~/.poke directory)
  3. Run poke and enjoy

Environments

Use poke env to manage environments.

Use poke -e env_name to run the request against the specified environment.

Aliases

Aliases are displayed next to the request name in parentheses.

Use poke -N alias_name to set the alias for chosen request.

Use poke -n alias_name to run the request with the specified alias.

Shareable curl

Use poke -e env_name -n alias_name --print (or -p) to print the request as a curl command with that environment's variables filled in.

The request is not executed. The command is written to stdout, without poke's own output flags, so it can be copied or piped.

Editing requests

Use poke -o -n alias_name or poke -o to open the request in your default editor (you can overwrite it by setting EDITOR environment variable).

Piping output

Use poke | jq to interactively select request and format response body.

If you want only response body without diagnostics, use poke 2>/dev/null | jq.

Adding requests

Use poke new to create request file interactively. Command lets you pick existing subdirectory under ~/.poke or create new nested one, then opens new .curl file with starter template.

Manual option: Create a new .curl file in ~/.poke/<any_dir_with_config>/<any_file_or_dir_with_file>.

The example directory tree could look like:

~/.poke
├── aliases.json  # autogenerated file
├── lru.json      # autogenerated file
├── response.json # autogenerated file
├── example_api
│   ├── config.json # example_api env variables
    ├── example_request.curl
└── your_api
    ├── config.json # your_api env variables
    ├── some_file.curl
    └── some_subdirectory
        └── some_file.curl

Copyright

Copyright (c) 2023 MrBananaLord. See MIT License for further details.