Syntactic sugar for
pocketd– a Swiss army knife of common helpful commands and operations
Pocket Knife is a powerful Python-based CLI wrapper for Pocket Network's pocketd command line tool. It streamlines complex blockchain operations with beautiful output, sensible defaults, and user-friendly commands.
# Install
git clone https://github.com/buildwithgrove/pocket-knife.git
cd pocket-knife
make install
# Use anywhere
pocketknife --help| Command | Description | Documentation |
|---|---|---|
| add-services | Add or modify services from file | 📖 Docs |
| delete-keys | Delete keys from keyring (all or by pattern) | 📖 Docs |
| export-keys | Export private keys in hex format | 📖 Docs |
| fetch-suppliers | Get all operator addresses for an owner | 📖 Docs |
| generate-keys | Generate multiple keys with mnemonics | 📖 Docs |
| import-keys | Import keys from mnemonic or hex | 📖 Docs |
| stake-apps | Stake applications (single or batch) | 📖 Docs |
| treasury | Comprehensive balance analysis | 📖 Docs |
| treasury-tools | Individual balance queries (liquid, stakes, etc.) | 📖 Docs |
| unstake | Batch unstake operator addresses | 📖 Docs |
git clone https://github.com/buildwithgrove/pocket-knife.git
cd pocket-knife
make install# Prerequisites: Python 3.8+, pocketd CLI
# Clone repository
git clone https://github.com/buildwithgrove/pocket-knife.git
cd pocket-knife
# Install with pipx (recommended)
pipx install .
# Or install in development mode
pip install -e .The os backend is used by default. For testing and development, you can use other backends:
# Example: Using test backend (no password required)
pocketknife generate-keys 5 myapp 0 --keyring-backend test
pocketknife export-keys mykey --keyring-backend test# Generate keys (test keyring - no password)
pocketknife generate-keys 10 grove-app 0 --keyring-backend test
# Export for backup
pocketknife export-keys --file keynames.txt --keyring-backend test# Import from backup
pocketknife import-keys --file backup.txt -t recover --keyring-backend os --pwd YOUR_PASSWORD
# Stake applications
pocketknife stake-apps pokt1abc... 1000000 anvil --keyring-backend os --pwd YOUR_PASSWORD# List keys
pocketd keys list --keyring-backend test
# Delete test keys by pattern
pocketknife delete-keys --keyring test --pattern grove-app --pwd 12345678
# Clean up all test keys
pocketknife delete-keys --keyring test --pwd 12345678- Home directory:
~/.pocket/ - Keyring backend:
os(most commands) ortest(unstake) - Network:
main - Default password:
12345678(⚠️ always override with--pwdforoskeyring!)
- Main RPC:
https://shannon-grove-rpc.mainnet.poktroll.com - Beta RPC:
https://shannon-testnet-grove-rpc.beta.poktroll.com
Built with:
MIT License - see LICENSE file for details.
Made with ❤️ for the Pocket Network community