@@ -20,15 +20,19 @@ sudo apt install -y cmake build-essential pkg-config
2020
2121## Install
2222
23- To install you need to fill the env vars (` .env ` ) with the Mostro pubkey and relays. For admin commands, you'll also need to set your admin private key.
23+ You can install directly from crates:
24+
25+ ``` bash
26+ cargo install mostro-cli
27+ ```
28+
29+ Or downloading and compiling it by yourself:
2430
2531``` bash
2632git clone https://github.com/MostroP2P/mostro-cli.git
2733cd mostro-cli
28- cp .env-sample .env
29- # Edit .env and set MOSTRO_PUBKEY, RELAYS, and POW
30- # For admin commands, also set ADMIN_NSEC
31- cargo run
34+ cargo build --release
35+ # The binary will be created on target/release/mostro-cli
3236```
3337
3438## Usage
@@ -61,7 +65,7 @@ Commands:
6165
6266Options:
6367 -v, --verbose
64- -m, --mostropubkey <MOSTROPUBKEY >
68+ -m, --mostropubkey <MOSTRO_PUBKEY >
6569 -r, --relays <RELAYS>
6670 -p, --pow <POW>
6771 -h, --help Print help
@@ -71,11 +75,13 @@ Options:
7175## Examples
7276
7377``` bash
74- $ mostro-cli -m npub1ykvsmrmw2hk7jgxgy64zr8tfkx4nnjhq9eyfxdlg3caha3ph0skq6jr3z0 -r ' wss://nos.lol,wss:// relay.damus.io ,wss://nostr-pub.wellorder.net,wss://nostr.mutinywallet.com,wss:// relay.nostr.band,wss://nostr.cizmar.net,wss://140.f7z.io,wss://nostrrelay.com,wss://relay.nostrr.de ' listorders
78+ $ mostro-cli -m npub1ykvsmrmw2hk7jgxgy64zr8tfkx4nnjhq9eyfxdlg3caha3ph0skq6jr3z0 -r ' wss://relay.mostro.network ,wss://relay.damus.io ' listorders
7579
7680# You can set the env vars to avoid the -m, -n and -r flags
77- $ export MOSTROPUBKEY=npub1ykvsmrmw2hk7jgxgy64zr8tfkx4nnjhq9eyfxdlg3caha3ph0skq6jr3z0
78- $ export RELAYS=' wss://nos.lol,wss://relay.damus.io,wss://nostr-pub.wellorder.net,wss://nostr.mutinywallet.com,wss://relay.nostr.band,wss://nostr.cizmar.net,wss://140.f7z.io,wss://nostrrelay.com,wss://relay.nostrr.de'
81+ $ export MOSTRO_PUBKEY=npub1ykvsmrmw2hk7jgxgy64zr8tfkx4nnjhq9eyfxdlg3caha3ph0skq6jr3z0
82+ $ export RELAYS=' wss://relay.mostro.network,wss://relay.damus.io'
83+ # if the Mostro require proof of work of 10 for example
84+ $ export POW=10
7985$ mostro-cli listorders
8086
8187# Create a new buy order
@@ -86,6 +92,8 @@ $ mostro-cli cancel -o eb5740f6-e584-46c5-953a-29bc3eb818f0
8692
8793# Create a new sell range order with Proof or work difficulty of 10
8894$ mostro-cli neworder -p 10 -k sell -c ars -f 1000-10000 -m " face to face"
95+
96+ # For admin commands, also set ADMIN_NSEC (this private key is different from the mnemonic in database we use to trade)
8997```
9098
9199## Progress Overview
@@ -105,5 +113,5 @@ $ mostro-cli neworder -p 10 -k sell -c ars -f 1000-10000 -m "face to face"
105113- [x] Direct message with peers (use nip-17)
106114- [x] Conversation key management
107115- [x] Add a new dispute's solver (for admins)
108- - [ ] Identity management (Nip-06 support)
109- - [ ] List own orders
116+ - [x ] Identity management (Nip-06 support)
117+ - [x ] List own orders
0 commit comments