daviddozie/forjex
Forjex is a command-line tool that helps developers generate new repositories, automate setups, and streamline project creation. It's designed to eliminate boilerplate and automate repetitive tasks, letting you focus on what truly matters building great software.
Forjex CLI
The Modern CLI for Instant Project Scaffolding
Generate, configure, and deploy your next project in seconds.
๐ Features
- ๐ฏ One Command Setup - Create GitHub repos, add CI/CD, and deploy to Vercel with a single command
- ๐ค Smart Commit Messages - Generates smart commit messages that describe your changes accurately
- โก Lightning Fast - Optimized workflows that save you hours of manual configuration
- ๐ Auto-Deployment - Push to GitHub and watch your changes deploy automatically to Vercel
- ๐ ๏ธ Multi-Framework Support - Works with Next.js, React, Vue, Python, Go, Rust, and more
- ๐ฆ Package Manager Agnostic - Works seamlessly with npm, yarn, pnpm, and bun
- ๐ Secure Authentication - GitHub OAuth device flow - no tokens to manage
๐ฆ Installation
Install Forjex globally using your preferred package manager:
# npm
npm install -g forjex
# yarn
yarn global add forjex
# pnpm
pnpm add -g forjex
# bun
bun add -g forjex๐ฏ Quick Start
Navigate to your project directory and run:
forjex forgeThat's it! Forjex will guide you through:
- Authenticating with GitHub (browser-based OAuth)
- Creating or selecting a repository
- Setting up CI/CD pipeline (GitHub Actions)
- Deploying to Vercel (optional)
๐ Usage
Basic Command
forjex forgeInteractive Options
When you run forjex forge, you'll be prompted to choose:
- โจ Create a new GitHub repository - Start fresh with a new repo
- ๐ Push to an existing GitHub repository - Use an existing repo
- โ๏ธ Add CI/CD pipeline (GitHub Actions) - Automated testing and building
- ๐ Deploy to Vercel - Instant deployment with auto-deploy on push
You can select any combination of these options!
๐ง How It Works
1. GitHub Repository Setup
Forjex automatically:
- Creates a new GitHub repository (or connects to existing)
- Initializes git in your local directory
- Adds all your files
- Generates smart commit messages by analyzing your code changes
- Pushes to GitHub
Example commit messages generated by Forjex:
feat: add Button and Modal components to navbar.tsx
fix: update authentication logic in auth.ts
chore: add axios import to api.ts
docs: update README
2. CI/CD Pipeline
Forjex detects your project type and generates a customized GitHub Actions workflow:
Supported Languages/Frameworks:
- Node.js - Next.js, React, Vue, Angular, etc.
- Python - Django, Flask, FastAPI
- Go - Any Go project
- Rust - Cargo projects
What the pipeline does:
- โ
Runs on every push to
mainand pull requests - โ Tests on multiple Node versions (20.x, 22.x)
- โ Lints your code
- โ Runs tests (if available)
- โ Builds your project
3. Vercel Deployment
Forjex deploys your project to Vercel with:
- Auto-framework detection (Next.js, React, Vue, etc.)
- Automatic GitHub integration - future pushes trigger deployments
- Production-ready URLs - Get your live URL instantly
๐จ Examples
Example 1: New Next.js Project
# Create a new Next.js app
npx create-next-app@latest my-app
cd my-app
# Set up everything with Forjex
forjex forgeWhat happens:
- Authenticates with GitHub โ
- Creates
my-apprepository on GitHub โ - Generates CI/CD workflow for Node.js โ
- Analyzes your code and creates commit message โ
- Pushes to GitHub โ
- Deploys to Vercel โ
- Shows you the live URL โ
Example 2: Existing Project
# Navigate to your existing project
cd my-existing-project
# Run Forjex
forjex forge
# Select "Push to an existing GitHub repository"
# Forjex finds your remote or lets you enter oneExample 3: CI/CD Only
cd my-project
forjex forge
# Uncheck "Deploy to Vercel"
# Only set up GitHub + CI/CD๐ Authentication
First Time Setup
When you first run Forjex:
- Forjex opens your browser automatically
- You'll see a code like:
ABCD-EFGH - Enter the code on GitHub
- Click "Authorize"
- Done! Your credentials are saved securely
Your credentials are stored locally in:
~/.forjex/config.json(GitHub token)- Vercel CLI handles Vercel auth internally
Re-authentication
Forjex remembers your authentication. You won't need to log in again unless:
- You explicitly log out
- Your token expires (after 1 year)
๐ Project Detection
Forjex automatically detects your project type by looking for:
| Project Type | Detection Files |
|---|---|
| Node.js | package.json |
| Python | requirements.txt, pyproject.toml, setup.py |
| Go | go.mod |
| Rust | Cargo.toml |
If Forjex can't detect your project type, it will skip CI/CD generation.
๐ฏ Smart Commit Messages
Forjex analyzes your code changes and generates meaningful commit messages following Conventional Commits:
Commit Types:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- CSS/styling changesrefactor:- Code refactoringtest:- Test additionschore:- Maintenance tasks
Examples:
# Adding a new component
feat: add LoginForm component to auth.tsx
# Fixing a bug
fix: resolve authentication timeout in api.ts
# Updating documentation
docs: update installation instructions in README
# Removing old code
refactor: remove deprecated functions from utils.ts๐ CI/CD Workflow
The generated GitHub Actions workflow includes:
# .github/workflows/ci.yml
โ Checkout code
โ Setup Node.js (20.x, 22.x)
โ Install dependencies
โ Lint code
โ Run tests
โ Build projectCustomization:
You can edit .github/workflows/ci.yml after generation to add:
- Additional test suites
- Code coverage reports
- Deployment steps
- Notifications
๐ Deployment
Vercel Integration
When you deploy with Forjex:
- First deployment - Deploys your current code
- Future deployments - Automatic on every push to
main - Preview deployments - Automatic on pull requests
Your deployment URL:
โ
Deployed to Vercel
https://your-project.vercel.app
Auto-Deployment
After initial setup, every push to main automatically:
- Triggers GitHub Actions (build & test)
- Deploys to Vercel (if tests pass)
- Updates your production URL
๐ ๏ธ Troubleshooting
Issue: "Command not found: forjex"
Solution:
# Check if installed globally
npm list -g forjex
# If not found, reinstall
npm install -g forjex
# Verify installation
forjex --versionIssue: "Authentication failed"
Solution:
- Check your internet connection
- Make sure you completed the browser authentication
- Try removing saved credentials:
rm -rf ~/.forjex- Run
forjex forgeagain
Issue: "Could not detect project type"
Solution:
- Make sure you have a
package.json,requirements.txt,go.mod, orCargo.toml - For Node.js projects: Run
npm init -yto create apackage.json
Issue: "Vercel deployment failed"
Solution:
- Make sure you completed Vercel authentication
- Check Vercel CLI is installed:
vercel --version - Try manual Vercel login:
vercel login
Issue: "Push failed - already a git repository"
Solution:
When prompted "Commit and push changes?", select Yes to commit and push your changes.
๐ Configuration Files
Forjex creates these files in your project:
.github/workflows/ci.yml
Your CI/CD pipeline configuration. Customize as needed.
vercel.json (if deploying to Vercel)
Vercel deployment configuration. Auto-generated based on your framework.
.gitignore (if selected)
Common ignore patterns for your project type.
README.md (if selected)
Basic project documentation.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- GitHub for the OAuth device flow API
- Vercel for seamless deployment
- The open-source community
๐ Links
- Website: https://forjex.vercel.app
- Documentation: https://forjex.vercel.app/docs
- GitHub: https://github.com/daviddozie/forjex
- Issues: https://github.com/daviddozie/forjex/issues
Made with โค๏ธ by David
If you find Forjex useful, please consider giving it a โญ on GitHub!