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

@distilled.cloud/forgejo

v1.0.0-rc.16

Published

Readme

@distilled.cloud/forgejo

Effect-native SDK for the Forgejo REST API, generated from the Swagger 2.0 document every Forgejo instance serves at /swagger.v1.json.

Spec source

The generator reads one file from the package's spec mirror:

specs/spec-mirror-forgejo/specs/forgejo.spec.json

Forgejo publishes no standalone spec artefact. Each running instance serves the document describing its own version at /swagger.v1.json, rendered from a Go template checked into the Forgejo repository (templates/swagger/v1_json.tmpl). The mirror (distilled-mirror/spec-mirror-forgejo, fetch script under stacks/distilled-submodules/spec-repos/forgejo/) snapshots that template at a pinned release tag with the two server-side placeholders (info.version, basePath) filled in the way a root-mounted instance would. Bump FORGEJO_VERSION in the fetch script to move to a newer release.

pnpm specs:fetch     # check out the mirror (from packages/forgejo)
pnpm generate        # convert + compile (see scripts/convert.ts)

Before the mirror exists, or to regenerate against today's upstream without touching submodules, materialise it locally from the repo root:

pnpm specs:local forgejo
DISTILLED_SPECS_LOCAL=1 pnpm generate forgejo

Layout

  • scripts/convert.ts — buckets the document's operations by tag, applies the RFC-6902 patch chain under patches/<tag>/<operationId>.json, and writes one Smithy model per tag to .generated-specs/.
  • scripts/generate.ts — compiles the models into src/services/<tag>.ts.
  • src/credentials.ts, src/protocol.ts, src/errors.ts, src/retry.ts, src/traits.ts — hand-written; everything under src/services/ is generated and never edited by hand.

Usage

import * as Redacted from "effect/Redacted";
import * as Forgejo from "@distilled.cloud/forgejo";

const program = Effect.gen(function* () {
  const repo = yield* Forgejo.repository.repoGet({
    owner: "acme",
    repo: "api",
  });
  return repo.clone_url;
}).pipe(
  Effect.provide(
    Forgejo.credentials({
      baseUrl: "https://git.example.com",
      token: Redacted.make(process.env.FORGEJO_TOKEN!),
    }),
  ),
);

baseUrl is the instance origin; the /api/v1 prefix is appended when missing. FORGEJO_URL / FORGEJO_TOKEN drive CredentialsFromEnv.