Skip to main content

CLI tool for REST API testing with JWT, API key, and basic auth support

Project description

cc-api-call

CLI tool for REST API testing with JWT, API key, and basic auth support.

Features

  • Multiple authentication modes (JWT, API key, basic auth, none)
  • Auto token refresh for JWT authentication
  • Per-project configuration (.claude/api-testing/.env)
  • Clean JSON output with -r flag
  • Works seamlessly with AI coding assistants

Installation

# Using uvx (recommended, no install needed)
uvx cc-api-call status

# Using pip
pip install cc-api-call

# Using uv
uv tool install cc-api-call

Quick Start

  1. Run any command to auto-create config:
uvx cc-api-call status
  1. Edit .claude/api-testing/.env with your settings:
PORT=3000
AUTH_MODE=jwt

# For JWT mode
API_TEST_EMAIL=user@example.com
API_TEST_PASSWORD=yourpassword
  1. Login (JWT mode):
uvx cc-api-call login
  1. Make requests:
uvx cc-api-call get /users -r
uvx cc-api-call post /users -d '{"name":"John","email":"john@example.com"}' -r
uvx cc-api-call put /users/1 -d '{"name":"Jane"}' -r
uvx cc-api-call delete /users/1 -y

Commands

uvx cc-api-call --help
Command Description
get Make GET requests
post Make POST requests
put Make PUT requests
delete Make DELETE requests
login Login and save JWT tokens
refresh Manually refresh JWT token
status Show config and token status

Options

All request commands support:

Option Description
-r, --raw Output raw JSON (for piping/parsing)
-H, --headers Show response headers
-v, --verbose Verbose output
--no-auth Skip authentication

POST/PUT specific:

Option Description
-d, --data JSON data string
-f, --file JSON file path

DELETE specific:

Option Description
-y, --yes Skip confirmation prompt

GET specific:

Option Description
-q, --query Query params (e.g., "page=1&limit=10")

Authentication Modes

JWT Mode (default)

AUTH_MODE=jwt
API_TEST_EMAIL=user@example.com
API_TEST_PASSWORD=yourpassword
AUTH_LOGIN_ENDPOINT=/auth/login
AUTH_REFRESH_ENDPOINT=/auth/refresh

API Key Mode

AUTH_MODE=api-key
API_KEY=your-api-key-here
API_KEY_HEADER=X-API-Key

Basic Auth Mode

AUTH_MODE=basic
BASIC_AUTH_USERNAME=admin
BASIC_AUTH_PASSWORD=password

No Auth

AUTH_MODE=none

Configuration

Config is stored in .claude/api-testing/ in your current working directory:

.claude/api-testing/
├── .env          # Your configuration
├── .gitignore    # Prevents committing secrets
└── tokens.jsonl  # JWT tokens (auto-generated)

License

BSD-3-Clause

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cc_api_call-0.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cc_api_call-0.1.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file cc_api_call-0.1.0.tar.gz.

File metadata

  • Download URL: cc_api_call-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.4

File hashes

Hashes for cc_api_call-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c4a68ef9559f0414b23a5a87ea12f86c7c84df1d3ed27a3a144aa36248ec1f6c
MD5 2be5885d3c16697f2cd10aaaed5a6885
BLAKE2b-256 88942f612abb01509cc8eb1b345c67f0242f14ebaa3d58d30f5744671414baf6

See more details on using hashes here.

File details

Details for the file cc_api_call-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cc_api_call-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3539fc25da4e09eb47fcbc047f43d52925b82c5fd749393ae7fbc7e0a841152f
MD5 7df02a4a506d868647ab86e7403b4b43
BLAKE2b-256 3cf5a1a0f924521fd52f1fd4a8b72faa64ec47ec2c7093bd000bf60e644e6dc0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page