pinoc 0.1.2

A CLI tool for setting up pinocchio program project
pinoc-0.1.2 is not a library.

About

Pinoc 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 crates.io (Recommended)

cargo install pinoc

From GitHub

cargo install --git https://github.com/a91y/pinoc --force

From Source

  1. Clone the repository

    git clone https://github.com/a91y/pinoc.git
    cd pinoc
    
  2. Build the tool

    cargo build --release
    
  3. Install globally

    cargo install --path .
    

Usage

Available Commands

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

# Build your project
pinoc build

# Run tests
pinoc test

# Deploy your program
pinoc deploy

# Get help
pinoc --help

Example

Create a new Pinocchio project and get started:

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

# Navigate to your project
cd my-pinocchio-app

# Build your project
pinoc build

# Run tests
pinoc test

Project Structure

When you initialize a project with pinoc 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
    └── tests.rs

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 --release
  5. To install too cargo install --path .