Commands
42space <command> [options]
42space --help lists commands by task and 42space <command> --help shows a
command's options with examples. A mistyped command gets the closest match
suggested.
Tools
add
42space add TOOL [options]
TOOL | Adds |
|---|---|
name@version | a built-in recipe (node, go, nvim) or, with --url, any download |
npm:<package> | a global npm package |
uv:<package> | a Python CLI tool installed with uv |
python@X.Y | a Python interpreter installed with uv |
vscode:<publisher.name> | a VS Code extension |
repo:<path> | a git repo in goinfre, with its secret files |
| Option | Applies to | Meaning |
|---|---|---|
--no-sync | all | only record it; install on the next sync |
--url URL | downloads | archive or binary URL; its version becomes a template |
--binary | downloads | the URL is a single executable |
--strip N | downloads | leading archive path components to drop (default 1) |
--bin PATH | downloads | executable inside the archive (repeatable) |
--sha256 HASH | downloads | expected checksum |
--prefer-system CONSTRAINT | downloads | skip the install if the system has e.g. >=22 |
--pre-release / --stable | VS Code | release channel |
--profile NAME | VS Code | target profile (repeatable; Default is the default profile) |
--secret PATH | repos | also sync this git-ignored file (repeatable) |
remove
42space remove TOOL [--profile NAME] [--secret PATH]
TOOL is a tool name, npm:<pkg>, uv:<pkg>, vscode:<publisher.name> or
repo:<name>. --profile only takes an extension out of that profile;
--secret only stops syncing that secret file. Installed files stay until
42space gc; repo clones always stay.
upgrade
42space upgrade [TOOL ...] [--to VERSION]
Without arguments, upgrades every catalog tool (node stays on its major line)
and every package set. --to sets an exact version for one tool.
rollback
42space rollback TOOL
Returns a downloaded tool to its previous version, which is kept on disk. Rolling back twice returns to where you were.
status, vscode, repos
42space status: machine, goinfre, manifest state, HOME usage, remote, unpushed changes, and the state of every tool.42space vscode [list|profiles]: extensions with version, channel, profiles and state; or the profiles VS Code knows.42space repos: synced repos and whether they and their secrets are in place.
This machine
| Command | Options | Does |
|---|---|---|
sync | --dry-run, -v, --quiet, --auto | install or repair everything on this machine |
doctor | diagnose problems and conflicts | |
gc | --dry-run | delete unused versions and downloads |
quota | --top N | show what fills HOME |
relocate PATH | --class cache|data, --accept-loss, --drop | move a HOME directory to goinfre |
Learn what changed
| Command | Options | Does |
|---|---|---|
scan | look for untracked changes | |
review | --yes, --list | decide what to do with each finding |
journal [show|clear] | -n N | show or clear recorded install commands |
recipe new NAME | --version V, --bin PATH | create a script recipe |
recipe approve NAME | --yes | review and approve a script, then install |
recipe show NAME / recipe list | inspect script recipes |
Environment
| Command | Does |
|---|---|
env set KEY=VALUE | manage a variable (values may use {home}, {cache}, …) |
env unset KEY | stop managing a variable |
env list | list managed variables and PATH entries |
path add DIR / path remove DIR / path list | manage PATH entries |
Setup and sharing
| Command | Does |
|---|---|
init | create the environment repo and goinfre layout |
enable / disable | install or remove shell integration (data is kept) |
shell install|uninstall|status | manage the rc block (--dry-run to preview) |
migrate | migrate from 42space v1 and install shell integration (--yes, --dry-run) |
remote set URL | set the environment repo's git remote |
remote show / remote status | the remote; or unpushed commits and uncommitted files |
remote push / remote pull | share or fetch your setup |
remote auto-commit [on|off] | commit every change automatically (default on) |
remote auto-push [on|off] | push after every change (default off) |
log | history of the environment repo (-n N, -p) |
Exit codes
| Code | Meaning |
|---|---|
| 0 | success |
| 1 | error |
| 2 | invalid command line |
| 10 | sync finished with failures |
| 20 | sync deferred tools because there was no network |
| 130 | cancelled (Ctrl-C or Ctrl-D) |