ncode

CLI docs Install

ncode CLI Get started

Install

Note This is a preview of the docs. The download and the one-line installer go live with the 0.1.0 release; until then these steps describe how they will work.

The ncode command installs into your home folder with one line. It needs no administrator password and touches nothing outside its own folders.

One-line install#

sh
curl -fsSL https://code.llmotions.com/install.sh | sh

The installer:

  1. checks that the Mac runs macOS 15 or later on Apple silicon (arm64), and stops with a message otherwise;
  2. downloads the release for version 0.1.0 and checks its SHA-256 checksum against the one pinned in the installer; on a mismatch it stops and changes nothing;
  3. puts the release in ~/.local/share/ncode and a small ncode command in ~/.local/bin;
  4. prints what to run next.

It never touches your conversations, settings or keys: those live in the ncode data folder, ~/Library/Application Support/SwarmCode, which the desktop app shares.

To install somewhere else, set a prefix. The release then goes to <prefix>/share/ncode and the command to <prefix>/bin:

sh
curl -fsSL https://code.llmotions.com/install.sh | NCODE_PREFIX="$HOME/tools" sh

Check that it works#

sh
ncode --version

This prints ncode 0.1.0. ncode --help prints every option. Both are answered before anything else starts, so they work even while the desktop app is open.

Put ~/.local/bin on your PATH#

If your shell says command not found: ncode, the folder is not on your PATH yet. The installer tells you when that is the case; it never edits your shell files itself.

For zsh, the default shell on macOS:

sh
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

For bash:

sh
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile

Update#

Run the same line again:

sh
curl -fsSL https://code.llmotions.com/install.sh | sh

It replaces the release in place. Your conversations, settings and keys stay where they are, so nothing is lost. Quit any running ncode session first.

Uninstall#

sh
curl -fsSL https://code.llmotions.com/install.sh | sh -s -- --uninstall

This removes the release, the ncode command and the swarmcode alias the installer wrote. By hand, the same is:

sh
rm -f ~/.local/bin/ncode ~/.local/bin/swarmcode
rm -rf ~/.local/share/ncode ~/.local/share/swarmcode

(The last path is only there if you installed ncode under its earlier name.)

Warning Neither way deletes your data. ~/Library/Application Support/SwarmCode holds your conversations, settings and provider keys, and the desktop app uses the same folder. Delete it only if you are removing the app too and want everything gone.

The old command name#

ncode was called by another name before this release, and its command was swarmcode. The installer also writes swarmcode as an alias: it runs ncode with the same arguments and, in a terminal, prints a one-line note that the name has changed. Scripts that call swarmcode keep working; move them to ncode when you can, because the alias will be removed in a later release. The older SWARM_… environment variables are still read too (see Environment variables).

Developer preview: why it opens without a warning#

ncode 0.1.0 is a developer preview. It is not notarized by Apple, because notarizing needs a paid Apple Developer ID, which ncode does not have yet.

macOS checks an unnotarized program when it carries a quarantine mark, which browsers and Mail add to everything they download. curl adds no such mark, so a release installed by the one-line installer starts without a Gatekeeper prompt. This holds only for downloads made with curl. A release downloaded with a browser is quarantined, and macOS refuses to run its programs until the mark is removed (see the manual install below).

Install the release by hand#

If you prefer not to pipe a script into sh, download the release yourself. The asset is on the GitHub releases of the ncode repository, named ncode-0.1.0-darwin-arm64.tar.gz:

sh
cd ~/Downloads
curl -fLO https://github.com/zaalipro/swarm-code-cli/releases/download/v0.1.0/ncode-0.1.0-darwin-arm64.tar.gz
shasum -a 256 ncode-0.1.0-darwin-arm64.tar.gz

Compare the printed checksum with the one on the releases page; stop if they differ. Then unpack it and put it where the installer would:

sh
tar -xzf ncode-0.1.0-darwin-arm64.tar.gz
mkdir -p ~/.local/share ~/.local/bin
rm -rf ~/.local/share/ncode
mv ncode-0.1.0 ~/.local/share/ncode
chmod 0600 ~/.local/share/ncode/releases/COOKIE
ln -sf ~/.local/share/ncode/bin/ncode ~/.local/bin/ncode

If you downloaded the archive with a browser instead of curl, clear the quarantine mark before the first run, or macOS blocks the programs inside:

sh
xattr -dr com.apple.quarantine ~/.local/share/ncode

Build from source#

For contributors. You need mise, which installs the pinned Erlang, Elixir and Rust versions, plus a C11 compiler, python3 and, on macOS, the Xcode command line tools (clang and codesign).

sh
git clone https://github.com/zaalipro/swarm-code-cli.git
cd swarm-code-cli
mise install
mise exec -- mix setup
scripts/install.sh

scripts/install.sh builds the release (including the native terminal helper) and installs it exactly like the one-line installer, into ~/.local/share/ncode and ~/.local/bin; NCODE_PREFIX changes the prefix. Re-run it after pulling changes.

Note The full contributor gate, mix precommit, is for maintainers: it re-derives the shared engine from a checkout of the desktop app's repository at a pinned commit, which is not public. Building, installing and running the tests do not need it.