Skip to main content
awewarm

awewarm: Subscription Window Warmer

Keep AI coding-plan windows warm with one minimal request.

Connect once; awewarm detects what your Claude Code / Codex account or subscription endpoint can do, then makes sure the next usage window is always already open.

English · 简体中文

Ko-fi

Version Python License

Status pip install Platform PyPI downloads GitHub stars

Connect once, then never think about 5-hour resets again: awewarm detects what it can do and only then keeps the next window open.

awewarm manages two kinds of connections:

  • Account — your local claude / codex CLI logins. awewarm reuses their login state and sends one minimal headless request (Reply with exactly: ok). No credentials are stored.
  • Subscription plan — any OpenAI Chat / OpenAI Responses / Anthropic-compatible endpoint with a base URL + API key. The key goes to the macOS Keychain, never to disk.

It schedules those requests in three modes — fixed, interval, and hybrid — explained in Scheduling Modes below. Interval-style renewal stays locked until the window semantics are verified or user-confirmed; fixed is always safe.

Install

Requires Python ≥ 3.9:

pip3 install awewarm

The background scheduler installs on macOS (launchd), Windows (Task Scheduler), and Linux (systemd user timer — loginctl enable-linger $USER first on headless/SSH accounts). Where systemd is unavailable, cron the tick: * * * * * awewarm run.

Windows note: there is no Keychain there, so API keys use ${ENV_VAR} references — persist them with setx AWEWARM_API_KEY_<PLAN> "..." (scheduler tasks inherit user env vars).

Quick Start

Let an AI agent set it up

Working in Claude Code, Codex, or another coding agent? Tell it:

Read https://github.com/wehuman01/awewarm/blob/main/README.ai.md and follow it to install and configure awewarm.

The agent installs the CLI, scans your local accounts (read-only), and tunes schedules on request. Onboarding itself (awewarm init, awewarm config add) stays in your terminal — it prompts for choices and API keys. After setup you can ask things like "when is the next warm-up?" or "set claude-code to 06:35 and 12:35".

Manual setup

awewarm init        # scan local accounts, pick a schedule, install the scheduler
awewarm status      # see what will happen next

For a subscription endpoint instead:

awewarm config add

You will be asked for the protocol, API base URL, API key, and model; awewarm tests the endpoint with one minimal request, then stores the key in the Keychain. The same command also re-adds a local claude / codex account you removed earlier — it lists whatever is detected on this machine.

Companion Tools

awewarm is part of a small tool family for AI coding agents:

  • aweswitch — agent profile switcher for Claude Code, Codex, and OpenCode. aweswitch manages which provider a session launches with; awewarm keeps that provider's subscription window open underneath. If you launch coding-plan profiles with aweswitch, awewarm is the piece that keeps those 5-hour windows from going cold overnight.
  • aweskill — CLI skill package manager for AI agents (47+ agents).
  • aweshelf — session bookmark manager for Claude Code and Codex.
  • awerouter — smart LLM router: flash/pro split by structural signals.

Scheduling Modes

All modes send the same one minimal request — what differs is when it fires. Switch with awewarm config set <id> --mode fixed|interval|hybrid; see the current mode and next due moment with awewarm status.

Mode Fires when Needs a verified window Best for
fixed fixed times each day no predictable hours; unverified plans
interval window + grace after each success yes 24/7 warmth on an always-on machine
hybrid both of the above yes recommended default

fixed — absolute times, always safe

One request at each fixed local time (weekday or every-day); each hit opens a fresh window.

  • If the machine was asleep at the slot time, the slot still fires late within the catch-up window (default 45 min); past that it is recorded as skipped.
  • A slot landing within 30 min of a previous success is skipped — never pay for two windows at once.
  • The only mode that works while window semantics are unknown, which is why unverified plans start here.
awewarm config set claude-code --times 06:35,11:40,16:45   # 5 h + 5 min apart: windows chain across a workday
awewarm config set claude-code --mode fixed

Example — a laptop that sleeps at night: slots at 06:35 / 11:40 / 16:45 keep a window open from 06:35 to ~21:45 every weekday. The machine only needs to be awake within 45 min of each slot.

interval — rolling renewal

After each success the next request is scheduled window + grace later (default 300 min + 75 s, plus up to 30 s jitter). The grace runs after the old window has closed — firing earlier would land inside the old window and start nothing. With no success recorded yet, one request fires immediately as the first anchor.

awewarm run --now my-plan --confirm        # 1. one minimal request, timestamped
# ...watch when the plan's quota resets, note the elapsed minutes...
awewarm config set my-plan --window 300    # 2. record the window (unlocks interval)
awewarm config set my-plan --mode interval # 3. rolling renewal

Example — an always-on machine you want warm around the clock, nights and weekends included. After 3 consecutive failures renewal pauses itself (status shows degraded) and resumes on the next success.

hybrid — fixed anchor + interval renewal (recommended)

Both engines run together: interval keeps the chain unbroken, while fixed slots re-anchor it at deterministic times — so each workday still starts where you expect even if the machine slept through the interval due. A slot within 30 min of a recent interval success is skipped automatically.

awewarm config set claude-code --mode hybrid   # window already verified at init
awewarm config set claude-code --times 06:35   # one anchor per workday morning

Example — a verified account with a 06:35 weekday anchor: interval renews all day (renewal ignores the weekday rule and continues over the weekend), and Monday 06:35 re-anchors the chain no matter what happened overnight.

Config

Users never hand-edit config; init / config add generate it at ~/.config/awewarm/config.json (state at ~/.local/state/awewarm/state.json). The shape, for reference:

{
  "version": 1,
  "connections": {
    "claude-code": {
      "kind": "account",
      "enabled": true,
      "transport": {"kind": "claude-cli", "cliCommand": "claude"},
      "window": {"status": "verified", "durationMinutes": 300},
      "schedule": {
        "mode": "hybrid",
        "fixed": {"at": ["06:35"], "days": "weekday", "catchUpWindowMinutes": 45},
        "interval": {"graceSeconds": 75, "jitterSeconds": 30}
      }
    }
  }
}

Commands

awewarm init                          # interactive onboarding: scan accounts, pick schedules, install scheduler
awewarm discover                      # read-only scan of local CLIs and logins
awewarm config add                    # add a connection: a detected account or a subscription endpoint
awewarm config set <id> [flags]       # show or change settings: --times, --days, --mode, --on/--off, --anchor, --window
awewarm config remove <id>            # delete a connection, its state, and its stored API key
awewarm config path                   # config / state / log locations
awewarm status [<id>] [--json]        # summary; one connection in detail; redacted machine-readable dump
awewarm run [--dry-run]               # one scheduler tick (the background scheduler calls this)
awewarm run --now <id> --confirm      # send one real request immediately
awewarm scheduler install / uninstall # background scheduler (launchd / Task Scheduler / systemd)
awewarm update [--check]              # upgrade to the latest PyPI release

Commands from pre-0.3 releases (add plan, times, enable, disable, verify, anchor, activate, remove, install, uninstall, inspect, self-update) still work as hidden aliases; they print their new spelling and will be removed in v1.0.

Self-Update

awewarm checks PyPI in the background — at most once a day, and never during scheduler ticks. When a newer release exists, interactive commands print a reminder to stderr.

awewarm update            # upgrade to the latest release
awewarm update --check    # show versions only

To disable the background check:

export AWEWARM_NO_UPDATE_CHECK=1

Support

If awewarm saves your quota, consider supporting it:

  • ⭐ Star the repo — it helps others find it.
  • Ko-fi — buy me a coffee.

Development

pip install -e .
python3 -m unittest discover -s tests

See docs/CONTRIBUTING.md for the engineering doctrine and docs/CHANGELOG.md for release history.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

awewarm-0.3.0.tar.gz (69.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

awewarm-0.3.0-py3-none-any.whl (39.6 kB view details)

Uploaded Python 3

File details

Details for the file awewarm-0.3.0.tar.gz.

File metadata

  • Download URL: awewarm-0.3.0.tar.gz
  • Upload date:
  • Size: 69.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.15

File hashes

Hashes for awewarm-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d64ce9d4050bd56ed4098cf4ba2d37dd84b5c752b73d44c1dd08667eadd3a3f8
MD5 d171ab691d06f7ece2fa9b9799ff89e7
BLAKE2b-256 103694fed364ec388883ec641f462aa595ecc7c35ee4d07fbe3ed3a8643c7d23

See more details on using hashes here.

File details

Details for the file awewarm-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: awewarm-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 39.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.15

File hashes

Hashes for awewarm-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b015052a49a1ba148b9cc0722ee9fa7a8a05476039913638382dc4c3a7d5475
MD5 5b5e934679bfdc500f74d669e22f9643
BLAKE2b-256 28bf0916c8259974d0d1c4c64c51e4a4d91e25b0bbbbdc61cd9498e4bcc129d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page