πŸš€ DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more β†’
Socket
Book a DemoInstallSign in
Socket

bit2-cli

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bit2-cli

A modern CLI tool for scaffolding Astro applications with libSQL/Turso database integration and flexible deployment to Cloudflare Pages, Vercel, or Netlify

latest
Source
npmnpm
Version
3.0.9
Version published
Maintainers
1
Created
Source

∴ bit2

bit2 logo

A modern CLI tool for scaffolding Astro applications with libSQL/Turso database integration and Cloudflare, Vercel or Netlify deployment

npm version License: MIT

Quick Start β€’ Commands β€’ Features

🎯 What is bit2?

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.

✨ Features

  • πŸš€ 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

πŸš€ Quick Start

# 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 deploy

That's it! Your app is running with a database, API endpoints, and a beautiful UI. When ready, deploy to production with a single command!

πŸ“‹ Commands

bit2 new <project-name>

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

bit2 dev

Starts the development server with local SQLite database and hot reload

bit2 deploy

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

bit2 migrate

Runs database migrations for both local and production databases

🎯 Workflow

# Create new project
bit2 new my-app
cd my-app

# Start development  
bit2 dev

# Deploy to production
bit2 deploy

πŸ“ Project Structure

my-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

πŸ—„οΈ Database

Local Development

  • Uses SQLite database file: ./dev.db
  • Automatically created on first migration
  • Perfect for development and testing

Production

  • Uses Turso cloud database
  • Global edge replication
  • Seamless scaling
  • Configured via environment variables

πŸš€ Deployment

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

πŸ› οΈ Prerequisites

For Development

  • Bun (recommended) or Node.js 18+

For Deployment

  • Turso CLI for database management
  • GitHub CLI for auto repository creation
  • Accounts with Turso, GitHub, and Cloudflare, Vercel or Netlify

Install & Setup

# 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 login

πŸ“š Learn More

🀝 Contributing

We 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

πŸ“ License

MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Astro for the amazing web framework
  • Turso for edge SQLite
  • Bun for the fast runtime

Made with ❀️ for the modern web

⭐ Star on GitHub β€’ πŸ“¦ View on npm β€’ πŸ› Report Issues

Keywords

cli

FAQs

Package last updated on 11 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts