This guide explains how to run Nexgit locally after entering one of the supported development environments.
Choose one supported setup path:
mise install
pnpm installnix develop
pnpm installSee Development environments for details. The project docs intentionally do not maintain separate manual installation instructions for Rust, Node.js, pnpm, or other toolchain packages.
pnpm checkpnpm format
pnpm format:checkcargo fmt --all --check
cargo check --workspace
cargo clippy --workspace --all-targets -- -D warningspnpm lint:desktop
pnpm --filter @nexgit/desktop typecheck
pnpm --filter @nexgit/desktop buildpnpm nix:check
pnpm nix:fmt:checkpnpm format:check
git diff --checkThis catches formatting issues, trailing whitespace, and some accidental text problems.
Show help:
cargo run -p nexgit-cli -- --helpRun the TUI:
cargo run -p nexgit-cli -- tuiRun headless commands:
cargo run -p nexgit-cli -- repo status --json
cargo run -p nexgit-cli -- stack list --jsonDefault stdio transport:
cargo run -p nexgit-cli -- app-server --listen stdio://Smoke test with one request:
printf '{"type":"request","id":1,"method":"system.version","params":{}}\n' \
| cargo run -q -p nexgit-cli -- app-server --listen stdio://Expected shape:
{"type":"ready","serverName":"nexgit","version":"0.1.0","protocolVersion":1,"transport":"stdio"}
{"type":"response","id":1,"ok":true,"result":{"name":"nexgit","protocolVersion":1,"version":"0.1.0"}}WebSocket transport for development:
cargo run -p nexgit-cli -- app-server --listen ws://127.0.0.1:0Unix socket transport on Unix-like systems:
cargo run -p nexgit-cli -- app-server --listen unix://After entering either supported environment and running pnpm install, start Electron development mode:
pnpm desktop:devThe desktop app starts the CLI app-server automatically. Lookup order:
NEXGIT_CLI_PATH, if set.../../target/debug/nexgit, relative toapps/desktop.cargo run -p nexgit-cli -- app-server --listen stdio://.nexgitfromPATH.
To force a specific binary:
cargo build -p nexgit-cli
NEXGIT_CLI_PATH="$PWD/target/debug/nexgit" pnpm desktop:devcargo run -p nexgit-cli -- app-server generate-tsThe current generated output is a scaffold. As the protocol grows, we should either generate the desktop types from Rust or keep a clear process for updating both sides.
Make sure you entered one of the supported environments:
mise installor:
nix developBuild the CLI first and set NEXGIT_CLI_PATH:
cargo build -p nexgit-cli
NEXGIT_CLI_PATH="$PWD/target/debug/nexgit" pnpm desktop:devThe first cargo check downloads and compiles dependencies. Later runs should be faster.
Try a modern terminal emulator and make sure your terminal window is large enough. The current TUI is only a scaffold.
Make sure apps/desktop/src/renderer/src/env.d.ts is included by tsconfig.json. If you moved files, update the include paths.
Remove Rust build output:
cargo cleanRemove JavaScript dependencies and Electron build output:
rm -rf node_modules apps/desktop/node_modules apps/desktop/out
pnpm install