{"_id":"gitrepublic-cli","name":"gitrepublic-cli","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"gitrepublic-cli","version":"1.0.0","description":"Command-line tools for GitRepublic: git wrapper with enhanced error messages, credential helper, commit signing hook, and API access","type":"module","main":"index.js","bin":{"gitrepublic":"scripts/git-wrapper.js","gitrep":"scripts/git-wrapper.js","gitrepublic-api":"scripts/gitrepublic.js","gitrep-api":"scripts/gitrepublic.js","gitrepublic-credential":"scripts/git-credential-nostr.js","gitrep-cred":"scripts/git-credential-nostr.js","gitrepublic-commit-hook":"scripts/git-commit-msg-hook.js","gitrep-commit":"scripts/git-commit-msg-hook.js","gitrepublic-path":"scripts/get-path.js","gitrep-path":"scripts/get-path.js","gitrepublic-setup":"scripts/setup.js","gitrep-setup":"scripts/setup.js","gitrepublic-uninstall":"scripts/uninstall.js","gitrep-uninstall":"scripts/uninstall.js"},"scripts":{"postinstall":"chmod +x scripts/*.js && node scripts/postinstall.js"},"keywords":["git","nostr","gitrepublic","credential-helper","commit-signing","nip-98"],"author":{"name":"GitCitadel LLC"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/silberengel/gitrepublic-cli.git"},"repositories":[{"type":"git","url":"git+https://github.com/silberengel/gitrepublic-cli.git"},{"type":"git","url":"https://git.imwald.eu/silberengel/gitrepublic-cli.git"}],"dependencies":{"nostr-tools":"^2.22.1"},"engines":{"node":">=18.0.0"},"_id":"gitrepublic-cli@1.0.0","gitHead":"74bea82ada8a589a709308eddeea399350cac1d3","bugs":{"url":"https://github.com/silberengel/gitrepublic-cli/issues"},"homepage":"https://github.com/silberengel/gitrepublic-cli#readme","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-45FglfFWpNjDbyQbe8qZsEEdciGBMszhlUu08XDQCNlQNM42dLc8wd+ac0r1KGjGYgehTVU1PSK5wqN89jI/FA==","shasum":"92115b1d7abe57e9051f70a39171e2f6e5095919","tarball":"https://registry.npmjs.org/gitrepublic-cli/-/gitrepublic-cli-1.0.0.tgz","fileCount":37,"unpackedSize":150378,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE2bEtjl9gKoSXpFd7pI2ugS9+wvQVqO8rKrHdQ2BOGXAiEA18ewNAkuR9lLwTE0EI0EQe26QuqRnootVy5NPfvOhI4="}]},"_npmUser":{"name":"silberengel","email":"silberengel7@protonmail.com"},"directories":{},"maintainers":[{"name":"silberengel","email":"silberengel7@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gitrepublic-cli_1.0.0_1771538064463_0.5210807450846913"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-19T21:54:24.462Z","1.0.0":"2026-02-19T21:54:24.632Z","modified":"2026-02-19T21:54:24.839Z"},"maintainers":[{"name":"silberengel","email":"silberengel7@protonmail.com"}],"description":"Command-line tools for GitRepublic: git wrapper with enhanced error messages, credential helper, commit signing hook, and API access","homepage":"https://github.com/silberengel/gitrepublic-cli#readme","keywords":["git","nostr","gitrepublic","credential-helper","commit-signing","nip-98"],"repository":{"type":"git","url":"git+https://github.com/silberengel/gitrepublic-cli.git"},"author":{"name":"GitCitadel LLC"},"bugs":{"url":"https://github.com/silberengel/gitrepublic-cli/issues"},"license":"MIT","readme":"# GitRepublic CLI\n\nCommand-line tools for GitRepublic: git wrapper with enhanced error messages, credential helper, commit signing hook, and API access.\n\n> **Note**: This CLI is part of the `gitrepublic-web` monorepo but can also be used and published independently. See [SYNC.md](./SYNC.md) for information about syncing to a separate repository.\n\n## Quick Start\n\n```bash\n# Install\nnpm install -g gitrepublic-cli\n\n# Set your Nostr private key\nexport NOSTRGIT_SECRET_KEY=\"nsec1...\"\n\n# Setup (configures credential helper and commit hook)\ngitrep-setup\n\n# Use gitrepublic (or gitrep) for git operations\ngitrep clone https://your-domain.com/api/git/npub1.../repo.git gitrepublic-web\ngitrep push gitrepublic-web main\n\n# Use gitrep for API commands too\ngitrep push-all main              # Push to all remotes\ngitrep repos list                 # List repositories\ngitrep publish repo-announcement myrepo\n\n# Note: \"gitrep\" is a shorter alias for \"gitrepublic\" - both work the same way.\n# We suggest using \"gitrepublic-web\" as the remote name instead of \"origin\"\n# because \"origin\" is often already set to GitHub, GitLab, or other services.\n```\n\n## Commands\n\n- **`gitrepublic`** or **`gitrep`** - Unified command for both git operations and API access\n  - Git commands: `gitrep clone`, `gitrep push`, `gitrep pull`, etc.\n  - API commands: `gitrep push-all`, `gitrep repos list`, `gitrep publish`, etc.\n- **`gitrepublic-setup`** or **`gitrep-setup`** - Automatic setup script\n- **`gitrepublic-uninstall`** or **`gitrep-uninstall`** - Remove all configuration\n\n> **Note**: `gitrep-api` and `gitrepublic-api` are still available for backward compatibility but are now aliases to `gitrep`/`gitrepublic`.\n\nRun any command with `--help` or `-h` for detailed usage information.\n\n## Uninstall\n\n```bash\n# Remove all configuration\ngitrep-uninstall\n\n# See what would be removed (dry run)\ngitrep-uninstall --dry-run\n\n# Keep environment variables\ngitrep-uninstall --keep-env\n```\n\n## Features\n\n- **Git Wrapper**: Enhanced error messages for GitRepublic operations\n- **Credential Helper**: Automatic NIP-98 authentication\n- **Commit Signing**: Automatically sign commits for GitRepublic repos\n- **API Access**: Full command-line access to all GitRepublic APIs\n\n## Requirements\n\n- Node.js 18+\n- Git\n- Nostr private key (nsec format or hex)\n\n## Commit Signing\n\nThe commit hook automatically signs **all commits** by default (GitHub, GitLab, GitRepublic, etc.). The signature is just text in the commit message and doesn't interfere with git operations.\n\nTo only sign GitRepublic repositories (skip GitHub/GitLab):\n\n```bash\nexport GITREPUBLIC_SIGN_ONLY_GITREPUBLIC=true\n```\n\nTo cancel commits if signing fails:\n\n```bash\nexport GITREPUBLIC_CANCEL_ON_SIGN_FAIL=true\n```\n\nBy default, the full event JSON is stored in `nostr/commit-signatures.jsonl` (JSON Lines format) for each signed commit. Events are organized by type in the `nostr/` folder for easy searching.\n\nTo also include the full event JSON in the commit message (base64 encoded):\n\n```bash\nexport GITREPUBLIC_INCLUDE_FULL_EVENT=true\n```\n\nTo publish commit signature events to Nostr relays:\n\n```bash\nexport GITREPUBLIC_PUBLISH_EVENT=true\nexport NOSTR_RELAYS=\"wss://relay1.com,wss://relay2.com\"  # Optional, has defaults\n```\n\n## Documentation\n\nFor detailed documentation, run:\n- `gitrep --help` or `gitrepublic --help` - General help and git commands\n- `gitrep push-all --help` - Push to all remotes\n- `gitrep repos --help` - Repository management\n- `gitrep publish --help` - Publish Nostr events\n- `gitrep-setup --help` or `gitrepublic-setup --help` - Setup options\n- `gitrep-uninstall --help` or `gitrepublic-uninstall --help` - Uninstall options\n\n## Links\n\n- [GitRepublic Web](https://github.com/silberengel/gitrepublic-web) - Full web application\n- [NIP-98 Specification](https://github.com/nostr-protocol/nips/blob/master/98.md) - HTTP Authentication\n- [Git Credential Helper Documentation](https://git-scm.com/docs/gitcredentials)\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-16e826ba44609ef44aef746d2fd4d1e3"}