{"id":50795838,"url":"https://github.com/dpkay-io/claude-shift","last_synced_at":"2026-06-12T14:33:27.874Z","repository":{"id":360873480,"uuid":"1252013189","full_name":"dpkay-io/claude-shift","owner":"dpkay-io","description":"Always have a fresh Claude session when you start working.  Stop hitting usage limits mid-flow. claude-shift aligns your Claude Max 5-hour windows with your actual schedule — automatically, in the background.","archived":false,"fork":false,"pushed_at":"2026-06-05T17:00:35.000Z","size":195,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-05T19:11:12.108Z","etag":null,"topics":["claude-code","claude-session-management","productivity","scheduler"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/claude-shift","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dpkay-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-28T05:38:37.000Z","updated_at":"2026-06-05T17:00:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dpkay-io/claude-shift","commit_stats":null,"previous_names":["dpkay-io/claude-shift"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dpkay-io/claude-shift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpkay-io%2Fclaude-shift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpkay-io%2Fclaude-shift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpkay-io%2Fclaude-shift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpkay-io%2Fclaude-shift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpkay-io","download_url":"https://codeload.github.com/dpkay-io/claude-shift/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpkay-io%2Fclaude-shift/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34249560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-code","claude-session-management","productivity","scheduler"],"created_at":"2026-06-12T14:33:27.787Z","updated_at":"2026-06-12T14:33:27.870Z","avatar_url":"https://github.com/dpkay-io.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# claude-shift\n\n**Always have a fresh Claude session when you start working.**\n\nStop hitting usage limits mid-flow. **claude-shift** aligns your Claude Max 5-hour windows with your actual schedule — automatically, in the background.\n\n![claude-shift CLI](https://raw.githubusercontent.com/dpkay-io/claude-shift/main/cli.png)\n\n## Install\n\n```bash\nnpm install -g claude-shift\n```\n\nRequires Node.js 18+ and [Claude CLI](https://claude.ai/download).\n\n## Quick start\n\nInteractive setup:\n\n```bash\nclaude-shift init\n```\n\nOr configure directly — tell it when you work, and let it do the math:\n\n```bash\n# Set your work schedule\nclaude-shift smart --slots \"09:00-14:00,20:00-23:00\" --days weekdays\n\n# Register with your OS scheduler\nclaude-shift install\n\n# See your weekly timeline\nclaude-shift week\n```\n\nDone. Pings fire automatically every day before your work blocks.\n\n## The problem\n\nClaude Max runs on a **5-hour usage window**. The moment you send a message, a 5-hour timer starts. When it expires, you get a fresh window. Simple enough — until you realize **you don't control when the timer starts.**\n\nA casual question at 7am means your window expires at noon. If you're deep in work from 9am to 2pm, your session resets right in the middle of it.\n\n```\nWithout claude-shift:\n\n  7:00 AM   Quick Claude question                ← 5h timer starts\n  9:00 AM   Deep work begins                     ← only 3h left\n 12:00 PM   Window expires mid-work              ← flow broken ✗\n```\n\nThis happens every day. Your window boundaries drift based on whenever you last used Claude, and they inevitably land at the worst possible moment.\n\n**You're paying $100-200/month for Claude Max.** Random resets shouldn't dictate when you can use it.\n\n## The solution\n\n**claude-shift** pings Claude automatically during your downtime — while you sleep, commute, or sit in meetings. This burns through a window cycle during hours you don't care about, so a **fresh 5-hour window is ready when you actually sit down to work.**\n\n```\nWith claude-shift:\n\n  4:00 AM   Auto-ping fires (you're asleep)      ← starts a window cycle\n  9:00 AM   Old window expired, fresh one starts  ← full 5h available ✓\n  2:00 PM   Uninterrupted deep work\n```\n\n**Tell it your work hours. It calculates the optimal ping times. Your OS runs them automatically.**\n\n## How it works\n\n1. **You define when you work** — provide your work windows (smart mode) or exact ping times (manual mode)\n2. **claude-shift calculates** when to fire pings so that fresh 5h windows line up with your work blocks\n3. **Your OS scheduler runs the pings** — each one briefly opens Claude CLI, sends a message, and exits\n\nThat's it. No daemon, no background process. Just your OS's native scheduler doing its job:\n- **Windows** — Task Scheduler (`schtasks`)\n- **macOS** — launchd (`~/Library/LaunchAgents`)\n- **Linux** — cron (`crontab`)\n\n## Smart mode (recommended)\n\nTell claude-shift when you work. It figures out the rest:\n\n```bash\nclaude-shift smart --slots \"06:30-08:00,09:00-11:00,20:00-23:00\" --days weekdays\n```\n\n```\nSmart mode calculation:\n  Slot duration: 5h | Burn rate: 2h\n\n  Your work windows:\n    6:30am – 8am on weekdays\n    9am – 11am on weekdays\n    8pm – 11pm on weekdays\n\n  Calculated pings:\n    Ping at 04:00 → slot 04:00–09:00 for your 06:30–11:00 window\n    Ping at 17:00 → slot 17:00–22:00 for your 20:00–23:00 window\n\n✓ 2 smart trigger(s) configured.\nℹ Run `claude-shift install` to activate with your OS scheduler.\n```\n\nYour two morning blocks (6:30–8am and 9–11am) are close together, so **one ping at 4am covers both**. The slot runs 4–9am, then a fresh one kicks in at 9am for your second block. Your evening window gets a pre-burn ping at 5pm — the slot ticks through your downtime so a fresh window renews at 10pm. This is intentional: you use the tail end of the first slot from 8–10pm (matching your 2-hour burn rate limit), and right as you might hit your usage limit, a fresh window starts at 10pm to carry you through the rest of your session.\n\nOptions:\n- `-s, --slots` — Work windows (`HH:mm-HH:mm`, comma-separated)\n- `-d, --days` — Days to apply (`weekdays`, `weekends`, `daily`, `mon-fri`, `mon,wed,fri`)\n- `-b, --burn-rate` — How long a window typically lasts for you, in hours (default: 2)\n- `-y, --yes` — Skip confirmation prompt\n\n## Manual mode\n\nSet exact ping times yourself:\n\n```bash\nclaude-shift add 03:00 --days weekdays\nclaude-shift add 16:30 --days mon,wed,fri\nclaude-shift add 06:00 --once             # One-time trigger for today\nclaude-shift add 06:00 --once 2025-01-15  # One-time trigger for a specific date\n```\n\n## View your schedule\n\n```bash\nclaude-shift today    # Today's timeline\nclaude-shift week     # Full week view\nclaude-shift list     # All configured triggers\nclaude-shift status   # Scheduler status + ping logs\n```\n\nWeekly timeline output:\n\n```\n  Schedule Timeline\n\n      00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23\n      ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵  ╵\n\n  Mon █████████   ⚡██████████████●██████████████         ⚡██████████████●█████\n\n  Tue █████████   ⚡██████████████●██████████████         ⚡██████████████●█████\n\n  ⚡ ping  ● renew  █ work  █ slot (5h)\n```\n\nColors in your terminal distinguish work windows (green) from slot coverage (gray).\n\n## Manage triggers\n\n```bash\nclaude-shift remove 001   # Remove a trigger by ID\nclaude-shift uninstall    # Remove all from OS scheduler\nclaude-shift ping         # Test a ping right now\n```\n\n## Configuration\n\nConfig is stored at `~/.claude-shift/config.json`. Logs at `~/.claude-shift/ping.log`.\n\n```bash\nclaude-shift config get                          # Show all settings\nclaude-shift config set burnRate 3               # Update a setting\nclaude-shift config set pingPath /path/to/project  # Set ping working directory\nclaude-shift config set pingPath /path --verify  # Set and validate with a test ping\n```\n\n| Setting | Default | Description |\n|---------|---------|-------------|\n| `slotDuration` | `5` | Claude Max window duration in hours |\n| `burnRate` | `2` | How long a window typically lasts for you (hours) |\n| `claudePath` | `claude` | Path to Claude CLI binary |\n| `nodePath` | *(auto-detected)* | Path to Node.js binary |\n| `pingPath` | *(empty)* | Working directory for pings (falls back to home dir) |\n| `pingMessage` | `ping` | Message sent to start the session |\n\n## Platform notes\n\n**Windows** — Tasks run when you're logged in. For overnight pings (e.g., 4am), your machine must be awake. Consider disabling sleep or using wake timers.\n\n**macOS** — launchd fires missed pings on next wake. Overnight pings work even if your Mac was asleep.\n\n**Linux** — cron uses absolute paths to avoid PATH issues in the cron environment.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpkay-io%2Fclaude-shift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpkay-io%2Fclaude-shift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpkay-io%2Fclaude-shift/lists"}