RTFM · AI era
Installing coding agents locally
Node.js and friends: prerequisites, installing OpenCode/Codex/Claude Code CLIs with npm, verifying them, and — equally important — removing them again. Own the toolchain; borrow the brains.

The pragmatic AI stance
When the manual does not answer the problem, ask your preferred AI for help. Work with it: explain what you are trying to achieve, show it the evidence you gathered, test its suggestions one step at a time, and solve the problem together. Talk with the AI, not merely at it.
One honest exception remains practical rather than ideological: training and serving frontier-scale models demands compute, storage and electricity budgets unreasonable to self-host casually. So the clever parts rent where necessary, while the workhorses below — CLI agents, editors, wrappers — run comfortably on hardware you already own, entirely across your own connection.
Node.js prerequisite
All agents below ship via npm. Saphira repositories carry nodejs; verify npm availability immediately after install.
apk update
apk add nodejs
node --version
npm --version # if reported missing, see note belowIf your repository snapshot splits npm into its own subpackage absent here, install agents through corepack/npx equivalents bundled with nodejs, or follow each tool's upstream tarball instructions. Verify rather than assume: node --version && npm --version settles the matter in seconds.
Install agents
# OpenCode
npm install -g opencode-ai@latest
opencode --version
# Codex CLI
npm install -g @openai/codex
codex --help
# Claude Code
npm install -g @anthropic-ai/claude-code
claude # first-run login/auth wizardPin major versions in scripted environments (npm install -g pkg@major.minor) so automated upgrades never surprise a working configuration mid-task.
Verify functionally
- Each CLI prints --version without shell tracebacks.
- A trivial prompt roundtrip completes against your chosen provider endpoint.
- Tool-permission prompts behave: agent requests approval before destructive operations rather than assuming.
which opencode codex claude
npm list -g --depth=0Removal, honestly
npm uninstall -g opencode-ai
npm uninstall -g @openai/codex
npm uninstall -g @anthropic-ai/claude-code
apk del nodejs # if Node itself unwanted
rm -rf ~/.npm/_cacache # leftover caches, if you careNothing here sinks hooks into system services or init. Agents live in npm's global prefix; removing them restores the machine exactly as before — software behaving like software.
Operating posture
- Treat agent output as suggestions requiring review; git diff catches most sins, backups catch the remainder.
- Give context-rich prompts: file excerpts, observed errors, tried fixes, constraints. Evidence beats narrative.
- Describe goals, not keystrokes; let the tool propose paths; evaluate; steer.
The rest of this manual teaches enough Linux to judge responses critically — that judgement separates tool-use from tool-dependence.
Did we miss something?
If this page left something unanswered, found an error, or there is another subject you would like documented, tell us. Saphira’s documentation grows from real problems people need to solve.
Send feedback or request a new section →
Prefer not to do it yourself?
Everything needed to do the work yourself is documented here and remains free — we charge for human time, not for withholding knowledge. Sometimes the missing resource is simply time. The same people who build Saphira can provide paid professional help with implementation, migration, troubleshooting and administration.