Common tasks with nak
masternak (the nostr army knife) is a versatile CLI tool for interacting with the Nostr network. Common use cases include:
- Event Creation: Create Nostr events signed with a default key (
01), or create events with custom content and tags, signed with a specific key, and published to multiple relays. - Querying: Query multiple relays for specific tags with a defined limit per relay and print their content.
- NIP-19 Manipulation: Decode NIP-19
note1codes, add relay hints, and re-encode them intonevent1codes. - Data Sync (Negentropy): Fetch all events except those already present in a provided line-delimited JSON file.
- Event Retrieval: Fetch an event using relay and author hints automatically extracted from a
nevent1code, then pretty-print the result. - Event Management: Republish an event from one relay to multiple other relays.
- Verification: Verify if a given Nostr event is valid.
- Advanced Filtering: Fetch all quoted events by a specific pubkey within a specific timeframe (e.g., the last 10 notes of 2023).