Skip to content

mw toolforge shell

Releasev0.35.0 · cfeceb67

mw toolforge shell [flags] -- [command arguments...]

Open an interactive SSH session or execute a command on Toolforge. Select a tool account with --tool; commands then use that account’s login environment and home directory. Without --tool, use your normal Toolforge login account.

shell and its compatibility alias exec use the upstream Toolforge CLI. Put -- before a remote command with flags. Arguments, including spaces, quotes and shell metacharacters, are preserved literally. To use a pipeline or redirection, invoke sh -c explicitly. SSH and remote-command failures produce a nonzero exit status.

Toolforge SSH access must already be configured. --beta selects toolsbeta; --lima uses the local lima-kilo SSH configuration.

See Toolforge documentation.

--help
Help for this command
--no-interaction
Do not ask any interactive questions
-t, --tool <string>
Tool name (auto-detected when running as a tool)
-v, --verbose <count>
Increase output verbosity. Example: --verbose=2 or -vv
Terminal window
mw toolforge shell # Open an interactive Toolforge session
mw toolforge shell --tool=mytool # Open a login shell as a tool
mw toolforge shell --tool=mytool -- printf '%s\n' 'hello world' # Preserve a single argument containing spaces
mw toolforge shell --tool=mytool whoami # Check the tool account identity
mw toolforge shell --tool=mytool webservice -- --backend=kubernetes start # Pass flags to a remote command
mw toolforge shell --tool=mytool -- sh -c 'printf hello | wc -c' # Explicitly request remote shell syntax
Report an issue with this page

Report a documentation issue

The report includes this page’s link, section and documentation version.

Review and submit on Phabricator, or run the command using your saved CLI profile. The command asks before creating the task.