Nostr Console v0.3.0-beta: Improved fetch and connection logic; now getting live feed, LN qr codes and other changes
0.3.0-beta
- added check marks well known accounts
- fixed URI exception for NIP05
- sorted lists printed in profile ( @radixrat )
- sorted tree children - now posts get printed in sorted order
- --lnqr or -l prints all LNBC invoices as qr code ( not yet for lnurl)
- changed fetch logic: after fetching all friends contacts etc, then reset the relays, and fetched ALL the events in last 2 hours. but not closing connection right now of old relays.
- new fetching logic: first all follows, well known or default accounts, and top tagged people are fetched for last few days. Then all live events are fetched for last 2 hours and ongoing.
Issues
- Encrypted channels need testing, and may not be working.
help and reference
- link to nostr console wiki
- link to discussions
Binaries
All binaries built using Github workflow automatically
- nostr_console_win64.zip this has a win64 executable file.
- nostr_console_elf64.zip this has a elf 64 executable file, dynamically linked, built using 'dart compile' on a Ubuntu 21 64 bit
- nostr_console_macOS.zip has an executable .app file. Needs to be unzipped. Built similarly on macOS
Usage
usage: nostr_console [OPTIONS]
OPTIONS
-p, --pubkey <public key> The hex public key of user whose events and feed are shown. Default is a hard-coded
public key derived from a well known private key. When given, posts/replies can't be sent.
-k, --prikey <private key> The hex private key of user whose events and feed are shown. Also used to sign events
sent. Default is same-as-above hard-coded well known private key.
-r, --relay <relay wss url> The relay url that is used as main relay. Default is wss://nostr-relay.untethr.me.
-d, --days <N as num> The latest number of days for which events are shown. Default is 1.
-q, --request <REQ string> This request is sent verbatim to the default relay. It can be used to recieve all events
from a relay. If not provided, then events for default or given user are shown.
-f, --file <filename> Read from given file, if it is present, and at the end of the program execution, write
to it all the events (including the ones read, and any new received).
-s, --disable-file When turned on, even the default file is not read from.
-t, --translate Translate some of the recent posts using Google translate site ( and not api). Google
is accessed for any translation request only if this flag is present, and not otherwise.
-l, --lnqr If set any LN invoices starting with LNBC will be printed as a QR code. Will set
width to 140, which can be reset if needed with the --width argument. Wider space is
needed for some qr codes.
-g, --location The given value is added as a 'location' tag with every kind 1 post made. Shortcut g for
geographic location.
-h, --help Print this usage message and exit.
-v, --version Print version and exit.
UI Options
-a, --align <left> When "left" is given as option to this argument, then the text is aligned to left. By default
the posts or text is aligned to the center of the terminal.
-w, --width <width as num> This specifies how wide you want the text to be, in number of columns. Default is 100.
Cant be less than 60.
-m, --maxdepth <depth as num> The maximum depth to which the threads can be displayed. Minimum is 2 and
maximum allowed is 12.
-c, --color <color> Color option can be green, cyan, white, black, red and blue.
Advanced
-y, --difficulty <number> The difficulty number in bits, only for kind 1 messages. Tne next larger number divisible by 4 is
taken as difficulty. Can't be more than 24 bits, because otherwise it typically takes too much
time. Minimum and default is 0, which means no difficulty.
-e, --overwrite Will over write the file with all the events that were read from file, and all newly received. Is
useful when the file has to be cleared of old unused events. A backup should be made just in case
of original file before invoking.