Build from Source¶
Build xcsh directly from source code.
Prerequisites¶
Building from source requires:
| Requirement | Version | Check Command |
|---|---|---|
| Node.js | 22.21.1 | node --version |
| npm | any | npm --version |
| Git | any | git --version |
Verify prerequisites:
Clone Repository¶
Example output:
Install Dependencies¶
Example output:
$ npm ci
added 608 packages, and audited 609 packages in 13s
209 packages are looking for funding
run `npm fund` for details
6 moderate severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
Build¶
Example output:
$ npm run build
> @robinmordasiewicz/f5xc-xcsh@6.4.1 prebuild
> node -e "const fs=require('fs');if(!fs.existsSync('.specs/index.json')){console.log('Specs missing, run: npm run reconcile:specs');process.exit(1)}" && npm run generate
Specs missing, run: npm run reconcile:specs
Verify Build¶
Example output:
$ node dist/index.js --version
node:internal/modules/cjs/loader:1386
throw err;
^
Error: Cannot find module '/private/var/folders/bp/kmfmhnl95kx1c8x321z7twbw0000gn/T/tmp.Zx6p8v6ysW/xcsh/dist/index.js'
at Function._resolveFilename (node:internal/modules/cjs/loader:1383:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1025:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1030:22)
at Function._load (node:internal/modules/cjs/loader:1192:37)
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
at node:internal/main/run_main_module:36:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v22.21.1
version check failed
Built from source on 2026-01-05
Run in Development Mode¶
For development with hot-reload:
Install (Optional)¶
Option 1: Link Globally¶
This creates a global xcsh command that points to your local build.
Option 2: Build Standalone Binary¶
Build platform-specific standalone binaries:
This creates executables in the binaries/ directory for:
- Linux (x64, arm64)
- macOS (x64, arm64)
- Windows (x64, arm64)
Move the appropriate binary to your PATH: