Getting Started v2.4

Set up your environment, install the CLI, and deploy your first project in under 5 minutes.

💡 Prerequisites

Before you begin, ensure you have Node.js 18+, Git, and an active .git account installed and configured.

1. Install the CLI

The .git command-line interface gives you full control over projects, deployments, and environments. Install it globally using your preferred package manager:

bash
npm install -g @git/cli # or using brew brew install git-tap/cli # or using pnpm pnpm add -g @git/cli

Verify the installation:

bash
git --version # Output: .git CLI v2.4.1 (darwin-arm64)

2. Authenticate

Connect the CLI to your .git account using OAuth. This creates a secure token in your shell environment.

bash
git auth login # Opens browser for OAuth flow... # ✓ Authenticated as developer@yourorg.git.dev
⚠️ Workspace Tokens

For CI/CD pipelines, use git auth token to generate a non-expiring workspace token. Never commit tokens to version control.

3. Initialize Your Project

Navigate to your repository root and run git init. The CLI will detect your framework, generate a .gitconfig.json, and prepare your deployment pipeline.

bash
cd my-awesome-app git init # ✓ Detected framework: Next.js 14 # ✓ Generated .gitconfig.json # ✓ Created initial deployment rules

Configuration File

The CLI generates a .gitconfig.json at your project root. Here's a minimal example:

json
{ "name": "my-awesome-app", "engine": "node", "env": "18", "build": { "command": "npm run build", "output": ".next" }, "deploy": { "regions": ["us-east-1", "eu-west-1"], "auto_preview": true } }

4. Deploy

Push to any branch to trigger a preview deployment, or explicitly deploy to production:

bash
# Deploy current branch to preview git deploy --preview # ✓ Building... # ✓ Deployed to https://feat-login.my-app.git.dev # Promote to production git deploy --prod # ✓ Rolling out to us-east-1, eu-west-1... # ✓ Live at https://my-app.git.dev

What's Next?

You're up and running! Explore these guides to master the platform: