Add optional command extensions

This commit is contained in:
DuProcess
2026-06-19 16:17:38 -04:00
parent 90e53f4b68
commit 41cdb0f54f
5 changed files with 241 additions and 8 deletions
+23
View File
@@ -101,6 +101,29 @@ dosh import-ssh palav homelab
This appends entries to `~/.config/dosh/hosts.toml` without trying to become an
OpenSSH config parser.
## Optional Command Extensions
Dosh can expose companion tools without taking a dependency on them. Command
extensions live in client or host config and expand only the first trailing word:
```toml
[extensions.tm]
command = "tm {args}"
description = "Open the server-side tmux dashboard"
```
With that config, `dosh palav tm` runs `tm` in the remote Dosh shell and
`dosh palav tm dosh` runs `tm 'dosh'`. Removing the table removes the integration.
Host config can override a global extension, or disable it:
```toml
[palav.extensions.tm]
command = "/opt/tm/bin/tm {args}"
[other-host.extensions.tm]
disabled = true
```
## Forwarding (Implemented)
SSH forwarding cannot be copied by keeping the bootstrap SSH connection open,