diffuse-prime-cli
Version:
CLI tool for Diffuse Prime
83 lines (59 loc) • 1.62 kB
Markdown
# Prime CLI
A CLI tool for Diffuse Prime built with TypeScript and viem.
## Installation
```bash
npm install -g prime-cli
# or
npx prime-cli
```
## Usage
### Main Commands
```bash
prime-cli --help # Show help
prime-cli --version # Show version
```
### Wallet Commands
#### Set Private Key
```bash
prime-cli wallet set-private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
```
#### Show Wallet Information
```bash
prime-cli wallet show
```
Displays wallet address and type.
#### Remove Wallet
```bash
prime-cli wallet remove
```
Removes the stored private key from local storage.
## Security
**⚠️ WARNING**: This CLI tool stores private keys locally with encryption. While the keys are encrypted, this is NOT suitable for production use with real funds.
For production use:
- Use hardware wallets
- Implement proper key management systems
- Never store private keys on disk
The current implementation uses a default encryption key. For better security, consider:
1. User-provided passwords for encryption
2. Hardware security modules
3. Secure key vaults
## Development
```bash
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev
# Test locally
node dist/index.js [command]
# or
npx prime-cli [command]
```
## Dependencies
- [viem](https://viem.sh/) - Ethereum library for TypeScript
- [commander](https://github.com/tj/commander.js/) - CLI framework
- [crypto-js](https://github.com/brix/crypto-js/) - Encryption utilities
- [chalk](https://github.com/chalk/chalk) - Terminal styling
## License
MIT