One command to set up, health-check, and repair any open-source project.
Install · Docs · Demo · Contributing
Demo
What you are watching:
forgefix doctoron a deliberately broken repo — anapp.pyand apyproject.toml, but no README, no lockfile, no CI, no security policy. Score: 38/100.forgefix report— the same findings as markdown, with the highest-value fixes first.forgefix up --apply— creates the missing setup files, makes.venv, installs the project, writesrequirements.lock, and runs the test suite.forgefix doctoragain — the same repo now scores 91/100.
Still frame: demo/demo-thumb.png · MP4 for social: demo/demo.mp4
The problem
Cloning a new repository usually starts a scavenger hunt. There is no lockfile, so the
install is not reproducible. The README says "install dependencies" without saying how.
There is no CI, so nobody knows whether main even passes its own tests. There is no
security policy, so vulnerability reports arrive as public issues.
$ git clone https://github.com/example/project && cd project
$ make dev
make: *** No rule to make target 'dev'. Stop.
$ pip install -r requirements.txt
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
Every one of those gaps is visible in file names and metadata alone. ForgeFix reads that metadata, scores the gaps, and fixes the ones it can fix.
What ForgeFix does
forgefix doctor checks a repository against a fixed set of onboarding rules and prints
a pass/warn/fail table with a concrete fix for each gap. forgefix up performs the
bring-up: stack detection, create-if-missing repairs, virtual environment, dependencies,
tests. Scans are read-only and never execute repository code.
| Command | What it does | Example |
|---|---|---|
forgefix init |
Write a starter .forgefix.yml (disable rules, set a score gate) |
forgefix init |
forgefix doctor |
Print the health table with fix suggestions | forgefix doctor --min-score 80 |
forgefix up |
Dry-run the bring-up plan (nothing is executed) | forgefix up --no-serve |
forgefix up --apply |
Repair setup, create .venv, install, run tests |
forgefix up --apply |
forgefix report |
Write the markdown health report | forgefix report --output health.md |
forgefix serve |
Run the HTTP API (/health, /doctor, /report) |
forgefix serve --port 8000 |
forgefix badge |
Print a live Shields.io badge URL | forgefix badge --write |
forgefix share |
Print a ready-to-post score update | forgefix share |
doctor also emits --json for machines. up never overwrites an existing file and
never invents a LICENSE for you.
How the score works
Every rule carries two fixed weights: the points lost when the check fails, and the points lost when it only warns. The score starts at 100, subtracts every deduction, and stays in the 0–100 range. No heuristics and no network calls — the same repository always scores the same, and unit tests pin the exact numbers.
| Check | Category | Fail | Warn |
|---|---|---|---|
| README present | docs | 12 | 6 |
| One-command install line | docs | 8 | 4 |
| Demo GIF or screenshot | docs | 3 | 2 |
| Changelog present | docs | 3 | 2 |
| Citation file | docs | 2 | 1 |
| Funding configuration | community | 2 | 1 |
| Dependency lockfile | deps | 6 | 3 |
| Pinned dependency versions | deps | 5 | 2 |
| Dockerfile or devcontainer | automation | 4 | 1 |
| CI workflow | automation | 8 | 6 |
| Security policy | security | 8 | 4 |
| Open-source license | legal | 6 | 3 |
| Ready dev environment | environment | 7 | 3 |
Plugins add checks with their own weights — the bundled example checks for an
.editorconfig at 3 fail / 1 warn points in the polish category.
A real report from the broken fixture, abridged:
# ForgeFix health report
- Repository: `demo-scratch`
- Health score: **38/100** (critical)
- Checks: 0 pass, 8 warn, 6 fail, 0 skip
## Category breakdown
| Category | Points lost |
| --- | --- |
| automation | 9 |
| deps | 5 |
| docs | 22 |
| environment | 7 |
| legal | 6 |
| polish | 1 |
| security | 8 |
## Top fixes
1. **README present** (-12): Add a README.md with a one-line pitch and a getting-started section.
2. **One-command install line** (-8): Add a copy-pasteable install command (pip install / npm install / make setup).
3. **CI workflow** (-8): Add a CI workflow under .github/workflows/ that runs lint and tests.
The check table above it lists all 11 findings (for example: FAIL | CI workflow | automation | no CI workflow found).
What it checks
Thirteen built-in rules. A scan reads file names and text only - nothing is executed, downloaded, or copied:
| Rule | What it looks for |
|---|---|
readme |
A README (.md, .markdown, .rst, .txt) at the repository root |
install |
An install line in the README (pip install, npm install, make setup, ...) |
demo |
A .gif in the root, demo/, docs/, assets/, images/, or .github/ |
changelog |
A changelog (CHANGELOG.md, CHANGELOG, HISTORY.md, CHANGES, ...) at the repository root |
citation |
A CITATION.cff (or CITATION.bib) at the repository root |
funding |
A .github/FUNDING.yml (or FUNDING.yml) |
lockfile |
A committed lockfile (requirements.lock, poetry.lock, uv.lock, package-lock.json, yarn.lock, go.sum, Cargo.lock) |
pinned_deps |
== pins in requirements.txt, or a committed lockfile |
devcontainer |
A Dockerfile, Containerfile, docker-compose.*, or .devcontainer/ |
ci |
.github/workflows/, .gitlab-ci.yml, .circleci/, Jenkinsfile, .travis.yml |
security |
A SECURITY.md (or .github/SECURITY.md) |
license |
A LICENSE, LICENCE, or COPYING file (plain, .md, or .txt) |
dev_env |
A .venv in a Python project (skipped outside Python projects) |
Each rule maps 1:1 to the weight table above. Disable rules per repository
with .forgefix.yml (forgefix init).
ForgeFix vs. other tools
| Tool | Scope | What it does not do |
|---|---|---|
| ForgeFix | Setup + health check + safe repair (README, lockfile, CI, license, …) | Not a language linter; does not rewrite source code |
| Ruff | Python lint and format | No project health score or bring-up |
| pre-commit | Run hooks on commit | No repository health report; you choose the hooks |
| GitHub checks | CI for code you already have | No local one-command setup or repair |
See each tool's own documentation for details. ForgeFix is meant to sit beside them: it tells you whether a repository is ready to accept contributors, and can create the missing setup files.
Quickstart
pipx install forgefix # from PyPI once published
# or straight from the repository:
pip install "git+https://github.com/BistaDinesh03/forgefix"
cd your-repo
forgefix doctor
To auto-fix what doctor found:
forgefix up --apply
Try the bundled fixtures right now: forgefix doctor --path tests/fixtures/broken_repo
scores 42, --path tests/fixtures/minimal_repo scores 100.
What it is NOT
Compared by category, not by name:
| Category | What it covers | What ForgeFix adds |
|---|---|---|
| Static linters | Style and correctness inside files | Repository-level onboarding health: docs, CI, license, lockfile |
| Dependency scanners | Vulnerable and outdated dependencies | A score and repairs; it does not audit package contents |
| Setup wizards | Bootstrapping brand-new projects | Works on the repositories you already cloned |
| CI gate tools | Enforcing checks in pipelines | The check itself, runnable locally and over HTTP |
What ForgeFix is not:
- Not a security scanner. It checks whether a security policy exists, not for vulnerabilities.
- Not a package manager. It never resolves, pins, or vendors dependencies for you.
- Not a linter replacement. Keep ruff, eslint, and their friends; they work inside files.
- Not a bot. It never opens pull requests and never pushes to your repository.
Plugins
A plugin is a class with a name and a check(root) method that returns Finding
objects. This is the bundled example, verbatim from
forgefix/plugins/example.py:
from pathlib import Path
from forgefix.core.rules import Finding
class ExamplePlugin:
"""Bundled example plugin registered under the ``forgefix.plugins`` group."""
name = "example"
def check(self, root: Path) -> list[Finding]:
"""Report whether the repository ships an .editorconfig."""
present = (root / ".editorconfig").is_file()
return [
Finding(
rule_id="editorconfig",
category="polish",
title="EditorConfig present",
status="pass" if present else "warn",
detail=(
".editorconfig found"
if present
else "no .editorconfig (indentation and charset may drift between editors)"
),
suggestion=(
"Add an .editorconfig with basic indentation, charset, and newline rules."
),
weight=3,
warn_weight=1,
source="plugin:example",
)
]
Register it under the forgefix.plugins entry-point group and ForgeFix discovers it
automatically. A broken plugin is logged and skipped; it cannot break a scan.
Details in docs/plugins.md.
HTTP API
forgefix serve # http://127.0.0.1:8000
$ curl http://127.0.0.1:8000/health
{"status":"ok","version":"0.3.0"}
$ curl "http://127.0.0.1:8000/doctor?path=."
{"path": "...", "score": {"total": 42, ...}, "findings": [...], "plugins": [...]}
$ curl "http://127.0.0.1:8000/report?path=."
{"path": "...", "score": 42, "markdown": "# ForgeFix health report ..."}
The API is the same scanner as the CLI: same weights, same score, same findings.
Use it as a CI gate
forgefix doctor exits with code 2 when the score is below --min-score, so
one pipeline step can fail a pull request that drops the health score:
- name: ForgeFix health gate
run: |
pipx install "git+https://github.com/BistaDinesh03/forgefix"
forgefix doctor --path . --min-score 80 --json
Run forgefix init first to store the threshold in .forgefix.yml
(min_score); the file's value applies whenever the flag is absent. --json
prints the score and every finding for downstream steps.
GitHub Action and live badge
Run ForgeFix on every pull request with the official composite action. It scores the branch, scores the base branch, and posts one comment (updated in place) when the score is below the threshold or drops:
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v7
- uses: BistaDinesh03/forgefix/.github/actions/forgefix@v0.3.0
with:
threshold: "80"
update-badge: ${{ github.event_name == 'push' }}
On main, update-badge refreshes .forgefix-badge.json and commits it only
when the score changes. Generate the document and the Shields.io snippet
locally with:
forgefix badge --write # writes .forgefix-badge.json
forgefix badge # prints the endpoint URL and markdown
forgefix up --badge does the same during a bring-up, and
forgefix up --apply --yes generates missing setup files without prompting.
Full workflow, inputs, and fork-permission notes:
docs/github-action.md.
Show off the result with forgefix share, which prints a Rich panel containing
the score, repository link, and demo GIF.
Roadmap
| Version | Focus |
|---|---|
| v0.2 | Rust and Java/Gradle stack detection · per-rule fix scripts · published JSON schema for --json |
| v0.3 | Shipped: GitHub Action, dynamic badge, real auto-fixes, and forgefix share |
| v0.4 | SARIF export for GitHub code scanning · plugin authoring guide · richer .forgefix.yml (per-rule weights) |
| v1.0 | Stable plugin API · forgefix cloud dashboard for private repos (docs/monetization.md) · migration guide from 0.x |
Contributing
- Setup:
make setup— editable install plus pre-commit hooks. - Tests:
make test— the 85% coverage gate is enforced inpyproject.toml. - Lint:
make lint(ruff check + format) andmake type(mypy). - Pull requests: focused changes, tests included, CHANGELOG entry, no secrets.
Full guidelines in CONTRIBUTING.md.
License
MIT © ForgeFix contributors. Original code; repository metadata reads only, nothing is copied from inspected projects.
Built with Typer, FastAPI, and Pydantic. Demo recorded with VHS.
Contributors
- @BistaDinesh03 - maintainer
Metadata
Release files for forgefix 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| forgefix-0.3.0.tar.gz | 47.7 kB | With provenance | Details for forgefix-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| forgefix-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for forgefix-0.3.0-py3-none-any.whl |
Total release size: 83.3 kB
Release files / forgefix-0.3.0.tar.gz
| Download URL | forgefix-0.3.0.tar.gz |
|---|---|
| Size | 47.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
911fa29adb7ee225bc16bd186ed73c2e3f792992e49c5942d424e9b719151104
|
|
BLAKE2b-256 checksum How to use checksums |
10a572a536679ceb8315f4b07f0a3b7506407d3143f104dd90c2b62af81a2dc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logRelease files / forgefix-0.3.0-py3-none-any.whl
| Download URL | forgefix-0.3.0-py3-none-any.whl |
|---|---|
| Size | 35.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c8a7ab3a200200b9fa5e97b7dabcd2baac80d0e75406996f12ae0045a74f0558
|
|
BLAKE2b-256 checksum How to use checksums |
dd3fa129db0f47e602d5b0afe86a4318c166bc3d04f8547c7a5c24e94c008645
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logSecurity for forgefix 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for forgefix-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.