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

forgekit-dev-server

v0.1.0

Published

Spin up a dedicated, persistent development Forgejo instance for any consuming project.

Readme

forgekit-dev-server

Spin up a dedicated, persistent development Forgejo instance for any project, with a single command. It generalizes the docker-compose + admin-token provisioning pattern forgekit has ad hoc in its own dev/ folder into a standalone, reusable tool any consuming project can depend on.

For the full design rationale (scope, packaging model, config shape, etc.), see SPEC.md.

Scope

Interactive local development only — not CI. If you need a Forgejo instance for automated tests, see forgekit's own testcontainers-based test-support/forgejo-container.ts instead; that's a different lifecycle (ephemeral, torn down per run) from what this tool provides (persistent, human-facing).

Installation

pnpm add -D forgekit-dev-server

Then add the scripts you want to your package.json:

// package.json
{
  "scripts": {
    "dev:forgejo": "forgekit-dev-server up",
    "dev:forgejo:down": "forgekit-dev-server down",
    "dev:forgejo:logs": "forgekit-dev-server logs",
    "dev:forgejo:status": "forgekit-dev-server status",
    "dev:forgejo:reset": "forgekit-dev-server reset"
  }
}

Configuration

Add a forgekit-dev-server.config.js next to your package.json:

// forgekit-dev-server.config.js
export default {
  name: 'my-project-dev-forgejo', // required — also becomes the Docker Compose project name
  admin: {
    username: 'dev-admin',
    email: '[email protected]',
    password: 'change-me',
  },
  port: 3000,          // optional, default 3000
  image: undefined,    // optional override of the bundled Forgejo image tag
  env: {
    baseUrl: 'FORGEJO_BASE_URL', // optional override of the .env key names
    token: 'FORGEJO_TOKEN',
  },
};

name namespaces the container, volume, and network for this project, so multiple consuming projects can each run their own instance concurrently without colliding. port avoids a host-port clash when more than one is running at once.

Usage

pnpm run dev:forgejo          # boots Forgejo, provisions an admin user + API token, prints connection details
pnpm run dev:forgejo:status   # re-prints connection details without re-provisioning
pnpm run dev:forgejo:logs     # tail container logs
pnpm run dev:forgejo:down     # stop the container (data persists in a named volume)
pnpm run dev:forgejo:reset    # stop and wipe the volume + cached admin token, for a clean slate

Re-running up is safe — it reuses the existing admin token instead of provisioning a new one. On success, up upserts FORGEJO_BASE_URL / FORGEJO_TOKEN (or your configured key names) into your project's own .env, without touching any other keys already in that file.

Run forgekit-dev-server --help (or -h) for the command list without leaving your terminal.

The admin token is cached at ~/.forgekit-dev-server/<name>/admin-token — reset it along with the instance's data via reset.

Local development (on this repo)

pnpm install
pnpm run build         # tsup
pnpm run dev            # tsup --watch
pnpm run lint           # biome check
pnpm run typecheck      # tsc --noEmit

Tests

pnpm run test:unit         # fast, no external dependencies
pnpm run test:integration  # drives a real docker compose lifecycle — needs Docker
pnpm run test              # both

Before handing over any change, run pnpm run ai-verify (lint + typecheck + unit tests scoped to what changed).

Related

  • forgekit — the Forgejo API client SDK this tool is named alongside. Not a dependency: the one thing this tool needs from a Forgejo instance — bootstrapping the very first admin user — requires forgejo admin user create (a CLI command with direct database access), since Forgejo's admin API itself requires an existing admin token to call. See SPEC.md §5.
  • Any Forgejo instance serves its own interactive API reference at <baseUrl>/api/swagger (e.g. http://localhost:3000/api/swagger) — the canonical source for what you can do with the token this tool hands you.

License

AGPL-3.0-or-later. If AGPL's terms don't work for your use case (e.g. you want to use forgekit-dev-server in closed-source software), open an issue on this repo — alternative licensing arrangements can be discussed.