From 90d207bd6ca8694779b16f60b8d467375a44ea96 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 23 Jan 2026 21:37:24 +0000 Subject: [PATCH] docs: design EVENT command as counterpart to REQ Research nak's event implementation and design Grimoire's EVENT command that maintains flag symmetry with REQ where applicable: - Reuses -k, -e, -p, -t, -d, -T flags with same syntax - Adds -c for content, --ts for timestamp - Same relay argument handling Document includes parser interface, examples, man page entry, and comparison with nak's implementation. --- docs/design/event-command.md | 269 +++++++++++++++++++++++++++++++++++ 1 file changed, 269 insertions(+) create mode 100644 docs/design/event-command.md diff --git a/docs/design/event-command.md b/docs/design/event-command.md new file mode 100644 index 0000000..1b14742 --- /dev/null +++ b/docs/design/event-command.md @@ -0,0 +1,269 @@ +# EVENT Command Design + +The EVENT command is the counterpart to REQ - while REQ queries events from relays, EVENT creates and publishes events to relays. + +## Design Philosophy + +**Symmetry with REQ**: Flags that make sense for both querying and creating events should use the same syntax. This makes the CLI intuitive - if you know REQ, you know half of EVENT. + +| Concept | REQ (query) | EVENT (create) | +|---------|-------------|----------------| +| Kind | `-k 1` filters for kind 1 | `-k 1` creates kind 1 | +| Event ref | `-e nevent1...` filters #e tags | `-e nevent1...` adds e-tag | +| Pubkey | `-p npub1...` filters #p tags | `-p npub1...` adds p-tag | +| Hashtag | `-t nostr` filters #t tags | `-t nostr` adds t-tag | +| D-tag | `-d article` filters #d tags | `-d article` sets d-tag | +| Generic tag | `-T a value` filters #a tags | `-T a value` adds a-tag | +| Relays | Query these relays | Publish to these relays | + +## Flags + +### Content & Kind + +| Flag | Description | Default | +|------|-------------|---------| +| `-c, --content ` | Event content/message | `""` (empty) | +| `-k, --kind ` | Event kind | `1` (text note) | +| `--ts, --created-at