A modern Rust CLI to bootstrap Solana Pinocchio programs with built-in build, deploy, and testing tools.
- Zero Configuration: Get started in seconds with sensible defaults
- Best Practices: Project structure follows Solana development conventions
- Developer Experience: Intuitive commands that feel natural
- Production Ready: Built-in testing, deployment, and key management
- ποΈ Instant Project Scaffolding - Create production-ready projects in seconds
- π Optimized Structure - Best-practice directory layout out of the box
- π¨ Unified Commands - Build, test, and deploy with simple commands
- π§Ή Smart Cleaning - Clean build artifacts while preserving keypairs
- π¦ Package Discovery - Find and add Pinocchio packages effortlessly
- π§ͺ Built-in Testing - Comprehensive testing with mollusk-svm
- π Keypair Management - Automatic generation and secure storage
- π Program ID Sync - Keep your program IDs consistent automatically
- βοΈ Configuration Management - Simple deployment configuration with Pinoc.toml
cargo install pinocFrom GitHub (Latest)
cargo install --git https://github.com/a91y/pinoc --forceFrom Source
git clone https://github.com/a91y/pinoc.git
cd pinoc
cargo build --release
cargo install --path .# Install pinoc
cargo install pinoc
# Create a new project
pinoc init my_awesome_app
# Navigate to your project
cd my_awesome_app
# Build and test
pinoc build
pinoc test
# Deploy to Solana
pinoc deployThat's it! You now have a fully functional Solana program ready for development.
| Command | Description | Example |
|---|---|---|
pinoc init <name> |
Create a new project | pinoc init my_app |
pinoc build |
Build your program | pinoc build |
pinoc test |
Run tests | pinoc test |
pinoc deploy |
Deploy to Solana | pinoc deploy --cluster devnet |
pinoc clean |
Clean build artifacts | pinoc clean |
pinoc add <package> |
Add a package | pinoc add some_package |
pinoc search [query] |
Search packages | pinoc search database |
pinoc keys list |
List program keypairs | pinoc keys list |
pinoc keys sync |
Sync program IDs | pinoc keys sync |
pinoc help |
Show help | pinoc help |
pinoc init <name> --no-git- Skip git initializationpinoc init <name> --no-boilerplate- Create minimal project structurepinoc clean --no-preserve- Clean everything including keypairspinoc deploy --cluster <cluster> --wallet <path>- Override deployment settings
my_project/
βββ Cargo.toml # Project configuration
βββ README.md # Documentation
βββ .gitignore # Git ignore rules
βββ Pinoc.toml # Deployment configuration
βββ src/
β βββ lib.rs # Main library
β βββ entrypoint.rs # Program entrypoint
β βββ errors.rs # Error definitions
β βββ instructions/ # Program instructions
β β βββ mod.rs
β β βββ initialize.rs
β βββ states/ # Account states
β βββ mod.rs
β βββ state.rs
β βββ utils.rs
βββ tests/
β βββ tests.rs # Unit tests
βββ target/deploy/
βββ my_project-keypair.json # Program keypair
Perfect for quick prototypes or learning:
my_minimal_project/
βββ Cargo.toml # Minimal configuration
βββ README.md # Basic documentation
βββ .gitignore # Git ignore rules
βββ Pinoc.toml # Deployment configuration
βββ src/
β βββ lib.rs # Minimal program structure
βββ target/deploy/
βββ my_minimal_project-keypair.json
Pinoc uses Pinoc.toml for deployment settings:
[provider]
cluster = "localhost"
wallet = "~/.config/solana/id.json"Override settings per deployment:
# Deploy to devnet with custom wallet
pinoc deploy --cluster devnet --wallet ./custom-keypair.jsonKeep your program IDs synchronized:
# Check key consistency
pinoc keys list
# Sync program ID in lib.rs with keypair
pinoc keys syncExample output:
β
Program key is already consistent!
π Program ID: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
π No update needed in src/lib.rs
Clean build artifacts while preserving important files:
# Clean target directory (preserves keypairs)
pinoc clean
# Clean everything including keypairs
pinoc clean --no-preserveEnsure you have these tools installed:
- Rust (1.70+) - Install here
- Solana CLI - Install guide
- Git - For version control
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Test thoroughly
- Commit with clear messages (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
git clone https://github.com/a91y/pinoc.git
cd pinoc
cargo build --release
cargo install --path .
# Test your changes
pinoc init test-project
cd test-project
pinoc buildThis project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- π Documentation: Pinocchio Docs
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π¦ Crates.io: pinoc
Made with β€οΈ by the Solana community
β Star us on GitHub if Pinoc helps you build faster!