capx-compose
v0.1.1
Published
π CLI tool to scaffold AI application projects with best practices and templates for Supabase, Vercel AI, Firebase, Solana, and EVM development. Create production-ready AI apps in seconds.
Maintainers
Keywords
Readme
capx-compose
A modular CLI tool for scaffolding AI apps with pre-configured integrations and best practices. Built for the AI IDE era with working examples you can import to Cursor, Claude, or any AI editor to start building immediately.
npx capx-compose my-appTable of Contents
Overview
capx-compose is a command-line tool that generates Next.js starter templates for AI apps. It handles the initial configuration of common services like AI SDKs, databases, authentication, and blockchain integrations, allowing developers to focus on building features rather than setup.
Features
- Ready-to-extend templates - Working code that AI IDEs can actually build on
- Everything you need to ship - Auth, database, AI, blockchain - all pre-wired
- No dependency hell - Pre-resolved conflicts so you can start building immediately
- Examples built-in - Working code that scales from hackathon to startup
- One command setup - From zero to running app in under 3 minutes
- Modern stack - Next.js 14, TypeScript, Tailwind, shadcn/ui
Who Needs This
- Hackathon Hackers: Ship your idea without getting caught up with setup
- Indie Hackers: Stop rebuilding the same auth + database + AI stack
- Web3 β AI Devs: Wallet connections + LLM streaming already solved
- AI β Web3 Devs: Add blockchain without the Solidity rabbit hole
Or anyone tired of wiring up the same services for the nth time.
Motivation
Modern AI apps need complex components that developers aren't always familiar with:
- Auth systems that actually work (social login, wallets with Privy)
- LLM integration with streaming, function calling, and error handling
- Database setup with real-time subscriptions (Supabase/Firebase)
- Blockchain connectivity for Web3 features (EVM, Solana, Sui)
Setting this up takes hours of debugging, reading docs, and fixing version conflicts.
Our approach: Start with working code that AI coding assistants can extend. Whether you're using Cursor, Claude, Windsurf, or any other AI-powered editor, these tools work best when they have boilerplate to build on rather than starting from scratch. capx-compose provides that foundation with a running app in under 3 minutes.
Getting Started
Installation
npm install -g capx-composeOr use directly with npx:
npx capx-compose my-appQuick Start
Interactive Setup (Recommended)
npx capx-compose my-appFollow the prompts to select your desired configuration.
Direct Configuration
# AI chat app
npx capx-compose my-app --plugins="vercel-ai" --yes
# AI with database
npx capx-compose my-app --plugins="vercel-ai,supabase" --yes
# Web3 AI app
npx capx-compose my-app --plugins="vercel-ai,evm,privy" --yes
# AI agent with DeFi capabilities
npx capx-compose my-app --plugins="vercel-ai,goat,supabase" --yesConfiguration
Available Plugins
| Plugin | Description | Use Case |
|--------|-------------|----------|
| vercel-ai | Vercel AI SDK with OpenAI integration | Streaming chat with GPT models |
| supabase | PostgreSQL with auth examples included | User auth, real-time data |
| firebase | Firestore with auth | Document storage, offline sync |
| vercel-kv | Redis-compatible caching | Session storage, caching |
| evm | Multi-chain support (ETH, Base, Arbitrum, Polygon) | Web3 transactions across chains |
| solana | Solana blockchain integration | Solana dApps |
| sui | Sui blockchain with wallet connection | Sui dApps with wallet UI |
| privy | Web3 authentication | Social login + embedded wallets |
| goat | AI agent for EVM & Solana (swaps, sends, balances) | Multi-chain DeFi agent |
| solana-agent-kit | Advanced Solana agent for DeFi | Token ops, swaps, Jupiter integration |
Plugin Compatibility Rules
- Minimum: 1 plugin required
- Maximum: 6 plugins allowed
- Databases: Choose either
supabaseORfirebase(not both) - Blockchains: Choose one -
evm,solana, ORsui(not multiple) - Agents: Choose either
goatORsolana-agent-kit(not both) - Auth:
privyrequires a blockchain plugin (evm,solana, orsui)
Common Configurations
# Web2 AI App
--plugins="vercel-ai,supabase"
# Web3 DeFi Dashboard
--plugins="evm,privy,vercel-ai"
# AI Agent Platform
--plugins="goat,vercel-ai,supabase,vercel-kv"
# Solana AI App
--plugins="solana,vercel-ai,firebase"
# Sui Blockchain App
--plugins="sui,privy,vercel-ai"Usage
CLI Options
capx-compose <project-name> [options]
Options:
--plugins <list> Comma-separated list of plugins
--dependency-strategy <type> Resolution strategy (smart|highest|compatible)
--package-manager <pm> Package manager (npm|yarn|pnpm)
--typescript Enable TypeScript (default: true)
--tailwind Enable Tailwind CSS (default: true)
--eslint Enable ESLint (default: true)
--yes Skip interactive prompts
--skip-install Skip dependency installation
--help Display help
--version Display versionProject Structure
my-app/
βββ src/
β βββ app/ # Next.js App Router
β β βββ api/ # API routes
β β βββ chat/ # Example chat implementation
β β βββ page.tsx # Home page
β βββ components/ # React components
β βββ lib/ # Utility functions and configs
β βββ types/ # TypeScript definitions
βββ public/ # Static assets
βββ .env.example # Environment variables template
βββ .env.local # Your environment variables (create this)
βββ next.config.js # Next.js configuration
βββ tailwind.config.js # Tailwind configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Dependencies and scriptsEnvironment Variables
Each plugin adds its required variables to .env.example:
# Copy the template
cp .env.example .env.local
# Example variables (plugin-dependent)
OPENAI_API_KEY=sk-... # For vercel-ai
NEXT_PUBLIC_SUPABASE_URL=https://... # For supabase
NEXT_PUBLIC_SUPABASE_ANON_KEY=... # For supabase
NEXT_PUBLIC_PRIVY_APP_ID=... # For privyDevelopment
Prerequisites
- Node.js 18.0.0 or higher
- npm 7.0.0 or higher
Local Development
# Clone the repository
git clone https://github.com/capx-ai/capx-compose.git
cd capx-compose
# Install dependencies
npm install
# Run tests
npm test
# Test CLI locally
capx-compose test-app --skip-installContributing
We welcome contributions, especially new plugin integrations.
Adding a Plugin
Create a new folder in /templates/[plugin-name]/ with:
config.json- Dependencies and metadataexample.tsx- Working example code.env.example- Required environment variablessetup.md- Setup instructions
Test locally with capx-compose test-app --plugins="your-plugin" --skip-install and submit a PR.
Priority Areas
- More AI SDKs (LangChain, direct OpenAI)
- Payment processing (Stripe, crypto payments)
- More auth providers
- Bug fixes and docs improvements
Support
- GitHub Issues - Bug reports and feature requests
- Discord - Community support and discussions
- Dev Guide - Guides and API docs
About Capx
Capx is building infrastructure for the convergence of AI and blockchain. capx-compose is part of our commitment to making this intersection more accessible to developers. Learn more at capx.ai.
License
MIT
Acknowledgments
Built with and for the developer community. Special thanks to early contributors and hackathon participants who provided feedback.
Made with β€οΈ at Capx
