Latest guide — Build-Only + Managed SQL + .env Vault

VibeGit Guide & 5-Step Workflow

Your code stays on your machine & GitHub. The vgit commit command packages both the Build and the SQL files, then pushes them to VibeGit to run live with .env protection and two-tier administration.

Copy this prompt and send it to Antigravity / Claude Code
Follow the standard VibeGit.net workflow (AI writes Code/Build/SQL → VibeGit deploys & operates):
1. Build the app locally; use window.VibeDB.from('table_name') for SQL data and window.VibeDB.proxy(url, ...) for APIs that need secrets (.env).
2. Check the CLI session: .\vgit.cmd whoami (or .\vgit.cmd login --web). If there is a real .env file, load it into the Project's .vault with .\vgit.cmd env push .env.
3. Run .\vgit.cmd commit -m "Build & sync SQL" to build locally and automatically check/generate the .sql file. If there is a build/SQL error, fix it and re-run until it passes.
4. Run .\vgit.cmd push to upload the Build + SQL package to the Project on VibeGit (0% server CPU).
5. Confirm the 🟢 RUNNING (HTTP 200 OK) status and send me the Project link and the live app link.
STEP 01

Sync from your AI Agent command line (CMD) & create a Project

Antigravity / Claude / Cursor CMD

Users work mainly inside a Project. Each Project holds everything: Build files, the SQL files that create the database, the .vault (encrypted .env), Logs and Domains.

  • Sign up / sign in at /auth?tab=register or /auth?tab=login
  • Go to Workspace → Projects (/workspace/projects) and click "+ New Project" (enter a project name & framework)
  • The system provisions a dedicated database schema (vgit_<user>_<project>) and a .vibegit.app subdomain
# Or create the Project straight from your local machine with the CLI:
$ .\vgit.cmd login --web
$ .\vgit.cmd init <user> my-project . --ai
STEP 02

Let AI write the Code, Build & SQL database files

AI IDE (Cursor / Claude / Antigravity)

AI writes the code, runs the build on your local machine and creates the .sql files that define your tables. No need to install PostgreSQL or set up complex Docker configs.

  • Read/write the database from the frontend via the auto-injected SDK: window.VibeDB.from("table_name").select() / insert() / delete()
  • Write your own schema.sql, or let vgit commit scan your code and generate vibegit_auto_schema.sql
  • Run npm run build on your local machine (0% server CPU)
// Save & read SQL data from the app (automatically connected to the Project's schema)
const products = await window.VibeDB.from('products').select();
await window.VibeDB.from('orders').insert({ id: 'ORD-01', total: 250000 });
STEP 03

Secure API keys in the .vault (AES-256-GCM)

Zero-Leak .vault

Never expose API keys (OpenAI, Gemini, VietQR, Supabase...) in frontend code. Put every key into the Project's .vault, encrypted with AES-256-GCM.

  • Load .env into the .vault with the CLI: .\vgit.cmd env push .env, or enter keys directly in Project → .vault
  • Call third-party APIs through the Server Proxy: window.VibeDB.proxy(url, { headers: { Authorization: "Bearer {{KEY}}" } })
  • The server decrypts keys from the .vault when calling the target API and blocks SSRF
$ .\vgit.cmd env set OPENAI_API_KEY=sk-proj-...

// In frontend code (the key is never exposed to the browser):
const res = await window.VibeDB.proxy('https://api.openai.com/v1/chat/completions', {
  method: 'POST',
  headers: { Authorization: 'Bearer {{OPENAI_API_KEY}}' },
  body: { model: 'gpt-4o-mini', messages: [{ role: 'user', content: 'Hello' }] }
});
STEP 04

Package (vgit commit) & deploy instantly (vgit push)

1-Step Deploy

vgit commit packages both the Build Artifact and the SQL files; vgit push sends them to VibeGit to run live immediately (or drag & drop a folder/ZIP at /deploy).

  • vgit commit: runs the local build + checks/generates SQL files + blocks dangerous DROP/TRUNCATE + VibeScore security scan
  • vgit push: uploads the Build + automatic DB backup + safe SQL migrations (SHA-256 tracking)
  • Or use the web UI at /deploy: drag & drop your dist/ folder or a .zip file to run it right away, no commands needed
$ .\vgit.cmd commit -m "Build app & sync SQL"
✓ [vgit commit #9acb4b4] Build & SQL Preflight OK (149.9 KB)

$ .\vgit.cmd push
✓ Deployed successfully (0% build CPU on the server)!
  • Auto domain      : https://my-project-c794eb.vibegit.app
  • SQL schema       : vgit_<user>_my_project (5 tables)
  • Run status       : 🟢 RUNNING (HTTP 200 OK)
STEP 05

Operate your Project, Database, Domains & archive source in a Repo

Operations & Safekeeping

Follow deploy logs, manage custom domains with SSL, back up/restore the database in one click right in the Project, and archive your original source code in a Repo when needed.

  • Project (/workspace/projects/<slug>): view Build files, SQL database, .vault, deploy logs and attach custom domains
  • Instant recovery: .\vgit.cmd rollback (return to a previous build) or one-click DB Backup restore at /database
  • Repo tab (/workspace/repositories): store your original source code Git-style (git push ... .git) when you want a source backup
# Check history & restore a previous version:
$ .\vgit.cmd history
$ .\vgit.cmd rollback

# Archive the original source code in a Repo (optional):
$ git push https://vibegit.net/<user>/my-project.git main

Quick reference: `vgit` commands & admin pages

Use `.\vgit.cmd` on Windows or `node scripts/vgit-cli.mjs`.

vgit login --web / --token <tk>Sign in via the browser or a CI token; the session is saved permanently.
vgit init <user> <app> <dir> --ai --ciInitialize a workspace (+ creates .cursorrules with --ai, GitHub Actions with --ci).
vgit env set K=V / vgit env push .envEncrypt with AES-256-GCM and push real environment variables to the VibeGit Vault.
vgit commit -m "<msg>" [--force-sql]Local build + generates vibegit_auto_schema.sql if missing + SQL Safety Guard.
vgit pushUpload the build + run SQL migrations (automatic DB backup) + check for HTTP 200 OK.
vgit history / vgit rollback [id]List the 5 most recent artifact snapshots and restore an older one in 1 second.
Automated playbook: CLAUDE.md & .agent/skills/vibegit-deploy/SKILL.mdKeeps 5 code snapshots & 5 pre-migration DB backups per app
VibeGit.net — Free Git sync & app deploys for Vibecoders