Skip to main content

Elegant CLI for API endpoint testing

Project description

OKO CLI

Python

License

Status

CLI

Build

OKO is a minimal and elegant CLI tool for testing API endpoints directly from your terminal.

Built with care for developers who prefer working from the command line and want a lightweight alternative to tools like Postman or Insomnia — without the overhead.


Features

  • 📁 Collections to organize endpoints
  • 🔗 Named endpoints with aliases
  • 🧩 Global variables with {{variable}} resolution
  • 🧪 Run HTTP requests from the terminal
  • 🎨 Clean, readable output using Rich
  • ⚙️ Simple JSON-based configuration
  • 🚀 Fast workflow, zero UI distractions

Installation

pip install oko-cli

Getting Started

Initialize a workspace

oko init

This creates the local OKO workspace with configuration, collections, and variables support.

Collections

Create a collection

oko collection create products

List existing collections

oko collection list

Endpoints

Add an endpoint to a collection

oko endpoint add products list https://dummyjson.com/products --method GET

List endpoints in a collection

oko endpoint list products

Run an endpoint

oko endpoint run products list

Variables

OKO supports global variables stored in the config file.

Add a variable

oko variable add base_url=https://dummyjson.com

List variables

oko variable list

Delete a variable

oko variable delete base_url

Variable Resolution

Variables can be referenced using the {{variable}} syntax:

oko endpoint add products list {{base_url}}/products --method GET

Variables are automatically resolved in:

  • URLs
  • Query parameters
  • Headers
  • JSON request bodies

Nested variables are also supported:

{{user.id}}
{{auth.token}}

Running Requests with Options

Headers

oko endpoint run auth currentUser -H Authorization="Bearer {{token}}"

Query Parameters

oko endpoint run products list -p limit=3 -p page=1

JSON Body

oko endpoint run users create --json '{"name":"John","email":"john@example.com"}'

Output

OKO displays:

  • HTTP status (color-coded)
  • Method and URL
  • Formatted JSON responses
  • Plain text responses when applicable

Designed to be readable, focused, and terminal-friendly.


Philosophy

OKO is intentionally simple.

  • No UI
  • No accounts
  • No syncing
  • No cloud dependencies

Just your terminal, your endpoints, and clean output.

Built for personal use — shared in case it helps others.


Requirements

  • Python 3.8+

Project Status

This project is in active development.

Current version focuses on:

  • Core endpoint execution
  • Collections
  • Variables
  • Clean CLI UX

Future versions may expand features while preserving simplicity.

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

oko_cli-0.2.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

oko_cli-0.2.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file oko_cli-0.2.0.tar.gz.

File metadata

  • Download URL: oko_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for oko_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f688cbc3346e572a8e9feaecaa581e9c0599528c68b48d99845df90073267889
MD5 cd202698f54a0911a3c2d546eb849672
BLAKE2b-256 edcf663548d1c5197494150e68a2bfe4660905f9b04c04bb896f5885be5e6aa3

See more details on using hashes here.

File details

Details for the file oko_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: oko_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for oko_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b38fc420d56ab6f30a3dadb2eeade28f109e17caad168bdccd50e05055e21913
MD5 b5e9ce63c75b2477aa867d2da31af8da
BLAKE2b-256 5676cf56be57e9b09f50e1269544e677962dcc4404ecbaac43e08f7e86def0ab

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