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
-rflag - 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
- Run any command to auto-create config:
uvx cc-api-call status
- Edit
.claude/api-testing/.envwith your settings:
BASE_URL=http://localhost:3000/api/v1
AUTH_MODE=jwt
# For JWT mode
API_TEST_EMAIL=user@example.com
API_TEST_PASSWORD=yourpassword
- Login (JWT mode):
uvx cc-api-call login
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cc_api_call-0.1.6.tar.gz.
File metadata
- Download URL: cc_api_call-0.1.6.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
479e407a61a828f4a038fb01fc792164a81ac28dddb734d9c4b6ad93d15f5ed1
|
|
| MD5 |
bedf6c3bb5e90a7dc9ae6f97272617ce
|
|
| BLAKE2b-256 |
c3187f8c9f84af096ec4e4fde584a9576fc6901dff6b116125a88f91d17afe66
|
Provenance
The following attestation bundles were made for cc_api_call-0.1.6.tar.gz:
Publisher:
publish.yml on CGYLab/api-call
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cc_api_call-0.1.6.tar.gz -
Subject digest:
479e407a61a828f4a038fb01fc792164a81ac28dddb734d9c4b6ad93d15f5ed1 - Sigstore transparency entry: 869600980
- Sigstore integration time:
-
Permalink:
CGYLab/api-call@b18c163bb8866a0afef90441b2d9f4d7cb6b6d08 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/CGYLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b18c163bb8866a0afef90441b2d9f4d7cb6b6d08 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cc_api_call-0.1.6-py3-none-any.whl.
File metadata
- Download URL: cc_api_call-0.1.6-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5df21619e2ac534e7fda8cc2e616e6b8a5bb1a2ebd97753ed6e4de351b3aa7d0
|
|
| MD5 |
7e2b1ba65dccade59570da5d4c7a18fd
|
|
| BLAKE2b-256 |
a0e90aceaf5e25ed097c16a7687fa470638b4ede5e615f002ab840c52e0024fa
|
Provenance
The following attestation bundles were made for cc_api_call-0.1.6-py3-none-any.whl:
Publisher:
publish.yml on CGYLab/api-call
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cc_api_call-0.1.6-py3-none-any.whl -
Subject digest:
5df21619e2ac534e7fda8cc2e616e6b8a5bb1a2ebd97753ed6e4de351b3aa7d0 - Sigstore transparency entry: 869600984
- Sigstore integration time:
-
Permalink:
CGYLab/api-call@b18c163bb8866a0afef90441b2d9f4d7cb6b6d08 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/CGYLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b18c163bb8866a0afef90441b2d9f4d7cb6b6d08 -
Trigger Event:
release
-
Statement type: