Skip to content

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:

$ node --version
v22.21.1

$ npm --version
10.9.4

$ git --version
git version 2.50.1

Clone Repository

git clone https://github.com/robinmordasiewicz/f5xc-xcsh.git
cd xcsh

Example output:

$ git clone https://github.com/robinmordasiewicz/f5xc-xcsh.git
Cloning into 'xcsh'...
$ cd xcsh

Install Dependencies

npm ci

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

npm run 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

node dist/index.js --version

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:

npm run dev

Install (Optional)

npm link

This creates a global xcsh command that points to your local build.

Option 2: Build Standalone Binary

Build platform-specific standalone binaries:

npm run build: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:

mkdir -p ~/.local/bin
cp binaries/xcsh-macos-arm64 ~/.local/bin/xcsh
chmod +x ~/.local/bin/xcsh
sudo cp binaries/xcsh-macos-arm64 /usr/local/bin/xcsh
sudo chmod +x /usr/local/bin/xcsh