BISO Sites

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=admin

Ports:

  • 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:appwrite

Force Rebuild

# Force rebuild (ignore cache)
bun run build --force --filter=web

Quality & Testing

Type Checking

# Check types across all packages
bun run check-types

# Check specific app
cd apps/web
bun run check-types

Linting

# Lint all packages
bun run lint

# Lint specific app
cd apps/web
bun run lint

# Auto-fix linting issues
cd apps/web
bunx eslint . --fix

Formatting

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

Adding 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-name

Removing Dependencies

cd apps/web
bun remove package-name

Updating Dependencies

# Update all dependencies
bun update

# Update specific package
bun update package-name

Git 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 pop

Viewing History

# View commit log
git log
git log --oneline
git log --graph --all

# View changes
git diff
git diff HEAD~1

Turbo Commands

Cache Management

# Clear Turbo cache
bunx turbo clean

# Run with cache
bun run build  # Automatically uses cache

# Run without cache
bun run build --force

Task Execution

# Run task in all packages
bunx turbo lint

# Run task in specific package
bunx turbo lint --filter=web

# Parallel execution
bunx turbo dev

Next.js Commands

Development

cd apps/web

# Start dev server
bunx next dev

# Custom port
bunx next dev -p 3050

# Turbopack (faster)
bunx next dev --turbo

Building

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 build

Starting Production Server

cd apps/web

# Build first
bunx next build

# Start production server
bunx next start

# Custom port
bunx next start -p 3000

Linting

cd apps/web

# Lint with Next.js
bunx next lint

# Fix issues
bunx next lint --fix

Database (Appwrite CLI)

Setup

# Install Appwrite CLI
npm install -g appwrite-cli

# Login
appwrite login

# Init project
appwrite init project

Database 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 listBuckets

Docker 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-web

Docker 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 --build

Utility 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/src

Process Management

# Find process on port
lsof -ti:3000

# Kill process
kill -9 $(lsof -ti:3000)

# View running processes
ps aux | grep node

Clean 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 .turbo

Keyboard Shortcuts (VS Code)

File Navigation

  • Cmd+P - Quick file open
  • Cmd+Shift+O - Go to symbol
  • Cmd+T - Go to symbol in workspace
  • Cmd+Click - Go to definition

Editing

  • Cmd+D - Select next occurrence
  • Cmd+Shift+L - Select all occurrences
  • Alt+Up/Down - Move line up/down
  • Cmd+/ - Toggle comment
  • Cmd+Shift+F - Find in files

Terminal

  • Ctrl+ ` - Toggle terminal
  • Cmd+Shift+5 - Split terminal
  • Cmd+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 dev

Production

NODE_ENV=production bun run build
NODE_ENV=production bun run start

Testing

NODE_ENV=test bun test

Aliases & 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

TaskCommand
Start devbun run dev
Build allbun run build
Type checkbun run check-types
Lintbun run lint
Formatbun run format
Install depsbun install
Add packagecd app && bun add pkg
Commitgit commit -m "type(scope): msg"
Pushgit push origin branch
💡
Pro Tip

Create a Makefile in the root with common commands for even faster access!

Next Steps