Commands Reference
Complete reference of all CLI commands for BISO Sites.
Commands Reference
Complete reference of all CLI commands used in BISO Sites development.
Development
Start Development Servers
# All applications
bun run dev
# Specific application
bun run dev --filter=web
bun run dev --filter=admin
bun run dev --filter=docs
# Multiple applications
bun run dev --filter=web --filter=adminPorts:
- Web:
http://localhost:3000 - Admin:
http://localhost:3001 - Docs:
http://localhost:3002
Building
Production Builds
# Build all applications
bun run build
# Build specific application
bun run build --filter=web
# Build for Appwrite deployment
cd apps/web
bun run build:appwriteForce Rebuild
# Force rebuild (ignore cache)
bun run build --force --filter=webQuality & Testing
Type Checking
# Check types across all packages
bun run check-types
# Check specific app
cd apps/web
bun run check-typesLinting
# Lint all packages
bun run lint
# Lint specific app
cd apps/web
bun run lint
# Auto-fix linting issues
cd apps/web
bunx eslint . --fixFormatting
# Format all files
bun run format
# Check formatting (no changes)
bunx prettier --check "**/*.{ts,tsx,md}"
# Format specific directory
bunx prettier --write "apps/web/src/**/*.{ts,tsx}"Package Management
Installing Dependencies
# Install all dependencies
bun install
# Clean install
rm -rf node_modules apps/*/node_modules packages/*/node_modules bun.lock
bun installAdding Dependencies
# Add to specific app
cd apps/web
bun add package-name
# Add dev dependency
cd apps/web
bun add -D package-name
# Add to package
cd packages/ui
bun add package-name
# Add to workspace root (use sparingly)
bun add -w package-nameRemoving Dependencies
cd apps/web
bun remove package-nameUpdating Dependencies
# Update all dependencies
bun update
# Update specific package
bun update package-nameGit Commands
Common Workflow
# Create feature branch
git checkout -b feat/feature-name
# Stage changes
git add .
git add path/to/file
# Commit with conventional commit message
git commit -m "feat(web): add new feature"
git commit -m "fix(admin): correct bug"
# Push branch
git push origin feat/feature-name
# Pull latest changes
git pull origin main
# Stash changes
git stash
git stash popViewing History
# View commit log
git log
git log --oneline
git log --graph --all
# View changes
git diff
git diff HEAD~1Turbo Commands
Cache Management
# Clear Turbo cache
bunx turbo clean
# Run with cache
bun run build # Automatically uses cache
# Run without cache
bun run build --forceTask Execution
# Run task in all packages
bunx turbo lint
# Run task in specific package
bunx turbo lint --filter=web
# Parallel execution
bunx turbo devNext.js Commands
Development
cd apps/web
# Start dev server
bunx next dev
# Custom port
bunx next dev -p 3050
# Turbopack (faster)
bunx next dev --turboBuilding
cd apps/web
# Build for production
bunx next build
# Build with type generation
bunx next build --typegen-only
# Analyze bundle size
ANALYZE=true bunx next buildStarting Production Server
cd apps/web
# Build first
bunx next build
# Start production server
bunx next start
# Custom port
bunx next start -p 3000Linting
cd apps/web
# Lint with Next.js
bunx next lint
# Fix issues
bunx next lint --fixDatabase (Appwrite CLI)
Setup
# Install Appwrite CLI
npm install -g appwrite-cli
# Login
appwrite login
# Init project
appwrite init projectDatabase Operations
# Deploy database schema
cd apps/web
appwrite deploy collection
# Create collection
appwrite databases createCollection
# List collections
appwrite databases listCollections --databaseId=<id>Storage
# Create bucket
appwrite storage createBucket
# List buckets
appwrite storage listBucketsDocker Commands
Building Images
# Build web app
cd apps/web
docker build -t biso-web .
# Build admin app
cd apps/admin
docker build -t biso-admin .Running Containers
# Run web app
docker run -p 3000:3000 biso-web
# Run with env file
docker run --env-file .env.local -p 3000:3000 biso-webDocker Compose
# Start all services
docker-compose up
# Start in background
docker-compose up -d
# Stop services
docker-compose down
# Rebuild and start
docker-compose up --buildUtility Commands
File Operations
# Find files
find apps/web -name "*.tsx"
# Count lines of code
find apps packages -name "*.ts" -o -name "*.tsx" | xargs wc -l
# Search in files
grep -r "searchterm" apps/web/srcProcess Management
# Find process on port
lsof -ti:3000
# Kill process
kill -9 $(lsof -ti:3000)
# View running processes
ps aux | grep nodeClean Up
# Remove node_modules
rm -rf node_modules apps/*/node_modules packages/*/node_modules
# Remove build artifacts
rm -rf apps/*/.next packages/*/dist
# Remove cache
rm -rf apps/*/.turbo .turboKeyboard Shortcuts (VS Code)
File Navigation
Cmd+P- Quick file openCmd+Shift+O- Go to symbolCmd+T- Go to symbol in workspaceCmd+Click- Go to definition
Editing
Cmd+D- Select next occurrenceCmd+Shift+L- Select all occurrencesAlt+Up/Down- Move line up/downCmd+/- Toggle commentCmd+Shift+F- Find in files
Terminal
Ctrl+` - Toggle terminalCmd+Shift+5- Split terminalCmd+K- Clear terminal
Scripts in package.json
Root (package.json)
{
"scripts": {
"build": "turbo run build",
"dev": "turbo run dev",
"lint": "turbo run lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"check-types": "turbo run check-types"
}
}App-Level (apps/web/package.json)
{
"scripts": {
"dev": "next dev -p 3000",
"build": "next build",
"build:appwrite": "DISABLE_MINIFY=1 NODE_OPTIONS=--max-old-space-size=4096 next build",
"start": "next start",
"lint": "next lint",
"check-types": "next typegen && tsc --noEmit"
}
}Environment-Specific Commands
Development
NODE_ENV=development bun run devProduction
NODE_ENV=production bun run build
NODE_ENV=production bun run startTesting
NODE_ENV=test bun testAliases & Shortcuts
Add to your .bashrc or .zshrc:
# BISO Sites aliases
alias bd="cd ~/Development/biso-sites && bun run dev"
alias bb="bun run build"
alias bl="bun run lint"
alias bf="bun run format"
alias bt="bun run check-types"
# Quick navigation
alias web="cd ~/Development/biso-sites/apps/web"
alias admin="cd ~/Development/biso-sites/apps/admin"
alias docs="cd ~/Development/biso-sites/apps/docs"
# Git shortcuts
alias gs="git status"
alias ga="git add ."
alias gc="git commit -m"
alias gp="git push"
alias gl="git pull"Quick Reference
| Task | Command |
|---|---|
| Start dev | bun run dev |
| Build all | bun run build |
| Type check | bun run check-types |
| Lint | bun run lint |
| Format | bun run format |
| Install deps | bun install |
| Add package | cd app && bun add pkg |
| Commit | git commit -m "type(scope): msg" |
| Push | git push origin branch |
💡
Pro Tip
Create a Makefile in the root with common commands for even faster access!
Next Steps
- Development Workflow - Daily development practices
- Troubleshooting - Common issues and solutions
- Contributing - How to contribute
