Skip to content

Function catalog

loadout ships 14 shell functions. They are functions rather than subcommands of the binary for one reason each, and for two of them — p and activate — the reason is load-bearing: a child process cannot change the directory or environment of the shell that started it. The rest stay functions because the generator already exists, so there is nothing to gain by moving them.

Each function declares what it requires. That one declaration drives three things at once: the setup instructions loadout describe prints, the status loadout doctor reports, and the indicator the web interface shows. They cannot drift apart because there is only one of them.

Change directory to a project under your projects root.

Terminal window
p # go to the projects root
p wc/qotm # go to <root>/wc/qotm

Requires the path {{project_root}} to exist.

Shaped by paths.project_root.

Runs in your shell rather than as a subprocess, because a child process cannot change the directory of the shell that started it.

Open a project from your projects root in your editor.

Terminal window
pv wc/qotm # open <root>/wc/qotm

Requires the path {{project_root}} to exist, configuration under editors.

Shaped by paths.project_root, editors.

Open a named editor workspace, or any project by path.

Terminal window
pw a11 # open the workspace named a11
pw wc/qotm # falls back to a path under the projects root

Requires configuration under workspaces, configuration under editors.

Shaped by workspaces, editors, paths.project_root.

Each workspace with a tmux_session also gets an alias of the same name that opens the workspace and attaches to the session.

Switch the global git identity and the SSH key that goes with it.

Terminal window
s # switch to the default identity
s wc # switch to the identity with id "wc"

Requires the git binary, the ssh-add binary, configuration under identities.

Shaped by identities.

Clears the agent before adding the new key, so only one identity’s key is loaded at a time. An identity can also nominate which credential entries become active, via its activates map.

Print the git identity currently in effect.

Terminal window
gcfg

Requires the git binary.

Clone a repository from a configured organisation.

Terminal window
<alias> api-starter # clone <org>/api-starter
<alias> api-starter server # clone into ./server

Requires the gh binary, configuration under clone_sources.

Shaped by clone_sources.

Named by clone_sources.

This is not one command but a family. One function is generated per entry in clone_sources, named after that entry’s alias, so the command names come from your config rather than from the catalog. Requires the GitHub CLI to be authenticated.

SSH to a configured host, a bare last octet, or any hostname.

Terminal window
msh # connect using the configured defaults
msh -m api # connect to the host aliased "api"
msh -m 5 # connect to <subnet_prefix>5
msh -k mykey -u ubuntu -p 2222
msh -h # full flag reference

Requires the ssh binary, configuration under hosts.

Shaped by hosts, ssh.

Upload a file to a configured remote host over scp.

Terminal window
mpush api ./build.tar # upload to the host's default path
mpush api ./build.tar /srv/app # upload to a specific path

Requires the scp binary, configuration under hosts.

Shaped by hosts.

Create a Python virtual environment under your venv root.

Terminal window
venv 3.12 myproject

Requires the path {{venv_root}} to exist.

Shaped by paths.venv_root.

Activate a Python virtual environment.

Terminal window
activate myproject

Requires the path {{venv_root}} to exist.

Shaped by paths.venv_root.

Runs in your shell rather than as a subprocess, because activation works by sourcing a script into the current shell.

Delete a Python virtual environment.

Terminal window
denv myproject

Requires the path {{venv_root}} to exist.

Shaped by paths.venv_root.

List the virtual environments under your venv root.

Terminal window
lenv

Requires the path {{venv_root}} to exist.

Shaped by paths.venv_root.

Install your configured global npm packages.

Terminal window
nig

Requires the npm binary.

Shaped by npm_globals.

Kill whatever process is listening on a port.

Terminal window
kp 3000

Requires the lsof binary.

Uses sudo, since the listening process is often not yours.