CLI Services
Git fundamentals, Supabase CLI, Vercel CLI, and development workflows for building full-stack applications.
CLI Services
Keep this page open while you work. It shows the daily loop and deeper commands when you need them.
Daily Workflow
git pull
supabase db diff # if schema changed
npm run dev # or vercel dev
# build feature with Cursor
git add .
git commit -m "feat: ..."
git push
vercel --prod # when ready for prodGit Essentials
Core Commands
| Command | Purpose |
git pull | Sync before you touch code |
git status | Check what changed |
git add . | Stage all changes |
git commit -m "..." | Save grouped work |
git push | Share with GitHub / trigger Vercel |
Common Fixes
| Situation | Command |
| Merge conflict | git pull, resolve files, git add ., git commit |
| Undo uncommitted file | git restore path/to/file |
| Fix last commit message | git commit --amend -m "new message" |
Supabase CLI
Setup
supabase login
supabase link --project-ref <ref>Common Commands
| Command | Purpose |
supabase migration new <name> | Scaffold SQL file |
supabase db push | Apply migrations to remote |
supabase db pull | Sync remote schema back to files |
supabase db diff | Compare local vs. remote (requires Docker) |
supabase db shell | Run ad-hoc SQL queries |
Quick Migration Workflow
supabase migration new add_tasks_table
# edit the generated SQL
supabase db push
git add supabase/migrations
git commit -m "Add tasks table"<details>
<summary>Local development commands</summary>
```bash
supabase start # spins up local stack (needs Docker)
supabase db reset # apply migrations locally
supabase stop # shut down local services
```
</details>Vercel CLI
Setup
npm install -g vercel
vercel loginCommon Commands
| Command | Purpose |
vercel | Link project + deploy preview |
vercel --prod | Push to production manually |
vercel dev | Run Next.js locally with Vercel settings |
vercel logs <url> | View production/runtime errors |
Cursor IDE Tips
Keyboard Shortcuts
| Shortcut | Action |
Cmd/Ctrl + `` | Open terminal |
Cmd/Ctrl + K | Inline chat |
Cmd/Ctrl + L | Side panel chat |
Cmd/Ctrl + Shift + P | Command palette |
Working with AI Code
- Read the diff before accepting
- Reject if off-track
- Re-prompt with clarifications or paste existing context
Open Project from Terminal
cursor .Practice Loop
Test your setup with this sequence:
git pullsupabase migration new add_example- Add a column in the SQL file
supabase db pushgit add supabase/migrationsgit commit -m "Add example column"git pushvercel --prod
If any step fails, capture the error and check Troubleshooting.
Want to deploy to your own server? See Self-Hosting 101.
Back to the main workflow? Return to Build with AI Flow.