Skip to content

odripads/Fablemaxxing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Fablemaxxing 🔥

Claude on your iPhone Home Screen: your rate-limit meters (5-hour, weekly, weekly-Fable) with live reset countdowns, plus a one-glance Claude headline — "Sonnet 5 dropped!" — that teleports you to the source when you tap it.

Built as a Scriptable widget — no Xcode, no Apple developer account, no server. One JavaScript file.

┌─────────────────────────────┐   ┌─────────────────────────────┐
│ FABLEMAXXING    claude · pro│   │ CLAUDE NEWS           14:02 │
│                             │   │                             │
│ 5-hour limit   42% · in 2h  │   │  Claude Sonnet 5            │
│ ████████░░░░░░░░░░░░        │   │  dropped!                   │
│ Weekly · all models         │   │                             │
│ ██████████████░░░  63% · 3d │   │                             │
│ Weekly · Fable              │   │                             │
│ ████░░░░░░░░░░░░░  18% · 3d │   │  Anthropic · 2d ago  →      │
└─────────────────────────────┘   └─────────────────────────────┘
                                     tap → opens X app / article

What it does

1 · Usage meters — the same three limits shown on claude.ai's usage page:

Meter Shows
5-hour limit current % used + "resets in Xm"
Weekly · all models current % used + reset countdown
Weekly · Fable current % used + reset countdown

Each meter is drawn as a battery that drains as you use Claude: segments go watercolor blue → flower pink → red as the window empties. If the API is unreachable, the widget shows the last known values marked stale.

Design language — "greenhouse battery": blush-pink paper background, watercolor indigo-blue charge, fern-green type, flower-pink accents, a little 🌍. Palette lives in the C object at the top of the script if you want to regrow it.

⏰ TIME TO FABLEMAXX — the reset alarm

Two layers, because iOS won't let an app silently set a real Clock alarm:

Automatic (built in): whenever a usage fetch sees you've burned ≥ 50% of the 5-hour window (RESET_ALERT_MIN_PCT), the widget arms a local notification for the exact reset moment: "TIME TO FABLEMAXX 🔥 — 5-hour window just reset. Claude is fully charged. Go." Tapping it opens Claude. It re-arms itself every window, and replaces (never stacks) pending alerts. To make it ring through Focus modes and sit large on the Lock Screen: Settings → Notifications → Scriptable → enable Time Sensitive.

Alarm-grade (one tap): for a true full-screen alarm that rings even in silent mode, use the Clock app via a Shortcut:

  1. In the Shortcuts app, create a shortcut named exactly TIME TO FABLEMAXX with two actions:
    • Receive Text input (Shortcut Input)
    • Create alarm at Shortcut Input, label TIME TO FABLEMAXX
  2. When you hit your limit, open Fablemaxxing in Scriptable → ⏰ Clock alarm at next 5h reset. It reads the exact reset time and hands it to your Shortcut — full-screen "TIME TO FABLEMAXX" alarm, set in two seconds.

2 · Claude headline — one big, loud headline per widget, rewritten punchy:

Raw title Widget shows
Introducing Claude Sonnet 5 Claude Sonnet 5 dropped!
Redeploying Fable 5 Fable 5 is back!
Claude Code v2.1.211 (changelog) Claude Code v2.1.211 out!
active status incident ⚠️ Elevated errors for multiple models

The headline rotates through the feed every ~15 minutes (or pin one with news:N). Tap it and you're transported to the source: official Anthropic/Claude news opens the X app on @ClaudeAI or @ClaudeDevs (where the announcement lives as a tweet), press coverage opens the article, incidents open the status page. Tune this with TAP_OPENS at the top of the script ("auto" / "article" / "x"; set X_IN_APP = false if you don't have the X app).

The feed merges, deduped:

  • Anthropic newsroom (anthropic.com/news) — official announcements
  • Claude Code changelog (GitHub) — new releases
  • status.anthropic.com — active incidents from the last 48h jump the queue with a ⚠️
  • Google News — wider Claude/Anthropic press coverage

Install (~5 minutes)

  1. Get Scriptable (free) from the App Store.

  2. Add the script: copy the contents of Fablemaxxing.js, then in Scriptable tap +, paste, and name it Fablemaxxing.

  3. Connect your Claude account: tap Fablemaxxing in Scriptable → 🌍 Sign in with Claude. It opens claude.ai to authorize, you paste back the code it shows — done, entirely on your phone. The widget gets its own OAuth token (PKCE), independent of Claude Code's, stored only in your iOS Keychain.

    Alternative: export from your Mac

    On the Mac where you use Claude Code, run sh setup/export-credentials.sh and paste the JSON it prints into the setup prompt (📋 Paste from Mac). Caveat: this shares Claude Code's token family — if the tokens have rotated (common), do a fresh claude login first, and know that the CLI may occasionally ask you to log in again. The sign-in flow above avoids all of this.

  4. Add widgets: long-press your Home Screen → EditAdd Widget → Scriptable → pick a size → tap the widget → set Script to Fablemaxxing and Parameter to one of:

    Parameter Widget
    usage (or empty) the three rate-limit meters
    news one punchy headline, rotates ~15 min, tap → source
    news:0, news:1, … headline pinned to item #1, #2, …
    newslist several headlines as a compact list
    both meters + latest headline in one widget

More than one headline at a time

iOS home-screen widgets can't detect swipe gestures (Apple limitation — widgets only support taps), which is why the default is one rotating tap-through headline. If you want more:

  • Widget stack: stack several news:0 / news:1 / news:2 widgets (drag one widget onto another). Swiping the stack flips through headlines without leaving the Home Screen.
  • News deck: tap the background of a newslist widget → a full-screen deck opens in Scriptable where you genuinely swipe left/right through every headline, usage meters on top.

How the usage data works

Claude Code authenticates with OAuth. The widget reuses those credentials to call the same usage endpoint the /usage command uses (api.anthropic.com/api/oauth/usage), refreshing the access token when it expires — identical to how community tools like ccusage statuslines work.

  • Credentials live only in your iOS Keychain and are sent only to api.anthropic.com / console.anthropic.com. No third-party server, no analytics, nothing else.
  • This is an unofficial endpoint; if Anthropic changes the response shape the widget parses defensively (any { utilization, resets_at } object becomes a meter row), but no guarantees.
  • If tokens are rotated by a new Claude Code login on your Mac, re-run step 3.

Why not the actual X accounts (@ClaudeDevs / @ClaudeAI)?

X removed free API access and third-party mirrors (Nitter instances, OpenRSS) are dead or blocked — verified at build time (empty bodies / 503s). Everything those accounts announce lands on anthropic.com/news, the Claude Code changelog, or press coverage within hours, so the feed above catches it without a $100/mo X API plan — and tapping an official headline still drops you onto @ClaudeAI / @ClaudeDevs in the X app, where the matching post is at the top of the profile. If you have X API access, fetchNews() is a 10-line addition — PRs welcome.

Troubleshooting

  • "Open Fablemaxxing in Scriptable to connect" — run the script in-app once and paste credentials (step 3).
  • "stale" in the header — last fetch failed; showing cached values. Usually transient (token refresh rate limits, network).
  • Meters disagree with claude.ai — the endpoint updates with a small lag; countdowns are computed client-side and are exact.
  • Widget doesn't update often — iOS controls refresh cadence (roughly every 15–30 min, less on low battery). That's an OS policy, not the script.

Files

MIT © odripads

About

Claude usage meters + Claude news on your iPhone Home Screen. A Scriptable widget.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors