Skip to content

Command reference

Everything on one page. Each command links to the page that explains it properly.

ngit is non-interactive by default

It won't prompt unless you ask. -i / --interactive opts into prompts; -d / --defaults accepts sensible defaults without asking.

Global flags

Available at any position — ngit --repo upstream send and ngit send --repo upstream are equivalent.

FlagPurpose
-d, --defaultsNon-interactive; use sensible defaults
-i, --interactiveEnable prompts
--jsonOne machine-readable JSON document on stdout
--offlineLocal cache only, skip the network
--repo <TARGET>Select the repository: remote name, naddr, or nostr:// URL
--repo-relay-onlyPublish only to repository relays
--signer <ALIAS|NPUB|NAME>Use a stored signer for this one command
-n, --nsec <NSEC>Provide a key inline
--nsec-file <PATH>Read a one-shot key from a file (preferred in CI)
--nbunksec <NBUNKSEC>Established remote-signer session, inline
--nbunksec-file <PATH>Established remote-signer session from a file
-f, --forceBypass safety guards
-v, --verboseVerbose output
-c, --customizePrint the git config reference and exit

Repositories

CommandDoes
ngit initPublish a repository to nostr
ngit repoShow this repository's metadata and roster
ngit repo initSame as ngit init
ngit repo editChange metadata, hosting or roster
ngit repo acceptAccept a maintainer invitation
ngit repo leaveEnd your own role
ngit repo follow-leadFollow a changed lead or roster
ngit syncPush nostr state out to the git servers

Pull requests

CommandDoes
git push origin pr/...The normal way to open a PR
ngit sendOpen a PR with a long or file-sourced description
ngit pr listList PRs — --status, --label
ngit pr view <ID>Read one — --comments
ngit pr checkout <ID>Check it out locally
ngit pr apply <ID>Apply its patches — --stdout to just print them
ngit pr comment <ID>Comment — --reply-to to thread
ngit merge <ID>Merge into the target branch (does not push)
ngit pr close / reopen / ready / draftChange status
ngit pr label <ID>Add labels
ngit pr set-subject / set-cover-noteRetitle or rewrite the description

Issues

CommandDoes
ngit issue createOpen an issue — --subject, --body, --label
ngit issue listList — --status, --label
ngit issue view <ID>Read one — --comments
ngit issue comment <ID>Comment — --reply-to
ngit issue resolved <ID>Close as fixed
ngit issue close <ID>Close without resolution
ngit issue reopen <ID>Reopen
ngit issue label / set-subject / set-cover-noteEdit

CI

CommandDoes
ngit ci status [TARGET]Show CI results — --require-ci-trust to gate
ngit ci request <COORDINATOR>Ask a coordinator to run CI
ngit ci stop <COORDINATOR>Withdraw that request
ngit ci trigger <COORDINATOR>Run one workflow once

Releases

CommandDoes
ngit release listList releases for linked applications
ngit release view <TARGET>View a release and its assets
ngit release publishPublish or edit a release
ngit release appWork with software applications
ngit release assetWork with release assets

Accounts

CommandDoes
ngit account loginLog in — --local, --bunker-url, --alias
ngit account connectInteractive login (alias for login -i)
ngit account createCreate a new identity
ngit account whoamiShow available signers and which one wins
ngit account logoutRemove login config — --forget also deletes the secret
ngit account forget-keys <entry>Delete a stored credential
ngit account export-keysPrint the nsec or nbunksec

Coding agents

ngit ships a skill that teaches coding agents to use it, and installs into the Codex and Claude discovery paths:

bash
ngit skill install
ngit skill upgrade
ngit skill status
ngit skill opt-out --local     # or --global

Install and upgrade make a dedicated commit. If you're not a maintainer, push it from a pr/ branch like any other change.

Two global flags matter for automation:

  • --json — one JSON document on stdout; relay chatter and diagnostics stay on stderr, so stdout is always parseable. id and reply_to come back as nevent1… strings, ready to use as arguments or, prefixed with nostr:, as references inside a body.
  • --offline — reads the local cache and skips the network. Fast, but a cold cache can produce false negatives.

Next

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