0xReLogic/Forge
حول
Forge is a command-line interface (CLI) tool specifically designed for developers frustrated with the sluggish feedback loop of cloud-based CI/CD. We understand how annoying it is to wait for CI/CD pipelines to complete only to discover a tiny bug
أدوات التطويرما يمكنك فعله
- Run CI/CD pipelines from simple YAML files
- Isolation using Docker containers
- Support for various Docker images
- Real-time log streaming with colors (parallel stages buffer logs and print in definition order)
النمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- +٢
- خلال 15 يومًا
- +٢
- خلال شهر
- +٢
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلFORGE - Local CI/CD Runner
About FORGE
FORGE is a lightweight local CI/CD tool built with Rust that allows you to run automation pipelines on your local machine. It's extremely useful for developing and testing pipelines before pushing them to larger CI/CD systems.
Why FORGE?
- Local & Fast: Run pipelines on your local machine without waiting for CI/CD servers
- Offline-First: Works without an internet connection (as long as Docker images are available locally)
- Compatible: Syntax similar to GitHub Actions and GitLab CI
- Lightweight: Minimal resource consumption
- Portable: Runs on Windows, macOS, and Linux
Features
- Run CI/CD pipelines from simple YAML files
- Isolation using Docker containers
- Support for various Docker images
- Real-time log streaming with colors (parallel stages buffer logs and print in definition order)
- Environment variables management
- Intuitive command-line interface & Interactive TUI Dashboard
- Multi-stage pipelines with parallel execution
- Caching to speed up builds (repo-local cache in
./.forge/cache/) - Secure secrets management (secrets are masked in verbose env output; commands can still echo secrets)
- Dependencies between stages with circular dependency detection
- Execution control: Step timeouts (
timeout: 30s) and automatic container cancellation - Retry resilience: Automatic step retries with delays (
retries: 3,retry_delay: 2s) - Flexible failure policies:
continue_on_error(step/stage) and pipeline-levelfail_fast: false - Artifact management: Upload and download files/directories between stages with SHA-256 verification
- Resource and security isolation: CPU/memory limits, network modes, read-only mounts, capability controls, secret allowlists, and optional pinned image digests
- Structured execution results with human summary, JSON, and JUnit output (
--format) - Consistent exit codes for scripting and automation
- Run history and artifact manifests stored in
.forge/runs/<run-id>/for auditing and replay
Quick Start
Installation
# With Cargo (from crates.io)
cargo install forge-runner
# Or install directly from GitHub
cargo install --git https://github.com/0xReLogic/Forge.git
# Or download a pre-compiled binary from the latest GitHub Release
# Linux (amd64)
curl -L https://github.com/0xReLogic/Forge/releases/latest/download/forge-linux-amd64 -o forge
# Linux (arm64)
curl -L https://github.com/0xReLogic/Forge/releases/latest/download/forge-linux-arm64 -o forge
chmod +x forge
./forge --version
# Optional (install to PATH): sudo install -m 755 forge /usr/local/bin/forge
# macOS (Intel)
curl -L https://github.com/0xReLogic/Forge/releases/latest/download/forge-macos-amd64 -o forge
# macOS (Apple Silicon)
curl -L https://github.com/0xReLogic/Forge/releases/latest/download/forge-macos-arm64 -o forge
chmod +x forge
./forge --version
# Optional (install to PATH): sudo install -m 755 forge /usr/local/bin/forge
Windows (PowerShell):
Invoke-WebRequest -Uri https://github.com/0xReLogic/Forge/releases/latest/download/forge-windows-amd64.exe -OutFile forge.exe
.\forge.exe --version
# Optional: move forge.exe into a directory on PATH (or add its directory to PATH)
# Or from source
git clone https://github.com/0xReLogic/Forge.git
cd Forge
cargo build --release
Prerequisites: Rust (1.91+) and Docker (20.10+; tested on 28.2.2)
For detailed installation instructions, see docs/installation.md.
Usage
# Initialize a project
forge init
# Validate configuration
forge validate
# Run the pipeline
forge run
# Run a specific stage (includes its dependencies)
forge run --filter test
# Run a specific step in a stage
forge run --filter test.unit-tests
# Machine-readable JSON output
forge run --format json
# JUnit XML for CI test reporting
forge run --format junit
Standard CLI mode output:
Machine-readable JSON output:
Secrets via .env (Recommended)
FORGE reads secret values from environment variables. To avoid exporting secrets manually every time, you can store them in a local .env file.
cp .env.example .env
# edit .env and set values like FORGE_API_TOKEN=...
forge run
FORGE automatically loads .env from:
- Current working directory
- The config file directory (when using
--file path/to/forge.yaml)
For more commands and options, see docs/usage.md.
For hermetic or restricted steps, configure the security controls in docs/configuration.md, including cgroup resource limits, read-only filesystems, capability restrictions, and immutable image digests.
Interactive TUI Dashboard (New!)
FORGE now includes a rich, responsive terminal user interface (TUI) dashboard to monitor your pipeline execution.
To run your pipeline in TUI mode:
forge run --tui
Controls:
qorQ: Quit TUI (automatically stops and cleans up active docker containers).Tab: Switch focus between the Stages & Steps panel and the Logs panel.Up/Downarrows:- Scroll step list (when in Stages & Steps panel).
- Scroll log lines (when in Logs panel).
PageUp/PageDown: Scroll logs page-by-page.aorA: Toggle Auto-Scroll (forces the logs panel to follow incoming logs).
Documentation
- Installation Guide - Detailed installation instructions for all platforms
- Usage Guide - Complete command reference and workflows
- Configuration Reference - YAML format and all configuration options
- Examples - Real-world examples for different tech stacks
- Architecture - System design and component details
Quick Example
version: "1.0"
stages:
- name: build
steps:
- name: Install Dependencies
command: npm install
image: node:16-alpine
working_dir: /workspace
- name: test
steps:
- name: Run Tests
command: npm test
image: node:16-alpine
working_dir: /workspace
depends_on:
- build
cache:
enabled: true
directories:
- /workspace/node_modules
Validate and preview what will run:
forge validate --file forge.yaml
forge run --file forge.yaml --dry-run --verbose
Cache storage:
- Cache data is stored inside your project at
./.forge/cache/. - FORGE derives a cache key from common lockfiles (e.g.
Cargo.lock,package-lock.json,pnpm-lock.yaml,yarn.lock,go.sum), so different dependency states use different cache folders. - To reset cache for a project, delete the
.forge/directory.
Parallel Execution
Run independent tasks simultaneously for faster pipelines:
version: "1.0"
stages:
- name: test
parallel: true
steps:
- name: Unit Tests
command: npm run test:unit
image: node:18-alpine
- name: Integration Tests
command: npm run test:integration
image: node:18-alpine
- name: Lint
command: npm run lint
image: node:18-alpine
All three steps run concurrently instead of sequentially (3× faster).
Stage Dependencies
Define complex pipelines with stage dependencies:
stages:
- name: setup
steps: [...]
- name: build
depends_on: [setup]
steps: [...]
- name: test
depends_on: [build]
steps: [...]
- name: deploy
depends_on: [build, test]
steps: [...]
FORGE automatically resolves execution order and detects circular dependencies.
Execution Control & Artifacts
Control step execution limits, retries, failure handling, and share build artifacts across stages:
version: "1.0"
fail_fast: false
stages:
- name: build
steps:
- name: Build Binary
command: cargo build --release
image: rust:1.91-alpine
timeout: 5m
artifacts:
upload:
- target/release/app
- name: test
depends_on: [build]
steps:
- name: Run Test Suite
command: ./run-tests.sh
image: alpine:latest
retries: 3
retry_delay: 2s
continue_on_error: true
artifacts:
download:
- app
See docs/configuration.md and examples/execution-control.yaml for more details.
More examples in docs/examples.md and examples/ directory.
Contributing
Thank you for your great contributions!
How to Contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Read CONTRIBUTING.md for detailed guidelines.
License
This project is licensed under the MIT License.
Credits
Inspired by GitHub Actions, GitLab CI, and Jenkins.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…