DEVELOPER
ForLoop CLI
Command-line interface for managing spaces, stories, files, and AI agents from your terminal.
ForLoop CLI
Overview
The ForLoop CLI (forloop) is a command-line tool that lets you interact with the ForLoop AI development platform directly from your terminal. Manage sprints, stories, files, AI agents, organizations, and more — without switching to the web browser.
Installation
Prerequisites
- Node.js 18 or later
- npm (comes with Node.js)
- A ForLoop API token with scopes:
sprint:read,sprint:write,story:read,story:write,agent:query,profile:read
Install via npm
npm install -g @forloop-cc/forloop-cli
Install via curl
curl -fsSL https://raw.githubusercontent.com/forloop-cc/forloop-cli/main/install.sh | bash
Verify the installation:
forloop --version
Authentication
Create an API token
- Go to Profile → API Tokens
- Click Create Token and select the required scopes
- Copy the token (starts with
floop_)
Login
forloop auth login --api-key floop_xxxxxxxxxxxx
The token is saved to ~/.config/forloop/tokens.json with secure permissions (600).
Check status
forloop auth status
Logout
forloop auth logout
Environment variable (CI/CD)
export FORLOOP_API_KEY=floop_xxxxxxxxxxxx forloop space-sprint list
Command Reference
All commands follow the pattern forloop <resource> <action> [options].
Sprint Management
| Command | Description |
|---|---|
forloop space-sprint list | List all accessible sprints |
forloop space-sprint get | Get sprint details with stories and files |
forloop space-sprint create | Create a new sprint |
forloop space-sprint update | Update sprint details |
forloop space-sprint delete | Delete a sprint |
Options:
--id <number>— Sprint ID--title <text>— Sprint title--start-date <YYYY-MM-DD>— Start date--end-date <YYYY-MM-DD>— End date--description <text>— Description--private— Make sprint private--org-id <number>— Filter by organization--no-stories— Exclude stories from result--no-files— Exclude files from result--output json— Output as JSON
Examples:
# List all sprints forloop space-sprint list # Get details of a specific sprint forloop space-sprint get --id 42 # Create a new sprint forloop space-sprint create \ --title "Q3 Feature Release" \ --start-date 2026-07-01 \ --end-date 2026-09-30 \ --description "Building the new analytics dashboard" # Update a sprint forloop space-sprint update --id 42 --title "Updated Title" # Delete a sprint (requires confirmation) forloop space-sprint delete --id 42 --confirm "DELETE: Q3 Feature Release"
Story Management
| Command | Description |
|---|---|
forloop story create | Create a story (task or note) |
forloop story get | Get story details with comments |
forloop story update | Update story fields |
forloop story delete | Delete a story |
Options:
--title <text>— Story title (required)--sprint <number>— Sprint ID (required)--type basic-task|basic-note— Story type--description <text>— Description--priority low|medium|high|critical— Priority level--points <number>— Story points estimate--assignee-agent <key>— Assign to an AI agent--status todo|in_progress|done— Update status
Examples:
# Create a task forloop story create \ --title "Implement user login" \ --sprint 42 \ --type basic-task \ --priority high \ --points 8 # Create a note forloop story create \ --title "Architecture decision: database choice" \ --sprint 42 \ --type basic-note \ --description "Weighing PostgreSQL vs DynamoDB for the analytics pipeline" # Update story status forloop story update --id 99 --status in_progress
AI Agent Commands
| Command | Description |
|---|---|
forloop agent history | View conversation history with AI agents |
forloop agent developer-sprint | Trigger AI developer agent to implement sprint stories |
forloop agent developer-status | Check status of a running developer task |
Examples:
# Trigger developer agent to build sprint stories forloop agent developer-sprint \ --sprint 42 \ --message "Build all in_progress stories for this sprint" # Check developer task status forloop agent developer-status --sprint 42 # View AI agent conversation history forloop agent history --sprint 42
File Management
| Command | Description |
|---|---|
forloop file upload | Upload a file to sprint S3 storage |
forloop file list | List files in a sprint |
forloop file download | Get a download URL for a file |
forloop file delete | Delete a file |
Examples:
# Upload a file forloop file upload \ --path ./design-mockup.png \ --sprint 42 \ --description "Updated homepage design" # List all files in a sprint forloop file list --sprint 42 # Get a download URL forloop file download --id 15
Sync Commands
Sync files between your local machine and sprint S3 storage.
| Command | Description |
|---|---|
forloop sync s3-to-local | Download sprint files to ~/.forloop/ |
forloop sync local-to-s3 | Upload a local file to sprint S3 |
forloop sync aivy-folder | Ensure a document folder exists for file sync |
forloop sync aivy-doc-get | Get the document folder story ID |
Directory structure after sync:
~/.forloop/sprint-{id}/
├── knowledge/ # Sprint context files
├── plan/ # Planning documents
└── task/ # Task-specific files
Examples:
# Download all sprint files to local forloop sync s3-to-local --sprint 42 # Upload a local file to sprint storage forloop sync local-to-s3 \ --path ~/.forloop/sprint-42/plan/roadmap.md \ --sprint 42 \ --folder plan
Organization & User Management
| Command | Description |
|---|---|
forloop user profile | View your profile |
forloop user quotas | Check your quota limits and usage |
forloop org list | List organizations |
forloop org get | Get organization details |
forloop org create | Create a new organization |
forloop org quotas | Get organization quota usage |
Examples:
# View your profile forloop user profile # Check quotas forloop user quotas # List your organizations forloop org list --owned-only
File Sync Workflow
A typical workflow combining local editing with sprint storage:
# 1. Download everything from the sprint forloop sync s3-to-local --sprint 42 # 2. Edit files locally in ~/.forloop/sprint-42/ vim ~/.forloop/sprint-42/plan/roadmap.md # 3. Upload changes back to sprint forloop sync local-to-s3 \ --path ~/.forloop/sprint-42/plan/roadmap.md \ --sprint 42 \ --folder plan
CI/CD Automation
Use the CLI in shell scripts and CI pipelines:
#!/bin/bash export FORLOOP_API_KEY="$FORLOOP_TOKEN" # Check if developer agent is still running STATUS=$(forloop agent developer-status --sprint 42 --output json | jq -r '.status') if [ "$STATUS" = "completed" ]; then echo "Sprint 42 build completed!" # Download build artifacts forloop sync s3-to-local --sprint 42 # Trigger next stage npm run deploy fi
Error Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Invalid usage / missing arguments |
| 3 | Authentication failure |
| 4 | Quota exceeded |
| 5 | Request timeout |
| 6 | Network error |
| 7 | API error |
| 10 | Content filtered |
| 130 | Interrupted (Ctrl+C) |
Configuration
Config resolution priority
- Environment variables (
FORLOOP_API_KEY,FORLOOP_API_URL) - Project-level
./opencode.json(under"forloop"key) - Global
~/.config/opencode/config.json - Default:
https://api.forloop.cc
Project config example (./opencode.json)
{ "forloop": { "apiUrl": "https://api.forloop.cc", "debug": true } }
Updating
npm update -g @forloop-cc/forloop-cli
Or use the update script:
curl -fsSL https://raw.githubusercontent.com/forloop-cc/forloop-cli/main/install.sh | bash
Next Steps
- Planner Plugin — Full opencode integration for AI-assisted development
- Sprint Room Guide — Understand the sprint board interface
- API Reference — Direct REST API access