CLI reference
One binary, one running instance: every action below rides the D-Bus seam (the D-Bus contract) - a second launch tells the first instance what to do and exits. The plugin verbs are the exception: they use no running instance or bus. validate, list, and uninstall never leave the filesystem; install reads its source off disk and, for a git URL, runs git.
dropterm [toggle] # default: toggle the overlay
dropterm show | hide # dedicated show/hide keys
dropterm new-tab [--cwd DIR] [--cmd COMMAND] [--profile NAME]
dropterm close-tab [--tab-index N]
dropterm rename-tab TITLE [--tab-index N]
dropterm duplicate-tab [--tab-index N]
dropterm switch-profile-tab --profile NAME [--tab-index N]
dropterm select-tab N # strict: no wrap, no 9 = last
dropterm --is-visible # query only, never shows the overlay
dropterm plugin validate [DIR] # offline plugin check (see below)
dropterm plugin docs # the plugin vocabulary reference
dropterm plugin install [FLAGS] SOURCE [DIR]
dropterm plugin list [DIR] # what is installed, and from where
dropterm plugin uninstall [--yes] ID [DIR]
new-tab
dropterm new-tab [--cwd DIR] [--cmd COMMAND] [--profile NAME]:
dropterm new-tab # a shell in the active tab's cwd
dropterm new-tab --cwd ~/src # a shell in an explicit directory
dropterm new-tab --cmd htop # a tab running htop
dropterm new-tab --profile web-prod # a tab running a configured profile
- If the app is running, the tab opens in the running instance and the overlay shows; if not, the app starts with that tab.
--cmdruns the command instead of the shell (cosmic-term-esemantics). It is whitespace-split, with no quoting support. The tab closes when the command exits, and it is not part of the saved session - the session never resumes a program.--profile NAMEruns the profile's command line in itscwdinstead of the shell, identically remote and at first launch. It is not combinable with--cmd. An explicit--cwdwins over the profile's owncwd. Unlike--cmd, the tab is part of the saved session.- If the config doesn't carry the profile name, the verb logs a
warnand opens a plain shell tab - the request is fire-and-forget: no error can be reported back. --cwdbeats inheritance; a nonexistent directory is ignored with a warning and the tab opens in the fallback.- Placement follows
new_tab_after_current(defaulttrueplaces it directly after the active tab,falseat the end).
Profiles themselves - the RON list, default_profile, their launch paths - are documented in Configuration.
Tab verbs
The tab verbs ride the same seam. All indices are 1-based (0 is rejected at the CLI edge; out-of-range targets warn and no-op):
dropterm close-tab # close the active tab
dropterm close-tab --tab-index 2 # close the second tab
dropterm rename-tab "work" # pin a title on the active tab
dropterm rename-tab "" # clear the override; shell titles resume
dropterm rename-tab "logs" --tab-index 3
dropterm duplicate-tab # fresh shell in the active tab's cwd
dropterm switch-profile-tab --profile web-prod # respawn the active tab under the profile
dropterm select-tab 2 # activate the second tab, strictly
close-tabandrename-tabare quiet state edits: they never show the overlay.duplicate-tab,switch-profile-tab, andselect-tabare tab-facing - likenew-tab, they show the overlay; a request arriving mid-slide-out reverses it instead of finishing the hide.- A rename pins a title no shell OSC title change can overwrite;
""is the documented reset (shell titles resume). DropTerm discards a pending inline rename on that tab when the remote title lands. duplicate-tabopens a fresh shell in the target tab's cwd - the running command is never copied. It lands after the active tab (always, whatevernew_tab_after_currentsays) and becomes active. The target's rename pin carries over (duplicating a tab renamed "work" opens the duplicate already named "work"). An unrenamed tab's title resolves from its own shell; an unresolvable target degrades to the active tab's cwd and pin.- The
Ctrl+Shift+Dkeybind and the context menu's "Duplicate Tab" row run this verb on the active tab; the per-tab context menu's row (right-click a tab button) runs it on the clicked tab. switch-profile-tab --profile NAMErespawns the target tab in place under the profile: its terminal is replaced by a fresh one running the profile's command in itscwd- running command and scrollback are lost, the same cost as closing and reopening the tab. The tab keeps its slot in the row, its activation state, and a pinned rename. From then on it saves to the session as a profile tab, and a restart restores it as that profile.- The spawn
cwdcomposes like a profile launch's: the profile's own livecwd, else the tab's. - After the switch, an unrenamed tab's default title renumbers (
Terminal Nfollows the fresh terminal); a renamed tab keeps its rename. - An unknown
--profilename or out-of-range--tab-indexwarns and changes nothing - unlikeduplicate-tab, it has no sensible fallback and never degrades to a spawn. - The context menu's Switch Profile folder (present exactly when ≥1 profile is configured) runs this verb on the active tab. The per-tab Switch Profile section runs it on the clicked tab.
select-tab Nis strict: no wrap, no9 = last.- Sent while the app is not running, all five verbs start it plain - only
new-tabcarries startup meaning.
Querying visibility
dropterm --is-visible prints true/false and exits with a matching code (0 visible, 1 hidden or not running) without summoning the terminal. It never combines with the action subcommands:
dropterm --is-visible && echo "the terminal is up"
if dropterm --is-visible; then ...; fi # exit code branch
On Windows, a release dropterm.exe is a GUI program and cmd.exe does not wait for it - a script writes start /wait dropterm.exe --is-visible; PowerShell waits when it captures the output.
The running instance serves the query over D-Bus (a read-only Visible property on its bus name), so it is cheap and works from any process.
Plugin verbs
You author plugins with two verbs, which never touch the display server or the bus: they need no running instance, show no overlay, and work in any session - including a headless one, where an authoring agent usually lives. Plugins is the contract itself; the verbs check work against it.
plugin validate
dropterm plugin validate [DIR] checks plugin dirs the way the terminal loads them:
- the manifest scan, the host's load-time scan - its log lines print verbatim
- a byte-compile of every
plugin.luawith the shipped Lua 5.4 (compile only - the verb executes nothing a plugin declares) - the vocabulary lint (it notes advisory names and never fails)
DIR is a plugins root (many plugin dirs - the examples/ shape) or a single plugin dir (one carrying plugin.json or plugin.lua), detected by content. Without DIR, it checks the config dir's plugins/ - what the running instance loads. A nonexistent dir checks as the empty first run: green, zero plugins.
Findings come in three classes:
- fault - a plugin skipped (a manifest that does not parse, an id that would not register) or a script that does not compile. Any fault exits 1.
- warning - something the plugin wrote was dropped: an unknown key, a wrong-typed row the scan skips. Each line names what was dropped.
- advisory - an advisory vocabulary word was used. The word is legal and nothing was dropped; the note is information.
The script-side warnings read plugin.lua itself, once it byte-compiles. Comments and string literals are dropped first - a name inside either is never read as code - and names are read in the dropterm. spelling and behind every alias the script binds with local NAME = require('dropterm').
- unknown name - the script names
dropterm.X, andXis neither a module the runtime installs nor, under its module, a call it carries; the call raises the first time it runs. - command cross-check - a command
plugin.jsondeclares that the script never registers withdropterm.command('id', ...)dispatches to nobody; a command the script registers that the manifest never declares can be neither bound nor shown. Each side warns once by its id. - listener nothing can wake - the script registers a
dropterm.onlistener while the manifest declares neitheron_startupnoron_startup_finishednor any command. Nothing loads the script. A lazy plugin with a command loads on its first press, so its listener is left alone.
The lints read literal spellings: a name built at run time is invisible, a run-time-built registration name hides the declared side of the cross-check, and a field the plugin adds to the dropterm table reads as unknown.
The bar is exit 0 with 0 warning(s): every dir scans as a plugin, every script byte-compiles, and nothing drops. Warnings and advisory notes both leave the exit code at 0 - the exit code is the pass/fail line, the warning count says whether anything was lost.
$ dropterm plugin validate ~/.config/io.github.l1br3_io.dropterm/plugins
dropterm: plugins: [fault] broken: plugin.json: invalid type: integer `42`, expected a sequence at line 1 column 16
dropterm: plugins: [fault] halves: plugin.lua does not compile: syntax error: [string "halves"]:1: <name> or '...' expected near 'end'
dropterm: plugins: checked 1 plugin(s) over /home/you/.config/io.github.l1br3_io.dropterm/plugins: 2 fault(s), 0 warning(s), 0 advisory note(s)
$ echo $?
1
Iterate: edit the manifest or script, run plugin validate, read the summary line.
plugin docs
dropterm plugin docs prints the contract's closed vocabulary - every manifest key, setting kind, event name, and runtime call, each marked pinned (mechanically enforced) or advisory (noted, never fails). It renders from the same table the scan, the lint, and the kit's schema and stub pin to: the names cannot drift between docs and behavior.
$ dropterm plugin docs
dropterm plugin vocabulary - the contract's closed names
docs/plugins.md is the contract; advisory names are noted, never fail
manifest keys (10):
name - pinned - display only - the dir name stays the plugin's id; also a profile key
commands - pinned
...
plugin install
dropterm plugin install [--link] [--force] [--yes] [--ref REF] SOURCE [DIR] installs one plugin into the plugins root. It runs the same checks as plugin validate before anything lands - a fault installs nothing - then asks once: plugins run with full user access. --yes skips the ask; a non-interactive terminal requires it.
SOURCE | What installs |
|---|---|
a plugin directory - carrying plugin.json, or exactly one subdir carrying it (the shape a GitHub zip download leaves). The path resolves against the directory you run the command from, so hand someone an absolute path | The dir, copied in |
a git URL - https://…, ssh://…, git@host:repo | A clone via the git binary (your SSH keys and credential helpers work). Without --ref, HEAD. The history is stripped - the files alone land - and the resolved commit prints. A missing git errors |
a github.com path URL - https://github.com/owner/repo/tree/REF/dir or https://github.com/owner/repo/dir (a folder's address in the browser) | That folder, from one clone - one plugin lands, its id the folder's name. tree/REF pins a branch, tag, or commit; without it, the default branch. File views (…/blob/…) and paths with .. are refused, and --ref beside a URL that already names one faults. Only github.com URLs carry a path: another host's URL past the repo clones whole (a tree view there is refused) |
an archive - .zip, .tar, .tar.gz, .tgz, .tar.xz, .txz, .tar.bz2, .tbz2 | The extracted dir. Entries escaping the staging dir, and symlinks, are refused |
| Flag | What it does |
|---|---|
--link | Symlink instead of copy - Unix only; edits to the source show on the next plugins reload without reinstalling |
--force | Replace an installed id: the whole dir swaps, contents never merge, and the old copy survives a failed landing |
--yes | Skip the confirm |
--ref REF | Git sources: the branch, tag, or commit SHA to install. A github.com path URL that already carries tree/REF refuses a second --ref |
The id is the landed dir's name - source dir, archive stem, repo basename, or github dir, lowercased into a slug. Installs record their source; plugin list reads it back. DIR is a plugins root. Without it, the verb uses the config dir's plugins/, created when missing.
$ dropterm plugin install ~/src/paste-uptime
dropterm: plugins: install: paste-uptime installed into /home/you/.config/io.github.l1br3_io.dropterm/plugins/paste-uptime — DropTerm picks it up on its next plugins reload
$ dropterm plugin install https://github.com/l1br3-io/dropterm/tree/main/plugin-kit/examples/paste-uptime
dropterm: plugins: install: paste-uptime installed into /home/you/.config/io.github.l1br3_io.dropterm/plugins/paste-uptime — DropTerm picks it up on its next plugins reload
plugin list
dropterm plugin list [DIR] prints one line per installed plugin: the id, the manifest's display name, a (linked) marker, and where the install recorded it coming from.
| Situation | What prints |
|---|---|
| a plugin the scan skips (a manifest that does not parse) | a warning line; the exit code stays 0 |
| an empty root | no plugins - not an error |
| a plugin copied in by hand before installs recorded sources | origin unknown |
$ dropterm plugin list
dropterm: plugins: list: paste-uptime — Paste uptime from /home/you/src/paste-uptime
dropterm: plugins: list: git-status — Git status (linked) from https://example.com/git-status.git@v1.2
plugin uninstall
dropterm plugin uninstall [--yes] ID [DIR] removes the plugin ID from the root. One confirm names what goes; --yes skips it. The running instance drops the plugin on its next plugins reload.
| Situation | What happens |
|---|---|
| a linked install | The link is removed; the source directory is untouched |
| any uninstall | The plugin's saved settings and state stay - reinstalling restores your configuration |
| an id that is not installed | The fault lists what is |
$ dropterm plugin uninstall paste-uptime
Remove `paste-uptime` from /home/you/.config/io.github.l1br3_io.dropterm/plugins?
Its saved settings stay, so a reinstall restores them.
Continue? [y/N] y
dropterm: plugins: uninstall: paste-uptime removed from /home/you/.config/io.github.l1br3_io.dropterm/plugins — its saved settings stay; DropTerm drops it at its next plugins reload