(Version française : INSTALL_fr.md)
This guide goes from the download to the first request, then details every setting. For an overview of the product, see the README.
- 1. What you need
- 2. Installing the binary
- 3. First connection
- 4. First steps in the interface
- 5. Settings:
config.yaml - 6. Your files: requests, variables, recipes, endpoints
- 7. Shared installation
- 8. Upgrading
- 9. Uninstalling
- 10. Troubleshooting
- A single file: the
termdevtoolsbinary. No dependency, no file to put next to it, no Internet access at run time. - A terminal of at least 80 columns by 24 rows. Recommended: Windows Terminal, macOS Terminal or iTerm2, any Linux terminal, including over SSH. PuTTY is discouraged (it passes several shortcuts on badly).
- Network access to the cluster from the machine TermDevTools runs on — direct, or through an HTTP or SOCKS5 proxy (§5) — and an account allowed at least to read the cluster's root (
GET /): that is the request that validates the connection.
Supported clusters: Elasticsearch 7.17 to 9.x, self-managed OpenSearch 2.x and 3.x.
Binaries are published on the Releases page:
| Platform | File |
|---|---|
| Linux (x86-64) | termdevtools-linux-amd64 |
| Windows (x86-64) | termdevtools-windows-amd64.exe |
| macOS (Apple Silicon) | termdevtools-darwin-arm64 |
| Checksums | SHA256SUMS |
- Download
termdevtools-linux-amd64andSHA256SUMSinto the same directory. - Check the file:
The line
sha256sum -c SHA256SUMS --ignore-missing
termdevtools-linux-amd64: OKmust be displayed. - Make it executable and put it in a directory of your
PATH:chmod +x termdevtools-linux-amd64 mkdir -p ~/.local/bin mv termdevtools-linux-amd64 ~/.local/bin/termdevtools
- Check:
If the command isn't found,
termdevtools --version
~/.local/binis not in yourPATH: addexport PATH="$HOME/.local/bin:$PATH"to your~/.bashrc, or run the binary by its full path.
Machine without Internet access: download the two files elsewhere, transfer them (scp, removable media), then resume at step 2. Nothing else needs to be transferred.
- Download
termdevtools-darwin-arm64andSHA256SUMS. - Check the file: the command below prints a digest, which must be identical to the one on the
termdevtools-darwin-arm64line ofSHA256SUMS.shasum -a 256 termdevtools-darwin-arm64
- Make it executable and put it in your
PATH:chmod +x termdevtools-darwin-arm64 mkdir -p ~/.local/bin mv termdevtools-darwin-arm64 ~/.local/bin/termdevtools
- The binary is not signed with an Apple developer account. If macOS refuses to run it because it was downloaded, remove the quarantine mark:
xattr -d com.apple.quarantine ~/.local/bin/termdevtools - Check with
termdevtools --version.
No binary is provided for Intel Macs: build from source (§2.4).
- Download
termdevtools-windows-amd64.exeandSHA256SUMS. - Check the file in PowerShell: the digest displayed must be the one on the matching line of
SHA256SUMS(letter case doesn't matter).Get-FileHash .\termdevtools-windows-amd64.exe -Algorithm SHA256
- Rename it
termdevtools.exeand put it in a directory of your own, for instance%LOCALAPPDATA%\termdevtools\. - Run it from Windows Terminal (or PowerShell) by its path, or add that directory to your
PATH. - The binary is not signed: Windows may display a warning on first launch.
Go 1.25 or later is required. go.mod asks for the Go 1.27.3 toolchain, the one the release binaries are built with: an older version of Go downloads it by itself. On a machine without Internet access, install Go 1.27.3 or later.
git clone https://github.com/gnocent/termdevtools.git
cd termdevtools
./install.sh # Linux, macOS.\install.ps1 # WindowsThe scripts build for your machine and install the binary into ~/.local/share/termdevtools (linked into ~/.local/bin) or %LOCALAPPDATA%\termdevtools. The TERMDEVTOOLS_INSTALL_DIR and TERMDEVTOOLS_BIN_DIR variables change those locations. To only build: go build -o termdevtools .
Without cloning, from 0.7.2 on: go install github.com/gnocent/termdevtools@latest (or @v0.7.2 for a given version) puts the binary in GOBIN, or $(go env GOPATH)/bin when it is unset.
Run termdevtools. The interface is in English; once connected, F3 switches it to French and remembers that choice.
-
The connection screen lists the clusters already used — none the first time — then "+ New connection" and "Quit". Choose "+ New connection" with the arrow keys and
Enter. -
URL: the address of the cluster, scheme and port included, for instance
https://es.example.com:9200. Don't put credentials in it (https://user:password@…is refused: the URL is saved). -
Protection: for a cluster that matters — production —,
Enteropens the list.Choice Effect none Everything is sent, as in earlier versions. writes need confirmation Red banner. A request that writes opens a confirmation popup whose active button is "Cancel": Enterpressed out of habit sends nothing.Tabor→to "Send", thenEnter, sends it.read-only Yellow banner. A request that writes is refused, nothing is sent. A request that writes is any
PUT, anyDELETE, and anyPOSTthat isn't a search or another known read (_search,_count,_msearch,_mget,_analyze…):_bulk,_delete_by_query, but also_refreshor_forcemerge.GETrequests are sent, except_refreshand_flush, which act on the cluster. The level holds for the whole session: to change it, quit and connect again.Label (banner), right below: a few words shown on the banner,
PRODfor instance. With "none", the field is greyed out andTabskips it. -
Authentication:
Tabto the field,Enterto open the list, then choose. The fields that follow adapt to that choice.Choice Fields to fill in none — Basic Auth Username, Password API Key API Key ID, then Secret, or encoded key (no ID): the key's secret — or the whole key in its encodedform, in which case the identifier isn't neededBearer token Token client certificate (mTLS) Client certificate, Client private key, Key passphrase if it is encrypted -
TLS (
https://URLs only):- CA file: the certificate of the authority that signed the cluster's, if it isn't among the authorities your system knows.
Enteron that field opens a file picker when a default directory is configured (§5); otherwise, type the path. - Verify server certificate (TLS): checked by default. Only uncheck it for a test, on a trusted network.
- CA file: the certificate of the authority that signed the cluster's, if it isn't among the authorities your system knows.
-
Tabto "Connect", thenEnter.Escor "Cancel" goes back to the list.
Once connected, the status bar tells what was recognized: ES 9.5.4, OS 2.19.6.
What is remembered, and what is not. The URL, the protection and its label, the authentication type, the username, the API key identifier and the certificate paths are saved in config.yaml: on the next connection, that cluster is in the list and only the secret is asked for again. Passwords, API key secrets, tokens and passphrases are never written to disk. To stop typing the secret, add secret_env: VARIABLE_NAME or secret_file: ~/path/to/file by hand to the cluster's entry in config.yaml: it is read from there when the form opens (see the README).
From a tool already connected to the cluster (TermDevTools with Basic Auth will do):
POST _security/api_key
{
"name": "termdevtools"
}
The answer holds id, api_key and encoded. Two ways to enter it, whichever you prefer:
idin API Key ID andapi_keyin the secret field;encodedalone in the secret field, API Key ID left empty. That is also the form Kibana shows when a key is created. The identifier is then taken from the key and saved for next time.
Choose Bearer token when the cluster expects an Authorization: Bearer … header: an Elasticsearch service account token or access token, an Elasticsearch or OpenSearch JWT. Paste the token alone; if it was copied with the word Bearer, that word is removed.
The token is never saved: it is asked again on every connection, and TermDevTools doesn't renew it when it expires. For lasting access, prefer an API key.
- The certificate and the key are expected in PEM format, in two files.
- A key protected by a passphrase is accepted in both common formats:
BEGIN ENCRYPTED PRIVATE KEY(PKCS#8, what OpenSSL writes by default) andBEGIN RSA PRIVATE KEYwith aDEK-Infoheader. .p12/.pfxfiles are not read: convert them to PEM with OpenSSL.
- On the left, the editor: one request per block, as in Kibana's console. The first time you connect to a cluster, it already holds a few requests that work anywhere.
GET _cluster/health GET _cat/indices?v&s=store.size:desc Ctrl+Eruns the request the cursor is in; the result shows up on the right.F8opens the recipe catalog: type a few words (unassigned,disk,snapshot…), choose with the arrow keys,Enterinserts the recipe at the end of the editor, ready to run.Tab(orF10) completes an endpoint being typed, and the columns of_catcommands afterh=ors=.Ctrl+Ssaves your requests for this cluster; they are saved on quitting withCtrl+Ctoo.F1lists every shortcut.
The file is created on first launch, every setting with a comment explaining it.
| System | Location |
|---|---|
| Linux, macOS | ~/.config/termdevtools/config.yaml |
| Windows | %USERPROFILE%\.config\termdevtools\config.yaml |
If the XDG_CONFIG_HOME variable is set, the directory is $XDG_CONFIG_HOME/termdevtools/.
| Setting | Default | Purpose |
|---|---|---|
default_timeout_seconds |
120 |
Maximum duration of a request, in seconds. |
language |
en |
Interface language: en or fr. F3 changes it and updates this line. |
mouse |
false |
Enables the mouse (click to switch panel, to choose in a list). Left off, the terminal's own selection and copy-paste stay available. |
default_ca_dir |
/etc/pki/tls/certs on Linux, empty elsewhere |
Directory where the picker of the CA file field (Enter on it) starts. The field itself stays empty until a file is chosen. |
default_client_cert_dir |
same | The same for the client's certificate and key. |
clusters |
empty | The connection history, most recent first. Kept up to date by the program. |
For each cluster, two optional lines replace the automatic detection when it can't succeed — a proxy hiding the cluster's answer, or an OpenSearch in compatibility mode, which reports a fake version:
clusters:
- url: https://search.example.com
auth_type: basic
username: admin
distribution: opensearch # elasticsearch | opensearch
version: "2.19"
tls:
verify: trueProxy. With nothing set, a cluster is reached through the proxy the environment variables designate, as curl does:
| Variable | Purpose |
|---|---|
HTTPS_PROXY |
Proxy for clusters in https://. |
HTTP_PROXY |
Proxy for clusters in http://. |
NO_PROXY |
Names, domains or addresses to reach without a proxy, separated by commas: es-internal.example.com,.intra.example.com,10.0.0.0/8. |
localhost and 127.0.0.1 never go through the environment's proxy. On Windows, only these variables are read, not the system's proxy settings.
For one cluster in particular, the optional proxy: line takes precedence over the environment:
clusters:
- url: https://es-dmz.example.com:9200
auth_type: basic
username: admin
proxy: http://proxy.example.com:3128 # or socks5://127.0.0.1:1080, or none
tls:
verify: trueValue of proxy: |
Effect |
|---|---|
http://host:port |
That HTTP proxy. A cluster in https goes through it in a tunnel: the proxy only sees the address asked for. |
socks5://host:port |
That SOCKS5 proxy — for instance socks5://127.0.0.1:1080 after ssh -D 1080 bastion. |
none |
A direct connection, whatever the environment says. |
Three limits: a proxy reached over TLS (https://proxy…) is refused; a proxy asking for a password is declared in the environment variable (HTTPS_PROXY=http://user:password@proxy:3128), never in config.yaml; NTLM or Kerberos authentication and PAC files are not supported.
The proxy in use is displayed while connecting, then in the status bar. For a cluster that isn't in the history yet, write its entry by hand as above, or use the environment variables.
Protection. The level chosen in the connection form (§3) is saved on the cluster's entry, with its label:
clusters:
- url: https://es-prod.example.com:9200
protection: confirm # none (default, line then absent) | confirm | read_only
label: PROD
auth_type: basic
username: adminA value the program doesn't know (protection: readonly, a typo) counts as read_only, the most restrictive level: the form says so when it opens, and the next connection saves read_only. A label without protection is kept, to no effect.
This protection is a safety net against slips, not security: anyone who can run the tool can remove it. For a cluster that really can't be modified, connect with an account that isn't allowed to write.
Edit the file with TermDevTools closed: the program rewrites it on every successful connection (it keeps your comments and the keys it doesn't know).
All of them live in the configuration directory (§5), and none is required.
| File | Content | Created by |
|---|---|---|
queries_<cluster>.txt |
The content of the editor for that cluster. | Ctrl+S, and on quitting |
variables_<cluster>.txt |
Your ${name} variables for that cluster, one per line: index=my-index. |
the program, on the first connection |
recipes/*.txt |
Your recipes, added to the catalog. | the program creates a commented template, my-recipes.txt |
endpoints.txt |
Your endpoints, added to completion: one per line. | you |
exports/ |
The exported results, one timestamped file per export. | Ctrl+S on the result |
Variables. A request may hold ${index}: the value is taken from the variables file when the request runs. The recipes of the catalog use index, node, repository, snapshot, field and task_id. An undefined variable stops the request with a message naming it.
Recipes. A recipe file is written like the editor, with a few directives in comments:
# @group Snapshots
# @recipe Nightly snapshots
# @tags backup
# This comment is shown in the preview.
GET _snapshot/nightly/_all
@group: the theme; an existing one files the recipe with the built-in ones.@recipe: the title; with the group and title of a built-in recipe, it replaces it.@tags: extra words for the filter.@es >=8.7or@opensearch >=2.4 <3.0: restricts the recipe to some clusters.
After any change, F7 reloads without restarting. A mistake in a file is reported in the status bar, with the file and the line. Files must be UTF-8.
To read the built-in recipes and endpoints, or start from them:
termdevtools --export-defaults ~/termdevtools-defaultsSeveral people can use the same binary on a server: each keeps their own history, requests and variables in their own configuration directory.
What is put next to the binary applies to everyone:
| File | Effect |
|---|---|
recipes/*.txt |
Common recipes, added to everyone's catalog. |
endpoints.txt |
Common endpoints, added to completion. |
cheatsheet.txt |
Starting content of the editor, in place of the built-in one. |
The binary's directory must be writable by trusted people only: what is in it is offered to every user. It can stay read-only for the users: the program writes nothing there, and exports (Ctrl+S on the result) go to each user's own configuration directory (§6).
Replace the binary with the new one. Your files are left alone.
- Proxy. 0.6 ignored the
HTTPS_PROXYandHTTP_PROXYvariables; they are now honored. If either is set on your machine, a cluster reached directly so far will go through that proxy, and the connection may fail if the proxy can't reach it. The message then starts withThrough proxy …. To reach it without a proxy: add it toNO_PROXY, or setproxy: noneon its entry inconfig.yaml(§5). - Exports. They were written to an
exports/directory next to the binary; they now go to the configuration directory (§6). The old directory is neither moved nor deleted: take your files from it if you need them.
All of the above, and besides:
- Three files were installed next to the binary:
cat_columns.txtis no longer read: delete it.endpoints.txtis read as an addition to the built-in list: delete it, unless you had added endpoints of your own to it.cheatsheet.txtstill provides the editor's starting content: delete it to get the built-in one.
- The interface starts in English as long as no language was chosen: if it was in French, press
F3once after connecting, the choice is remembered.
See also "Before upgrading" in the changelog, for each version.
Delete the binary and the configuration directory (§5): TermDevTools writes nothing anywhere else. A version up to 0.6 may have left, next to the binary, an exports/ directory and crash-<date>.log files.
| Symptom | Likely cause, and what to do |
|---|---|
x509: certificate signed by unknown authority |
The cluster's certificate is signed by an authority your system doesn't know: fill in the CA file. |
The cluster responded HTTP 401 |
Credentials refused — a wrong password or API key secret, a wrong or expired Bearer token. |
API Key ID missing… |
The secret field holds a secret alone, with no identifier: fill in API Key ID, or paste the key in its encoded form (§3). |
The cluster responded HTTP 403 |
The account isn't allowed to read the cluster's root (GET /): it needs at least the monitoring privilege (monitor). |
The cluster responded HTTP 301 (or 302…) followed by an address |
The URL entered redirects elsewhere: use the address shown. Redirections are never followed. |
No credentials in the URL… |
Remove user:password@ from the URL and choose Basic Auth. |
The header says Cluster instead of ES … or OS … |
The cluster wasn't recognized: everything is offered, unfiltered. State distribution and version in config.yaml (§5). |
Tab doesn't complete |
Some terminals intercept Tab: use F10. |
Ctrl+←/→ doesn't switch panel on macOS |
The system intercepts it: use Option+←/→. |
F2 or F9 copies nothing |
The copy goes through the terminal (OSC 52) — except on a Mac outside SSH, where it goes through pbcopy and works in any terminal. Windows Terminal, WezTerm, kitty, Alacritty and iTerm2 (once enabled in its settings) support it; PuTTY, macOS Terminal (through SSH), GNOME Terminal and the other VTE-based terminals don't. In tmux: set -g set-clipboard on; screen needs to be configured for it. |
| A request with a huge answer fails with "response larger than 64 MB" | Narrow it down: filter_path, size, or h= for _cat commands. |
| A proxy is needed to reach the cluster | Set HTTPS_PROXY, or proxy: on the cluster's entry in config.yaml (§5). |
The message starts with Through proxy … |
The attempt went through that proxy. If the cluster is reached without a proxy — which was the case up to 0.6, which ignored HTTPS_PROXY — add it to NO_PROXY, or set proxy: none on its entry in config.yaml (§5). |
HTTP 407, or Proxy Authentication Required |
The proxy asks for a password: HTTPS_PROXY=http://user:password@proxy:3128. Only Basic authentication is supported. |
a proxy reached over TLS (https://) is not supported |
The proxy is declared as https://: use its http:// address, or a SOCKS5 proxy (§5). |
| The program crashed | A crash-<date>.log file is written to the configuration directory (§5), or printed if it can't be: attach it to a bug report, after checking that it holds nothing confidential. |