npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dockerforge/cli

v0.2.5

Published

DockerForge CLI: generate production-grade Dockerfiles, .dockerignore, and Compose from a local project, and lint Dockerfiles (human/JSON/SARIF). Offline.

Readme

@dockerforge/cli

Generate and lint production-grade Dockerfiles from the command line. Offline, no account.

npm license node

Point it at a project directory and it detects the stack, then writes a Dockerfile, a .dockerignore, and a Compose file, with a confidence score and warnings. It also lints existing Dockerfiles and reports findings as human text, JSON, or SARIF. Everything runs on your machine and makes no network calls.

Install

Run it directly with npx:

npx @dockerforge/cli generate ./my-app

Or install it globally:

npm install -g @dockerforge/cli
dockerforge generate ./my-app

Generate

Run DockerForge from the root of the app you want to containerize:

cd ./my-app
npx @dockerforge/cli generate .

It writes a Dockerfile, .dockerignore, and docker-compose.yml by default.

dockerforge generate .                 # write files into the current directory
dockerforge generate ./app -o ./out    # write into a chosen directory
dockerforge generate . --print         # print the Dockerfile, write nothing
dockerforge generate . --json          # JSON output for scripts and CI
dockerforge generate . --pin-digests   # resolve Docker Hub base images to sha256 digests

| Flag | Effect | | --- | --- | | -o, --output <dir> | Write output to this directory. Defaults to the target path. | | --print | Print the Dockerfile to stdout instead of writing files. | | --json | Print { dockerfile, dockerignore, compose, confidence, improvements }. | | --pin-digests | Resolve Docker Hub base-image tags to immutable SHA-256 digests. Makes live registry requests. | | --stack <name> | Override stack detection (node, python, dotnet, ...). | | --port <n> | Set the exposed port. | | --no-optimise | Skip the optimisation pass. | | --no-security | Skip the security pass. |

The default output is a coloured summary with the detected services, a confidence score, and any warnings. --json and --print produce plain output with no decoration. Colour turns off when the output is not a terminal or when NO_COLOR is set.

Default generation is offline. --pin-digests is opt-in because it contacts Docker Hub to turn base-image tags such as node:20-alpine3.21 into node:20-alpine3.21@sha256:.... Digest-pinned images stay fixed until you update them, so pair this with Docker Scout, Renovate, Dependabot, or another digest refresh process.

After reviewing the generated files, build and run with Docker:

docker build -t my-app .
docker run --rm -p 3000:3000 my-app

Or use the generated Compose file:

docker compose up --build

Lint

dockerforge lint ./Dockerfile
dockerforge lint . --format sarif > results.sarif
dockerforge lint . --fail-on medium
dockerforge lint . --rules DF001,DF002

| Flag | Effect | | --- | --- | | --format <fmt> | human (default), json, or sarif. | | --fail-on <severity> | Lowest severity that fails the run: info, low, medium, high, critical. Default high. | | --rules <ids> | Comma-separated rule ids to run. Default is all rules. |

| Id | Check | Severity | | --- | --- | --- | | DF001 | Base image is not pinned (no tag, or :latest) | high | | DF002 | Final stage runs as root | high | | DF003 | COPY . . copies the whole build context | high | | DF004 | .dockerignore is missing or does not exclude .env | medium | | DF005 | A secret-like value is hardcoded in ENV or ARG | critical | | DF006 | No WORKDIR is set in the final stage | low |

The sarif format follows SARIF 2.1.0, so the output drops straight into GitHub code scanning or any SARIF viewer. Full detail for each rule is in the rules reference.

Exit codes

lint:

| Code | Meaning | | --- | --- | | 0 | No findings at or above --fail-on. | | 1 | Lint found at least one issue at or above --fail-on. | | 2 | A tool error (bad path, unreadable file, invalid --fail-on). |

generate:

| Code | Meaning | | --- | --- | | 0 | Success. | | 1 | An error. The human error line includes a typed code when one is available, for example PATH_NOT_FOUND. |

Use in CI

Fail a pull request when a Dockerfile has a high-severity issue:

- run: npx @dockerforge/cli lint . --fail-on high

Upload findings to GitHub code scanning:

- run: npx @dockerforge/cli lint . --format sarif > dockerforge.sarif
- uses: github/codeql-action/upload-sarif@v3
  with:
    sarif_file: dockerforge.sarif

Documentation

License

Apache-2.0. Built on @dockerforge/core.