Skip to content

Nostr Console Best Practices

Vishal edited this page Dec 29, 2022 · 5 revisions

Some Useful Tips

Create shortcuts to Nostr Console

On windows, you can easily create a shortcut on desktop or anywhere else. A shortcut to Nostr Console executable, with arguments as required, will make it easy for you to invoke the application by just a click. An example of how it looks like is seen here.

Similar steps can be taken in other operating systems, though their shortcuts may take different forms and even different names.

Use Multiple Accounts with Nostr Console

A single instance of Nostr Console can only handle or work with a single account. However, you can invoke multiple nostr console applications with different accounts at the same time, and all those applications will work independently. Its important in such cases to give different --file arguments to each invocation ( otherwise multiple instances will/may write to same file and corrupt it).

One can also create multiple shortcuts, where each shortcut is for a different account.

Use Windows Terminal

On Windows, this is a useful console program, and it even prints emojis.

It can be invoked through a shortcut too, whose command line would look like (you'd need to change the nostr_console_win64.exe path and even the wt.exe path though):

C:\Users\Vishal\AppData\Local\Microsoft\WindowsApps\wt.exe C:\Users\GitHub\nostr_console\bin\nostr_console_win64.exe --file=account1_events_file.txt --prikey=deadbeafdeadbeafdeadbeafdeadbeafdeadbeafdeadbeafdeadbeafdeadbeaf

If you have a wide-screen use --width option

The --width=N will make the application use N number of columns in the terminal. The default is 120. So if you see lot of screen empty on left and right of the displayed text, then you can use this setting to make it use more screen. This thread has some screenshots too.

To get the full width of terminal ( on linux etc) use the command line argument: -w `tput cols`

Go directly to a specific channel

Typing the following command on bash/linux will take you straight to the '#nostr console' public channel ( whose channel id starts with 52ca). You can add your --prikey too.

It first gives specific inputs to the app, then makes the app take input from stdin.

{ echo -e "3\n1\n52ca" ; cat /dev/stdin; } | ./nostr_console_elf64

using same principles, you can go to any public channel or your direct message inbox, or encrypted channel etc.

Clone this wiki locally