alpacon work-session use

Set or clear the active work session for the current workspace.

Usage

alpacon work-session use [SESSION_ID] [flags]

Key facts

  • Only a session in the active state can be selected.
  • Later exec, websh, cp, and tunnel commands use the selected session.
  • Use --unset without an ID to clear the selection.

Flags

FlagTypeDescriptionDefault
-h, --helpboolhelp for usefalse
--unsetboolClear the active work-session for the current workspacefalse
--outputstringOutput format: table or jsontable

Examples

Set the active session

bash
alpacon work-session use 11111111-2222-3333-4444-555555555555

Clear the active session

bash
alpacon work-session use --unset

See Selecting a session for how the active session interacts with the --work-session flag and the ALPACON_WORK_SESSION environment variable.

Note

An agent session cannot be the workspace’s active session, even when its status is active. Pass --work-session SESSION_ID to each command or set ALPACON_WORK_SESSION in the agent’s environment.

Last updated: