A simple command-line tool for using the Nostr network. It keeps your keys safe, lets you manage your profile, and supports multiple relays. It's made for fun, not serious use.
- Safe storage of private keys
- Post messages to multiple relays
- View and edit profile information (editing is still being worked on)
- List recent posts
- Customizable relay list
- Lightning tips via NWC
- NIP-89 app handler registration and discovery
| NIP | Name | Status |
|---|---|---|
| NIP-01 | Basic protocol flow | β Supported |
| NIP-04 | Encrypted Direct Messages | β Supported |
| NIP-19 | bech32-encoded entities (nsec, npub, note, nprofile) | β Supported |
| NIP-42 | Authentication of clients to relays | π² Not supported |
| NIP-46 | Nostr Connect (remote signing) | β Supported (TUI) |
| NIP-47 | Nostr Wallet Connect (Lightning) | β Supported |
| NIP-57 | Lightning Zaps | π² Not supported |
| NIP-65 | Relay List Metadata | π² Not supported |
| NIP-89 | Recommended Application Handlers | β Supported |
Get up and running in minutes:
hoot -s -k nsec1...Enter encryption password:
Storing key | Storing key / Storing key - Storing key done
hoot -u '{"name":"YourName","about":"Your bio here"}'Loading key | Loading key / Loading key done
Loaded relays:
- wss://purplerelay.com/
- wss://nos.lol/
- wss://relay.damus.io
- wss://relay.nostr.band
Updating profile | Updating profile / ... done
Profile update published to 3/4 relays
hoot -pLoading key | Loading key done
Loaded relays: [4 relays]
Retrieving profile | Retrieving profile done
Your profile:
name=YourName,about=Your bio here
hoot -m "Hello Nostr! π #introduction"Publishing post | Publishing post / ... done
Successfully published to relay
Successfully published to relay
Successfully published to relay
hoot -lLast 4 posts from your profile:
Created: Wed, 25 Mar 2026 14:25:19 EDT
Content: Hello Nostr! π #introduction
hoot -dmsLoading DMs | Loading DMs / ... done
Your recent direct messages:
-
Clone the repository:
git clone https://github.com/oth-body/hoot.git cd hoot -
Build the binary:
make build # or: go build -o hoot . -
Install to PATH:
sudo make install # or: sudo mv hoot /usr/local/bin/
brew tap oth-body/hoot
brew install hootyay -S hoot-bin
# or: paru -S hoot-binDownload the latest release for your platform from GitHub Releases:
# Linux amd64
curl -sL https://github.com/oth-body/hoot/releases/latest/download/hoot-linux-amd64.tar.gz | tar xz
sudo mv hoot /usr/local/bin/
# macOS arm64 (M1/M2)
curl -sL https://github.com/oth-body/hoot/releases/latest/download/hoot-darwin-arm64.tar.gz | tar xz
sudo mv hoot /usr/local/bin/If you already have hoot installed:
hoot -check-update # Check for updates
hoot -update # Update to latest versionCreate a relays.txt file in:
- Your config directory:
- Linux:
~/.config/nostr-cli/ - macOS:
~/Library/Application Support/nostr-cli/ - Windows:
%APPDATA%\nostr-cli\
- Linux:
Example relays.txt:
wss://relay.damus.io
wss://relay.nostr.band
wss://nostr.wine
If no relays.txt is found, the above default relays will be used.
Hoot can be used in two modes: Interactive TUI (Terminal User Interface) or CLI (Command Line Interface).
Simply run hoot without any flags to launch the interactive terminal interface:
hootThe TUI provides:
- Login options: Enter nsec directly, use saved profile, or scan QR code (NIP-46)
- Multi-profile support: Save and switch between multiple Nostr accounts
- Post composer: Write and publish notes
- Feed viewer: Browse recent posts from the network
- Relay management: Add, remove, and configure relays
- Tipping: Send sats to other users via Lightning
- Use β/β arrow keys to navigate menus
- Press Enter to select an option
- Press Esc to go back
- Press q to quit
Use command-line flags for scripting or quick actions.
hoot -s -k <your-private-key>You'll be prompted to create an encryption password.
hoothoot -m "Hello Nostr! #introduction"Hashtags are automatically extracted and added as tags.
hoot -lhoot -phoot -u '{"name":"Alice","about":"Nostr enthusiast","lud16":"alice@getalby.com"}'hoot -r "wss://relay1.com,wss://relay2.com" -m "Hello from custom relays!"Hoot supports sending Lightning tips via NWC.
hoot -nwc "nostr+walletconnect://..."Get your NWC URI from a compatible wallet like Alby or Mutiny.
# Tip by npub
hoot -tip 100 -user npub1...
# Tip by hex pubkey
hoot -tip 100 -user <hex-pubkey>
# Tip directly to a Lightning address
hoot -tip 100 -user alice@getalby.comRegister your app as a handler for specific event kinds:
hoot -register-handler "1,6" -platform web -url-template "https://myapp.com/e/<bech32>"Recommend an app for handling a kind:
hoot -recommend "pubkey:d-identifier:1"Find handlers for a specific kind:
hoot -find-handlers 1| Flag | Description |
|---|---|
-m "message" |
Post a message to Nostr |
-k <key> |
Private key to store (use with -s) |
-s |
Store a new private key |
-r "relay1,relay2" |
Comma-separated list of relay URLs |
-l |
List your last 4 posts |
-p |
View your profile info |
-u '{"name":"..."} |
Update profile with JSON |
-dms |
View your direct messages |
-replies "event-id" |
View replies/reactions for a specific event |
-version |
Display version info |
-nwc "uri" |
Set NWC URI for tipping |
-tip <sats> |
Amount to tip (use with -user) |
-user <npub/hex/lud16> |
User to tip |
-register-handler "kinds" |
Register as handler for event kinds |
-platform <platform> |
Platform for handler (web, ios, android) |
-url-template "url" |
URL template for handler |
-recommend "pk:d:kind" |
Recommend an app for a kind |
-find-handlers <kind> |
Find handlers for a specific kind |
-check-update |
Check for available updates |
-update |
Update hoot to the latest version |
| Variable | Description | Default | Example |
|---|---|---|---|
HOOT_PASSWORD |
Encryption password for key storage (automation) | - | export HOOT_PASSWORD=mysecurepass |
HOOT_BCRYPT_COST |
Bcrypt hash cost (4-31, higher = more secure but slower) | 10 | export HOOT_BCRYPT_COST=12 |
HOOT_RELAY_CONNECT_TIMEOUT |
Timeout for relay connections | 10s | export HOOT_RELAY_CONNECT_TIMEOUT=30s |
HOOT_QUERY_TIMEOUT |
Timeout for event queries | 10s | export HOOT_QUERY_TIMEOUT=30s |
HOOT_DM_QUERY_TIMEOUT |
Timeout for DM queries | 15s | export HOOT_DM_QUERY_TIMEOUT=1m |
HOOT_SIGN_EVENT_TIMEOUT |
Timeout for signing events (NIP-46) | 30s | export HOOT_SIGN_EVENT_TIMEOUT=2m |
HOOT_PUBLISH_TIMEOUT |
Timeout for publishing events | 5s | export HOOT_PUBLISH_TIMEOUT=10s |
# 1. Store your key
hoot -s -k nsec1...
# 2. Configure custom relays
mkdir -p ~/.config/nostr-cli
cat > ~/.config/nostr-cli/relays.txt << EOF
wss://relay.damus.io
wss://relay.nostr.band
wss://nostr.wine
EOF
# 3. Post introduction
hoot -m "Hello Nostr! #introduction"hoot -r "wss://my-relay.com,wss://backup-relay.com" \
-m "Just deployed hoot v0.0.4! π #go #nostr #opensource"# See your recent posts
hoot -l
# View replies to a specific note
hoot -replies note1abc123...
# View your DMs
hoot -dms# View your profile
hoot -p
# Update with Lightning address
hoot -u '{"name":"Alice","about":"Building on Nostr","lud16":"alice@getalby.com"}'
# Full profile update
hoot -u '{
"name": "Alice Nostr",
"about": "Building on Nostr | Go developer",
"picture": "https://example.com/profile.png",
"banner": "https://example.com/banner.png",
"lud16": "alice@getalby.com",
"nip05": "alice@example.com"
}'# Setup NWC (one-time)
hoot -nwc "nostr+walletconnect://..."
# Tip by npub (100 sats)
hoot -tip 100 -user npub1abc123...
# Tip by Lightning address
hoot -tip 500 -user alice@getalby.com# Register your app as a handler for kinds 1 and 6
hoot -register-handler "1,6" \
-platform web \
-url-template "https://myapp.com/e/<bech32>"
# Recommend an app
hoot -recommend "pubkey123:my-app:1"
# Find handlers for kind 1 (text notes)
hoot -find-handlers 1See TROUBLESHOOTING.md for common errors and solutions.
MIT