Install
ngit ships two binaries, and both must be on your PATH:
ngit— the CLIgit-remote-nostr— a small launcher that git discovers by filename whenever it meets anostr://URL
git-remote-nostr contains almost nothing; the implementation lives in ngit. But without it on your PATH, git clone nostr://... fails with an unknown protocol error, so install them together.
One-line install
curl -Ls https://ngit.dev/install.sh | bashiwr -useb https://ngit.dev/install.ps1 | iexDetects your platform, downloads the matching release binaries, verifies their checksums, and installs both. This is the fastest route and the one most people want.
With cargo
cargo install ngitRequires rust and cargo. Make sure ~/.cargo/bin is on your PATH. Installing the ngit crate provides both binaries.
With nix
Into your profile
nix profile add github:DanConwayDev/ngit-cliOne package, both binaries — ngit and git-remote-nostr land on your PATH together.
Then the usual profile management:
nix profile list # find its index or name
nix profile upgrade ngit # pull a newer version
nix profile remove ngitOlder Nix
nix profile add was called nix profile install before Nix 2.25. If add isn't recognised, use install — the arguments are identical.
If flakes aren't enabled, either add experimental-features = nix-command flakes to your nix.conf, or pass it per command:
nix --extra-experimental-features "nix-command flakes" \
profile add github:DanConwayDev/ngit-cliWithout installing
To try it, or to get both binaries on your PATH for one shell session:
nix shell github:DanConwayDev/ngit-cliPrefer this over nix run, which only exposes ngit — git-remote-nostr wouldn't be on your PATH, so git clone nostr://... would fail.
In a flake
Add it as an input:
{
inputs.ngit.url = "github:DanConwayDev/ngit-cli";
}Then include the package:
inputs.ngit.packages."${pkgs.system}".defaultPrebuilt binaries
Download the latest release archive for your platform and put both binaries on your PATH:
Builds are published for Linux (x86_64 and aarch64, glibc 2.17+ or musl), macOS (universal — Intel and Apple Silicon) and Windows (x86_64).
From source
git clone nostr://danconwaydev.com/relay.ngit.dev/ngit
cd ngit
git checkout <latest-release-tag>
cargo build --releaseThen move ./target/release/ngit and ./target/release/git-remote-nostr onto your PATH.
Building against a private CA
If your git server or relay uses a certificate from an internal CA, build with --features native-tls-roots so ngit trusts your system certificate store.
Verify
Both commands must resolve:
ngit --version
git-remote-nostr --versionIf ngit works but git-remote-nostr doesn't, git clones will fail — see Troubleshooting.
Next
- Quickstart — publish a repo and open your first PR
- Accounts & keys — log in, or use a remote signer