docs: Update commands help messages

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb
2025-08-24 09:24:31 +00:00
parent 089b62a0ef
commit c308dc1b42
42 changed files with 203 additions and 93 deletions

View File

@@ -15,9 +15,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Make subject mandatory and optional content - by Awiteb
### Documentation
- Update commands help messages - by Awiteb
### Fixed
- Check the nip07 signer in `CliOptions::ensure_signer` - by Awiteb
- Required the `applied_commits` - by Awiteb
## [0.4.0] - 2025-08-08

View File

@@ -12,7 +12,7 @@ Arguments:
<ISSUE_ID> The open issue id to close it
Options:
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
```
Issue a kind `1632` (Close status) for the specified issue. The issue have to

View File

@@ -9,7 +9,7 @@ List the repositories issues
Usage: n34 issue list [OPTIONS] [NADDR-NIP05-OR-SET]...
Arguments:
[NADDR-NIP05-OR-SET]... Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
[NADDR-NIP05-OR-SET]... Repository addresses
Options:
--limit <LIMIT> Maximum number of issues to list [default: 15]

View File

@@ -9,7 +9,7 @@ Create a new repository issue
Usage: n34 issue new [OPTIONS] <--content <CONTENT>|--editor>
Options:
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
-c, --content <CONTENT> Markdown content for the issue. Cannot be used together with the `--editor` flag
-e, --editor Opens the user's default editor to write issue content. The first line will be used as the issue subject
--subject <SUBJECT> The issue subject. Cannot be used together with the `--editor` flag

View File

@@ -12,7 +12,7 @@ Arguments:
<ISSUE_ID> The ID of the closed issue to reopen
Options:
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
```
Issue a kind `1630` (Open status) for the specified issue. The issue have to

View File

@@ -12,7 +12,7 @@ Arguments:
<ISSUE_ID> The issue id to resolve it
Options:
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
```
Issue a kind `1631` (Resolved status) event for the specified issue.

View File

@@ -12,7 +12,7 @@ Arguments:
<ISSUE_ID> The issue id to view it
Options:
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
```
Simply provide the issue ID in `note` or `nevent` format to retrieve and display

View File

@@ -13,7 +13,7 @@ Arguments:
[APPLIED_COMMITS]... The applied commits
Options:
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
--patches <PATCH-EVENT-ID> Patches that have been applied. Use this when only some patches have been applied, not all
```

View File

@@ -12,7 +12,7 @@ Arguments:
<PATCH_ID> The open/drafted patch id to close it. Must be orignal root patch
Options:
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
```
Issue a kind `1632` (Close status) for the specified patch. The patch have to

View File

@@ -12,7 +12,7 @@ Arguments:
<PATCH_ID> The open patch id to draft it. Must be orignal root patch
Options:
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
```
Issue a kind `1633` (Draft status) for the specified patch. The patch have to

View File

@@ -12,7 +12,7 @@ Arguments:
<PATCH_ID> The patch id to fetch it
Options:
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
-o, --output <PATH> Output directory for the patches. Default to the current directory
```

View File

@@ -9,7 +9,7 @@ List the repositories patches
Usage: n34 patch list [OPTIONS] [NADDR-NIP05-OR-SET]...
Arguments:
[NADDR-NIP05-OR-SET]... Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
[NADDR-NIP05-OR-SET]... Repository addresses
Options:
--limit <LIMIT> Maximum number of patches to list [default: 15]

View File

@@ -13,7 +13,7 @@ Arguments:
<MERGE_COMMIT> The merge commit id
Options:
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
--patches <PATCH-EVENT-ID> Patches that have been merged. Use this when only some patches have been merged, not all
```

View File

@@ -12,7 +12,7 @@ Arguments:
<PATCH_ID> The closed/drafted patch id to reopen it. Must be orignal root patch
Options:
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
```
Issue a kind `1632` (Close status) for the specified patch. The patch have to

View File

@@ -12,7 +12,7 @@ Arguments:
<PATCH-PATH>... List of patch files to send (space separated)
Options:
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
--original-patch <EVENT-ID> Original patch ID if this is a revision of it
```

View File

@@ -13,7 +13,7 @@ Arguments:
Options:
--quote-to Quote the replied-to event in the editor
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
-c, --comment <COMMENT> The comment (cannot be used with --editor)
-e, --editor Open editor to write comment (cannot be used with --content)
```

View File

@@ -12,7 +12,7 @@ Arguments:
<HEAD> Name of the repository's primary branch, such as 'master' or 'main'
Options:
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
--tags <TAGS> Tags to announce a state for, in the format `<tag-name>=<commit-id>`. Separated by comma
--branches <BRANCHES> Branches to announce a state for, in the format `<branch-name>=<commit-id>`. Separated by comma
```

View File

@@ -9,7 +9,7 @@ View details of a nostr git repository
Usage: n34 repo view [NADDR-NIP05-OR-SET]...
Arguments:
[NADDR-NIP05-OR-SET]... Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
[NADDR-NIP05-OR-SET]... Repository addresses
```
This command prints repository details to standard output. If no arguments

View File

@@ -13,7 +13,7 @@ Arguments:
Options:
--set-relay <RELAYS> Optional relay to add it to the set, either as URL or set name to extract its relays. [aliases: `--sr`]
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
```
Each set requires a unique name, provided as the final argument to the command.

View File

@@ -13,7 +13,7 @@ Arguments:
Options:
--set-relay <RELAYS> Specific relay to remove it from the set, either as URL or set name to extract its relays. [aliases: `--sr`]
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
```
Removes an entire set, or specific repositories and relays from it.

View File

@@ -13,7 +13,7 @@ Arguments:
Options:
--set-relay <RELAYS> Add relay to the set, either as URL or set name to extract its relays. [aliases: `--sr`]
--repo <NADDR-NIP05-OR-SET> Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`
--repo <NADDR-NIP05-OR-SET> Repository addresses
--override Replace existing relays/repositories instead of adding to them
```

View File

@@ -28,11 +28,17 @@ use crate::{
#[derive(Debug, Args)]
pub struct CloseArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Option<Vec<NaddrOrSet>>,
/// The open issue id to close it
issue_id: NostrEvent,

View File

@@ -25,11 +25,13 @@ use crate::{
#[derive(Debug, Args)]
pub struct ListArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET")]
#[arg(value_name = "NADDR-NIP05-OR-SET", value_delimiter = ',')]
naddrs: Option<Vec<NaddrOrSet>>,
/// Maximum number of issues to list
#[arg(long, default_value = "15")]

View File

@@ -43,11 +43,17 @@ use crate::{
)
)]
pub struct NewArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Option<Vec<NaddrOrSet>>,
/// Markdown content for the issue. Cannot be used together with the
/// `--editor` flag.
@@ -115,10 +121,7 @@ impl CommandRunner for NewArgs {
relays,
naddrs.extract_relays(),
utils::add_write_relays(relays_list.as_ref()),
client
.fetch_repos(&naddrs.into_coordinates())
.await?
.extract_relays(),
repos.extract_relays(),
// Include read relays for each maintainer (if found)
client.read_relays_from_users(&maintainers).await,
content_details

View File

@@ -28,11 +28,17 @@ use crate::{
#[derive(Debug, Args)]
pub struct ReopenArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Option<Vec<NaddrOrSet>>,
/// The closed issue id to reopen it
issue_id: NostrEvent,

View File

@@ -28,11 +28,17 @@ use crate::{
#[derive(Debug, Args)]
pub struct ResolveArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Option<Vec<NaddrOrSet>>,
/// The issue id to resolve it
issue_id: NostrEvent,

View File

@@ -33,11 +33,17 @@ use crate::{
#[derive(Debug, Args)]
pub struct ViewArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Option<Vec<NaddrOrSet>>,
/// The issue id to view it
issue_id: NostrEvent,

View File

@@ -73,8 +73,8 @@ pub struct CliOptions {
#[arg(short = '7', long, group = "signer")]
pub nip07: bool,
/// Fallbacks relay to write and read from it. Multiple relays can be
/// passed.
#[arg(short, long)]
/// passed, separated by commas.
#[arg(short, long, value_delimiter = ',')]
pub relays: Vec<RelayOrSet>,
/// Proof of Work difficulty when creatring events
#[arg(long, value_name = "DIFFICULTY")]

View File

@@ -29,11 +29,17 @@ use crate::{
#[derive(Debug, Args)]
pub struct ApplyArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Option<Vec<NaddrOrSet>>,
/// The open patch id to apply it. Must be orignal root patch or
/// revision root

View File

@@ -28,11 +28,17 @@ use crate::{
#[derive(Debug, Args)]
pub struct CloseArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Option<Vec<NaddrOrSet>>,
/// The open/drafted patch id to close it. Must be orignal root patch
patch_id: NostrEvent,

View File

@@ -28,11 +28,17 @@ use crate::{
#[derive(Debug, Args)]
pub struct DraftArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Option<Vec<NaddrOrSet>>,
/// The open patch id to draft it. Must be orignal root patch
patch_id: NostrEvent,

View File

@@ -43,11 +43,17 @@ use crate::{
#[derive(Debug, Args)]
pub struct FetchArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Option<Vec<NaddrOrSet>>,
/// Output directory for the patches. Default to the current directory
#[arg(short, long, value_name = "PATH")]

View File

@@ -25,11 +25,13 @@ use crate::{
#[derive(Debug, Args)]
pub struct ListArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET")]
#[arg(value_name = "NADDR-NIP05-OR-SET", value_delimiter = ',')]
naddrs: Option<Vec<NaddrOrSet>>,
/// Maximum number of patches to list
#[arg(long, default_value = "15")]

View File

@@ -29,11 +29,17 @@ use crate::{
#[derive(Debug, Args)]
pub struct MergeArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Option<Vec<NaddrOrSet>>,
/// The open patch id to merge it. Must be orignal root patch or
/// revision root

View File

@@ -28,11 +28,17 @@ use crate::{
#[derive(Debug, Args)]
pub struct ReopenArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Option<Vec<NaddrOrSet>>,
/// The closed/drafted patch id to reopen it. Must be orignal root patch
patch_id: NostrEvent,

View File

@@ -47,11 +47,17 @@ const PATCH_ALT_PREFIX: &str = "git patch: ";
#[derive(Args, Debug)]
pub struct SendArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Option<Vec<NaddrOrSet>>,
/// List of patch files to send (space separated).
///

View File

@@ -62,11 +62,17 @@ pub struct ReplyArgs {
/// Quote the replied-to event in the editor
#[arg(long)]
quote_to: bool,
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Option<Vec<NaddrOrSet>>,
/// The comment (cannot be used with --editor)
#[arg(short, long)]

View File

@@ -48,11 +48,17 @@ const HEAD_TAG_KIND: TagKind = TagKind::Custom(Cow::Borrowed("HEAD"));
/// Arguments for the `repo state` command
#[derive(Args, Debug)]
pub struct StateArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Option<Vec<NaddrOrSet>>,
/// Tags to announce a state for, in the format `<tag-name>=<commit-id>`.
/// Separated by comma.

View File

@@ -33,11 +33,13 @@ use crate::{
/// Arguments for the `repo view` command
#[derive(Args, Debug)]
pub struct ViewArgs {
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
///
/// If omitted, looks for a `nostr-address` file.
#[arg(value_name = "NADDR-NIP05-OR-SET")]
#[arg(value_name = "NADDR-NIP05-OR-SET", value_delimiter = ',')]
naddrs: Option<Vec<NaddrOrSet>>,
}

View File

@@ -31,12 +31,18 @@ pub struct NewArgs {
/// Unique name for the set
name: String,
/// Optional relay to add it to the set, either as URL or set name to
/// extract its relays. [aliases: `--sr`]
#[arg(long = "set-relay", alias("sr"))]
/// extract its relays, separated by commas. [aliases: `--sr`]
#[arg(long = "set-relay", alias("sr"), value_delimiter = ',')]
relays: Vec<RelayOrSet>,
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Vec<NaddrOrSet>,
}

View File

@@ -30,13 +30,19 @@ pub struct RemoveArgs {
/// Set name to delete
name: String,
/// Specific relay to remove it from the set, either as URL or set name to
/// extract its relays. [aliases: `--sr`]
#[arg(long = "set-relay", alias("sr"))]
/// extract its relays, separated by commas. [aliases: `--sr`]
#[arg(long = "set-relay", alias("sr"), value_delimiter = ',')]
relays: Vec<RelayOrSet>,
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Vec<NaddrOrSet>,
}

View File

@@ -31,13 +31,19 @@ use crate::{
pub struct UpdateArgs {
/// Name of the set to update
name: String,
/// Add relay to the set, either as URL or set name to extract its relays.
/// [aliases: `--sr`]
#[arg(long = "set-relay", alias("sr"))]
/// Add relay to the set, either as URL or set name to extract its relays,
/// separated by commas. [aliases: `--sr`]
#[arg(long = "set-relay", alias("sr"), value_delimiter = ',')]
relays: Vec<RelayOrSet>,
/// Repository address in `naddr` format (`naddr1...`), NIP-05 format
/// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`.
#[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")]
/// Repository addresses
///
/// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or
/// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas.
#[arg(
value_name = "NADDR-NIP05-OR-SET",
long = "repo",
value_delimiter = ','
)]
naddrs: Vec<NaddrOrSet>,
/// Replace existing relays/repositories instead of adding to them
#[arg(long = "override")]