forjex
v1.5.10
Published
Automate GitHub repo creation and Vercel deployment
Downloads
68
Maintainers
Readme
Forjex CLI
🚀 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 README2. 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.appAuto-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
