Repository navigation
Releases: AbyAbyss/cli-rest-client
Releases · AbyAbyss/cli-rest-client
Release list
v0.6.0
Changed
- The command is now
restinstead ofterm-rest-client:rest,rest -gui,
rest run,rest loadand so on. The installers (get.sh,make install) install
restand keepterm-rest-clientas a link to it, replacing an older copy, so existing
scripts keep working;make uninstallremoves both.get.shwarns when another
program calledrestcomes first on yourPATH. Release archives are now
rest-<os>-<arch>.tar.gz(rest.exein the Windows zip), andgo installtakes
.../cmd/rest@latest. The product name, the data folder (term-rest-client) and
TERM_REST_CLIENT_DATAare unchanged, so existing workspaces are found as before.
Fixed
- Browser UI: the Variables dialog listed environments as
"[object HTMLDivElement], [object HTMLDivElement]" instead of their names, so they
couldn't be selected.
v0.5.1
Fixed
- Browser UI: the Variables dialog listed environments as
"[object HTMLDivElement], [object HTMLDivElement]" instead of their names, so they
couldn't be selected.
v0.5.0
Added
- Load testing:
term-rest-client load,Alt+L/F7andlin the terminal app, and a
Load test dialog in the browser UI. Virtual users run a request, or a folder's requests
in order, each with its own variables (a captured login token stays with its user).
Constant users (-vus,-duration), ramping stages (-stages 30s:50,1m:50,30s:0), or
a fixed or ramping request rate (-rate 200/s,/sstage targets) where arrivals with
no free user are dropped and counted. Results: requests/s, failed requests, latency
p50/p90/p95/p99 overall and per request, status codes, error reasons, bytes, a
per-second timeline, and tests as checks.-threshold "p95<300ms,errors<1%"sets the
exit code;-outwrites JSON or CSV. Live sparklines in the terminal, live charts in
the browser. Hosts other than this machine or a private network need confirming
(-yeswithout a terminal). - The demo server has
/slow,/flakyand/status/{code}for trying load tests.
Fixed
- The browser UI didn't show requests at the top level (outside any collection), such as
the sample's Health Check.
v0.4.0
Added
term-rest-client -gui: a browser interface on the same workspace, embedded in the
binary (about 370 KB). Requests run in the Go process, so there's no CORS. It has
request tabs, the collections tree, variables and environments, live streams, a
WebSocket log and composer, the GraphQL schema browser, a JSON tree view, history,
code snippets, cURL and Postman import, a command palette, and light and dark themes.
It listens on 127.0.0.1 on a free port by default;-portasks for a port (a busy one
falls back to a free one),-lanalso listens on the network and prints a link per
address, and-no-opendoesn't start a browser. A per-run key, a SameSite cookie and
Host and Origin checks keep other sites from using it.- Copy from the response pane:
ccopies the body;yopens a menu with the body raw or
as pretty JSON, response and request headers as text or JSON, the full response (like
curl -i), and stream events or WebSocket messages as JSON. Ctrl+Topens the GraphQL schema browser.F6still works, but on Macs it turns on
Do Not Disturb unlessfnis held. The README has a macOS section on function keys
and on making Option work as Alt in Terminal.app and iTerm2.
Changed
- For a WebSocket request the Body tab is now called Message and drops the HTTP body
type picker (JSON, Form, ...), which never applied to messages. A note says the text
is sent as is when the connection opens, and the example shows plain text or JSON. - The GraphQL schema browser has a Details pane (description, arguments, the result
type's fields, and the query it would write).Enter,Spaceand clicks now open and
close fields instead of replacing the query, andiinserts the query, also from
nested fields.
Fixed
- An empty GraphQL body showed a JSON example (
{"name": "{{name}}"}) as its
placeholder, which looked like a query that was already there. The Query and
Variables editors now show GraphQL examples and mention F6, and sending an empty
query says to type one or press F6. - Errors before sending (an empty query, a bad URL, a failing pre-request script) showed
"No Environment" even with an environment selected.
v0.3.0
Added
- Streaming responses: Server-Sent Events and NDJSON are shown live, each event with
its arrival time, type and id. The timeout stops at the headers,Escstops the
stream and keeps what arrived, and History keeps it. Test subjectseventsand
event[i]/event[i].json.path.runfollows streams until-streamruns out. - GraphQL: a GraphQL body type with Query and Variables editors, sent as JSON (or in
the URL for GET).F6browses the schema by introspection and writes a query with
variables for a field. Code snippets, curl import/export and Postman's graphql body
mode all handle it. - WebSocket requests (WS in the method dropdown): connect with params, headers and
auth in the handshake, send the Body tab as messages, and watch a live sent/received
log; tests run on the received messages when the connection ends.runconnects,
sends and collects replies for CI. Snippets in JavaScript, Python, Go and websocat. term-rest-client demoserves a local demo API (httpbin-like, plus SSE, GraphQL and
WebSocket) that the sample workspace's Local environment points at, so the samples
and the documented commands work offline with-data demo.json.runexplains unknown names: it lists the workspace's environments, suggests close
request and folder paths, and points at the sample workspace when the path is one of
its requests.-env global/globalsmean the global variables, likenone.- Sample "API Types" collection: GraphQL (countries API), SSE (Wikimedia live edits)
and WebSocket (Postman echo).
v0.2.0
Added
- Prebuilt binaries:
make release/scripts/release.shbuild macOS, Linux and
Windows archives with SHA256SUMS; a Release workflow publishes them on av*tag;
get.shinstalls the right one with a singlecurl ... | sh, no Go needed. - Code generation: the
Ctrl+Gwindow shows the request as cURL, Python (requests),
JavaScript (fetch), Go (net/http) or HTTPie;←/→switch language and the choice
is remembered fory. Real values or{{variables}}as named variables in the code.
CLI:term-rest-client export -lang LANG [-raw]. Each snippet is run against a test
server in the test suite and must send the same request as the app. - Copy as cURL:
cin theCtrl+Gwindow copies the command to the clipboard andv
switches between filled-in values and{{variables}};yin the Collections tree
and History copies a request directly. Uses pbcopy, wl-copy, xclip, xsel or clip,
and OSC 52 over SSH. CLI:term-rest-client export -curl [-raw]. - Import from cURL: paste a curl command into the URL field (or
Ctrl+O) to get a
request with method, params, headers, auth and body; several commands become a
collection. Handles browser "Copy as cURL" output ($'...' quoting, continuations,
--data-raw, --compressed, cookies), -u / bearer headers to Auth, --json, -G, -F,
--data-urlencode. CLI:term-rest-client curland curl files inimport. - Export to Postman: collections and folders as Collection v2.1 files (
xin the tree),
environments and globals (Export button in the Variables tab), and
term-rest-client export. Requests imported from Postman get their original scripts
back; scripts written here are translated intopm.testJavaScript with matching
comparison rules. Import and export round-trip. - Import from Postman: collections v2.0/v2.1 (nested folders, inherited auth, raw /
urlencoded / form-data / GraphQL bodies, query and path variables, collection
variables), environments and globals. Common test/pre-request script patterns are
converted; the original JavaScript is kept as comments.Ctrl+O(oriin the
tree) in the app,term-rest-client import FILE...on the command line. - Environments, like Postman: named variable sets layered over Globals. Environment
picker next to the URL andAlt+Eto switch; the Variables tab edits Globals or any
environment and can create, rename, duplicate, delete and activate them. The response
pane and History show which environment was used. CLI:run -env NAMEand
env [NAME|none]. Sample workspace has httpbin.org and Local environments. - Request history, like Postman: a History view in the sidebar (Alt+H / Alt+C / F3,
or click), grouped by day. Open an entry to get the request back with the response
it got, save it to a collection, filter, delete, or clear all. Stored in
<workspace>.history.json; newest 200 entries, bodies up to 64 KB; can be turned
off in Settings.term-rest-client history [-n N]lists it. - Response pane shows the request headers that were actually sent (including
Authorization, Content-Type, User-Agent, Host, Content-Length, Accept-Encoding). - Tests, Request Headers, Response Headers and Body are foldable sections: keys
t/r/h/bin the response pane, or click the heading. Choices are saved. run -vprints sent (>) and received (<) headers likecurl -v.- Folders inside collections, nested to any depth, and requests at the top level outside
any collection (like Postman). New tree keys:fnew folder,mmove to another
collection/folder/top level;Lefton a request jumps to its folder. - Save As can save into any folder or the top level; the request title shows the full path.
listprints full paths andrunaccepts folder paths (runs everything inside).- Workspace file version 2 (
foldersand top-levelrequests). Version 1 files load
as before and the saved draft link is migrated. - Params, Auth, Headers, Body, Pre-request and Tests tabs now work (they were placeholders).
- Auth: Basic, Bearer token and API key (header or query parameter).
- Body types: JSON, text, XML and form-urlencoded, with automatic
Content-Type. - Workspace variables (
{{name}}) with a Variables tab, URL autocompletion and built-ins
{{$uuid}},{{$timestamp}},{{$isoTimestamp}},{{$randomInt}}. - Pre-request scripts (
set/unset) and response tests with value capture. - Collections, variables and settings are saved to a JSON workspace file (
-data,
TERM_REST_CLIENT_DATA), and unsaved edits are restored on the next start. - Save / Save As dialog, unsaved-changes prompt, duplicate and reorder in the tree.
- Response pane: status colours, size, sorted headers, highlighted JSON, test results,
save body to file. - Copy as cURL, JSON formatter, request cancellation, HEAD and OPTIONS methods.
- Settings: Gruvbox Dark and Light themes, timeout, redirect following, TLS verification.
install.shwithmake install/make uninstallto put the binary on your PATH
(macOS and Linux, with shell-specific PATH hints and a Go version check),
make build-mac-universal, and linux/arm64 builds.- Headless
listandruncommands with test-based exit codes, plus-version. - README screenshots generated from the real UI (
make screenshots). - Test suite covering the engine, scripting, storage, CLI and the UI (simulated terminal).
Changed
- Code split out of a single
main.gointointernal/{ui,engine,script,vars,storage,cli}. - Module path is now
github.com/AbyAbyss/cli-rest-client, sogo installworks. - Tabs: Builder is gone; the response pane is always visible next to the active tab.
Tab 7 is Variables. - Send is
Ctrl+R/F5/Enterin the URL field, save isCtrl+S, save as isAlt+S.
Fixed
- cURL output for HEAD requests uses
-I, since-X HEADmakes curl wait for a body. - Typing digits in the URL, body or any text field switched tabs instead of inserting text.
Escquit the application, including from dialogs and dropdowns.Ctrl+S,Ctrl+QandCtrl+Shift+Snever fired in real terminals; saving was unreachable.- Rename and delete dialogs replaced the whole screen, and Esc in them quit the app.
- Response text containing
[...](common in JSON) was eaten as colour tags. - Status line printed the code twice ("200 200 OK").
- Collections and edits were lost on exit.
- The method dropdown could not be reached with
Tab. - Dialog backgrounds let the screen underneath show through between fields.
- Makefile
buildtarget mixed Windowscmdsyntax into a shell recipe.