tenax

Reference / The Tenax CLI

Tenax commands

Use the app on your device. Use tenax to set up a host or open the same sessions from a terminal.

New here? Get started. These commands use your saved sign-in.

Sign in from a terminal

Run these on the computer where you use the CLI. Host installation is separate; see Get started.

Sign in from a terminal commands
CommandWhat it does
tenax loginSign this terminal client in. Approve its sign-in code or QR in the app, or open the printed link in a browser. The QR prints only on a terminal wide enough to hold it; on a pipe or a narrow console you still get the sign-in code and the link.
tenax hostsList your hosts and whether they are online.
tenax hosts --jsonThe same list as JSON, one object per host, with its name, key, online state, OS and version.
tenax logoutTake this computer off your account — its host row goes too if it is one — then clear the saved sign-in and client key. The running host exits on its next check. If the directory is unreachable the local files still go — remove the computer's row later from the app on a signed-in device.
tenax uninstallSign out, then remove the host service, tray, binaries and all keys/data. With sessions running, it says how many and asks first; --yes skips the question. On Windows those sessions stop. On Linux and macOS tmux keeps them, but the app no longer reaches this computer.

Sessions

Run these from a signed-in terminal client. With several hosts, add --host "Home computer". Quote names with spaces.

Sessions commands
CommandWhat it does
tenax sessions --host "Home computer"List sessions on the selected host.
tenax sessions --jsonOne JSON object per session: name, id, state (idle, working, needs you, background job, offline), muted.
tenax new work --host "Home computer"Create a shell named work and print its name.
tenax attach --session work --host "Home computer"Attach to that session and type in it. Use the name printed by new or sessions.
tenax new quiet --mutedCreate a session with its notifications muted.
tenax attach quiet --mutedAttach to quiet; if it does not exist, create it with notifications muted. An existing session keeps its mute state.
tenax mute work maxMute a session’s notifications for good. 0 unmutes it; an epoch time mutes it until then.
tenax rename work reviewRename a session. Two names mean session rename; one name means local host rename.
tenax kill workEnd the session and its running shell. This stops work in that session.

Talk to a session

Run these from a signed-in terminal client, or from an agent inside a session. Add --host and a host’s name or key to reach any of your hosts; watch takes --hosts and watches all of them by default.

Talk to a session commands
CommandWhat it does
tenax peek work --lines 40Print the last lines of a session’s text and exit. It never attaches.
tenax send work "npm test"Type the text into a session and press Enter. It reports written. An agent that has not taken the text yet reports written, not submitted or written, queued. An agent whose input box never showed the text reports not delivered and exits 70. A working agent whose screen did not change reports not confirmed and exits 70: it may have taken the text. Peek before you send again.
tenax notify "Build done"Send a notification to your devices. Run inside a session, it names that session.
tenax watch --sessions "*" --oncePrint one line per session or host event, such as finished, needs-you, background-job or offline. --once exits on the first event; --timeout SECS stops waiting.
tenax leave-alt workBring a session back from a stuck full-screen mode. The program keeps running and scrollback returns.
tenax reset-mouse workTurn off a mouse mode a program left on, so scrolling reaches history again.
tenax help agentsPrint the full reference written for agents in a session.

Schedules

The host keeps each schedule and types its text into the session at that time, then presses Enter.

Schedules commands
CommandWhat it does
tenax schedule list workList a session’s schedules.
tenax schedule add work at +30m "continue"Type the text into work in 30 minutes. Also takes an epoch time, +Nh or +Nd.
tenax schedule add work cron "0 9 * * 1-5" "standup"Type the text on a cron schedule: minute, hour, day of month, month, day of week.
tenax schedule pause work IDPause a schedule. resume, rm and renew take the same arguments.

Files on the host

Paths name a file inside one of the host's shared roots and cannot escape them. files roots lists the roots and their host paths: Home first, then the computer's drives or volumes. A path with no leading / is inside Home. A root's name works as the first part of a path, for example Home/notes.txt.

A leading / depends on the host:

  • Linux and macOS: the host also shares Computer, at /, so a leading / is the computer's own path. /home/me/notes.txt is that file, and it lands in Home when Home is /home/me. /srv/notes.txt is outside Home, in Computer.
  • Windows: a drive path such as C:/Users/me/notes.txt lands in that drive's root. A leading / with no drive is inside Home.
Files on the host commands
CommandWhat it does
tenax files rootsList shared roots and their host paths.
tenax files ls HomeList the top of Home. On a Linux or macOS host, tenax files ls / lists the computer's /.
tenax files ls "project notes" --host "Home computer"List a folder on a selected host. Quote paths with spaces.
tenax files mkdir notesCreate a directory in the shared root.
tenax files mv notes old-notesMove or rename a path. An existing destination is not overwritten.
tenax files count notesCount files and directories under this path.
tenax files rm notes/draft.txtDelete a file or empty directory.
tenax files rm -r old-notesDelete a directory and all its contents.
Upload and download from a Unix shell

In sh, bash, or zsh on Linux or macOS:

tenax files get notes.txt > local-notes.txt
tenax files put notes.txt < local-notes.txt
tenax files put local-notes.txt notes.txt

The first command downloads to a local file. The second uploads from one. The third is the same upload in the cp spelling — put LOCAL REMOTE — which needs no redirection and works in PowerShell too. These can replace existing file contents.

The redirection examples are for Unix shells; PowerShell redirection differs by version.

Device approval

Use an already approved device to approve another. Check the device is yours before approval.

Device approval commands
CommandWhat it does
tenax devicesList approved and pending devices. Each row shows the name, model, place, the day it was added and when it was last seen. A pending device cannot attach yet; its row shows a QR an already-approved device can scan to approve it.
tenax devices --jsonPrint the device list as one JSON array: key, approved, this, name, platform, model, place, created, last_seen and kind. A pending device's sign-in code is not in it.
tenax approve HEXApprove the pending device key shown by devices. Replace HEX with its key.
tenax approve CODE [--yes]Approve the sign-in code a computer shows (the CODE: tenax login prints). Prints the pending computer’s name and key fingerprint and asks first; --yes skips the question, for scripted sign-in only.
tenax devices remove HEXRemove a device. Hosts stop admitting it after their next approval check, usually within about 30 seconds.
tenax hosts remove HEXRemove an offline host. HEX is 8 or more hex characters of its key. The host signs out and needs a new approval to come back.

Manage this host

Run these on the computer that holds your sessions, as your own user. Interactive installers start service setup automatically. Run service install yourself only when setup did not finish.

Manage this host commands
CommandWhat it does
tenax service installApprove this host if needed, then install and start its user service.
tenax service statusCheck whether this host’s service is running.
tenax service install --dry-runPreview service setup without installing it.
tenax service uninstallStop and remove this host’s user service.
tenax service uninstall --dry-runPreview the removal without changing anything.
tenax rename "Home computer"Rename this local host. This is not a remote host selector.
tenax update [TAG]Update this computer’s Tenax to the latest release, or to the given release tag.
tenax --versionPrint this binary’s version.
tenax remote-updatePrint whether app-triggered host updates are allowed. Default: on.
tenax remote-update offBlock app-triggered updates on this host. Use on to allow them again.
tenax auto-updatePrint whether unattended host updates are enabled. Default: off.
tenax auto-update onEnable the six-hour update check. A newer verified build installs when no client is attached. remote-update off blocks this too.
How the service runs on each OS

Linux uses a user service that survives logout. macOS uses a launchd user agent that starts at login. Windows uses a per-user Scheduled Task that runs inside your logon session. Headless Macs and Windows computers need a logged-in user. The Unix installer tries to provide bundled tmux. If it reports missing tmux, follow its package-manager instructions. Windows installs bundled psmux and tenaxw.exe. Sessions live in the host’s multiplexer and can outlive the host service.

Unix binaries: ~/.local/bin. Windows binaries: %LOCALAPPDATA%\Programs\tenax.

Config and keys: ~/.config/tenax/ on Linux and macOS, %APPDATA%\tenax on Windows. State and logs: ~/.local/state/tenax/ on Linux, ~/Library/Application Support/tenax/ on macOS (logs in ~/Library/Logs/tenax/), %LOCALAPPDATA%\tenax on Windows.

Advanced host setup

Choose a shell, shared root, or connection mode

Run the host by hand only for troubleshooting. The service normally manages it.

tenax host --root /home/me/projects -- /bin/zsh

This example shares the projects folder and uses zsh for new sessions. Replace both paths with paths on your host.

--root DIR sets the Home shared root. The default is the host user’s home directory.

--name "Home computer" overrides the display name. --no-direct uses outbound connections only.

By default, Tenax always prefers a direct path between your devices. No port forwarding needed.

To configure the session program through the service:

tenax service install -- host -- /bin/zsh
Shell suggestions in the app

The shell on your host draws its own suggestions. Fish has them built in.

For zsh, see zsh-autosuggestions. For bash, see ble.sh.

Tenax does not install these or edit your dotfiles. Use the app’s right arrow to accept the shell’s suggestion.

Run tenax help agents for the full reference. An invalid command prints short usage text.