terz-cli
v0.2.0
Published
Your package's adoption, on one page, on your own box.
Maintainers
Readme
terz
Your package's adoption, on one page, on your own box.
A run reads every registry your packages live on (npm, PyPI, Docker Hub, GitHub, GitLab), appends the readings to a plain file, and rewrites one static HTML page. No account, no database, nothing to keep running. The timer is yours.
npm install -g terz-cli
mkdir adoption && cd adoption
terz init # writes terz.config.json
terz run # takes a run, writes chart.html and terz.jsonList your packages once, in terz.config.json:
{
"name": "Acme",
"products": [
{
"name": "Acme CLI",
"slug": "acme-cli",
"sources": { "npm": ["acme-cli"], "pypi": ["acme-cli"] }
}
]
}Then give the run to a timer. Once a day is right: the download APIs refresh daily, and reading them more often only spends rate limit.
0 8 * * * cd /path/to/adoption && terz runWhat a run leaves behind
chart.html· the chart, one self-contained file. Serve it, or open it off disk.terz.json· the same chart as a document, for the Terz apps and anything else that wants the numbers. Schema: https://terz.dev.readings.jsonl· every reading ever taken, one JSON object per line. Append-only; your history is a file you can read withtailand back up withcp.
A source that does not answer is held, not fatal: the chart keeps the last good value, dimmed, with a tag saying how long it has been held. A missing reading is never rendered as a zero; zero is a real measurement.
Revenue, optionally
Adoption and money on one page. Set a restricted, read-only Stripe key in the
environment under STRIPE_KEY_<SLUG> and give the product its Stripe account id in
the config ("stripe": "acct_…"). The next run lights up revenue, subscriptions
and MRR. A secret key is refused territory: use a restricted key, which starts
with rk_.
License
Proprietary, source-available. You may run it and read it; you may not redistribute
it or rehost it as a service. Full terms in LICENSE.
Hosted, with sign-in and history kept for you: https://app.terz.dev · Docs and the product: https://terz.dev · Support: [email protected]
