Get Started with Factory CLI

From installation to your first AI-powered project in just a few minutes

🎁 20 Million Free Tokens

No credit card required β€’ Start building immediately

Quick Start in 4 Steps

Get up and running with Factory CLI in under 5 minutes

1

Create Your Account

🎁 Special Invitation Link

Use our exclusive invitation link to get 20 million free tokens (worth $200+)

πŸš€ Sign Up with Free Tokens
🎁

Important: Make sure to use the invitation link above to receive your free tokens. Regular registration won't include the bonus.

2

Install Factory CLI

🍎

macOS / Linux

# Using curl
curl -fsSL https://cli.factory.ai/install.sh | sh
πŸͺŸ

Windows

# Using PowerShell
iwr https://cli.factory.ai/install.ps1 | iex
πŸ“¦

npm

# Global installation
npm install -g @factory/cli
Verify Installation
$ factory --version
Factory CLI v2.1.0
3

Configure Authentication

Login to Your Account

$ factory auth login
🌐 Opening browser for authentication...
βœ… Successfully authenticated!
🎁 Available tokens: 20,000,000

This will open your browser to complete the OAuth flow with your Factory account.

Alternative: You can also set your API key manually using factory auth set-key YOUR_API_KEY

4

Create Your First Project

Initialize a New Project

$ mkdir my-ai-project && cd my-ai-project
$ factory init
πŸ” Analyzing project structure...
πŸ“ Creating .factory/config.yml
πŸ€– Setting up AI assistants...
βœ… Project initialized successfully!

Start Your First AI Conversation

$ factory chat "Create a simple REST API with user authentication"
πŸ€– Factory AI:
I'll help you create a REST API with user authentication.
Let me analyze your project structure first...
πŸ“ Creating files:
β”œβ”€β”€ src/app.js
β”œβ”€β”€ src/routes/auth.js
β”œβ”€β”€ src/middleware/auth.js
└── package.json

Use Specialized Droids

$ factory droid security --scan
πŸ”’ Security Droid analyzing code...
⚠️ Found 2 potential security issues:
1. Missing rate limiting on auth endpoints
2. JWT secret should be in environment variables
βœ… Fixes applied automatically!

Essential Commands

Master these commands to get the most out of Factory CLI

πŸš€ Basic Commands

factory chat "your request"

Start an AI conversation for any development task

factory analyze

Analyze your codebase structure and patterns

factory generate component UserProfile

Generate code components with AI assistance

πŸ€– Droid Commands

factory droid review

Run automated code review with suggestions

factory droid security --scan

Perform comprehensive security analysis

factory droid test --generate

Generate intelligent test cases

πŸ“ Project Management

factory status

Check project status and token usage

factory history

View conversation and change history

factory config --show

Display current configuration settings

⚑ Advanced Features

factory workflow create deploy-pipeline

Create custom AI-powered workflows

factory integrate github

Integrate with external tools and services

factory export --format markdown

Export conversations and documentation

πŸ’‘ Best Practices

Tips to maximize your productivity with Factory CLI

Be Specific in Requests

Provide clear, detailed descriptions of what you want to achieve. Include context about your project, tech stack, and requirements.

Use Droids for Specialized Tasks

Leverage specialized droids for specific tasks like security scanning, code review, or documentation generation.

Review AI Suggestions

Always review and test AI-generated code. While highly accurate, it's important to understand and validate the suggestions.

Iterate and Refine

Don't hesitate to ask follow-up questions or request modifications. Factory CLI learns from your feedback and improves over time.

Monitor Token Usage

Keep track of your token consumption with factory status to optimize usage and plan upgrades.

Integrate with CI/CD

Set up Factory CLI in your CI/CD pipeline for automated code review, testing, and documentation updates.

Ready to Build Something Amazing?

You're all set! Start building with AI-powered development tools

πŸ“š Learn More

Explore advanced features and specialized droids

πŸ’° Check Pricing

View plans and pricing for continued usage

🀝 Get Support

Join our community and get help when needed