poke

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2026 License: MIT

README

poke

CI Go Report Card

A terminal API client for REST and gRPC. I built poke to learn more about gRPC internals. It has request collections stored as YAML files you can version control.

Install

git clone https://github.com/rickysurya/poke
cd poke
go build -o poke ./cmd/poke

Usage

REST

./poke rest --url https://example.com/users
./poke rest --method POST --url https://example.com/users --body '{"name": "damodaran"}'

gRPC

./poke grpc --address localhost:50051 --service echo.Echo --method UnaryEcho --body '{"message": "hello"}'

Collections

./poke collection --file mycollection.yaml --request "Get Users" --env staging

Collection format

name: my api
version: "1.0"
requests:
  - id: "1"
    name: Get Users
    method: GET
    url: "https://{{base_url}}/users"
    type: rest
environments:
  - name: staging
    variables:
      base_url: staging.example.com
  - name: prod
    variables:
      base_url: prod.example.com

Roadmap

  • TUI interface
  • gRPC server-side streaming
  • Request history

Directories

Path Synopsis
Package cli handles command line argument parsing and routing
Package cli handles command line argument parsing and routing
cmd
poke command
testserver command
internal
engine
Package engine handles REST and gRPC client logic
Package engine handles REST and gRPC client logic
interpolate
Package interpolate handles variable substitution in request templates
Package interpolate handles variable substitution in request templates
models
Package models defines the core data structures for poke
Package models defines the core data structures for poke
storage
Package storage handles reading and writing collection files
Package storage handles reading and writing collection files
proto

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL