Configure the Solana keypair used for signing write operations.
Review: $ARGUMENTS
Instructions
show (default)
- Read
SOLANA_KEYPAIR_PATHfrom environment. - If set and file exists — show public address (never the private key).
- If not set — show setup instructions:
Option 1 (env var): export SOLANA_KEYPAIR_PATH=~/.config/solana/id.json Option 2 (command): /solana-keypair set /path/to/keypair.json
set
- Validate the file exists and is readable.
- If valid — extract public address, confirm success.
- If invalid — show error with troubleshooting (check path, permissions, format).
- Always remind: keypair files are sensitive. Never share or commit them.
validate
- Check file exists, is readable, and is valid Solana keypair format.
- Show validation result with details (path, public address, permissions).
Security rules
- Never display private keys — only public addresses.
- Warn users to
chmod 400keypair files. - Remind that keypair controls all funds in the associated wallet.
- Suggest dedicated wallets for testing, hardware wallets for large amounts.
Keypair creation (if user has none)
Point user to:
solana-keygen new --outfile ~/.config/solana/id.json- Wallet apps: Solflare, Phantom, Magic Eden (export keypair to JSON)
Related skills
/solana-accept-risk— required before mainnet write operations/solana-network— choose which network to use