Installation
Get #divisions CLI up and running in your environment. Follow the steps below to configure your local development workflow.
Prerequisites
Before installing, ensure your system meets the following requirements:
- Node.js v18.17 or higher
- Package Manager: npm v9+, yarn v1.22+, or pnpm v8+
- OS: macOS 12+, Ubuntu 20.04+, Windows 10/11 (WSL2 recommended)
- Storage: ~150 MB free space
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:
✓ Generating .env.defaults...
✓ Configuring build pipeline...
✓ Linking to remote registry...
✓ Successfully initialized #divisions v2.4.0
/Users/developer/projects✓ Generating .env.defaults...
✓ Configuring build pipeline...
✓ Linking to remote registry...
✓ Successfully initialized #divisions v2.4.0
Run
Docs: https://docs.divisions.dev/getting-started
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