Compare commits

..
4 Commits
Author SHA1 Message Date
gitea-actions d0c6a66ed5 Update GitHub stars 2026-10-18 20:01:31 -04:00
ZacharyZhang-NYandClaude Opus 5.5 ca872b7708 CI: stars commits come from gitea-actions, as in Ely-GPUI-Components
Catalog / validate (push) Successful in 28s
Catalog / stars (push) Successful in 28s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 02:40:53 -04:00
ZacharyZhang-NY 697383430c Stars on Gitea: a GitHub token from STARS_GITHUB_TOKEN when set, anonymous otherwise; links to the Gitea repo
Catalog / validate (push) Successful in 17s
Catalog / stars (push) Successful in 19s
2026-10-09 16:19:32 -04:00
ZacharyZhang-NY a28681ad71 TokenLedger, restored from the site's copy at 8b5c36a: the move from GitHub left it behind 2026-10-09 16:19:32 -04:00
8 changed files with 60 additions and 10 deletions

No files matched your search

+4 -3
View File
@@ -49,12 +49,13 @@ jobs:
- run: pnpm install --frozen-lockfile - run: pnpm install --frozen-lockfile
- run: pnpm run update-stars - run: pnpm run update-stars
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # A GitHub token, optional: this server's own token means nothing to GitHub.
GITHUB_TOKEN: ${{ secrets.STARS_GITHUB_TOKEN }}
- run: pnpm validate - run: pnpm validate
- name: Commit stars - name: Commit stars
run: | run: |
git config user.name 'github-actions[bot]' git config user.name 'gitea-actions'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com' git config user.email 'actions@git.zacharyzhang.com'
git add apps git add apps
if ! git diff --cached --quiet; then if ! git diff --cached --quiet; then
git commit -m 'Update GitHub stars' git commit -m 'Update GitHub stars'
+2 -2
View File
@@ -1,6 +1,6 @@
# Ely GPUI Showcases # Ely GPUI Showcases
Apps built with [Ely GPUI Components](https://github.com/ZacharyZhang-NY/Ely-GPUI-Components). The catalog feeds the Showcase page on the Ely site. Apps built with [Ely GPUI Components](https://git.zacharyzhang.com/ZacharyZhang-NY/Ely-GPUI-Components). The catalog feeds the Showcase page on the Ely site.
## Submit an app ## Submit an app
@@ -59,7 +59,7 @@ Unknown fields fail validation.
## Stars ## Stars
On every push to `main` and each Monday, CI asks GitHub for each GitHub source's stars and commits any change. `starsUpdatedAt` moves only when the count does. `pnpm run update-stars` does the same locally with `GITHUB_TOKEN` set. On every push to `main` and each Monday, CI asks GitHub for each GitHub source's stars and commits any change. `starsUpdatedAt` moves only when the count does. It signs in with the `STARS_GITHUB_TOKEN` secret when set, a GitHub token, and asks anonymously otherwise. `pnpm run update-stars` does the same locally, `GITHUB_TOKEN` optional.
## How the site uses this ## How the site uses this
+30
View File
@@ -0,0 +1,30 @@
TokenLedger is a native macOS dashboard that answers one question for
everyone who builds with AI coding tools: what did the models actually
cost me today?
Every CLI assistant keeps its own usage log, in its own format, under
its own directory. TokenLedger reads them all on launch — ZCode's
SQLite ledger, Codex JSONL sessions, DeepSeek Harness workdirs, Claude
Code transcripts — and merges them into a single ledger of tokens,
requests, cache behavior and list-price cost. Any other folder that
matches a known log shape can be added from the Sources page, and any
source can be toggled off without touching a config file.
The Overview page carries a nine-tile KPI grid — today's tokens, the
trailing week, list-price cost, cache hit, tool calls, failed and
retried shares — over stacked area charts by source, a year of calendar
heat, the last two weeks hour by hour, and where the tokens go. The
Models page breaks the same ledger down per model over 1D, 7D, 30D or
all time: speed in output tokens a second, cache hit, and what the
usage would cost at each model's official card, never a guess for a
model without one.
It is built on Ely: the KPI tiles, the segmented span control, the data
table on the Models page, and every chart — areas, bars, lines, both
heatmaps — are Ely components in dark and light.
![Overview](light.png)
![Models](models.png)
![Sources](sources.png)
Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

+20
View File
@@ -0,0 +1,20 @@
{
"id": "token-ledger",
"name": "TokenLedger",
"author": "nanami-0713",
"description": "One ledger for every model call on the machine: tokens, list-price cost and plan credits, read from the local logs of ZCode, Codex, Claude Code and friends, then drawn in Ely charts.",
"category": "dev",
"platforms": [
"macOS"
],
"website": null,
"source": "https://github.com/nanami-0713/token-ledger",
"publishedAt": "2026-10-06T00:00:00+08:00",
"previews": [
"light.png",
"models.png",
"sources.png"
],
"stars": 3,
"starsUpdatedAt": "2026-10-19T00:01:30.408Z"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

+4 -5
View File
@@ -20,13 +20,12 @@ export async function refresh(root, get, now) {
return changed; return changed;
} }
/** A repository's stars from GitHub's API. */ /** A repository's stars from GitHub's API, signed in when GITHUB_TOKEN holds a GitHub token. */
async function stargazers({ owner, repo }) { async function stargazers({ owner, repo }) {
const token = process.env.GITHUB_TOKEN; const token = process.env.GITHUB_TOKEN;
if (!token) throw new Error("stars: GITHUB_TOKEN is not set"); const headers = { accept: "application/vnd.github+json", "x-github-api-version": "2022-11-28" };
const res = await fetch(`https://api.github.com/repos/${owner}/${repo}`, { if (token) headers.authorization = `Bearer ${token}`;
headers: { accept: "application/vnd.github+json", authorization: `Bearer ${token}`, "x-github-api-version": "2022-11-28" }, const res = await fetch(`https://api.github.com/repos/${owner}/${repo}`, { headers });
});
if (!res.ok) throw new Error(`stars: ${owner}/${repo} answered ${res.status} ${await res.text()}`); if (!res.ok) throw new Error(`stars: ${owner}/${repo} answered ${res.status} ${await res.text()}`);
return (await res.json()).stargazers_count; return (await res.json()).stargazers_count;
} }