Skip to content

setup your pinocchio project blazingly fast πŸ’¨

License

Notifications You must be signed in to change notification settings

4rjunc/solana-chio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Chio CLI Logo

Chio CLI

Setup Solana Pinocchio projects blazingly fast

About

Chio is a command-line tool designed to make it easy to set up and manage Pinocchio projects on Solana. It automates common development tasks including project initialization, building, testing, and deployment with simple commands.

Features

  • πŸš€ Fast project scaffolding with best practices
  • πŸ“ Proper directory structure for Solana/Pinocchio development
  • πŸ”¨ Simple build, test, and deployment commands
  • πŸ’» Comprehensive testing environment setup

Installation

From GitHub

cargo install --git https://github.com/4rjunc/solana-chio --force

From Source

  1. Clone the repository

    git clone https://github.com/4rjunc/solana-chio.git
    cd solana-chio
  2. Build the tool

    cargo build --release
  3. Install globally

    cargo install --path .

Usage

Available Commands

# Initialize a new project
chio init <project-name>

# Build your project
chio build

# Run tests
chio test

# Deploy your program
chio deploy

# Run benchmarks
chio bench

# Get help
chio --help

Example

Create a new Pinocchio project and get started:

# Create a new project
chio init my-pinocchio-app

# Navigate to your project
cd my-pinocchio-app

# Build your project
chio build

# Run tests
chio test

# Run benchmarks
chio bench

Project Structure

When you initialize a project with chio init, it creates the following structure:

my-project/
β”œβ”€β”€ Cargo.toml
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ lib.rs               # Library crate using no_std
β”‚   β”œβ”€β”€ entrypoint.rs        # Program entrypoint
β”‚   β”œβ”€β”€ errors.rs            # Error definitions
β”‚   β”œβ”€β”€ instructions/        # Program instructions
β”‚   β”‚   β”œβ”€β”€ mod.rs
β”‚   β”‚   β”œβ”€β”€ deposit.rs
β”‚   β”‚   └── withdraw.rs
β”‚   └── states/              # Account state definitions
β”‚       β”œβ”€β”€ mod.rs
β”‚       └── utils.rs
└── tests/                   # Test files
    └── unit_tests.rs

Development Roadmap

Completed βœ…

  • Generate proper project structure
  • Pass user address to testcase file
  • Create a comprehensive README template
  • Implement chio build command

In Progress 🚧

  • Implement remaining command wrappers:
    • chio test β†’ cargo test --features test-default
    • chio deploy β†’ solana program deploy ./target/debug/<project_name>.so
    • chio bench β†’ cargo bench --features bench-default
  • Update banner and styling

Planned πŸ“‹

  • Add more sophisticated testing templates
  • Improve error handling
  • Add configuration options
  • proper gitbook for the project

Contributing

Contributions are welcome! Here's how you can contribute:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests to ensure everything works
  5. Commit your changes (git commit -m 'Add some amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Development Setup

  1. Ensure you have Rust and Cargo installed
  2. Install Solana CLI tools
  3. Clone the repository
  4. Build with cargo build
  5. Run with cargo run -- <command>

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

setup your pinocchio project blazingly fast πŸ’¨

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages