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