Prerequisites

Before installing, ensure your system meets the following requirements:

Note: If you're using Windows, we strongly recommend installing via WSL2 for full compatibility with our DevOps hooks and native build tools.

Installation

Using npm (Recommended)

bash
npm install -g @divisions/cli

Using pnpm

bash
pnpm add -g @divisions/cli

Using yarn

bash
yarn global add @divisions/cli
Permissions: If you encounter permission errors, avoid using sudo. Instead, configure your npm/pnpm global directory as documented in the official package manager guides.

Verification

Confirm the installation by checking the version and running a health check:

bash
divisions --version
# Output: 2.4.0-stable
bash
divisions health-check
# Output: ✓ Node runtime detected
#         ✓ Global bin path resolved
#         ✓ Config directory created at ~/.divisions
#         ✓ Ready for initialization

Initial Configuration

Run the interactive setup wizard to configure your workspace:

$ divisions init
✓ Workspace directory detected: /Users/developer/projects
✓ Generating .env.defaults...
✓ Configuring build pipeline...
✓ Linking to remote registry...
✓ Successfully initialized #divisions v2.4.0
Run divisions dev to start the local environment.
Docs: https://docs.divisions.dev/getting-started

Environment Variables

The CLI automatically generates a .env.defaults file. Copy it to .env.local and update the following:

.env.local
# #divisions Configuration
DIVISIONS_API_KEY=sk_live_...
DIVISIONS_REGION=us-east-1
DIVISIONS_LOG_LEVEL=info

Next Steps