Skip to content

havanoor/goblin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

24 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ‘บ Goblin

A fast, keyboard-driven API client for the terminal.
Built for developers who think in keystrokes, not mouse clicks.

Go Version License Platform


โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ ๓ฐ‰“ Saved (2)      โ”‚  โ— ๓ฐ’‹ Request                 โ”‚  โ— ๓ฐˆ™ Response               โ”‚
โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚
โ”‚โ–Œ GET Health Checkโ”‚ ๓ฐ–‡ URL  ๓ฐกข Headers  ๓ฑ˜– Body     โ”‚  ๓ฐ–‡ Body  ๓ฐกข Headers  โฑ Metricsโ”‚
โ”‚  https://httpbin โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  โ”‚
โ”‚                  โ”‚                              โ”‚  200 OK ยท 142ms ยท 348B      โ”‚
โ”‚  POST  Post JSON โ”‚  [GET] > https://httpbin.org โ”‚                             โ”‚
โ”‚  https://httpbin โ”‚                              โ”‚  {                          โ”‚
โ”‚                  โ”‚                              โ”‚  โ”œ "args": {}               โ”‚
โ”‚                  โ”‚  [m] method  [i] edit        โ”‚  โ”œ "headers": {             โ”‚
โ”‚                  โ”‚  [enter] send                โ”‚  โ”‚ โ”œ "Host": "httpbin.org"  โ”‚
โ”‚                  โ”‚                              โ”‚  โ”‚ โ”” ...                    โ”‚
โ”‚                  โ”‚                              โ”‚  โ”” "url": "https://..."     โ”‚
โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚
โ”‚  NORMAL   ๓ฐ– local  [i] edit  [m] method  [r] send  [ctrl+s] save  [?] help   โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Why Goblin?

Goblin is designed around one idea: your API workflow should never leave your terminal.

  • ๐Ÿš€ Instant startup โ€” a single Go binary, no runtime, no Electron, no browser tab
  • ๐Ÿ”’ 100% offline & private โ€” no account, no telemetry, no cloud sync
  • โŒจ๏ธ Vi-native navigation โ€” Normal, Insert and Command modes feel like home
  • ๐ŸŒณ Interactive JSON tree โ€” navigate, fold and search deeply nested responses
  • ๐Ÿ“Š Rich metrics โ€” TTFB, DNS, TLS, total time and response size on every request
  • ๐ŸŽจ Multiple themes โ€” four hand-crafted, eye-friendly color schemes
  • ๐Ÿ” Encrypted vault โ€” AES-256-GCM secrets, never stored in plain text
  • ๐ŸŒ Environments โ€” switch between local, staging and prod in one keystroke

Install

From source (recommended):

git clone https://github.com/you/goblin
cd goblin
go install ./cmd/goblin

Quick build:

make build   # produces ./goblin binary

Cross-compile:

make build-linux    # Linux AMD64
make build-mac      # macOS ARM64 (Apple Silicon)
make build-windows  # Windows AMD64

Quick Start

goblin

On launch, focus starts on the Request panel. The natural flow is left โ†’ right:

[Collections sidebar]  โ†’  [Request panel]  โ†’  [Response panel]
   browse & save           edit & send           inspect results
  1. Edit the URL โ€” press i to enter Insert mode, type your URL, press Esc
  2. Set the method โ€” press m to cycle GET โ†’ POST โ†’ PUT โ†’ PATCH โ†’ DELETE
  3. Send โ€” press r or Enter
  4. Save โ€” press Ctrl+S or type :w

Press ? at any time to open the full keyboard reference.


Keyboard Reference

Modes

Mode Indicator Enter Exit
Normal NORMAL default โ€”
Insert INSERT i Esc
Command COMMAND : Esc

Navigation

Key Action
Tab / l / Right Move to next panel (column)
Shift+Tab / h / Left Move to previous panel (column)
j / โ†“ Move down / scroll (contextual)
k / โ†‘ Move up / scroll (contextual)
[ / ] Cycle tabs within the active panel
? Open help screen
Space Toggle (Header checkbox or JSON node)

Request

Key Action
i Edit URL or body (Insert mode)
m Cycle HTTP method
r / Enter Send request
Ctrl+S Save request to collection

Headers Tab

Key Action
j / k Navigate headers
Space Toggle header on/off
x Delete selected header

Response

Key Action
j / k Scroll or navigate JSON tree
Space / Enter Fold / expand JSON node
/ Search in response body
y Yank response body
[ / ] Cycle Body / Headers / Metrics

Sidebar

Key Action
[ / ] Switch between Collections and History
/ Filter / fuzzy search
a Import history entry into collection

Command Reference

Enter Command mode with :.

Request Management

Command Action
:w Save current request
:wq Save and quit
:q Quit
:new Create a new request
:rename <name> Rename the selected request
:delete Delete the selected request
:curl <cmd> Import a cURL command into the active request
:diff Diff current response against the previous one

Headers & Auth

Command Action
:header <key> <value> Add a custom request header
:auth bearer <token> Add Authorization: Bearer <token>
:auth basic <user> <pass> Add Authorization: Basic ... (base64 encoded)

Environments

Command Action
:env <name> Switch active environment
:setenv <key> <value> Set a variable in the current environment
:getenv <key> Look up an environment variable
:extract <var> <path> Extract value from response JSON into environment

Use {{VAR}} syntax anywhere in your URL, headers or body โ€” variables are substituted at send time.

# Example
:setenv BASE_URL https://api.example.com
# Then use in URL:
{{BASE_URL}}/users/me

Secrets Vault

Secrets are stored encrypted with AES-256-GCM at ~/.goblin/secrets.enc.

Command Action
:vault <passphrase> Unlock the secrets vault

Once unlocked, use {{SECRET_KEY}} just like environment variables. The vault indicator appears in the status bar when active.

Themes

Command Action
:theme <name> Switch color theme

Available themes:

Theme Description
muted Warm neutral, soft blue accents (default)
nord Cool arctic blue-grey
rosepine Dusty rose and teal on deep violet
kanagawa Japanese ink with warm parchment text

Environments & Data

Collections and environments are stored at ~/.goblin/data.json. The file is plain JSON โ€” you can edit it directly, commit it to version control, or share it with your team.

{
  "environments": [
    { "name": "local", "vars": { "BASE_URL": "http://localhost:8080" } },
    { "name": "prod",  "vars": { "BASE_URL": "https://api.example.com" } }
  ]
}

CLI Mode

Goblin can run collections non-interactively, making it a natural fit for CI pipelines, shell scripts, and automation.

# Run all requests in the default collection
goblin run

# Run a specific collection
goblin run -collection "Payment API"

# Run a single request against a specific environment
goblin run -request "Health Check" -env prod

# JSON output โ€” pipe into jq, scripts, CI tools
goblin run -format json | jq '.[] | select(.status >= 400)'

# Text summary
goblin run -format text -verbose

Exit codes: 0 if all requests return < 400, 1 if any request fails or returns an error โ€” making it straightforward to fail a CI build on broken endpoints.

Flags:

Flag Default Description
-collection first Collection name to run
-request all Run a single request by name
-env active Environment name
-format pretty Output format: json, pretty, text
-timeout 30 Request timeout in seconds
-verbose off Print request details to stderr

Roadmap

  • cURL import โ€” :curl <command>
  • CLI mode โ€” goblin run for CI pipelines
  • Request rename & delete
  • Response diffing
  • Collection export/import (shareable JSON/YAML)
  • Request chaining & variable extraction
  • WebSocket client
  • OpenAPI spec import

Dependencies

Goblin is intentionally lean. Only 3 external packages are used โ€” all from the same terminal UI ecosystem:

Package Purpose
charmbracelet/bubbletea TUI event loop and architecture
charmbracelet/bubbles TUI components (inputs, lists, viewport)
charmbracelet/lipgloss Terminal color and layout styling

Everything else โ€” HTTP client, JSON parsing and formatting, AES-256-GCM encryption, base64 encoding, cURL parsing โ€” is implemented using the Go standard library with zero additional dependencies.


License

MIT ยฉ Goblin Contributors

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors