Getting Started
Learn how to set up your environment, create your first project, and deploy to production in under 5 minutes.
Introduction
Welcome to #divisions. This guide will walk you through the essentials of initializing a project, configuring your workspace, and deploying your first application. Whether you're a solo developer or part of a large engineering team, our streamlined workflow ensures rapid iteration and reliable deployments.
Prerequisites
Before diving in, ensure your development environment meets the following requirements:
- Node.js
v18+or Python3.10+ - A modern package manager (npm, yarn, pnpm, or pip)
- Git installed and configured
- An active #divisions account (free tier available)
Create Your Account & API Key
Sign up at dashboard.divisions.dev and navigate to the Settings → API Keys section. Generate a new key with read:deploy and write:projects scopes.
Install the #divisions CLI
Our command-line interface handles scaffolding, local development, and deployment. Install it globally using your preferred package manager:
npm install -g @divisions/cli
# or
yarn global add @divisions/cli
# or
pip install divisions-cli
Verify the installation by running:
divisions --version
# Expected output: divisions-cli/v2.4.1 (stable)
Initialize Your First Project
Run the interactive scaffolding command to generate a boilerplate project with best practices pre-configured:
mkdir my-app && cd my-app
divisions init --template nextjs --auth supabase
The CLI will prompt you for project metadata, region selection, and initial repository setup. Answer the prompts, and the tool will generate your file structure, install dependencies, and configure environment variables automatically.
Run Locally
Start the local development server with hot-reloading enabled. The CLI automatically proxies API requests to your mocked endpoints.
divisions dev
# ➜ Server running at http://localhost:3000
# ➜ Dashboard: http://localhost:3000/__divisions
Open your browser to the provided URL. Make changes to your code and watch them reflect instantly. The local environment mirrors production exactly, ensuring zero-surprise deployments.
Deploy to Production
When you're ready to go live, push your code and trigger a deployment. #divisions handles builds, SSL, edge caching, and global CDN distribution automatically.
divisions deploy --env production
# ✅ Build successful (14.2s)
# ✅ Deployed to https://my-app.divisions.app
# 📊 Monitoring: dashboard.divisions.app/projects/my-app
Your application is now live with a globally distributed edge network, automatic HTTPS, and zero-config load balancing.
Troubleshooting
Running into issues? Here are the most common solutions:
- Authentication failed: Verify your API key is set in
~/.divisions/config.jsonor exported asDIVISIONS_API_KEY. - Port already in use: Run
divisions dev --port 3001to specify a custom port. - Build timeouts: Check your
divisions.config.jsfor heavy synchronous operations. Consider using--experimental-parallel-builds.
Next Steps
You've successfully deployed your first project. Here's what to explore next: