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

@fc2cma/cli

v0.3.0

Published

Unofficial CLI for the FC2 Content Market (Adult): subscribe to sellers, sync works into SQLite, track prices, cross-check sukebei magnets.

Downloads

433

Readme

fc2cma

Open on npmx.dev Open on npmx.dev Open on npmx.dev

Unofficial CLI for the FC2 Content Market (Adult). Subscribe to a list of sellers, sync their works into a local SQLite DB, track price history, and cross-check against sukebei magnets — all in a shape an AI agent can loop over.

Install

bun install

Optional: put your FC2 session cookie in .env so the crawler can see seller pages that gate content behind login:

FC2_COOKIE=...
# FC2CMA_DB=~/.fc2cma/db.sqlite   # default path, override if you want

Quickstart

# Run ad-hoc without a global install: `pnpx @fc2cma/cli <args>`
# (also works with `bunx` / `npx`). In the dev checkout,
# `bun start <args>` is equivalent to `fc2cma <args>`.

# 1. Subscribe to a seller
fc2cma subscribe add <author-slug>

# 2. Pull their works (fast; listing only)
fc2cma sync --author <author-slug>

# 3. Same, with detail-page backfill for publish dates & prices
fc2cma sync --author <author-slug> --with-detail

# 4. Same, with sukebei magnet cross-check
fc2cma sync --author <author-slug> --with-sukebei

# 5. Browse
fc2cma list  --author <author-slug> --since 2024-01-01
fc2cma info  --id <work-id>
fc2cma whats-new --since-last-sync

Commands

| command | what it does | |---|---| | subscribe add/remove/list | manage the seller subscription list. remove preserves history; remove --purge cascades. | | sync [--author X \| --all] | fetch the FC2 listing and upsert works. Add --with-detail for date/price backfill, --with-sukebei to record magnets. | | list --author X [--since --until] | list an author's works, optionally in a time window. | | info --id <work-id> | full detail for one work: metadata, price timeline, and magnets (if synced). | | whats-new [--since X \| --since-last-sync] | aggregated diff for agents: new releases, price drops, new magnets. | | sukebei --author X | ad-hoc magnet lookup for every work of an author, without touching the DB. |

AI-agent contract

Every command accepts --json. stdout is then a single line:

{ "ok": true, "command": "whats-new", "generatedAt": 1713500000000,
  "data": { ... }, "warnings": [] }

All time fields in both the DB and the JSON output are ms since epoch (Date.now() values). --since / --until on the CLI accept either YYYY-MM-DD, full ISO 8601, or a numeric ms string — parsed once at the boundary by src/utils/dates.ts.

Exit codes:

  • 0 ok
  • 2 usage error (bad flag / missing required / mutex violated)
  • 3 network-dominated failure (all FC2 pages failed, sukebei all errored)
  • 4 partial (reserved for hard degradations — currently unused)

stderr carries human chatter and warnings. When --json is set, all chalk progress lines redirect to stderr so stdout stays parseable.

A typical agent loop:

fc2cma sync --all --with-detail --with-sukebei --json > /dev/null
fc2cma whats-new --since-last-sync --json

Storage

Single SQLite file at ~/.fc2cma/db.sqlite (overridable via FC2CMA_DB env or --db flag). WAL mode; bun:sqlite, no extra dependencies. Price history is append-on-change: a new row lands only when (price_yen, on_promo) differs from the latest observation for that work. Schema lives in src/db/migrations.ts.

Scripts

  • bun run typecheck — strict TypeScript check
  • bun run lint — ESLint + Prettier
  • bun test — unit tests (pure helpers: dates, price-diff, sukebei-diff)

Status

Phase 1 — subscriptions, listing sync, info/listmerged. Phase 2 — price history, detail-page backfill, whats-newmerged. Phase 3 — sukebei integration, sukebei ad-hoc command — this branch.

Disclaimer

Unofficial tool — not affiliated with, endorsed by, or sponsored by FC2, Inc. or sukebei. It simply reads publicly reachable pages on behalf of the signed-in user, the same way a browser would. No media is downloaded or redistributed; only bibliographic metadata (title, price, publish date, magnet URI) is stored locally. The target site hosts adult material — use only where that is legal for you, and only for works you have the right to access. You are responsible for complying with the target sites' Terms of Service and your local laws. Provided as-is, with no warranty (see LICENSE).