apix is a CLI HTTP client that manages requests across multiple API environments.
It handles authentication, domain switching, and OpenAPI Specification (OAS) integration with a simple YAML config file.
- Manage API domains
- Store credentials in
yaml
- OAS support
- Endpoint
<tab>
completions
go install github.com/rhydianjenkins/apix@latest
Want to build from source instead?
# fetch the project
git clone https://github.com/rhydianjenkins/apix && cd apix
# then build from source
go build -o apix && ./apix
# or run with nix
nix run
API eXecuter (APIX) is a CLI tool to manage API domains and make requests
Usage:
apix [command] [flags]
apix [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
delete Send a DELETE request to the active domain
edit Open config in your $EDITOR
get Send a GET request to the active domain
help Help about any command
list List all domain names saved in config
new Create a new API domain
patch Send a PATCH request to the active domain
post Send a POST request to the active domain
put Send a PUT request to the active domain
remove Remove a domain from the config
switch Sets the active domain to the specified name
Flags:
-h, --help help for apix
Use "apix [command] --help" for more information about a command.
How do I send a request body?
apix
aims to make use of pipelines as much as possible and takes the request body from stdin
.
# Make a POST request to {base}/users with `my_req_body.json` as a body
cat my_req_body.json | apix post /users
How do I enable shell completion?
If you haven't already, add your completion directory to fpath
:
# in .zshrc, or wherever
fpath=($HOME/.local/zsh-completions $fpath)
compinit
Then generate the completion script:
# if you're using zsh...
apix completion zsh > ~/.local/zsh-completions/_apix
How do I get it working with OAS?
APIX
can do:
json
andyaml
spec formats- openapi versions
3.0.0
and3.1.0
- remote and local specs
You can specify which spec belongs to which domain in config:
apix new myapi https://api.example.com --oas "https://api.example.domain/myOAS.json"
# ... or
apix new myapi https://api.example.com --oas "/local/path/to/myOAS.yaml"
Assuming you've set up shell completions, you should be able to <tab>
complete your endpoints!