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.1.tar.gz (11.5 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.1-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for oko_cli-0.2.1.tar.gz
Algorithm Hash digest
SHA256 3ce8ff2655a6313bf6768b5f37ca94823bfb4f63eff9171bd6231cfd18761a98
MD5 00366ead1d3a32e6f593321b4bf7eeb4
BLAKE2b-256 c5f464013cd9947a006c2cd95d4c3e2c3100e9c389afc718cc7340115980662e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for oko_cli-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 72970a2b9e472e0ede56ecf29460b1b2f7f9691e23fde70a3837301ccfe19b9c
MD5 615e44a2d7583f587f63bc54a8545e31
BLAKE2b-256 a863945d8bbe86c9e0a608db74166c26ba2113b182d2aefa42b5da03acff9d39

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