Quickstart
This guide walks you through installing the @git/cli toolkit, initializing a new project, and deploying to our global edge network.
Prerequisites: Node.js 18+ and Git must be installed on your machine. A free .git account is required for deployment.
1. Install the CLI
The @git/cli package provides everything you need to initialize, build, and deploy projects directly from your terminal.
$ npm i -g @git/cli
added 142 packages in 3.2s
$ git --version
.git CLI v2.4.1 (node-v18.17)
2. Initialize a New Project
Use the interactive init wizard to scaffold a new project or convert an existing repository.
$ git init my-app
✔ Detected framework: Next.js 14 (App Router)
✔ Created .git/config.yml
✔ Set up edge caching rules
✔ Ready to deploy.
Auto-detection: The CLI automatically identifies your framework, sets up build commands, and configures output directories. No manual setup required.
3. Authenticate
Link your local CLI to your .git account using SSO or OAuth.
$ git auth login
Opening browser for OAuth...
✓ Authenticated as dev@yourteam.com
✓ Token cached securely
4. Deploy to Production
Push your code and trigger a deployment with a single command. Preview URLs are generated automatically for non-main branches.
$ git deploy --prod
Building project... (12s)
Running tests... (4s)
Uploading assets to edge network...
✓ Deployed successfully
→ https://my-app.git.dev
→ Rollback: git rollback --last
Next Steps
-
Configure Environments
Learn how to manage dev, staging, and production variables with
.env.*files and secret vaults. -
Set Up CI/CD Workflows
Automate deployments on push, PR creation, or schedule. Configure rollbacks and canary releases.
-
Explore Edge Functions
Run serverless logic at the edge with our V8-isolated runtime. Low latency, global scale.
Production Safety: Always run git deploy --dry-run before pushing to production. Enable branch protection rules in your project settings.