Skip to content

Install ​

ngit ships two binaries, and both must be on your PATH:

  • ngit — the CLI
  • git-remote-nostr — a small launcher that git discovers by filename whenever it meets a nostr:// 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 ​

bash
curl -Ls https://ngit.dev/install.sh | bash
powershell
iwr -useb https://ngit.dev/install.ps1 | iex

Detects 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 ​

bash
cargo install ngit

Requires rust and cargo. Make sure ~/.cargo/bin is on your PATH. Installing the ngit crate provides both binaries.

With nix ​

Into your profile ​

bash
nix profile add github:DanConwayDev/ngit-cli

One package, both binaries — ngit and git-remote-nostr land on your PATH together.

Then the usual profile management:

bash
nix profile list                              # find its index or name
nix profile upgrade ngit                      # pull a newer version
nix profile remove ngit

Older 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:

bash
nix --extra-experimental-features "nix-command flakes" \
  profile add github:DanConwayDev/ngit-cli

Without installing ​

To try it, or to get both binaries on your PATH for one shell session:

bash
nix shell github:DanConwayDev/ngit-cli

Prefer 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:

nix
{
  inputs.ngit.url = "github:DanConwayDev/ngit-cli";
}

Then include the package:

nix
inputs.ngit.packages."${pkgs.system}".default

Prebuilt 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 ​

bash
git clone nostr://danconwaydev.com/relay.ngit.dev/ngit
cd ngit
git checkout <latest-release-tag>
cargo build --release

Then 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:

bash
ngit --version
git-remote-nostr --version

If ngit works but git-remote-nostr doesn't, git clones will fail — see Troubleshooting.

Next ​

Contribute with ngit: nostr://danconwaydev.com/relay.ngit.dev/ngit