First-run setup: sithbit setup
sithbit setup
A guided, re-runnable first-run wizard. It configures the two things every other command depends on — a Solana RPC endpoint and a signing keypair — using plain stdin prompts, makes sure the wallet can afford a mailbox, can optionally claim your on-chain mailbox in the same pass, and then points you at the next steps. It takes no flags: everything is driven by the dialogue.
It is deliberately non-destructive. It reads your current config values up front and shows them, writes a change only when you type an explicit new value (pressing Enter keeps the current one), and confirms before generating a wallet — so re-running it on an already-configured machine, or against a funded keypair, never clobbers anything. The one exception to “Enter changes nothing” is a brand-new machine: when no wallet exists yet the wizard suggests a default endpoint, and pressing Enter accepts and writes that suggestion. The one step that spends SOL and sends a transaction — the mailbox create — defaults to no, so a piped or closed stdin never fires it by accident.
The wizard runs five steps:
- RPC endpoint. Shows the currently configured endpoint. Enter a new URL
to switch clusters (this writes the same
config
sithbit config set --urledits), or press Enter to keep the current one. On a machine with no wallet yet, the wizard instead suggests a build-appropriate default — mainnet for release builds, devnet for development builds — and Enter accepts and persists the suggestion. (The two endpoint constants live at the top ofmail_client/src/commands/setup.rs, so an operator shipping a hosted RPC endpoint swaps them in one place.) - Signing keypair. Shows the current keypair path and lets you change it.
If no readable keypair exists at the chosen path, it offers to generate a
fresh wallet there (the same artifact
sithbit wallet createwrites). It asks first, so a re-run never overwrites an existing wallet; decline and it prints the manualsithbit wallet createcommand instead. - Wallet funding. Checks that the settled wallet — freshly generated or
pre-existing — holds enough SOL to pay for a mailbox create (the account
rents, the flat alias fee, and a small fee buffer; about 0.0124 SOL). A
wallet that already covers it, or that already owns a mailbox, skips the
step with a note. Otherwise, on clusters with a faucet (devnet, testnet, a
local validator) the wizard requests an airdrop of one SOL, retrying a few
times because the public devnet faucet is flaky; on mainnet — or if the
faucet stays dry — it prints your wallet address and the required amount,
re-checks the balance each time you press Enter, and lets you type
skipto move on unfunded. (The devnet web faucet at faucet.solana.com is the manual fallback when the RPC faucet errors.) - Mailbox. Offers to claim your on-chain mailbox
right now, defaulting to skip (only an explicit
y/yesproceeds). Accept and it prompts for the mail domain (defaultsithbit.com) and the default stamp price in lamports (default one SOL), then drives the same on-chain create assithbit mailbox create— which also mints the wallet’s self-alias in the same transaction. It is re-run-safe: a create against a mailbox that already exists errors on-chain, and the wizard surfaces that message and carries on to completion rather than aborting. Decline and it prints the manualsithbit mailbox createcommand instead. - Next steps. Static guidance — create your on-chain
mailbox (if you skipped step 4), set a default
stamp price, and review your settings with
sithbit config get.
Example
A first run on a machine with no wallet yet, switching to devnet, letting the wizard generate a keypair, fund it from the faucet, and claim a mailbox inline:
$ sithbit setup
SithBit setup — configure your RPC endpoint and wallet.
Config file: /home/you/.config/solana/cli/config.yml
Step 1/5 RPC endpoint
Current: https://api.mainnet-beta.solana.com
New URL (Enter keeps current): https://api.devnet.solana.com
Set RPC endpoint to https://api.devnet.solana.com.
Step 2/5 Signing keypair
Current: /home/you/.config/solana/id.json
No keypair file found at /home/you/.config/solana/id.json.
Generate a new wallet there now? [Y/n]: y
Generated a new wallet at /home/you/.config/solana/id.json.
Step 3/5 Wallet funding
Requesting 1000000000 lamports (1 SOL) from the cluster faucet…
Airdropped 1000000000 lamports (1 SOL).
Step 4/5 Mailbox
A mailbox is your on-chain inbox — claim one to start receiving mail.
Create your mailbox on-chain now? [y/N]: y
Domain [sithbit.com]:
Default stamp price in lamports [1000000000]:
Created your mailbox for domain sithbit.com.
Step 5/5 Next steps
You're configured. To start receiving mail:
1. sithbit mailbox create # claim your on-chain mailbox
2. sithbit mailbox update # set your default stamp price
3. sithbit config get # review your settings anytime
Done.
On mainnet the funding step has no faucet to lean on, so a wallet short of the mailbox cost is shown its own address and the amount to send, and the wizard re-checks the balance each time you press Enter:
Step 3/5 Wallet funding
Creating a mailbox costs about 12415720 lamports (0.01241572 SOL).
Send at least that much to your wallet address:
85FZrun1Eb5bdkbFCDjaFSTLnBfnx6sUFHa5BiYH2Q03
Press Enter to re-check the balance, or type 'skip':
If a keypair already exists at the chosen path the wizard reports
Found an existing keypair at … and skips generation entirely; a wallet that
already holds enough SOL passes the funding step with a one-line note, and one
that already owns a mailbox skips both the funding wait and the create prompt.
Declining the mailbox step (the default) prints Claim one later with: sithbit mailbox create and moves on, and re-running the wizard against a wallet that
already owns a mailbox prints You already have a mailbox — skipping. and
still finishes. The prompts also default cleanly on end-of-input, so a piped
or closed stdin takes every default — including skipping the funding wait
and the mailbox create — rather than hanging.
Prefer a browser? The four web clients walk a brand-new user through the same
five steps without a terminal — see
Getting started. And once you’re set up, the
read-only sithbit earnings snapshot shows what your wallet
holds and has taken in.