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

@tiangong-lca/cli

v0.0.3

Published

Unified TianGong LCA CLI with direct REST adapters and low-entropy command surface.

Readme

TianGong LCA CLI

Package: @tiangong-lca/cli Executable: tiangong Node: 24.x

Run

Use the published CLI directly:

npx -y @tiangong-lca/cli@latest --help
npx -y @tiangong-lca/cli@latest doctor
npx -y @tiangong-lca/cli@latest flow --help

Optional global install:

npm install --global @tiangong-lca/cli
tiangong --help

Run from this repository:

npm ci
npm run build
node ./bin/tiangong.js --help

Env

Remote commands require:

TIANGONG_LCA_API_BASE_URL=
TIANGONG_LCA_API_KEY=
TIANGONG_LCA_SUPABASE_PUBLISHABLE_KEY=
TIANGONG_LCA_REGION=us-east-1

Notes:

  • TIANGONG_LCA_API_BASE_URL accepts the project root, /functions/v1, or /rest/v1.
  • TIANGONG_LCA_API_KEY is the TianGong user API key from the account page, not a Supabase project key.
  • The CLI exchanges TIANGONG_LCA_API_KEY for a user session, then reuses the access token for both Edge Functions and direct Supabase access.

Optional session control:

TIANGONG_LCA_SESSION_FILE=
TIANGONG_LCA_DISABLE_SESSION_CACHE=false
TIANGONG_LCA_FORCE_REAUTH=false

Optional LLM review env, only for review process --enable-llm or review flow --enable-llm:

TIANGONG_LCA_REVIEW_LLM_BASE_URL=
TIANGONG_LCA_REVIEW_LLM_API_KEY=
TIANGONG_LCA_REVIEW_LLM_MODEL=

Search

Minimal search flow request:

{
  "query": "soda lime glass",
  "filter": {
    "flowType": "Product flow"
  }
}

Run:

npx -y @tiangong-lca/cli@latest search flow --input ./search-flow.request.json --json
npx -y @tiangong-lca/cli@latest search process --input ./search-process.request.json --json
npx -y @tiangong-lca/cli@latest search lifecyclemodel --input ./search-lifecyclemodel.request.json --json

Empty search results should be treated as empty whether the response is [] or {"data":[]}.

Read

npx -y @tiangong-lca/cli@latest flow get --id <flow-id> --version <version> --json
npx -y @tiangong-lca/cli@latest flow list --id <flow-id> --state-code 100 --limit 20 --json
npx -y @tiangong-lca/cli@latest process get --id <process-id> --version <version> --json

Real DB Flow Review

  1. Search or otherwise collect exact flow refs.
  2. Materialize DB rows into local review input.
  3. Review the materialized rows.
  4. Materialize approved decisions into downstream artifacts.

flow fetch-rows input:

[
  {
    "id": "7a285e9a-a9f6-4b86-ab17-6ea17367400c",
    "version": "01.01.001",
    "state_code": 100,
    "cluster_id": "cluster-0001",
    "source": "search-flow"
  }
]

flow materialize-decisions input:

[
  {
    "cluster_id": "cluster-0001",
    "decision": "merge_keep_one",
    "canonical_flow": {
      "id": "7a285e9a-a9f6-4b86-ab17-6ea17367400c",
      "version": "01.01.001"
    },
    "flow_refs": [
      "[email protected]",
      "[email protected]"
    ],
    "reason": "approved_same_product_flow"
  }
]

Run:

npx -y @tiangong-lca/cli@latest flow fetch-rows \
  --refs-file ./flow-refs.json \
  --out-dir ./flow-fetch

npx -y @tiangong-lca/cli@latest review flow \
  --rows-file ./flow-fetch/review-input-rows.jsonl \
  --out-dir ./flow-review

npx -y @tiangong-lca/cli@latest flow materialize-decisions \
  --decision-file ./approved-decisions.json \
  --flow-rows-file ./flow-fetch/review-input-rows.jsonl \
  --out-dir ./flow-decisions

Key flow fetch-rows outputs:

  • review-input-rows.jsonl
  • fetch-summary.json
  • missing-flow-refs.jsonl
  • ambiguous-flow-refs.jsonl

Key flow materialize-decisions outputs:

  • flow-dedup-canonical-map.json
  • flow-dedup-rewrite-plan.json
  • manual-semantic-merge-seed.current.json
  • decision-summary.json
  • blocked-clusters.json

Other Common Commands

npx -y @tiangong-lca/cli@latest review process --run-root ./artifacts/process_from_flow/<run_id> --run-id <run_id> --out-dir ./review
npx -y @tiangong-lca/cli@latest publish run --input ./publish-request.json --dry-run
npx -y @tiangong-lca/cli@latest doctor --json

More Docs

  • docs/IMPLEMENTATION_GUIDE_CN.md: maintainer-facing command contract and implementation notes
  • --help: the canonical command surface for tiangong, tiangong flow, tiangong review, tiangong process, tiangong lifecyclemodel, and tiangong publish
  • tiangong-lca-skills: use the skill-specific SKILL.md and wrapper docs for agent workflows; the CLI README only covers the public invocation contract

Help

npx -y @tiangong-lca/cli@latest --help
npx -y @tiangong-lca/cli@latest flow --help
npx -y @tiangong-lca/cli@latest review --help
npx -y @tiangong-lca/cli@latest process --help
npx -y @tiangong-lca/cli@latest lifecyclemodel --help
npx -y @tiangong-lca/cli@latest publish --help