diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-11-27 11:24:48 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-11-27 11:24:48 +0000 |
| commit | 7f5984d0609dd7ad630623b6331234cc7ef5944a (patch) | |
| tree | 73fb02b1c0adc33c82aef54acd58ebef7dee9c8d | |
| parent | a6be0dbe0f56095e64c18b150d220c7d851487a8 (diff) | |
build: update readme
to simplify and target users more than contributors and prioritise
building from source
| -rw-r--r-- | Cargo.toml | 2 | ||||
| -rw-r--r-- | README.md | 44 | ||||
| -rw-r--r-- | src/bin/git_remote_nostr/main.rs | 11 |
3 files changed, 26 insertions, 31 deletions
| @@ -2,7 +2,7 @@ | |||
| 2 | name = "ngit" | 2 | name = "ngit" |
| 3 | version = "1.5.3" | 3 | version = "1.5.3" |
| 4 | edition = "2021" | 4 | edition = "2021" |
| 5 | description = "cli for code collaboration over nostr with nip34 support" | 5 | description = "a command-line tool and git plugin to work with nostr enabled git repositories" |
| 6 | authors = ["DanConwayDev <DanConwayDev@protonmail.com>"] | 6 | authors = ["DanConwayDev <DanConwayDev@protonmail.com>"] |
| 7 | readme = "README.md" | 7 | readme = "README.md" |
| 8 | homepage = "https://gitworkshop.dev/r/naddr1qqzxuemfwsqs6amnwvaz7tmwdaejumr0dspzpgqgmmc409hm4xsdd74sf68a2uyf9pwel4g9mfdg8l5244t6x4jdqvzqqqrhnym0k2qj" | 8 | homepage = "https://gitworkshop.dev/r/naddr1qqzxuemfwsqs6amnwvaz7tmwdaejumr0dspzpgqgmmc409hm4xsdd74sf68a2uyf9pwel4g9mfdg8l5244t6x4jdqvzqqqrhnym0k2qj" |
| @@ -1,19 +1,28 @@ | |||
| 1 | # ngit | 1 | # ngit |
| 2 | 2 | ||
| 3 | a command-line tool to send and review patches via nostr | 3 | a command-line tool and git plugin to work with nostr enabled git repositories |
| 4 | 4 | ||
| 5 | - works seemlessly with [gitworkshop.dev](https://gitworkshop.dev) | 5 | - clone a nostr repository, or add as a remote, by using the url format nostr://pub123/identifier |
| 6 | - fully implements nostr git protocol (nip34) | 6 | - remote branches begining with `pr/` are open PRs from contributors; `ngit list` can be used to view all PRs |
| 7 | - enables proposals to be managed as branches, similar to GitHub PRs, or patches similar to patches-over-email | 7 | - to open a PR, push a branch with the prefix `pr/` or use `ngit send` for advanced options |
| 8 | 8 | ||
| 9 | see [gitworkshop.dev/ngit](https://gitworkshop.dev/ngit) and [gitworkshop.dev/about](https://gitworkshop.dev/about) for more details | 9 | browse [gitworkshop.dev/repos](https://gitworkshop.dev/repos) to find nostr repositories. |
| 10 | 10 | ||
| 11 | ## git-remote-nostr | 11 | ## install |
| 12 | 12 | ||
| 13 | a git remote helper (git plugin) included with ngit that enables nostr integration with native git commands when used with a nostr remote eg nostr://npub123/identifer | 13 | install options: |
| 14 | 14 | ||
| 15 | - repository state stored in a nostr event with git server(s) used for data sync | 15 | 1. **build from source**: clone this repository, [install rust and cargo](https://www.rust-lang.org/tools/install), checkout the latest release tag, run `cargo build --release` and move `./target/release/ngit` and `./target/release/git-remote-nostr` to your PATH. |
| 16 | - treats open proposals branches prefixed `pr/*` | 16 | 2. **install with cargo**: [install rust and cargo](https://www.rust-lang.org/tools/install), run `cargo install ngit`, maken sure `~/.cargo/bin` is in your PATH |
| 17 | 3. download the latest release binaries from [gitworkshop.dev/ngit](https://gitworkshop.dev/ngit) and add to PATH | ||
| 18 | |||
| 19 | run the commands `ngit` and `git-remote-nostr` to ensure the binaries are in your PATH. | ||
| 20 | |||
| 21 | ## contributions welcome! | ||
| 22 | |||
| 23 | [gitworkshop.dev/repos/ngit](gitworkshop.dev/r/naddr1qqzxuemfwsq3gamnwvaz7tmjv4kxz7fwv3sk6atn9e5k7q3q5qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exsxpqqqpmejawq4qj) to report issues and see PRs | ||
| 24 | |||
| 25 | use ngit to submit PRs with clone url: `nostr://npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/relay.damus.io/ngit` | ||
| 17 | 26 | ||
| 18 | ## primer | 27 | ## primer |
| 19 | 28 | ||
| @@ -47,20 +56,3 @@ eg self-hosted, github, codeberg, etc. | |||
| 47 | │ User │ | 56 | │ User │ |
| 48 | └─────────┘ | 57 | └─────────┘ |
| 49 | ``` | 58 | ``` |
| 50 | |||
| 51 | ### ngit commands | ||
| 52 | |||
| 53 | run from the directory of the git repository: | ||
| 54 | |||
| 55 | - `ngit init` signal you are this repo's maintainer accepting PRs and issues via nostr | ||
| 56 | - `ngit send` submit PR with advanced options | ||
| 57 | - `ngit list` list Prs; checkout, apply or donwload selected | ||
| 58 | - `ngit account` login, logout, export keys | ||
| 59 | |||
| 60 | ## contributions welcome! | ||
| 61 | |||
| 62 | use ngit to submit PRs! | ||
| 63 | |||
| 64 | [gitworkshop.dev/r/naddr1qqzxuemfwsq3gamnwvaz7tmjv4kxz7fwv3sk6atn9e5k7q3q5qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exsxpqqqpmejawq4qj](https://gitworkshop.dev/repo/ngit) to report issues and see proposals | ||
| 65 | |||
| 66 | install the tool with `cargo install ngit`, use a prebuilt binary or build from source off the master branch. | ||
diff --git a/src/bin/git_remote_nostr/main.rs b/src/bin/git_remote_nostr/main.rs index e4f97c7..6b89be6 100644 --- a/src/bin/git_remote_nostr/main.rs +++ b/src/bin/git_remote_nostr/main.rs | |||
| @@ -123,11 +123,14 @@ fn process_args() -> Result<Option<(NostrUrlDecoded, Repo)>> { | |||
| 123 | println!("nostr plugin for git"); | 123 | println!("nostr plugin for git"); |
| 124 | println!("Usage:"); | 124 | println!("Usage:"); |
| 125 | println!( | 125 | println!( |
| 126 | " - add a nostr repository as a remote by using the url format nostr://pub123/identifier" | 126 | " - clone a nostr repository, or add as a remote, by using the url format nostr://pub123/identifier" |
| 127 | ); | ||
| 128 | println!( | ||
| 129 | " - remote branches begining with `pr/` are open PRs from contributors; `ngit list` can be used to view all PRs" | ||
| 130 | ); | ||
| 131 | println!( | ||
| 132 | " - to open a PR, push a branch with the prefix `pr/` or use `ngit send` for advanced options" | ||
| 127 | ); | 133 | ); |
| 128 | println!(" - remote branches begining with `pr/` are PRs from contributors"); | ||
| 129 | println!(" - to open a PR, push a branch with the prefix `pr/`"); | ||
| 130 | println!(" - branches with this prefix are issued by the maintainer(s)"); | ||
| 131 | return Ok(None); | 134 | return Ok(None); |
| 132 | }; | 135 | }; |
| 133 | 136 | ||