{} jsonr GitHub

Send JSON requests from the terminal in five minutes, not five tabs.

jsonr reads plain .http files, fills in variables, keeps secrets out of your shell history, and asserts on the response.

create-user.httpin git
POST @@baseUrl@@https://prod.api.example.com/users
Authorization: Bearer @@apiKey@@••••••••••••

{
  "name": "John Doe",
  "email": "john.doe@example.com"
}
jsonr-config.json · prod ~/.secrets/jsonr-prod.json
terminal-s 201 smoke test
$ 
→ POST https://prod.api.example.com/users  Authorization: Bearer *****201 Created · 84 ms · status matches 201{
  "id": 1042,
  "name": "John Doe",
  "email": "john.doe@example.com"
}
variable from config secret, masked in every log

Requests as files

One .http file per request. Commit them next to the code, share them with the team.

Environments

-e prod swaps base URLs, headers and secrets. Config files merge from your home folder down to the project.

Smoke tests

-s 201 checks the status, -t "ok" checks the body. Non-zero exit on mismatch, so CI can run it.

Chaining

jsonr run script.js gives you a jsonr() function to pass one response into the next request.

Built for AI agents that should never see your keys.

An agent can run jsonr against real APIs while the API key stays in a file it never reads.

  • Secrets live outside the repo in a JSON file referenced from jsonr-config.json.
  • Every log is scrubbed. Any secret value that shows up in output, including --debug, is replaced with *****.
  • The command is safe to paste. jsonr create-user.http -e prod contains no credential, so it can sit in a prompt, a script or a chat.
  • One command makes it a skill. jsonr skill --init writes a SKILL.md for Claude Code, Codex and Cursor next to your AGENTS.md, so /jsonr send create-user against prod just works. jsonr skill prints the agent instructions.
Agent runsjsonr create-user.http -e prod
jsonr reads the secret locally~/.secrets/jsonr-prod.json → { "apiKey": "prod_…" }
Request goes out with the real keyAuthorization: Bearer prod_ApiKey123
Agent sees the response onlyAuthorization: Bearer *****

Install

curl -fsSL sobanieca.github.io/jsonr/install.sh | bash

A single binary for Linux and macOS (x64 and arm64), no runtime needed. Update it any time with jsonr update. Run jsonr --help to read everything in about five minutes.