CLI Reference
Command reference for Quackback development and operations
Command reference for Quackback development and operations.
Development Commands
Start Development Server
bun run devStarts the development server at http://localhost:3000.
Options:
- Hot reloading enabled
- Source maps enabled
- OTP codes printed to console
Build for Production
bun run buildCreates optimized production build in .output/.
Preview Production Build
bun run previewPreview the production build locally. Run from apps/web/ directory.
Start Production Server
bun run startStarts the production server. Requires bun run build first. Run from apps/web/ directory.
Database Commands
Run Migrations
bun run db:migrateApplies pending database migrations. Safe to run multiple times.
Generate Migration
bun run db:generateCreates a new migration from schema changes. Run after modifying files in packages/db/src/schema/.
Open Drizzle Studio
bun run db:studioOpens visual database browser at https://local.drizzle.studio.
Seed Demo Data
bun run db:seedPopulates database with demo workspace and sample data.
Reset Database
bun run db:resetWarning:
This command destroys all data. It drops and recreates the database, then runs migrations. Use with caution.
Code Quality
Lint Code
bun run lintRuns ESLint checks. Exits with error if issues found.
Type Check
cd apps/web && bun run typecheckRuns TypeScript compiler in check mode. No output if successful. Must be run from apps/web/ directory.
Generate Routes
cd apps/web && bun run generate:routesGenerates TanStack Router route definitions. Automatically run as part of typecheck.
Testing
Run Unit Tests
bun run testRuns Vitest unit tests. By default runs in watch mode.
Run Specific Test
bun run test path/to/test.tsRuns a specific test file.
E2E Tests
bun run test:e2eRuns Playwright end-to-end tests in headless mode.
E2E with UI
cd apps/web && bun run test:e2e:uiOpens Playwright's interactive test UI. Must be run from apps/web/ directory.
E2E Headed
cd apps/web && bun run test:e2e:headedRuns E2E tests in visible browser windows. Must be run from apps/web/ directory.
Setup & Utilities
Initial Setup
bun run setupTip:
This is the recommended way to get started. It handles all the setup steps in one command.
One-time setup script:
- Checks prerequisites
- Installs dependencies
- Creates
.envfrom template - Generates auth secret
- Starts PostgreSQL
- Runs migrations
Install Dependencies
bun installInstalls all project dependencies.
Docker Commands
Start Services
docker compose up -dStarts PostgreSQL and application in background.
View Logs
docker compose logs -fFollow logs from all services.
docker compose logs app --tail 100View last 100 lines from app service.
Stop Services
docker compose downStops and removes containers (preserves volumes).
Reset Everything
docker compose down -vWarning:
This command stops containers and removes volumes, destroying all data. Use only when you want a clean slate.
Rebuild Images
docker compose build --no-cacheRebuilds Docker images from scratch.
Environment Variables
Example
# Copy template
cp .env.example .env
# Generate secret
openssl rand -base64 32Data Import
Import Data
bun run importCLI tool for importing data from other feedback platforms.
Import from UserVoice
bun run import:uservoiceImport data from UserVoice exports.
Generate Sample CSV
bun run db:generate-csvGenerates sample CSV data for testing imports.
AI Features
Backfill AI Data
bun run ai:backfillBackfill AI-generated data (embeddings, sentiment) for existing posts.
Quick Reference
Command | Description |
|---|---|
| Start dev server |
| Production build |
| Run migrations |
| Database browser |
| Seed demo data |
| Reset database |
| Check code quality |
| Run unit tests |
| Run E2E tests |
| Initial setup |
| Import data CLI |
Troubleshooting
Command Not Found
# Ensure Bun is installed
curl -fsSL https://bun.sh/install | bash
# Restart shell or source profile
source ~/.bashrcPermission Denied
# Fix script permissions
chmod +x scripts/*.shPort in Use
# Find process
lsof -i :3000
# Kill it
kill -9 <PID>Next Steps
- Development Setup - Full setup guide
- Environment Variables - Configuration
- Docker Deployment - Production deployment
Was this helpful?
Your feedback shapes what we write next.