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.
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.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.
# Or create the Project straight from your local machine with the CLI: $ .\vgit.cmd login --web $ .\vgit.cmd init <user> my-project . --ai
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.
// 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 });Never expose API keys (OpenAI, Gemini, VietQR, Supabase...) in frontend code. Put every key into the Project's .vault, encrypted with AES-256-GCM.
$ .\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' }] }
});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.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)
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.
# 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
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.