(Version française : SPEC_fr.md)
Terminal-mode simulator of Kibana's "DevTools" view, for submitting requests to an Elasticsearch or OpenSearch cluster without going through a browser.
Status: this document describes the design as shipped — version 0.9.0 (beta). The version history is in CHANGELOG.md, the step-by-step installation in INSTALL.md.
- Problem solved: an Elasticsearch or OpenSearch cluster sometimes has no Kibana (or OpenSearch Dashboards), or one that is down — often during an investigation, precisely. An equivalent of Dev Tools right in the terminal is then far more efficient than a series of
curlcommands (TLS handling, multi-line requests, formatting the JSON…). - Target users: the people who administer and operate Elasticsearch or OpenSearch clusters.
- Target environments: Linux without a graphical interface first (RHEL 8/9/10 and any other amd64 distribution), that is the servers a cluster is reached from; Windows and macOS as well, for use from one's own workstation.
- Target clusters: Elasticsearch from 7.17 to 9.x, and self-managed OpenSearch 2.x and 3.x — the distribution and version are detected at connection (§5), and what the tool suggests is selected for them (§9.5). OpenSearch managed by AWS, which requires SigV4 request signing, is out of scope (§7).
- Portability constraint: single binary per platform, no system dependency beyond the base libc on Linux (nothing equivalent needed on Windows/macOS), and no companion file: the tool is meant for servers without Internet access, where an installation that is one file to copy matters more than being able to update reference data without a new binary.
- Language chosen: Go.
- TUI library chosen:
tview(ready-made widgets:TextAreafor the editor,TextViewfor the JSON,Flex/Gridfor layout,SetInputCapturefor global shortcuts), built ontcell. Chosen overbubbleteafor how simple it is to develop against for this use case (a classic widget-based layout, no complex custom rendering). - HTTP/JSON client library: Go's stdlib (
net/http+encoding/json), no external dependency needed a priori. - Build/distribution method: static binary (
CGO_ENABLED=0 go build), no dependency on the system's libc → portable as-is across RHEL 8/9/10 (and any other Linux amd64 distribution), and easy to fold into an existing deployment/configuration-management tool.build-release.shcross-compiles the same source forlinux/amd64,windows/amd64, anddarwin/arm64in one pass, stamps the version into it (termdevtools --version) and produces theSHA256SUMSfile a binary can be checked against once carried elsewhere — see INSTALL.md. - Reference data: endpoints,
_catcolumns and recipes are plain text files of the source tree, compiled into the binary withgo:embed(§9.5).
On launch, a connection screen lists the URLs of known clusters (no separate name: the URL is already the most explicit identifier), sorted from most to least recently used (order of the clusters list in config.yaml, specific to the current user — see §9.1 and §9.2), and always additionally offers a "New connection" option.
- Selecting an existing cluster: non-sensitive fields (protection and label, auth type, CA/cert paths, username, API key ID) are pre-filled from
config.yaml; only the secret (password, API key secret, Bearer token, private key passphrase) is asked for again, depending on the auth type, unless the cluster's entry says where to read it (below). The form opens on the authentication, as it did before protection levels existed:Tab, then the secret; the protection, above it, is reached withShift+Tab. - Secret read from a variable or a file: when the cluster's entry has
secret_envorsecret_file(§5, §9.2), the form opens with the secret field already filled in — masked, handled as if typed — and the focus on "Connect":Enteris enough. The message area names the variable or the file. Secret not found (variable unset or empty, file missing, unreadable, empty or too large, relative path, both keys at once): the field stays empty, the message says why, and the form opens as usual. Nothing is sent before "Connect". - New connection: a full interactive form to fill in — URL, protection and label (below), authentication type (none / Basic Auth / API Key / Bearer token / mTLS client certificate), then depending on the type: username, API key ID, CA path, client cert/key paths (empty: picked with the certificate picker below, or typed), whether to enable TLS verification — and finally the corresponding secret(s). Typed with the URL of a known cluster, it replaces that cluster's entry, the form's fields with it; the keys written by hand on the entry (
proxy,distribution,version,secret_env,secret_file, §9.2) are kept, and apply to the connection already — as when the cluster is picked from the list. The secret, though, isn't read from the variable or the file: the form is a new one. - Protection and label (§5): a "Protection" dropdown right under the URL — "none" (the default for a new connection), "writes need confirmation", "read-only" — then the "Label (banner)" field, 30 characters at most (
PROD,prod eu-west). With "none", the label is greyed out andTabskips it, but what it holds is kept. A successful connection saves both; theprotectionkey is left out for "none". A levelconfig.yamlholds but no version knows (a typo) is offered as "read-only", the most restrictive one, with a warning in the message area as soon as the form opens; connecting then savesread_only. In the list of known clusters, the secondary text names the protection the way the banner will (§3.1):auth: basic · PROD · writes need confirmation. - Certificate picker (
Enteron the CA file / client cert / client key fields): opens a popup — a small file browser, 70 columns wide — listing the entries found directly inside the corresponding configured directory (default_ca_dirfor the CA field,default_client_cert_dirfor both client cert/key fields — §9.2), to pick from instead of typing a filename from memory; subdirectories are listed first (suffixed with the OS path separator), then files, each group alphabetical. Arrows thenEnterpicks a file or browses into a subdirectory;Backspacegoes back up to the parent directory;Esccancels entirely without changing the field, from any depth. Reports a clear error in the connection screen's message line instead of opening an empty popup when the corresponding directory isn't configured; falls back to browsing the user's home directory (rather than erroring) when it's configured but doesn't exist on disk (§5). - Fields displayed dynamically, to show only what's relevant:
- URL in
http://(not https) → TLS fields hidden (CA file, "verify certificate" checkbox, and the client certificate/key fields, since a client certificate is part of the TLS handshake); a CA file or client certificate saved for such a cluster isn't read either (§5) - "None" authentication → no auth field shown
- "Basic Auth" → only username/password
- "API Key" → the key's identifier, then its secret
- "Bearer token" → only the token
- "client certificate (mTLS)" → only the certificate fields (hides username/password); also hidden if the URL is
http://(see above)
- URL in
- API key in its
encodedform: the secret field also takes the whole key as Kibana and the API creating it show it first —base64(identifier:secret). It is recognized by its shape (two parts of the alphabet of Elasticsearch keys around a:, once decoded), including without its trailing=padding or pasted with a line break. The identifier it holds then replaces the form's, empty or not: that is the one saved inconfig.yamland shown in the header. A secret alone with no identifier is refused before anything is sent, with a message saying what to enter. - Bearer token: pasted as it is; the spaces or line break around it, and the word
Bearerif it was copied along, are removed. - Active field highlighted: the field currently focused is displayed in inverted colors (background/text), so it stays identifiable even when the blinking cursor alone isn't enough.
- 24-row terminal: the longest form (https with a client certificate) only fits by dropping the blank line between two fields; it is dropped in that case alone, so that the buttons stay on screen.
- 80-column terminal: a field wider than the room the labels leave (a path, 60 columns, past the French labels) is narrowed to fit inside the frame, its content scrolling; it gets its width back as soon as there is room.
- In both cases, once the connection succeeds, the entry (new or existing) is moved/inserted at the first position of the
clusterslist inconfig.yaml— no secret is ever written there. - Detection: the answer to the
GET /that validates the connection also tells which distribution and version the cluster runs (§5). Nothing to choose or fill in; a cluster that can't be identified is still connected to. - One attempt at a time: an attempt given up on (
Escor the Cancel button) or superseded by a newer one is ignored when its answer finally arrives — a cluster slow to answer can't replace the session opened on another one since, and pressing Connect twice opens a single session. - What is refused before any connection: a URL carrying credentials (
https://user:password@host). The URL is the one thing about a cluster that is saved and displayed as is — inconfig.yaml, in the header, in thecurlcommands copied: the password would end up there. The message points to Basic Auth. - What is not a connection: a
3xxanswer. Redirections are never followed (§5); the screen shows the status and the address the answer points to, for the URL to be corrected. - Proxy: when the connection goes through a proxy (§5), the screen names it before anything is sent — "Connecting through proxy …", followed by where it comes from (
HTTPS_PROXY,HTTP_PROXYorconfig.yaml). If the attempt fails, the proxy is recalled in front of the error's detail — often longer than the room there is — with the way to do without it when it comes from the environment. The message area is three lines high for that purpose. An HTTP status received through a proxy is announced the same way: the answer may be the proxy's own (407,403). A proxy that can't be used (§5) stops the attempt before anything is sent. - Once connected, you work against one cluster at a time, inside a general layout inspired by Kibana's DevTools.
- Several clusters in one session (
Ctrl+O):Ctrl+Oopens this same screen again in session, to switch to another cluster. Each connection stays open with all its state — requests, cursor, result, the panel that had the focus — until the program exits, with no maximum:- a cluster already open, marked
open connectionin the list, goes straight back to its screen as it was left, with no form and no new connection; its URL typed as a new connection does the same, the status bar saying the form's settings aren't applied: one connection per URL, the URL being what its requests are saved by (§3.2). To change the protection or the credentials of an open connection, quit and relaunch; - another cluster goes through the form, as at startup; a connection that fails leaves the one on screen as it was.
Escon the list goes back to the cluster the screen was opened from; - switching cancels nothing: a request in progress, read or write, runs to completion; its answer lands in its own cluster's panels, and the status bar on screen says it came, naming that cluster.
Esconly abandons the request of the cluster on screen; - like the other shortcuts acting on the panels,
Ctrl+Owaits for a popup (help, recipes, confirmation) or the search bar to close; - the language switched with
F3on one connection applies to the connection screen and to the other connections as soon as they are back on screen; - a save that fails on switching doesn't stop it: the left panel stays in memory, saved again on exit, and the failure is said at once on the connection screen, then on the cluster's status bar;
- memory: each connection keeps its last result, and a large result takes several times its size once displayed (measured: a 60 MiB JSON response takes about 450). Any request sent on that connection (a
GET /) replaces it as soon as it ends, with its answer or its error, and frees that memory for the program, the editor untouched; the memory the system reports for the program may take a while to go down.
- a cluster already open, marked
- Screen split into two vertical panels, with a relative width adjustable during the session via
F5/F6(see §4):-
Left panel: request editor (free-form text, one or more lines, e.g.
GET _cat/indices). Its starting content is described in §3.2. -
Right panel: JSON result of the last executed request (so empty on startup).
-
Automatic word wrap in both panels (a line too long for the display width is visually folded on screen) — this affects neither the editor's actual text (so not request parsing, see §3.2), nor the content exported/copied from the result (see §3.3). Implementation note worth keeping in mind:
TextArea.GetCursor()andTextView.ScrollTo()both reason in terms of displayed line (post-wrap), not logical line, as soon as wrap is active — relying on them directly would have broken request targeting (Ctrl+Enter), completion (Tab), and search scrolling (Ctrl+Fon the right). Worked around respectively viaTextArea.GetSelection()(absolute offset position in the text, independent of display) and tview's region mechanism (Highlight/ScrollToHighlight, anchored to content rather than a line number). A related but distinct gap surfaced later:TextArea.Select()(used for the left panel's search matches) is correctly wrap-safe — it's the offset-based method just described — but its own doc comment is explicit that it "preserves" the scroll offset, unlike normal cursor movement (typing, arrow keys), which tview scrolls into view automatically. A match outside the visible viewport was therefore selected correctly internally while staying invisible on screen — indistinguishable, to the user, from search "landing in the wrong place". Fixed byEditor.scrollToCursor(ui/editor.go), replicating tview's own (unexported) auto-scroll logic usingGetCursor's display row (correct here, unlike for logical-line purposes) together with the publicGetOffset/SetOffset.A further report — search actually selecting the wrong text (not just off-screen, e.g. matching content shifted a few characters away from the real match) — turned out to be a second, more fundamental bug in the same offset-based method, not a wrap issue at all:
TextArea.GetSelection/Select/Replaceall count UTF-8 bytes internally (confirmed by reading tview's own source — position tracking advances bylen(cluster), a string's byte length), a fact none of their doc comments spell out. This codebase's own offset arithmetic (findNextinui/search.go,lineColAt/CompletionPrefixinui/editor.go) used rune counts (len([]rune(...))) throughout instead. The two agree exactly as long as every character before the position in question is single-byte ASCII — and silently diverge, by however many extra bytes accumulate, as soon as any multi-byte UTF-8 character (an accented letter, typically) appears earlier in the buffer. Not a crash, just a wrong-looking result: search selecting a few characters away from the real match, endpoint completion replacing the wrong span, and — sinceCursorLineis built on the samelineColAt— potentiallyCtrl+Etargeting the wrong request entirely whenever an earlier line held non-ASCII text. Fixed by switching all of this codebase's own offset arithmetic to byte lengths (len(s)) instead of rune counts, matching tview's convention exactly; seeTestLineColAtByteOffsetsandTestFindNextByteOffsets, both of which fail against the pre-fix code with content reproducing the original report. One last case of the same kind: search ignores case, and lowercasing a whole text can change its length in bytes ("İ", two bytes, becomes "i̇", three) — so case is folded letter by letter, only where the lowercase form takes the same number of bytes (foldCase,ui/search.go).
-
- Header: the first line of the main screen says which cluster this is: the name of the tool, then a badge with the detected distribution and version in short form (
ES 9.5.4,OS 2.19.6, teal for the former and blue for the latter, so that two clusters can be told apart at a glance withCtrl+O; the "Cluster" caption when it isn't known), the URL, and the user at the far right. When it doesn't fit, the name of the tool goes first, then the user, then the URL is cut short (https://es-prod.ex…), and last it goes too. On a protected cluster (§5), the whole line changes color and the name of the tool gives way to the label and the level ("PROD · read-only"), or the level alone, in capitals, without a label ("READ-ONLY"): red background with "writes need confirmation", since writes remain possible, yellow with "read-only". They stay whatever the width. The label is shown as typed, brackets included, and brought down to one line if written by hand over several; the level followsF3. - Status bar: the last line of the screen. "request in progress..." status during the call, then HTTP code + response time once the request completes. From the first second on, the running message counts the seconds and says how to abandon the request (
request in progress... 12 s — Esc to abandon, §3.2), updated every second — unless something else has been written to the line since (a save, an error), which it doesn't cover. The message comes first: it is often the only sign of what just happened (a write refused in read-only, a send cancelled). It takes the left of the line, and the shortcuts what it leaves on the right: as many as fit, in the order of the catalog, none cut in two. The message itself is only cut short, with a…, when it doesn't fit alone. With the header, that makes the same two lines as the former status line and help bar: the panels kept their height on an 80×24 terminal. - More below: while the editor, the result or the help screen has more to show below, a
▼sits on its bottom border, next to the right corner, and goes away at the end. Only what scrolls is marked, and what counts is the rows displayed, wrapping included. For the result and the help,TextViewis asked by scrolling one row down and back (scrollPanel): counting its wrapped rows would wrap the whole text on the spot, which freezes the interface on a large result. - Theme: fixed colors on a dark background of their own, the same whatever the terminal's theme (
ui/theme.go); a terminal without 24-bit colors gets the closest ones it has, andNO_COLORis honored (both by tcell). Red and yellow say something about the cluster or the last request and nothing else; the rest of the chrome keeps to blue and gray. The panel with the focus has a thick blue border and the other a thin gray one: its shape as well as its color, so that it still shows without colors. - Help screen (
F1): a popup overlaid on the layout (centered, height proportional to the terminal, scrollable if content overflows), opening on TermDevTools' version (the one--versionprints) and the connected cluster's distribution and version in long form (Elasticsearch 9.5.4), the latter only when detected — what a bug report asks for first; then reminding how the two panels work, the list of shortcuts (§4), and the location of the files the user may create or edit (§9.1). Closes withEsc, with no effect on the editor's or result's content.
- tview component:
TextArea(multi-line, natively handles cursor/selection), laid out beside a line-number gutter (SPEC.md §7 backlog #5) inside a shared bordered panel — the number is shown once per logical line, blank on a word-wrapped continuation row, matching the usual editor convention.TextAreaexposes no public API for where it wraps, so the gutter recomputes that itself (ui/gutter.go,wrapRowStarts) using the same underlying library (github.com/rivo/uniseg)TextAreauses internally, kept in step by construction rather than by reverse-engineered approximation. - Auto-closing brackets/quotes (SPEC.md §7 backlog #6,
ui/autoclose.go): typing{,[, or"inserts the matching closer too, cursor placed in between; typing a closer that's already sitting right there (typically the one just auto-inserted) steps over it instead of duplicating it; Backspace between an empty pair removes both sides at once. Deliberately conservative given this was flagged as the highest UX-risk item on the backlog: does nothing while a selection is active (TextArea's own default typing-replaces-selection behavior applies instead), and doesn't auto-close a bracket typed as plain content inside an already-open string — tracked per line by counting unescaped"characters before the cursor, sufficient on its own since an unescaped newline inside a JSON string is invalid JSON to begin with (a string literal can never legitimately span more than one line). - Content: text containing one or more API requests (starting with GET, PUT, POST, or DELETE, followed by the endpoint and parameters, and on the following lines, the JSON payload to send). The editor detects the end of the JSON under a request (brace balancing) to understand the separation with the next request. Any line starting with
#is a comment, and is therefore ignored. - Execution:
Ctrl+E(alsoCtrl+Enterwhere the terminal reports it — see §4) executes the request the cursor is in, only if the left panel is focused (no effect if the right panel is focused, see §4). On a blank or comment line between two requests, that is the closest one above (failing that, the first of the editor). On any other line that isn't part of a request — a request line still being typed, such asGETalone — nothing is sent and the status bar says no request was found: falling back to the request above would run one the user isn't looking at, aDELETEfor instance. The call is launched asynchronously; the status bar switches to "request in progress...", then the right panel and status bar are updated once the response is received. Only the answer to the last request sent is displayed: an earlier, slower one that answers afterwards is dropped. If that earlier one only reads (esclient.IsRead, the classification of the production guardrails, §5), it is cancelled — its connection closed —, so that a heavy search doesn't keep loading the cluster for an answer no one will see; a write is left to finish: cut short, no one could tell whether it went through (a_reindexwatched with_cat/tasks, typically). Abandoning (Esc): while a request is in progress,Esccloses its connection, unless a popup, the search bar or the completion list takes it first — closing one of them never abandons a request. The result panel keeps what it shows, and the status bar says after how many seconds the request was abandoned — and, for a write, that the cluster may have carried it out anyway: closing the connection doesn't undo what the cluster has already received. An answer arriving afterEscisn't displayed. With no request in progress,Escis passed on as before. On a protected cluster (§5), a request that writes is confirmed or refused before anything is sent — after variable substitution and body validation, so that a request with an invalid body is refused for that, with no confirmation popup. - Reusable variables (
${name}, SPEC.md §7 backlog #4): a${name}reference anywhere in the path or body is substituted with a stored value before the request is actually sent (Ctrl+E) or turned into acurlcommand (F9) —App.resolveRequest, shared by both, the only two "what would actually be sent" operations;F4(reformat) deliberately does not go through it, since it edits the saved query text itself and must leave${name}literal. An undefined variable aborts with a status-bar error naming it (deduplicated across path and body) rather than sending the literal placeholder text. Values come from~/.config/termdevtools/variables_<sanitized URL>.txt— one file per cluster per user, same scheme as the query save below (name=valuelines,#comments,ui/variables.go'sparseVariables) — loaded on connection and reloaded on demand withF7(no in-app editor; hand-edited, like the user's recipes and endpoints, §9.1). Self-documenting on first use, same approach asconfig.yaml(LoadVariablesFile, mirroringconfig.WriteDefaultConfigFile). - Starting content: see "Loading at startup" below.
- Per-cluster save: the editor content save is specific to the cluster you're connected to (identified by its URL) and to the current user — one
~/.config/termdevtools/queries_<sanitized URL>.txtfile per cluster already used by that user (next toconfig.yaml, see §9.1 for the detail of filename sanitization). - Save triggers:
Ctrl+S(left panel focused): explicit save, with confirmation in the status bar.- Automatic on program exit: content is saved with no explicit action on close (
Ctrl+C, the connection screen's "Quit", or an externalSIGTERM/SIGHUPsignal — e.g. a dropped SSH session), in addition to explicitCtrl+S— that of every open connection (§3.0), not only the one on screen. Best-effort, silent (no confirmation possible at that point).SIGKILL, as with any program, remains impossible to intercept. - Automatic on switching (
Ctrl+O, §3.0): the left panel on screen is saved when the connection screen opens, as on exit, to stay safe on disk while another cluster is on screen. - Never at the expense of what is already saved: the file is replaced in one step (written beside it, then renamed over it), so a full disk or a crash in the middle of a save leaves the previous content intact. If the save on
Ctrl+Cfails, the connection concerned is put on screen, its status bar says so and the program stays; a secondCtrl+Cquits regardless. If saved requests exist but couldn't be read at startup, the editor — which doesn't hold them — isn't written over them on exit;Ctrl+Sremains the explicit way to replace them.
- Loading at startup, once connected to a cluster: if a save already exists for this cluster (URL) and this user, it's loaded; otherwise a
cheatsheet.txtnext to the binary, if a team installed one; otherwise the starter built into the binary — a short welcome comment and a handful of requests that work on any cluster (GET /,_cluster/health,_cat/nodes...), pointing to the recipe catalog for the rest. The starter replaces the long cheatsheet that versions up to 0.5 loaded: its content is now in the catalog, which is searchable and adapted to the cluster, instead of a wall of text to scroll through. - Recipe catalog (
F8): a popup over the layout, 76 columns wide like the help screen, listing the ready-made requests that apply to the connected cluster — about a hundred, grouped by theme (overview, shards and allocation, nodes and resources, indices, tasks, snapshots, index lifecycle, upgrade and maintenance, search and documents), in English only.- A filter field keeps the focus the whole time: typing narrows the list down (every word typed must appear, case-insensitively, in the recipe's group, title, tags or body),
↑/↓(alsoCtrl+P/Ctrl+N,PgUp/PgDn) move the selection without wrapping around,Enterinserts,Esccloses. The application's other shortcuts are inactive while it is open, exceptCtrl+C. - A preview below the list shows the selected recipe as it will be inserted, comments dimmed.
- Insertion: at the end of the editor, separated from what precedes by a blank line, under a
# titlecomment — never at the cursor, where it could land in the middle of an existing request. The cursor is placed on the recipe's first request, soCtrl+Eruns it at once; one undo removes it. - A recipe may hold several requests and uses
${name}variables for what depends on the cluster (${index},${node},${repository},${snapshot},${field},${task_id}): running it with a variable undefined names the variable to define, as for any request. - Recipes that exist in two forms (index lifecycle: ILM on Elasticsearch, ISM on OpenSearch) share a title: only the form that applies is listed. When the cluster couldn't be identified, both are, each followed by the clusters it is meant for.
- The user's own recipes are listed with the built-in ones, marked as added, the preview's border naming their file. Format, locations and merge rules: §9.1 and §9.5.
- A filter field keeps the focus the whole time: typing narrows the list down (every word typed must appear, case-insensitively, in the recipe's group, title, tags or body),
- Reloading (
F7): re-reads everything the user or the team maintains by hand — the cluster's variables, recipes, endpoints — and forgets the_catcolumns learned from the cluster. The status bar sums up what was loaded, or names the first problem found (file and line) and how many others there are. - Syntax highlighting: dropped, not just deferred —
tview.TextArea(the library's only widget supporting multi-line editing: cursor, selection, undo, clipboard) explicitly does not support multi-color text (official documentation: "Multi-color text is not supported"), unlike the read-onlyTextViewused on the right (§3.3). Getting it would require rebuilding a custom editor on top of a colorableTextView(cursor/selection/editing reimplemented by hand) — judged disproportionate for this tool. Confirmed that no newer version of tview lifts this limitation (v0.42.0 = latest version as of 2026-08-12). Two things are colored all the same, which take no editor of their own: the method of each request line (teal forGET, blue forPOSTandPUT, red forDELETE) and comments, by changing the color of the cellsTextAreahas just drawn (Editor.paintRequests, on the display rows the gutter already computes). The selection keeps its colors. - Auto-completion (
TaborF10, left panel focused): offered only when the cursor is in the middle of typing aMETHOD partial_endpointline (not in a JSON body or anywhere else —Tabkeeps its standard tab-insertion behavior there;F10has no such fallback meaning and is simply swallowed).F10was added after confirming Tab itself gets swallowed before reaching the app on some terminals (see §4); no fallback modifier detection can work around a key that never reaches the app at all. Case-insensitive comparison of the typed prefix against the list of endpoints known for the connected cluster, centered on administration/operations (_cat/*,_cluster/*,_nodes/*, index admin endpoints...) — no dynamic discovery of real index names (noted as an idea for a future version, see §7).- 0 match → message in the status bar, nothing else.
- 1 match → direct completion, no further interaction.
- Several matches → a dropdown list to choose from (arrows then Enter to confirm, Esc to cancel); an extra
Tabwhile the list is open cycles through the suggestions. Typing further letters narrows the selection to the first item starting with what's been typed so far (case-insensitive,Backspaceto correct), useful to jump straight to an entry in a long list instead of scrolling. The list's title always shows that full search text (what was typed beforeTabplus any type-ahead keystrokes since) — needed because matching is a plain prefix check with no special handling of the/separator: typingiright after completing_catsearches for_cati, not_cat/i, and matches nothing since every_cat/*candidate has a/there. A failed search reports an error and keeps the list open; Enter alone leaves the request unchanged. Backspace corrects the search and Esc cancels. Explicit navigation (arrows, Tab/Shift+Tab, PgUp/PgDn, Home/End) or clicking an item clears the failed search and its error, allowing that item to be selected. A newer, unrelated status message is preserved. - Optional leading
/: ignored for matching and preserved on insertion. User and team endpoints are normalized on loading, so slash-prefixed_catentries also support column completion. - Query after the cursor: merged with the candidate's default parameters using one
?. The user's query text is kept unchanged; a user-supplied key overrides every default with that key, including repeated keys and equivalent escaped spellings. - Optional trailing
/: in HTTP, a trailing/right before the parameters is optional (_cat/indices/?h=...is equivalent to_cat/indices?h=...). No known endpoint stores one, so it's ignored for comparison — completion replaces the whole typed segment (the/included), not just what precedes it. This case doesn't arise for theh=/s=columns below:_catcommand recognition (longest prefix, at a/boundary) already naturally absorbs it. - List source: the list built into the binary, each endpoint tagged with the clusters it exists on, filtered for the connected one (§9.5); extended — never replaced — by an
endpoints.txtnext to the binary (the team's) and one in the user's configuration directory (§9.1), one endpoint per line,#= comment, same optional tags. - Built-in list: generated from the official API specifications — elastic/elasticsearch-specification, every minor branch from
7.17to9.5, and the OpenSearch API specification — then checked against real clusters (§9.5). Filtered to endpoints with no path parameter (/{index}/...ones are out of scope, see above) and to administration domains:_cat(all commands,?vsystematically for column headers),_cluster,_nodes, indices, snapshots, tasks, ingest, dangling indices, and the core search/document endpoints (_search,_count,_bulk,_reindex...) on both; ILM, SLM, license, features, migration, node shutdown, searchable snapshots, SSL, X-Pack info on Elasticsearch; ISM, snapshot management,_list, query insights, search pipelines, remote store on OpenSearch. Deliberately left out: ML, security, watcher, transform, rollup, SQL/ES|QL, CCR, connectors, inference, enrich.
h=/s=columns for_cat/*commands: a special case of the auto-completion above, taking priority over generic endpoint completion. Recognized when the cursor is in the middle of typing theh=(displayed columns) ors=(sort) parameter of an already-identified_cat/xxxcommand (e.g._cat/indices?h=health,st):- only the last typed column (after the last comma) is completed, what precedes it is preserved as-is;
- for
s=, if the column is already followed by:, completes the sort direction (asc/desc) rather than a column name (e.g.s=docs.count:de→desc); this case doesn't apply toh=, where a:is part of the compared text as-is; - trailing path filter: many
_catcommands accept a filter (index name, node name...) between the command and the parameters, e.g._cat/shards/myindex?h=.... The command is recognized as the longest entry in thecommand → columnstable that prefixes the path at a/boundary (never a partial word match:shardsxyzdoes not matchshards) — otherwiseshards/myindexwould match no known command and nothing would be suggested; - the list of proposed columns depends on the current
_catcommand (e.g. the columns of_cat/shardsdiffer from those of_cat/indices) and is asked from the cluster itself: the first time a command's columns are completed,GET _cat/<command>?helpis sent in the background (3-second limit; answered by the receiving node alone, without touching the cluster), the answer is kept for the session — untilF7— and the completion that was waiting resumes by itself, provided the editor hasn't changed in the meantime. Exact for whatever version the cluster runs, including one more recent than the binary, and for a_catcommand added by the user toendpoints.txt. Only names made of letters, digits,_,.and-are kept from the answer: what comes out of it is offered in a list, then written into the editor, and a cluster's answer has no business putting anything else there. If the cluster can't be asked (timeout, error, insufficient privileges), a table built into the binary is used instead, with a warning in the status bar: generated from the?helpof the real clusters of §9.5 and deliberately conservative — only columns present on every tested version of the range it is given for. There is no user-level file for these columns: what the cluster says is always better than a list maintained by hand (thecat_columns.txtthat versions up to 0.5 read next to the binary is ignored). Only full column names are offered (e.g.docs.count), not their short aliases (dc): more descriptive, and it limits the number of suggestions for commands with many columns (_cat/indices,_cat/nodes,_cat/shards...).
- Display format: pretty-printed JSON (typical responses) or fixed-width text (e.g. a response to a
_catcommand). - Request reminder: the panel's first line is always a
# METHOD pathcomment (no JSON body) recalling which request produced the displayed result — e.g.# GET _cat/health?v. Part of the panel's plain text, so it's included in exports and clipboard copy too (below), not just the on-screen display. - Response headers (SPEC.md §7 backlog #2): every HTTP header on the response is listed right after the reminder, one
# Header: valuecomment line per header (sorted by name), same plain-text treatment as the reminder itself — included in exports and clipboard copy. Gray like the reminder, except aWarningheader (RFC 7234 — Elasticsearch sets it to flag a deprecated API in use) shown in yellow so it stands out. Not shown for a transport-level failure (ShowError): there's no response to have headers from. - Syntax highlighting for JSON: yes in v1.
- Result history: No.
- Handling large responses: manual scroll with up/down keys. Indenting and colorizing are done outside the interface's own goroutine, which stays responsive meanwhile. A response larger than 64 MB is not displayed: the request is reported as failed, with the advice to narrow it down (
filter_path,size,h=) — loaded whole, it would exhaust memory before anything could be shown. The duration reported covers the whole response, body included. - Displaying errors (invalid request, unreachable cluster, timeout): in the status bar.
- Redirections: a
3xxanswer is displayed for what it is — its status, and itsLocationheader among the headers — never followed (§5). - Nothing displayed is interpreted by the terminal: a response body, its headers or an error message may hold escape sequences (writing to the clipboard, retitling the window, hiding text); the display library never writes a control character to the screen, which a test checks for every way in (
ui/terminal_safety_test.go). - Export (
Ctrl+S, right panel focused): writes the currently displayed result (request reminder included) into theexports/subfolder of the user's configuration directory (§9.1, created if needed), a timestamped filename followed by a random number (YYYYMMDD-HHMMSS-<number>), so that two exports in the same second, from one session or two, never overwrite each other,.jsonextension if the response body is valid JSON,.txtotherwise — note that the leading#reminder line means the exported.jsonfile isn't itself strictly valid JSON, a deliberate trade-off for traceability. Confirmation (with path) shown in the status bar; error (e.g. nothing to export) shown the same way. - Copy to clipboard (
F2): whenconfig.Mouseis enabled,tview.Application.EnableMouse(true)prevents native terminal text selection (the app captures mouse events instead) — no mouse selection possible in this panel in that case.F2copies the entire displayed result regardless of the mouse setting, via the standard terminal mechanism OSC 52 (tcell.Screen.SetClipboard): the local terminal receives an escape sequence asking it to copy to its own clipboard, which works even over SSH (the clipboard is never the remote server's). Confirmation shown in the status bar, but with no guarantee the copy actually happened: neither tcell nor the OSC 52 protocol return a confirmation, and support depends on the terminal: Windows Terminal, WezTerm, kitty, Alacritty, foot and iTerm2 (once enabled in its settings) support it; PuTTY, macOS Terminal, GNOME Terminal and the other VTE-based terminals don't. In tmux,set -g set-clipboard onis needed — the default,external, keeps the applications inside it from setting the clipboard —;screenneeds its own configuration. To be verified in real-world use. On a Mac, outside SSH (none ofSSH_CONNECTION,SSH_CLIENT,SSH_TTYset),F2andF9go throughpbcopyinstead (ui/clipboard.go): it works in any terminal, macOS Terminal included, and confirms the copy, so the status bar drops its reservation. Shouldpbcopyfail, the copy goes through the terminal, as elsewhere. Through SSH,pbcopywould fill the remote Mac's pasteboard: only the terminal reaches the user's.
The status bar reminds the main shortcuts, as far as its message leaves room for them; F1 lists them all.
| Action | Key | Status |
|---|---|---|
| Execute the request under the cursor | Ctrl+E (Ctrl+Enter also works on terminals that report it) |
Defined |
| Abandon the request in progress | Esc, when no popup, search bar or completion list takes it (§3.2) |
Defined |
| Switch focus left ↔ right panel | Ctrl+←/Ctrl+→ (or Alt+←/Alt+→) |
Defined |
| Quit the application (auto-saves the left panel of every open connection, §3.2) | Ctrl+C |
Defined |
| New request / clear the editor | Free-form editing of the left panel text | Defined |
| Open another connection, go back to an open one | Ctrl+O: the connection screen, Esc to go back (§3.0) |
Defined |
| Search in requests | Ctrl+F in the left panel |
Defined |
| Search in the JSON result | Ctrl+F in the right panel |
Defined |
| Resize the left/right split | F5 (shrink the left) / F6 (grow it) — Ctrl+Shift+←/→ also works on terminals that report it |
Defined |
| Save (left) / export (right) | Ctrl+S, behavior depends on the focused panel (§3.2, §3.3) |
Defined |
| Open the recipe catalog | F8 — type to filter, ↑/↓ to move, Enter to insert, Esc to close (§3.2) |
Defined |
| Complete an endpoint while typing | Tab, F10, or Ctrl+Space in the left panel, on a METHOD endpoint line (§3.2) |
Defined |
| Reformat (re-indent) the JSON body of the request under the cursor | F4 in the left panel, no effect if there's no body or it isn't valid JSON; a # line inside or before the body can't be re-indented around and is reported |
Defined |
Copy the request under the cursor as an equivalent curl command |
F9 in the left panel — secrets replaced with a placeholder (§7 backlog #3) |
Defined |
| Reload the hand-edited files (variables, recipes, endpoints) | F7, no panel restriction (§3.2) |
Defined |
| Show help (how it works + shortcuts) | F1, Esc to close |
Defined |
| Copy the result to the clipboard | F2 (§3.3) |
Defined |
| Switch the interface language (fr/en) | F3 |
Defined |
Ctrl+E(andCtrl+Enter, where the terminal reports it) is only active when the left panel (request editing) is focused — no effect from the right panel.
Alt+←/→is accepted on every system as a fallback for panel focus switch (seehasShortcutModifierinui/app.go), for terminals whereCtrl+←/→doesn't reach the app: on macOS it is intercepted at the OS level by default (Mission Control desktop switching —Optionis the Alt key there), and under PuTTY it doesn't get through either, whereAlt+←/→does.Mouse (
mouse: true, §9.2): a click gives the focus to the panel clicked, and the shortcuts that depend on the focused panel (Ctrl+S,Ctrl+F,Ctrl+E) follow it; a popup takes every click while it is open, and the completion list closes when the focus leaves it. Clicking a completion item is an explicit choice even after a failed type-ahead search; clicking its border is not.Some combinations (
Ctrl+Enter,Ctrl+Shift+←/→,Tab) are reported inconsistently — or not at all — depending on the terminal. Terminal-agnostic alternatives cover these cases:Ctrl+E(execute),F5/F6(resize),F10(complete). Panel focus switch has no function key: its fallback isAlt+←/→, above. PuTTY is known to mishandle several shortcuts and is strongly discouraged — no issues found on native macOS or Windows 10+ terminals. When in doubt, prefer the alternatives above.
- See §3.0 for the flow and §9.2 for the
config.yamlschema. - Distribution and version: read from the body of the
GET /that validates the connection (refdata.DetectTarget), with no extra request.version.distributionequal toopensearch→ OpenSearch, atversion.number.- Otherwise, a
taglinementioning OpenSearch → OpenSearch without a version: this is its compatibility mode (compatibility.override_main_response_version), which announces a fake7.10.2and drops thedistributionfield. - Otherwise, Elasticsearch's own
tagline(You Know, for Search) → Elasticsearch atversion.number— or without a version ifversion.build_flavorisserverless(Serverless has none that means anything). - Another value in
distribution(a fork announcing itself), or an answer that is none of the above → unknown. - Never a reason to refuse the connection: an unknown distribution means nothing is filtered, a missing version that version bounds are ignored (§9.5) — offering too much is better than hiding what works.
- Override:
distribution:andversion:on a cluster's entry inconfig.yaml(§9.2) replace what was detected, for a cluster behind a proxy that rewritesGET /or an OpenSearch in compatibility mode. Never written by the program; kept when the entry is moved to the top of the history. An invalid value is ignored with a warning in the status bar, and the connection proceeds with what was detected.
- Validating the connection: a
GET /(15 seconds at most). The account used must therefore be allowed to run it — themonitorcluster privilege on Elasticsearch,cluster:monitor/mainon OpenSearch; a401or a403is displayed as is. - Supported authentication: none, Basic Auth (login/password), API Key (identifier and secret, or the key in its
encodedform — either way sent asAuthorization: ApiKey base64(id:secret), §3.0), Bearer token (Authorization: Bearer <token>: a service account token, an access token, a JWT — whatever the cluster accepts as one; the program neither obtains nor renews it), client certificate (mTLS). Basic Auth, API Key (in both forms) and Bearer token (a service account token) are checked against a real Elasticsearch with security on (esclient/integration_test.go): each is accepted with the right secret and turned down with a wrong one. The client certificate is checked against a test server that demands it; OpenSearch's JWT authentication was not checked. - TLS: certificate verification (CA located by default in
default_ca_dir, path overridable per connection), option to skip it. TLS 1.2 at least (the default of Go's standard library). A CA file, when given, replaces the system's authorities for that connection. It is only read for a cluster in https with verification on, and the client certificate only in https: a path saved for a cluster in http, or with verification off, never blocks the connection, even if the file no longer exists. The command ofF9follows the same rule —--cacertonly when verifying,-konly in https. - Redirections are not followed: a
301,302,307… answer is returned as it is. Followed, a301/302turns aPOST,PUTorDELETEinto aGETof the new address without a word, and a307/308replays the request, body included, to wherever the answer points: neither is what the user wrote.curl, whichF9gives the equivalent command for, doesn't follow them either. - Proxy: a cluster is reached through the proxy the environment designates —
HTTPS_PROXYfor a cluster in https,HTTP_PROXYfor a cluster in http — unlessNO_PROXYexcludes it. These are the rules of Go's standard library (http.ProxyFromEnvironment): the same variables in lowercase are read too, andlocalhostlike any loopback address never goes through a proxy.- Per cluster: the
proxy:key of its entry inconfig.yaml(§9.2) settles it for that cluster, whatever the environment says — a proxy URL, ornonefor a direct connection. Never written by the program, kept on every reconnection, likedistributionandversion. Unlike the environment, it applies to a loopback address as well. - Proxies accepted:
http://andsocks5://. With anhttp://proxy, a cluster in https is reached through aCONNECTtunnel: encryption and certificate verification are end to end, the proxy only sees the name and port asked for. A cluster in http, on the other hand, hands the proxy the whole request, credentials included.socks5://is whatssh -Dopens; the cluster's name is then resolved by the proxy. - A proxy reached over TLS (
https://) is refused, whether it comes from the environment or fromconfig.yaml: Go's HTTP transport has a single TLS configuration, the cluster's, and would apply it to the proxy as well — verification turned off for the cluster would be off for the proxy, the cluster's CA file would become the only authority trusted for the proxy, and the cluster's client certificate would be offered to it. - The proxy's credentials: in the environment variable only (
http://user:password@proxy:3128, Basic authentication). They are sent to the proxy and to it alone, and are neither displayed nor copied; a standard-library error message that would quote the variable is replaced. Inproxy:ofconfig.yamlthey are refused, as in a cluster's URL: nothing secret is stored there. NTLM, Kerberos, PAC files and the system's proxy settings (Windows, macOS) are not supported. - Always visible: on the connection screen (§3.0), then in the status bar once connected. The command of
F9(§4) carries--proxyor--noproxy '*'whenconfig.yamldecides, and nothing when the environment does, whichcurlreads by itself — except that, according to its documentation, it only readshttp_proxyin lowercase. - Change from 0.6, which ignored the environment: a cluster reached directly now goes through the designated proxy, if there is one and
NO_PROXYdoesn't exclude it.
- Per cluster: the
- Certificates: two globally configurable default directories (
default_ca_dir,default_client_cert_dir) where the certificate picker popup starts (§3.0) — never the value of a field, since a directory isn't a certificate file. Up to 0.7 they also pre-filled the fields of a new connection, and on Linux that connection failed unless a file replaced the directory, even in http. They default to/etc/pki/tls/certs(RHEL/CentOS' standard TLS certificate directory) on Linux only, empty on Windows and macOS since that path doesn't exist there; overridable or clearable ("") per §9.2. Neither setting is a gate: if the configured directory doesn't exist on disk, the picker falls back to browsing the user's home directory instead of erroring out, and the field itself can always be typed by hand for a certificate kept anywhere else. Only when even that fallback isn't usable does the picker report a clear error naming the setting, not a raw OS error. - Client key protected by a passphrase: both formats are read — the encrypted PKCS#8 format (
BEGIN ENCRYPTED PRIVATE KEY, what OpenSSL has written by default since 1.1.0) and the legacy encrypted PEM format (BEGIN RSA PRIVATE KEYwith aDEK-Infoheader). For PKCS#8, the standard library having no support for it, the PBES2 scheme is implemented inesclient/pkcs8.go: a key derived by PBKDF2 (HMAC-SHA1 to SHA-512), encryption by AES-128/192/256 or triple DES in CBC mode — every combinationopenssl pkcs8 -topk8 -v2produces, checked against keys written by OpenSSL itself. Keys derived with scrypt, and the older PBES1 and PKCS#12 schemes, are refused with an error that names what isn't supported; a wrong passphrase is reported as such. - Secret storage: none, the program writes no secret — password, API key secret, Bearer token, and private key passphrase are re-requested on every connection, unless the cluster's entry says where to read them (below); only non-sensitive elements (URL, auth type, username, API key ID, CA/cert paths) are persisted in
config.yaml, with the most recently used entry at the top of the list. The same rule extends to the "copy as cURL" feature (F9, §4): the generated command includes the real, non-sensitive auth details (username, API key ID, certificate/key paths) but replaces the actual secret with a placeholder — a clipboard copy has no guardrail equivalent to "never written to disk." A corollary: a URL carrying credentials is refused (§3.0), since the URL itself is saved. - Secret read from a variable or a file:
secret_env: NAMEorsecret_file: pathon a cluster's entry inconfig.yaml(§9.2) say where its secret is — the one its authentication asks for, a single one per type: the password, the API key's secret or itsencodedform, the Bearer token, the client key's passphrase. Written by hand, never by the program, kept on every reconnection likeproxy:config.yamlsays where the secret is, never what it is.- Read on opening the form (§3.0), every time: the secret fills the masked field as if typed — an
encodedkey is recognized the same way —, the focus goes to "Connect", and the message area names the variable or the file. - The file: a regular file in UTF-8, read whole, without the line ends it finishes with (spaces are kept: they may be part of a password) nor the byte order mark some Windows editors add, 64 KiB at most. A pipe, a terminal, a device or a directory is refused — opening or reading it could freeze the interface —, as is UTF-16 or binary content (what
>writes in Windows PowerShell 5.1): sent as it is, it would only fail, or even lock the account. Its path is absolute, or starts with~/(the home directory); a relative path is refused — relative to the directory the program was started from, it wouldn't point to what was meant. On Linux and macOS, a file its group or other users can read is used all the same, with a warning in the message area (chmod 600); nothing is checked on Windows. - Never blocking: a variable unset or empty, a file missing, unreadable, refused, empty or too large, a relative path, or both keys on the same entry — the field stays empty, the message says which, and the secret is typed as usual.
- Keeping it safe is the user's job: the file, or whatever sets the variable, lies outside what the program writes; whoever can read it can connect.
F9keeps its placeholder (above). Like the URL it is sent to, these keys come fromconfig.yaml: a file taken over from someone else deserves a look at them before connecting. - Checked against a real Elasticsearch with security on (
ui/secret_integration_test.go): Basic Auth, API key and Bearer token, each from a variable and from a file.
- Read on opening the form (§3.0), every time: the secret fills the masked field as if typed — an
- Production guardrails: a protection level per cluster, chosen in the connection form (§3.0) and saved in
config.yaml(protection, §9.2), against a slip on a cluster that matters — a request sent with oneCtrl+Eto production instead of the test cluster.none(default): everything is sent, under the plain header, as before.confirm: red header (§3.1). A request that writes opens a "Write to a protected cluster" popup, 70 columns wide, naming the cluster (label and URL) and the resolved request (the body stays in sight in the editor). A path longer than 120 characters is shortened without losing its API, what says what the request does: the query string goes first, then what precedes the API — a long list of indices — is cut in its middle, its first and last names staying in sight (logs-2026.10.01,…,logs-2026.10.15/_delete_by_query), with two buttons: "Cancel", which has the focus, and "Send".Enterpressed out of habit orEscsends nothing, and the status bar says so; only "Send" (Tabor→, thenEnter; the arrows don't go round from one end of the row to the other) sends the request, as it was resolved onCtrl+E. No letter triggers sending. While the popup is open, the other shortcuts have no effect, exceptCtrl+C.read_only: yellow header. A request that writes isn't sent; the status bar names the request and says how to allow it (connect again with "writes need confirmation"), and the right panel doesn't change.- Read or write (
esclient.IsRead): the resolved method and path decide — after variable substitution, since a variable may hold the API itself; the body isn't read. The path classified is the one sent: like Go's HTTP client, what follows a#is removed (a fragment, never sent: classifying the whole of_security/user/bob#/_has_privilegeswould take for a read thePOST _security/user/bobthat is sent), then the query string.GETreads, except_refresh,_flushand_flush/synced, which both distributions also take asGET, and OpenSearch's SQL and PPL (_plugins/_sql,_plugins/_ppland their_opendistroequivalents), which read their query from the URL too;PUTandDELETEwrite, whatever the path; aPOSTonly reads if the API part of its path — from the first segment that starts with_without being_all— matches a pattern of the built-in allowlist as a whole (_search,_count,_msearch,_mget,_field_caps,_analyze,_explain/*,_ingest/pipeline/*/_simulate,_sql,_query,_pit…, full list inesclient/readonly.go), where*stands for exactly one segment, neither empty nor holding an encoded/. A path holding a.or..segment, even encoded, always writes: a proxy normalizing paths would send another one (_mvt/../../logs/_bulkwould becomelogs/_bulk). Everything else writes, including what loses no data but acts on the cluster (_refresh,_flush,_forcemerge,_cache/clear,_cluster/reroute):confirmcovers every write, a_bulkor aPUT _mappingbeing able to break as much as aDELETE. An allowlist rather than a denylist, because a forgotten read is blocked for nothing (a nuisance) whereas a forgotten write would go through (a danger). One list for both distributions: a pattern only Elasticsearch knows, sent to OpenSearch, just gets a 404 there. Left out on purpose: OpenSearch's_plugins/_sql, which runs aDELETEstatement whenplugins.sql.delete.enabledis set — something that can't be known from here —, and_plugins/_ppl, whose machine-learning commands leave a doubt. A_written as%5Fisn't decoded: the request is classified as a write. The list can't be extended by the user; a forgotten read gets fixed in a release. - What isn't affected:
F9(nothing is sent),F4, completion and theGET _cat/<command>?helpit sends, recipes, the connection'sGET /. Nor is load: an expensive search or a_nodes/hot_threadsare reads. - Set at connection: to change level, quit and connect again (requests are saved per cluster) —
Ctrl+Ogoes back to the connection already open without making it again (§3.0). No shortcut lifts the protection mid-session: a guard that comes off with one key no longer protects against reflexes. - A safety net, not security: the protection prevents a mistake, it doesn't stop someone who means to write — anyone who can run the tool changes the setting in the form or in
config.yaml. What actually prevents writing is an account with no write privilege on the cluster. - Checked against real clusters (
ui/protection_integration_test.go, the Elasticsearch 9.5 and OpenSearch 3.9 oftools/testclusters.sh): an indexDELETErefused inread_only, where a search goes through; without effect while the confirmation is cancelled, carried out once confirmed; carried out at once without protection.
- What is trusted, and what is not: the binary's directory and the user's configuration directory are trusted inputs — what is put there (recipes, endpoints, cheatsheet) is offered to the user; the binary must therefore not be installed in a directory anyone can write to. Those files are nonetheless refused as a whole if they hold control characters (§9.5). The cluster is not trusted: its answers are displayed without being interpreted (§3.3), bounded in size (§3.3), and the column names it supplies to completion are filtered (§3.2).
- Input syntax: free-form, Kibana Console style (
METHOD path+ optional JSON body on the following lines). - HTTP methods to support: GET, POST, PUT, DELETE.
- Validation before sending: check that the body's JSON is valid before executing.
- Default timeout: 2 minutes, configurable via
default_timeout_secondsinconfig.yaml(§9.2).
What isn't done, by choice or not yet:
- Dynamic auto-completion of the connected cluster's real index names (completion is limited to known endpoints and
_catcolumns, see §3.2) — item 10 below. - Syntax highlighting in the editor, beyond methods and comments (dropped, see §3.2).
Candidates inspired by Kibana Dev Tools — all shipped as of this writing, roughly in decreasing-interest order as originally proposed: Reformat the request body's JSON in place (Kibana's "auto indent") as F4 (§4); Show the response's HTTP headers as part of the result panel (§3.3); "Copy as cURL" as F9 (§4) — secrets redacted, see esclient.Client.CurlCommand; Line numbers in the editor gutter as part of the editor panel (§3.2); Reusable variables as ${name} substitution, reloaded with F7 (§3.2, §9.1); Auto-closing brackets/quotes while typing in the editor (§3.2, ui/autoclose.go).
Roadmap after v0.5 — recorded on 2026-10-01 after comparing with geek-fun/dockit, cars10/elasticvue and elastic/cli. The order is the intended sequence; every item is still to be refined before it is built.
Built-in, version-aware reference data and recipes— delivered in 0.6: recipes, endpoints and_catcolumns inside the binary, selected from the distribution (Elasticsearch or OpenSearch) and version detected at connection, extended by the user's own files and reloaded withF7(§3.2, §5, §9.1, §9.5). Nothing but the binary to install. Brings self-managed OpenSearch into scope.HTTP(S) proxy— delivered in 0.7:HTTPS_PROXY/HTTP_PROXY/NO_PROXYhonored, a per-clusterproxy:key,http://andsocks5://proxies (§5).Extended authentication— delivered in 0.7: API key in itsencodedform and Bearer tokens (§3.0, §5). The Cloud ID is moved to the "not scheduled" items below; SigV4 stays out.Production guardrails— delivered in 0.7.3: a per-cluster protection (none,confirm,read_only) chosen in the connection form, confirmation or refusal of the requests that write, a banner with a label (§3.0, §3.1, §5). A protection enforced by a team is moved to "not scheduled" below.Secrets without retyping, first tier— delivered in 0.7.4:secret_envandsecret_fileon a cluster's entry, read on opening the connection form (§3.0, §5). An opt-in OS keychain is a separate, later decision (it changes the "no secret ever persisted" promise of §5).- Watch mode — re-run the request under the cursor every N seconds and highlight what changed.
Cancel a running request, live timer— delivered in 0.7.5:Escabandons the request in progress, a newer request cancels a read still in flight, and the status bar counts the seconds of the wait (§3.1, §3.2).- Diff between two runs of the same request.
- Cluster "top" screen — health, nodes, unassigned/relocating shards, running tasks, thread-pool rejections, auto-refreshed.
- Dynamic completion — index, alias, data stream, field, node and repository names; covers the "dynamic auto-completion" bullet above.
- Headless mode —
run -f file --json, no TUI; only worthwhile once item 5 exists. - Large-JSON navigation — folding, jump to path, jq-like filter.
Several clusters in one session— delivered in 0.8.0 (issue #10):Ctrl+Oswitches between open connections, each kept with all its state (§3.0). Naming clusters, the second step, will be discussed in an issue of its own.
Not scheduled yet, in decreasing interest: URL-parameter and query-DSL completion; execution history; a protection enforced by a team — a file next to the binary setting, for some clusters, a level the user couldn't lower, the protection being each user's own setting today (§5); ES|QL/SQL tabular rendering; multiple buffers and arbitrary files; tabular view with CSV/Markdown export; multi-cluster comparison; bulk import/export; a configurable export directory, should the user's (§9.1) not be enough; Elastic Cloud's Cloud ID in place of the URL — a mere typing shortcut, the console giving the cluster's URL as well, and one whose decoding could not be checked against any real deployment; AWS SigV4 request signing, which is what OpenSearch managed by AWS (Amazon OpenSearch Service, Serverless) requires when it is secured by IAM — left out of item 1 because it is neither small nor self-contained: every request must be signed (canonical request, payload hash, date-scoped key), and credentials come from a chain of sources (environment, shared profile, SSO, instance or container role, with session tokens that expire mid-session) that either pulls in the AWS SDK, at odds with the dependency-free static binary, or has to be re-implemented. A managed domain that accepts Basic Auth (fine-grained access control with an internal user database) should be reachable as any other OpenSearch — not tested.
Deliberately left out: AI assistant or MCP server; forms for snapshots/ILM/templates; built-in SSH tunnels (ssh -D and a socks5:// proxy stand in for them, §5); non-Elasticsearch-API backends (DynamoDB, MongoDB…).
- Runtime dependencies: none — the standard libc present on RHEL 8/9/10 (or any other Linux amd64 distribution) on that platform, nothing at all to install on Windows or macOS.
- Performance: must support large results (several MB).
- Packaging: a single binary to copy, with no file to install next to it, published with its SHA-256 checksum (
SHA256SUMS); from 0.7.2 on, also installable withgo install github.com/gnocent/termdevtools@<version>(tagsvX.Y.Z; earlier versions declared another module path).termdevtools --versiontells which version it is, before any file is read or created: the one stamped bybuild-release.shor the install scripts, otherwise the module version Go records in the binary (the one installed bygo install, or derived from git by a plaingo build), otherwisedev.termdevtools --export-defaults <directory>writes the data built into it out as files — to read what is built in, or as examples for one's own files (§9.1); it refuses to overwrite an existing file, and to write into either directory reference files are read from (the built-in recipes would come back as the user's own, frozen copies hiding the corrections of later versions). - Project/binary name: termdevtools.
Nothing is required next to the binary: every file below is either created by the program or an optional addition. What the program writes into the files it creates — the comments documenting config.yaml, the variables file and the recipe template — is in English, whatever the interface language. Connection history is specific to the user (two people launching the same shared binary on the same server shouldn't step on each other), whereas a team may want to share recipes with everyone using one installation. Hence two separate locations, read in that order of priority after the data built into the binary (§9.5):
- User configuration directory (
~/.config/termdevtools/, or$XDG_CONFIG_HOME/termdevtools/if that variable is set), created automatically (0700permissions) on first write:config.yaml— known clusters, updated automatically on every successful connection, no secret in it (§9.2). If the file doesn't exist yet, it's created on startup with every setting shown at its default value, a comment above each explaining what it does — self-documenting, so a user can discover what's configurable without reading this spec. Existing values are never touched; if the file does exist but is missing one or more settings (e.g. saved by an older version of the program, before some setting existed, or hand-trimmed down to a couple of keys), the missing ones are appended the same way, so it stays fully self-documenting as the program evolves. Saving it (every successful connection,F3) updates the values in place: the comments, and any key this version doesn't know, are kept — as is a default directory deliberately set to"".queries_<sanitized URL>.txt— one file per cluster already used by this user, containing the latest save of the left panel for that cluster (§3.2). Written byCtrl+Sand automatically on program exit. Name built from the cluster's URL, replacing with_any character that isn't alphanumeric,.,_, or-(so notably:and/) — e.g.https://es-prod.example.com:9200→queries_https___es-prod.example.com_9200.txt. Two different URLs that happened to be similar enough to produce the same name after this normalization would (rare case) share the same file — an accepted limitation to keep names readable rather than hashed.variables_<sanitized URL>.txt— one file per cluster already used by this user, holding the reusable${name}values substituted into requests (§3.2, §7 backlog #4) — same one-file-per-cluster-per-user scheme and filename sanitization asqueries_*.txt, just a different prefix (config.VariablesPathForURL). Hand-edited (no in-app editor), self-documenting: created with an explanatory comment the first time this user connects to this cluster, if it doesn't exist yet. Loaded on connection, reloaded on demand withF7(no file-watching).recipes/*.txt— the user's own recipes, added to the catalog (§3.2; format and merge rules in §9.5). Every.txtfile of the directory is read, in name order. The directory is created on first launch withmy-recipes.txt, a template made of comments only — it explains the format and adds nothing until edited. It is written once: a user who deletes the file isn't given it again as long as the directory remains.endpoints.txt— the user's own endpoints, added to those offered by completion (§3.2). Optional, never created by the program.exports/— results exported viaCtrl+Sfrom the right panel, one timestamped file per export (created on demand, §3.3). Each user's own, like the rest of the directory: exporting doesn't depend on the rights on the binary's directory, and a cluster's results can't be read by the other users of the installation. Up to 0.6 this directory was the binary's, and exporting failed in a shared or read-only installation (/opt,/usr/local/bin).crash-<timestamp>.log— written only if the program panics: the recovered value and a full stack trace (recoverCrashinmain.go), for diagnosing a crash on a terminal nobody watching can reproduce or transcribe by hand. If the file can't be written, the report is printed instead. Best-effort — a panic in tcell's own input-reading goroutine, rather than in codetview.Application.Runprocesses itself, isn't caught this way.
- Executable's directory (the binary's, not the shell's current working directory) — all optional, and the program writes nothing there:
recipes/*.txt,endpoints.txt— same formats as above, for content shared by everyone using that installation (a team's own recipes). The user's files come on top of them.cheatsheet.txt— a team's own starting content for the editor, loaded only if noqueries_*.txtsave yet exists for the current cluster/user, in place of the built-in starter (§3.2).
- Files of versions up to 0.5, which installed three companion files next to the binary:
cat_columns.txtis no longer read;endpoints.txtis read as the team's additions (above) instead of replacing the built-in list — harmless, since a line without a tag never removes the version constraint of the built-in entry it duplicates (§9.5);cheatsheet.txtkeeps its role. The repository no longer carriesendpoints.txt,cat_columns.txtnorcheatsheet.txt.exampleat its root, and the install scripts no longer copy anything but the binary — they only point out such leftovers. The same goes for anexports/directory left next to the binary by a version up to 0.6: it is no longer written to, and is neither moved nor deleted.
default_timeout_seconds: 120
language: en # interface language: "en" (default) or "fr" — see the i18n package; also switchable live with F3, which rewrites this line
mouse: false # mouse support, off by default (see §3.3) — everything has a keyboard equivalent
default_ca_dir: "" # where the certificate picker of the CA field starts (§3.0) — defaults to /etc/pki/tls/certs (RHEL/CentOS' standard TLS cert directory) on Linux, "" (disabled) on Windows/macOS
default_client_cert_dir: "" # the same for the client cert/key fields (mTLS) — same default rule
# order = usage history, most recently connected first
# (no separate name: the URL identifies the cluster)
clusters:
- url: https://es-prod.example.com:9200
protection: confirm # optional: none (default, key then left out) | confirm | read_only (§5) — an unknown value counts as read_only
label: PROD # optional: names the cluster in a protected cluster's header (§3.1)
auth_type: basic # none | basic | api_key | bearer | mtls (a Bearer token is never stored)
username: svc_devtools # used if auth_type: basic (password never stored)
api_key_id: "" # used if auth_type: api_key (secret never stored); taken from the key when it is entered in its encoded form
secret_env: ES_PROD_PW # optional: variable to read the secret from, or secret_file: ~/.es-prod.secret (absolute or ~/) — never written by the program (§5)
tls:
verify: true
ca_file: /etc/pki/ca-trust/es-prod-ca.pem
client_cert: "" # used if auth_type: mtls
client_key: "" # used if auth_type: mtls
- url: https://es-staging.example.com:9200
auth_type: none
tls:
verify: false
- url: https://search-behind-proxy.example.com
auth_type: none
distribution: opensearch # optional: elasticsearch | opensearch — replaces the detection (§5)
version: "2.19" # optional: replaces the detected version
tls:
verify: true
- url: https://es-dmz.example.com:9200
auth_type: basic
username: svc_devtools
proxy: http://proxy.example.com:3128 # optional: a proxy URL (http:// or socks5://, without credentials), or none — otherwise the environment decides (§5)
tls:
verify: truetermdevtools/
├── main.go // entry point: loads config, launches the connection screen, then the UI
├── go.mod
├── config/
│ └── config.go // reads/writes config.yaml, moves the used entry to the top of the list
├── i18n/
│ └── i18n.go // fr/en message catalogs for the interface, selected via config.Language
├── esclient/
│ ├── client.go // HTTP client (auth none/basic/api_key/mtls, TLS), executes a request
│ ├── proxy.go // which proxy to go through: the environment, or the cluster's setting
│ ├── curl.go // the request as an equivalent curl command, secrets redacted
│ └── pkcs8.go // decryption of client keys in the encrypted PKCS#8 format
├── parser/
│ └── parser.go // splits the editor content into requests (method, endpoint, payload, comments)
├── refdata/ // reference data built into the binary (§9.5)
│ ├── target.go // distribution + version, detection from "GET /"
│ ├── constraint.go // "@es >=8.7 <9.0" tags and their matching
│ ├── endpoints.go // endpoints.txt format, merge of layers
│ ├── catcolumns.go // cat_columns.txt format, parsing of "GET _cat" and "?help"
│ ├── recipes.go // recipe file format, merge of layers
│ ├── catalog.go // embedded data + team's and user's files, selection for a target
│ ├── export.go // --export-defaults, user's recipe template
│ └── data/ // the embedded files: endpoints.txt, cat_columns.txt, starter.txt, my-recipes.txt, recipes/*.txt
├── ui/
│ ├── connect.go // initial connection screen (tview.Form)
│ ├── app.go // Flex assembly, focus management, global shortcuts
│ ├── editor.go // left panel (TextArea)
│ ├── completion.go // prefix filtering, h=/s= detection for _cat commands
│ ├── recipes.go // recipe catalog popup (F8)
│ ├── result.go // right panel (TextView + JSON highlighting)
│ ├── header.go // first line of the main screen: product, URL, user, protection
│ ├── theme.go // the palette, applied to tview and to the color tags
│ └── statusbar.go // last line of the main screen: message + shortcuts
├── tools/ // developer tools, not shipped
│ ├── genrefdata/ // generates refdata/data/endpoints.txt and cat_columns.txt
│ └── testclusters.sh // starts/stops the real clusters the integration tests run against
├── internal/testclusters/ // the list of those clusters, shared by the generator and the tests
└── config.yaml.example
- Left panel focused, cursor positioned on a request,
Ctrl+E(orCtrl+Enter). parserextracts method + endpoint + JSON payload around the cursor and validates the JSON.- Invalid JSON → error message in the status bar, nothing is sent.
- Valid JSON → HTTP call launched in a goroutine; status bar → "request in progress...".
- Response received →
esclientreturns the HTTP code, duration, body; UI updated viaQueueUpdateDraw(thread-safe with tview): right panel filled in (pretty-printed and highlighted JSON, or plain text for_catresponses), status bar → HTTP code + duration.
What completion and the recipe catalog offer is data, not code: plain text files under refdata/data/, compiled into the binary (go:embed) and selected, once connected, for the cluster's distribution and version (§5).
-
Why plain embedded files. A small user-level SQLite database was considered and dropped: the whole set is a few hundred read-only lines; text files stay hand-editable, diffable and reviewable, and the same format serves the user's own additions; a database would add either cgo (losing the static binary) or a large pure-Go driver, for no query the tool needs. One set of files per version was dropped too — the supported window holds some thirty minor versions — in favor of one catalog whose entries each say where they apply.
-
Constraints. An entry may be followed by tags:
@es,@es >=8.7,@es >=7.17 <9.0,@opensearch >=2.4(@elasticsearchand@osare accepted too). A bound is a version,>=inclusive or<exclusive; several intervals may be given for one distribution.- No tag: the entry applies everywhere.
- Tags for one distribution only: the entry isn't offered on the other.
- Matching fails open: on a cluster whose distribution is unknown nothing is filtered out, and on one whose distribution is known but not its version, version bounds are ignored.
-
Files (under
refdata/data/):endpoints.txt— one endpoint per line, optional tags. Generated, not hand-edited.cat_columns.txt—# _cat/<command> [tags]sections, then one column per line with optional tags. Generated. Only the fallback of §3.2.recipes/*.txt— the catalog, one file per theme, listed in the order of the file names.starter.txt— the editor's content on a first connection (§3.2).my-recipes.txt— the template written into the user'srecipes/directory (§9.1).
-
Recipe file format — the editor's own (requests and
#comments) plus directives written as comments, so that a recipe file can be pasted into the editor as is:# @group <name>— theme of the recipes that follow; without it, the file's name.# @recipe <title>— starts a recipe, which runs up to the next@recipeor@group.# @tags <words>— extra words for the catalog's filter.# @es ...,# @opensearch ...— the recipe's constraint; before the first@recipe, the default for the whole file.- Any other
# @wordline is an ordinary comment. A file without any@recipeis a single recipe named after the file, provided it holds a request; an@recipewithout a request is reported as a problem.
-
Layers. Embedded data first, then the team's files (binary's directory), then the user's (configuration directory) —
endpoints.txtandrecipes/*.txtonly (§9.1). Layers are merged, a file never replaces the built-in data as a whole:- Endpoints: union. An endpoint already known keeps its constraint unless the higher layer states one — so a line without a tag (typically from the
endpoints.txtof an older installation) cannot make a version-specific endpoint appear everywhere. - Recipes: a recipe with the same group and title (ignoring case) as recipes of a lower layer replaces them — all of them, since a title may exist there in one variant per distribution. Any other recipe is added at the end of its group, or in a new group after the existing ones.
- A line that can't be read is skipped and reported — file and line — in the status bar, at connection and on
F7; the rest of the file still loads. So is what would otherwise be dropped or misread in silence: a request,@tagsor a constraint written outside any recipe, a recipe whose only "request" is a line the editor wouldn't run, an interval no version can be in (>=9.0 <8.0). A file that isn't UTF-8 text (typically UTF-16, as written by>in Windows PowerShell) is reported and ignored as a whole; a UTF-8 byte order mark is tolerated. So is a file holding a control character other than a tab or an end of line: an escape sequence, which no editor shows, would otherwise end up in the requests the recipe is inserted into. A mistake in the embedded data itself is a build error, caught by the package's tests.
- Endpoints: union. An endpoint already known keeps its constraint unless the higher layer states one — so a line without a tag (typically from the
-
Generation (
tools/genrefdata, a developer tool):endpointsreads the official API specifications —output/schema/schema.jsonof every minor branch of elastic/elasticsearch-specification from7.17to9.5, and the OpenSearch OpenAPI document — keeps the namespaces of §3.2 and the endpoints without path parameter, and derives each constraint from the specification's own "since" annotation when there is one, otherwise from the branches the endpoint is present in. A short table of overrides, each with its reason, corrects what real clusters contradict (a wrong "since", a branch lagging behind the product, approximatex-version-addedvalues on the OpenSearch side).catcolumnsasks the real clusters below (GET _cat, thenGET _cat/<command>?help).explain <text>shows where an entry's constraint comes from.
-
Ground truth.
tools/testclusters.sh upstarts eleven single-node containers, security disabled: Elasticsearch 7.17.29, 8.0.1, 8.11.4, 8.19.22, 9.0.8 and 9.5.4; OpenSearch 2.0.1, 2.11.1, 2.19.6, 3.0.0 and 3.9.0. The integration tests (go test -tags integration ./refdata/) check, on each of them:- that the distribution and version are detected;
- that every endpoint offered for it exists there, and that none of those hidden from it answers;
- that the built-in
_cattable names the cluster's commands and no column it doesn't have; - every recipe offered for it, by running each of its requests — against a small fixture: an index with an alias and a block, a snapshot repository, a snapshot — and by checking every
_catcolumn it names against the cluster's own?help(an unknown column is silently ignored by_cat, so only this catches a typo). An answer that is a bare{}fails too, unless listed as expected: it is how a filter that selects nothing shows.
These tests are destructive — they change cluster settings, create, restore and delete indices and snapshots — and refuse any cluster that isn't on the local machine unless
TDT_IT_ALLOW_REMOTE=1is set. The containers are published on the loopback interface only. -
Precision between two tested versions: conservative. An endpoint or column that appeared somewhere between two tested versions is dated by the specification when it says so, otherwise by the first tested version where it exists — better not offered than offered wrongly.
_catcolumns escape the question entirely at run time, being asked from the cluster. -
A cluster newer than the binary gets whatever has no upper bound, that is what applied to the most recent version known at build time.
No blocking question identified at this stage. Section kept available for any question that might come up during future work.