Skip to content

Commit ba2c350

Browse files
lroolleclaude
andcommitted
Repo surfaces: GitHub Pages site, llms.txt, security policy, templates
- docs/index.html: self-contained Pages site with an animated replay of a real session — the +X change flash, /compact snap-to-zero, quota bump, wall-clock resets — plus signal anatomy, values with honest numbers, and an explicit anti-pitch. No frameworks, no external assets, reduced-motion respected. - llms.txt: one-fetch orientation for agents (state layout, test harness whitelist rule, wire-contract pointer). - SECURITY.md: earned, not boilerplate — the script handles OAuth tokens; states the exact trust surface and known trade-offs. - Minimal issue/PR templates sized for the repo's scale. - CI: shellcheck gate at error severity (clean today; warnings tracked, not gated). - README links the live demo. Pages serves from main:/docs; homepage + 8 discovery topics set; merged branches now auto-delete. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent ec3b22f commit ba2c350

9 files changed

Lines changed: 366 additions & 0 deletions

File tree

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Bug report
3+
about: Something renders wrong or breaks
4+
---
5+
6+
**What you see** (paste the rendered line, or a screenshot):
7+
8+
**What you expected:**
9+
10+
**Environment:**
11+
- OS:
12+
- Claude Code version (`claude --version`):
13+
- Statusline version (CHANGELOG entry or git tag):
14+
15+
**If it's a quota/fetch issue**, paste (redact anything private):
16+
```
17+
cat ~/.claude/statusline/usage.err
18+
tail -5 ~/.claude/statusline/logs/statusline.log
19+
```

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Security issue
4+
url: https://github.com/thevibeworks/claude-code-statusline/security/advisories/new
5+
about: Token leaks or injection — report privately, not as an issue.

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
**What & why:**
2+
3+
**Checklist:**
4+
- [ ] `npm exec --yes bats -- t/` passes (new functions added to the awk whitelist in `t/helpers.bash`)
5+
- [ ] No real tokens, session IDs, or home paths in fixtures/docs

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ jobs:
1414
run: sudo apt-get update && sudo apt-get install -y jq
1515
- name: Run tests
1616
run: npm exec --yes bats -- t/
17+
- name: Shellcheck (error severity; warnings are tracked, not gated)
18+
run: shellcheck -S error statusline.sh install.sh claude-watch.sh

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<img src="assets/statusline-preview.svg" alt="Claude Code Statusline" width="100%">
1313
</p>
1414

15+
<p align="center"><a href="https://thevibeworks.github.io/claude-code-statusline/"><b>Live animated demo →</b></a></p>
16+
1517
One Bash file that plugs into the official `statusLine` command hook. Shows
1618
what matters: active model, context window, session cost, 5h / 7d quota with
1719
reset times, prompt-cache health, extra-usage spend, git activity, and subscription tier.

SECURITY.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Security
2+
3+
This script reads your Claude OAuth access token (from Claude Code's
4+
credentials file or the macOS Keychain) and sends it to exactly one host:
5+
`api.anthropic.com` (plus `platform.claude.com` for token refresh). It
6+
never writes the token to logs or caches, and it has no analytics,
7+
telemetry, or third-party endpoints. Verify that claim — it's one file:
8+
grep `curl` in `statusline.sh`.
9+
10+
## What to report
11+
12+
- Anything that could leak the OAuth token (into logs, cache files, argv,
13+
error messages, or to a non-Anthropic host)
14+
- Command injection via statusline stdin (Claude Code feeds it JSON that
15+
includes untrusted strings like branch names and paths)
16+
- install.sh integrity issues
17+
18+
## How to report
19+
20+
Open a [private security advisory](https://github.com/thevibeworks/claude-code-statusline/security/advisories/new)
21+
on GitHub. If that's not possible, open a regular issue saying only
22+
"security issue, need a private channel" — do not include details.
23+
24+
Expect an acknowledgment within a week. This is a maintained side project,
25+
not a company with an on-call rotation; critical token-leak reports get
26+
fixed fast, everything else gets triaged honestly.
27+
28+
## Known trade-offs (not vulnerabilities)
29+
30+
- The token passes to curl via `-H` on argv, which is briefly visible in
31+
`ps` on the local machine. An attacker with local process-listing access
32+
can already read the credentials file itself.
33+
- `curl | bash` install is offered for convenience; the paranoid path
34+
(clone, read, copy) is documented in the README and is four lines.

docs/.nojekyll

Whitespace-only changes.

docs/index.html

Lines changed: 261 additions & 0 deletions
Large diffs are not rendered by default.

llms.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Claude Code Statusline
2+
3+
> One bash file that renders live quota (5h/7d windows with reset times,
4+
> per-model weekly limits), context pressure, session cost, prompt-cache
5+
> health, and git activity in Claude Code's statusLine hook. 265 bats tests,
6+
> deps are jq + curl, no daemon, no telemetry.
7+
8+
Key facts for agents:
9+
- Everything lives in `statusline.sh` (~2900 lines, plain bash). Install
10+
copies it to `~/.claude/statusline.sh` and wires `settings.json`.
11+
- State lives under `~/.claude/statusline/` (account-scoped caches) and
12+
`~/.claude/statusline/sessions/` (per-session state). Never commit these.
13+
- Quota data comes from `GET https://api.anthropic.com/api/oauth/usage`
14+
with the user's OAuth token; the observed wire contract is versioned in
15+
docs/api/oauth-usage.md and re-synced against CLI captures.
16+
- Tests extract real functions from statusline.sh via an awk whitelist in
17+
t/helpers.bash — new functions MUST be added there or tests silently skip.
18+
- `STATUSLINE_NO_FETCH=1` renders from cache/stdin only (tests export it;
19+
also for offline use).
20+
21+
## Docs
22+
23+
- [README](https://github.com/thevibeworks/claude-code-statusline/blob/main/README.md): signals, themes, configuration flags, install
24+
- [Wire contract](https://github.com/thevibeworks/claude-code-statusline/blob/main/docs/api/oauth-usage.md): observed /api/oauth/usage request/response schema, rate-limit obligations
25+
- [CHANGELOG](https://github.com/thevibeworks/claude-code-statusline/blob/main/CHANGELOG.md): per-release rationale, not just diffs
26+
- [CONTRIBUTING](https://github.com/thevibeworks/claude-code-statusline/blob/main/CONTRIBUTING.md): test harness rules, style
27+
28+
## Source
29+
30+
- [statusline.sh](https://github.com/thevibeworks/claude-code-statusline/blob/main/statusline.sh): the entire product
31+
- [install.sh](https://github.com/thevibeworks/claude-code-statusline/blob/main/install.sh): installer (curl | bash entrypoint)
32+
- [t/statusline.bats](https://github.com/thevibeworks/claude-code-statusline/blob/main/t/statusline.bats): 253 statusline tests
33+
- [t/install.bats](https://github.com/thevibeworks/claude-code-statusline/blob/main/t/install.bats): 12 installer tests
34+
35+
## Optional
36+
37+
- [claude-watch.sh](https://github.com/thevibeworks/claude-code-statusline/blob/main/claude-watch.sh): standalone live usage/cost watcher
38+
- [Site](https://thevibeworks.github.io/claude-code-statusline/): animated demo of the line

0 commit comments

Comments
 (0)