Commit Graph

3 Commits

Author SHA1 Message Date
Awiteb
3510b59fbb feat: Improve exit codes and make them more specific
Signed-off-by: Awiteb <a@4rs.nl>
2025-07-04 10:50:24 +00:00
Awiteb
57fc868b63 chore: Move NostrEvent to crate::cli::types
Signed-off-by: Awiteb <a@4rs.nl>
2025-06-03 09:27:20 +00:00
Awiteb
4c6578ccb1 feat: Support relays and naddrs sets
This commit introduces support for 'sets', a feature that simplifies
referencing multiple relays or naddrs with a single word.

Sets are stored in the config directory under `n34` as `config.toml` in
`TOML` format. The config path follows the `$XDG_CONFIG_HOME` standard,
defaulting to `$HOME/.config` if unset.

The `n34 sets` command allows managing sets, adding, removing, updating,
or displaying them. When using the main `--relays` flag, a set name can
be provided to automatically expand its relays (an error occurs if the
set contains no relays). Similarly, any command accepting naddrs can
reference a set to extract its naddrs.

Sets can also be merged by updating a set while specifying another
set in `--repo` merges their naddrs, while `--set-relays` merges their
relays. Removal follows the same pattern.

Signed-off-by: Awiteb <a@4rs.nl>
2025-06-01 12:12:09 +00:00