bountychain-cli
v1.0.1
Published
AI-powered GitHub bounty system with Solana NFT rewards
Maintainers
Readme
🏆 BountyChain CLI
AI-Powered GitHub Bounties with Solana NFT Rewards
BountyChain is a CLI tool that automatically:
- Scans GitHub repositories using AI (Neurolink) to identify improvement opportunities
- Creates bounty issues on GitHub
- Verifies PR submissions using AI to determine if they solve the bounty
- Rewards contributors with NFTs on Solana Devnet
🚀 Quick Start
Prerequisites
- Node.js 18+
- npm or pnpm
- GitHub Personal Access Token (PAT)
- Neurolink AI platform (for AI-powered scanning and verification)
Installation
# Clone or navigate to the project
cd bountychain-cli
# Install dependencies
npm install
# Copy environment configuration
cp .env.example .env
# Edit .env and add your GitHub token
# GITHUB_TOKEN=your_github_pat_here
# Build the project
npm run build
# Link globally (optional)
npm linkSetting Up Neurolink AI
BountyChain uses Neurolink by Juspay as the AI execution engine. Neurolink provides access to 12+ AI providers (OpenAI, Anthropic, Google, AWS Bedrock, etc.) under one unified API.
# Run the Neurolink setup wizard
pnpm dlx @juspay/neurolink setup
# Or using npx
npx @juspay/neurolink setupThe setup wizard will:
- Let you select your preferred AI provider
- Guide you through API key configuration
- Validate your credentials
Supported providers:
- OpenAI (GPT-4o, GPT-4o-mini, o1)
- Anthropic (Claude 3.5/3.7 Sonnet, Opus)
- Google AI Studio (Gemini 2.5 Flash/Pro) - Free tier available!
- AWS Bedrock (Claude, Titan, Llama, Nova)
- Azure OpenAI
- Mistral AI
- Ollama (local models - free!)
- And 5+ more providers
Environment Variables
Create a .env file with:
# Required: GitHub Personal Access Token
# Create at: https://github.com/settings/tokens
GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx
# Solana network (devnet recommended for testing)
SOLANA_NETWORK=devnet
# Optional: Your Solana private key (base58 encoded)
SOLANA_PRIVATE_KEY=Note: Neurolink AI provider configuration is handled separately via
pnpm dlx @juspay/neurolink setup
📖 Usage
Complete Workflow
# 1. Initialize with a GitHub repository
bounty init https://github.com/vercel/next.js
# 2. Scan the repo to generate bounty suggestions (uses Neurolink AI)
bounty scan
# 3. Create GitHub issues for the bounties
bounty create
# 4. List all bounties
bounty list
# 5. When a PR is submitted, verify it (uses Neurolink AI)
bounty verify-pr https://github.com/vercel/next.js/pull/123
# 6. If verified, mint an NFT reward
bounty reward contributor-usernameCommands Reference
bounty init <repo-url>
Initialize BountyChain with a GitHub repository.
bounty init https://github.com/owner/repoWhat it does:
- Validates the GitHub URL
- Verifies repository access
- Saves configuration for subsequent commands
bounty scan
Use AI to analyze the repository and generate bounty suggestions.
bounty scanWhat it does:
- Fetches repository file structure
- Retrieves README content
- Sends to Neurolink AI for analysis
- Generates 5-10 bounty suggestions with:
- Title
- Description
- Difficulty (easy/medium/hard)
- Estimated time
bounty create
Create GitHub issues from the last scan results.
bounty createWhat it does:
- Takes bounties from last scan
- Creates GitHub issues with bounty labels
- Stores mapping of bounty ID to issue number
bounty list
Display all bounties and their status.
bounty list
bounty list --status open
bounty list --status completedOptions:
-s, --status <status>- Filter by status (open, claimed, completed)
bounty verify-pr <pr-url>
Verify if a Pull Request correctly solves a bounty.
bounty verify-pr https://github.com/owner/repo/pull/123What it does:
- Fetches PR details
- Detects linked issue (looks for "Fixes #xx")
- Downloads PR diff
- Sends to AI for verification
- Updates bounty status if passed
- Adds comment to PR with results
PR Requirements:
- PR body should contain
Fixes #xxorCloses #xxreferencing the bounty issue
bounty reward <github-username>
Mint an NFT reward for completing a bounty.
bounty reward octocat
bounty reward octocat --wallet <solana-address>
bounty reward octocat --bounty <bounty-id>Options:
-w, --wallet <address>- Recipient's Solana wallet address-b, --bounty <id>- Specific bounty ID to reward
What it does:
- Finds completed bounty for the user
- Mints NFT on Solana Devnet
- Returns mint address and explorer link
- Generates QR code text for Phantom wallet
🏗️ Project Structure
bountychain-cli/
├── src/
│ ├── commands/ # CLI command implementations
│ │ ├── init.ts # bounty init
│ │ ├── scan.ts # bounty scan
│ │ ├── create.ts # bounty create
│ │ ├── list.ts # bounty list
│ │ ├── verifyPR.ts # bounty verify-pr
│ │ └── reward.ts # bounty reward
│ ├── github/ # GitHub API integration
│ │ ├── issues.ts # Issue operations
│ │ └── pr.ts # PR operations
│ ├── ai/ # AI integration
│ │ └── runAI.ts # Neurolink wrapper
│ ├── solana/ # Blockchain integration
│ │ └── mintNFT.ts # NFT minting
│ ├── utils/ # Utilities
│ │ ├── config.ts # Configuration management
│ │ └── logger.ts # Logging utilities
│ └── index.ts # Main entry point
├── data/
│ └── bounties.json # Local storage
├── package.json
├── tsconfig.json
├── .env.example
└── README.md🔧 Technical Details
GitHub API Integration
- Uses GitHub REST API v3
- Requires PAT with
reposcope - Handles rate limiting with delays
AI Integration (Neurolink)
- Connects to local Neurolink instance
- Falls back to mock implementation if unavailable
- Used for:
- Repository scanning
- PR verification
Solana NFT Minting
- Uses Solana Devnet by default
- Creates SPL tokens with 0 decimals (NFT-style)
- Generates temporary wallet if not configured
- Auto-requests airdrop for transaction fees
🧪 Testing
# Use a public repository for testing
bounty init https://github.com/vercel/next.js/tree/canary/examples/blog-starter
# Or any small repo you have access to
bounty init https://github.com/your-username/your-repo
# Test the workflow
bounty scan
bounty create
bounty list📝 Data Storage
Bounties are stored in data/bounties.json:
{
"repo": {
"owner": "vercel",
"repo": "next.js",
"url": "https://github.com/vercel/next.js"
},
"bounties": {
"bounty-123-1": {
"id": "bounty-123-1",
"title": "Add comprehensive README",
"description": "...",
"difficulty": "easy",
"estimatedTime": "2-4 hours",
"issue": 45,
"status": "open",
"createdAt": "2024-01-15T10:00:00Z"
}
},
"lastScan": [...]
}🤝 Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
📄 License
MIT License - feel free to use this for your own bounty programs!
Built with ❤️ for the Web3 community
