A modern CLI tool for scaffolding Astro applications with libSQL/Turso database integration and Cloudflare, Vercel or Netlify deployment
bit2 is the fastest way to create modern web applications with a complete, production-ready stack. Get a beautiful Astro site with database integration and deployment configured in minutes.
- 🚀 Astro 5.x - Modern web framework with SSR and islands architecture
- 💾 libSQL/Turso - SQLite for the edge with global replication
- 🎯 Multi Deploy - One-command deployment to Cloudflare, Vercel or Netlify
- ⚡ Bun Runtime - Fast JavaScript runtime and package manager
- 🔄 Auto Setup - Database initialization and dependency installation
# Install globally
npm install -g bit2-cli
# Create a new project
bit2 new my-awesome-app
# Start developing
cd my-awesome-app
bit2 dev
# Deploy to production (when ready)
bit2 deployThat's it! Your app is running with a database, API endpoints, and a beautiful UI. When ready, deploy to production with a single command!
Creates a new Astro project with everything configured:
- Copies optimized Astro template
- Installs dependencies automatically
- Sets up local SQLite database with sample data
- Ready to run immediately
Starts the development server with local SQLite database and hot reload
Smart deployment workflow:
- Creates Turso cloud database automatically
- Sets up GitHub repository (optional)
- Deploys to Cloudflare, Vercel or Netlify with automatic configuration
- Configures environment variables
Runs database migrations for both local and production databases
# Create new project
bit2 new my-app
cd my-app
# Start development
bit2 dev
# Deploy to production
bit2 deploymy-app/
├── src/
│ ├── pages/ # Astro pages (frontend + API)
│ ├── components/ # Astro components
│ ├── db/
│ │ ├── client.ts # Database client configuration
│ │ ├── schema.sql # Database schema
│ │ └── seed.sql # Sample data
│ └── lib/
│ └── db.ts # Database utilities
├── dev.db # Local SQLite database
├── astro.config.mjs # Astro + Cloudflare, Vercel or Netlify configuration
└── package.json
- Uses SQLite database file:
./dev.db - Automatically created on first migration
- Perfect for development and testing
- Uses Turso cloud database
- Global edge replication
- Seamless scaling
- Configured via environment variables
The bit2 deploy command handles everything:
- Creates and configures your Turso cloud database
- Sets up GitHub repository
- Installs Cloudflare, Vercel or Netlify adapter
- Shows instructions for Cloudflare, Vercel or Netlify deplyoy configuration
- Next deployments on git push
- Bun (recommended) or Node.js 18+
- Turso CLI for database management
- GitHub CLI for auto repository creation
- Accounts with Turso, GitHub, and Cloudflare, Vercel or Netlify
# Install Bun
curl -fsSL https://bun.sh/install | bash
# Install Turso CLI (required for deployment)
curl -sSfL https://get.tur.so/install.sh | bash
turso auth signup
# Install CLI tools for deployment
brew install gh # GitHub CLI
gh auth loginWe welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
bit2 test) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see the LICENSE file for details.
Made with ❤️ for the modern web