CLI tool for CasperGhost - AI-Powered DeFi Assistant for Casper Network
npm install casper-ghostFull-featured command-line interface for CasperGhost - AI-Powered DeFi Assistant
All UI actions available via CLI commands! Stake, unstake, claim rewards, tokenize assets, deploy contracts, and more - all from your terminal.
``bash`
npm install -g casper-ghost
Or use with npx:
`bash`
npx casper-ghost
1. Node.js 18+
2. Environment Variables (create .env file or export):
`bashRequired
VITE_EMBEDAPI_KEY=your_embedapi_key
PUBLIC_KEY=your_casper_public_key
šÆ Commands
$3
`bash
Stake CSPR (auto-select best validator)
ghost stake 100Stake to specific validator
ghost stake 100 --validator Auto-select best validator by APY
ghost stake 100 --validator maxUnstake tokens
ghost unstake 50
ghost unstake allClaim rewards
ghost claim
`$3
`bash
Show full portfolio
ghost portfolioCheck balance only
ghost balanceJSON output
ghost portfolio --json
`$3
`bash
List all validators
ghost validatorsTop 10 validators
ghost validators --top 10JSON output
ghost validators --json
`$3
`bash
Tokenize invoice from file
ghost tokenize --type invoice --amount 1000 --file invoice.pdfTokenize from URL
ghost tokenize --type bill --amount 500 --url https://example.com/bill.pdfWith description
ghost tokenize --type invoice --amount 1000 --file invoice.pdf --description "Q4 2024 invoice"
`$3
`bash
Deploy staking pool
ghost deploy --template staking-poolInteractive mode
ghost deploy --interactive
`$3
`bash
Transfer CSPR
ghost transfer 100Transfer to CSPR.name
ghost transfer alice.cspr 50
`$3
`bash
List your NFTs
ghost nft listBrowse collections
ghost nft browse
`$3
`bash
Bridge from Ethereum
ghost bridge --from ethereum --to casper --amount 100Interactive mode
ghost bridge --interactive
`$3
`bash
Start interactive chat session
ghost chat
`š” Examples
`bash
Quick stake
ghost stake 100Check portfolio
ghost portfolioFind best validator
ghost validators --top 1Tokenize invoice
ghost tokenize --type invoice --amount 1000 --file invoice.pdfInteractive AI chat
ghost chat
`š§ Configuration
$3
`bash
--network # casper-test or casper (default: casper-test)
--public-key # Your Casper public key
--private-key # Private key (use with caution!)
--key-path # Path to private key file
`$3
Set in
.env file or export:-
VITE_EMBEDAPI_KEY - EmbedAPI key for AI features
- PUBLIC_KEY - Your Casper public key (hex)
- CASPER_RPC_URL - Casper RPC endpoint
- CASPER_NETWORK - Network name
- WISE_LENDING_CONTRACT_HASH - WiseLending contract hash
- CSPR_CLOUD_API_KEY - CSPR.cloud API key (optional)
- PINATA_API_KEY - Pinata API key for IPFS (optional)
- PINATA_SECRET_KEY - Pinata secret key (optional)š ļø Development
`bash
Clone repository
git clone https://github.com/casperghost/casper-ghostInstall dependencies
cd packages/casper-ghost-cli
npm installLink for local development
npm linkTest
ghost --help
`š¦ Package Info
- Name:
casper-ghost`- Web App: https://casperghost.pro
- Documentation: https://github.com/casperghost/casper-ghost
- Support: https://github.com/casperghost/casper-ghost/issues
- Never commit private keys to version control
- Use environment variables for sensitive data
- For production, use hardware wallets or secure key management
- Transaction signing requires wallet connection (Casper Signer)
ā
All UI Actions Available
- Staking, unstaking, claiming rewards
- Portfolio management
- Validator selection
- RWA tokenization with AI risk audit
- Contract deployment
- Transfers
- NFT operations
- Cross-chain bridging
- Interactive AI chat
ā
Beautiful CLI Output
- Color-coded messages
- Progress indicators
- JSON output option
- Clear error messages
ā
Production Ready
- Error handling
- Input validation
- Transaction previews
- Confirmation prompts
---
Made with ā¤ļø by the CasperGhost Team