cmdop session
cmdop session manages terminal sessions on this machine: it creates them,
lists them, records attachment, and destroys them. A session survives the
client that created it — that is the point of managing it separately from the
shell you are typing in.
cmdop session create
cmdop session list
cmdop session destroy <session-id>cmdop session attach records that you are attached to a session and returns
its metadata. Driving a session’s terminal interactively from the CLI is not
part of this command — for that, use
cmdop connect <machine>, which opens an interactive terminal
on another machine.
Create a session
cmdop session create
cmdop session create --shell /bin/bash --cwd ~/projects/api| Flag | Purpose |
|---|---|
--shell <path> | Shell to run. Defaults to your login shell (/bin/zsh on a typical macOS install). |
--cwd <directory> | Working directory for the session. |
create prints the session ID that every other subcommand takes.
List sessions
cmdop session listShows every session with its status and metadata.
Attach and detach
cmdop session attach <session-id>
cmdop session detach <session-id>detach leaves the session running — detaching is not stopping.
Destroy a session
cmdop session destroy <session-id>
cmdop session destroy <session-id> --forcedestroy terminates the session and removes it. --force skips the
confirmation prompt.
Save and restore
cmdop session save
cmdop session restoresave persists every active session to disk; restore brings previously
saved sessions back. Run save before a planned restart of the machine or the
agent.
Related
- cmdop connect — attach an interactive terminal to another machine.
- Admin and policy