Skip to content

Satograms/satogram-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

satogram-cli

Command-line interface for the Satogram API. Send custom messages with Bitcoin satoshis to Lightning Network participants.

Install

Using go install

This installs the binary to your $GOPATH/bin (or $GOBIN if set):

go install github.com/Satograms/satogram-cli@latest

Make sure your Go bin directory is on your PATH:

Linux

# Add to ~/.bashrc or ~/.zshrc
export PATH="$PATH:$(go env GOPATH)/bin"

macOS

# Add to ~/.zshrc
export PATH="$PATH:$(go env GOPATH)/bin"

Windows (PowerShell)

# Add to your PowerShell profile ($PROFILE)
$env:PATH += ";$(go env GOPATH)\bin"

Build from source

git clone https://github.com/Satograms/satogram-cli.git
cd satogram-cli

Linux

go build -o satogram-cli .
sudo mv satogram-cli /usr/local/bin/

macOS

go build -o satogram-cli .
sudo mv satogram-cli /usr/local/bin/

Windows (PowerShell)

go build -o satogram-cli.exe .
Move-Item satogram-cli.exe "$env:USERPROFILE\go\bin\"

Usage

Get recipient statistics

satogram-cli stats

Example output:

Recipient Statistics
  Node pubkeys:          16636
  Lightning addresses:   27252
  Total recipients:      43888
  Satograms sent:        2272680
  Signups:               16880

Create a Satogram campaign

Campaigns have a minimum cost of 500 sats.

satogram-cli create --total-cost 1000 --message "Hello from the Lightning Network!"

Optional flags:

Flag Description Default
--amt-per-satogram Sats to send per recipient 1
--max-fees Max routing fee per payment in sats 20
--sender-address Lightning address or node pubkey to include as sender, so you are first to receive your own satogram
--recipient-selection Target recipients: all, signups, nodes, or lightningAddresses all

Returns a Lightning invoice that must be paid to start delivery.

Check invoice payment status

satogram-cli invoice <payment_request>

Returns one of: OPEN (unpaid), SETTLED (paid), CANCELED, or ACCEPTED.

Get campaign delivery status

satogram-cli status <payment_request>

Shows delivery progress including success/failure counts, sats spent, and campaign details.

JSON output

Add the --json flag to any command to get the response as JSON:

satogram-cli --json stats
{
  "total_count_pubkeys": 16636,
  "total_count_lightning_addresses": 27252,
  "total_count": 43888,
  "total_satograms_sent": 2272680,
  "total_signed_up": 16880
}

This works with all commands:

satogram-cli --json stats
satogram-cli --json create --total-cost 1000 --message "Hello!"
satogram-cli --json invoice <payment_request>
satogram-cli --json status <payment_request>

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages