{"id":51117578,"url":"https://github.com/xodapi/neurogate-limit-watch","last_synced_at":"2026-06-24T23:01:31.045Z","repository":{"id":366343110,"uuid":"1275897334","full_name":"xodapi/neurogate-limit-watch","owner":"xodapi","description":"Single-binary Rust NeuroGate quota monitor for Codex/Droid workflows","archived":false,"fork":false,"pushed_at":"2026-06-21T11:48:52.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-21T12:20:24.791Z","etag":null,"topics":["abtop","cli","codex","droid","limits","monitoring","neurogate","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/xodapi.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":"SECURITY.md","support":null,"governance":null,"roadmap":"ROADMAP.md","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-06-21T09:24:19.000Z","updated_at":"2026-06-21T11:48:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/xodapi/neurogate-limit-watch","commit_stats":null,"previous_names":["xodapi/neurogate-limit-watch"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/xodapi/neurogate-limit-watch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xodapi%2Fneurogate-limit-watch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xodapi%2Fneurogate-limit-watch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xodapi%2Fneurogate-limit-watch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xodapi%2Fneurogate-limit-watch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xodapi","download_url":"https://codeload.github.com/xodapi/neurogate-limit-watch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xodapi%2Fneurogate-limit-watch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34752465,"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-24T02:00:07.484Z","response_time":106,"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":["abtop","cli","codex","droid","limits","monitoring","neurogate","rust"],"created_at":"2026-06-24T23:01:30.057Z","updated_at":"2026-06-24T23:01:31.036Z","avatar_url":"https://github.com/xodapi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# neurogate-limit-watch\n\n[English](README.md) | [Русский](README.ru.md)\n\n[![CI](https://github.com/xodapi/neurogate-limit-watch/actions/workflows/ci.yml/badge.svg)](https://github.com/xodapi/neurogate-limit-watch/actions/workflows/ci.yml)\n\nSingle-binary Rust CLI for safely checking NeuroGate quota usage in\nCodex/Droid/Claude/Cursor workflows.\n\n`nglimit` polls NeuroGate `GET /v1/me`, summarizes credit/request usage for\n5-hour, 24-hour, 7-day, and 30-day windows, includes an abtop-style live\nterminal monitor, and can merge local\n`abtop --status-json` agent status. It is built as a native executable, so\nusers do not need Python, pip, venv, Node, or API SDK dependencies.\n\n![demo](assets/demo.svg)\n\n## Why\n\nVibe coders need to know whether they can safely keep a Codex/Droid/Claude\nsession running or whether they are about to hit NeuroGate limits. The tool is\nsmall, local-first, and intentionally avoids storing API keys or logging\nprivate prompts.\n\n## NeuroGate Referral Bonus\n\nOptional: new NeuroGate users can register with this referral link and receive\n`$5` on their account:\n\nhttps://portal.neurogate.space/invite?ref=cbvBMDP06DSwPL9u\n\nThe referral link is not required to use this project. The CLI does not send\nreferral data anywhere.\n\n## Download\n\nRelease binaries:\n\nhttps://github.com/xodapi/neurogate-limit-watch/releases\n\nPick the archive for your platform, unpack it, then run:\n\n```bash\nnglimit --version\nnglimit --demo\nnglimit --demo --monitor\n```\n\nWindows PowerShell:\n\n```powershell\n.\\nglimit.exe --version\n.\\nglimit.exe --demo\n.\\nglimit.exe --demo --monitor\n```\n\nIf you double-click `nglimit.exe` in Explorer, the Windows console will stay\nopen after the command finishes. The Windows archive also includes\n`nglimit-open.cmd`, a double-click helper that always pauses at the end, and\n`nglimit-monitor.cmd` for launching the live monitor directly.\n\n## .env Next To The Binary\n\nYou can keep the NeuroGate API key in a local `.env` file next to `nglimit`\nor in the directory where you run it. The release archive includes\n`.env.example`.\n\n```bash\ncp .env.example .env\n```\n\nEdit `.env`:\n\n```dotenv\nNEUROGATE_API_KEY=YOUR_NEUROGATE_API_KEY\nNEUROGATE_API_BASE=https://api.neurogate.space\n```\n\nThen run:\n\n```bash\nnglimit\nnglimit --compact\nnglimit --json\n```\n\nWindows PowerShell:\n\n```powershell\nCopy-Item .env.example .env\nnotepad .env\n.\\nglimit.exe --compact\n```\n\nDouble-click option on Windows:\n\n```text\nnglimit-open.cmd\nnglimit-monitor.cmd\n```\n\nLookup order:\n\n1. `--env-file \u003cPATH\u003e`\n2. `.env` in the current directory\n3. `.env` next to the `nglimit` executable\n\nReal environment variables have priority over `.env` values. `.env` is ignored\nby git and should not be committed.\n\n## Build From Source\n\nRequirements: Rust stable.\n\n```bash\ngit clone https://github.com/xodapi/neurogate-limit-watch.git\ncd neurogate-limit-watch\ncargo build --release --locked\n```\n\nBinary location:\n\n- Windows: `target/release/nglimit.exe`\n- Linux/macOS: `target/release/nglimit`\n\n## Usage\n\nTry without a key or network:\n\n```bash\nnglimit --demo\nnglimit --demo --json\n```\n\nUse a real NeuroGate key:\n\n```bash\nexport NEUROGATE_API_KEY=\"YOUR_NEUROGATE_API_KEY\"\nnglimit\nnglimit --json\nnglimit --with-abtop\n```\n\nWindows PowerShell:\n\n```powershell\n$env:NEUROGATE_API_KEY = \"YOUR_NEUROGATE_API_KEY\"\n.\\nglimit.exe\n.\\nglimit.exe --json\n```\n\nMock a saved `/v1/me` payload:\n\n```bash\nnglimit --mock tests/fixtures/me.json\nnglimit --mock tests/fixtures/me.json --json\n```\n\nWatch mode:\n\n```bash\nnglimit --watch 60 --with-abtop\nnglimit --watch 60 --notify\n```\n\nLive monitor:\n\n```bash\nnglimit --monitor\nnglimit --monitor --watch 10\nnglimit --monitor --with-abtop\nnglimit --monitor --notify\n```\n\nMonitor presets for different terminal sizes:\n\n```bash\nnglimit --monitor --preset full      # 2-column grid, sparklines (default)\nnglimit --monitor --preset compact   # single-column, gauge + metrics\nnglimit --monitor --preset mini      # one line per window, minimal\n```\n\nPer-window thresholds:\n\n```bash\nnglimit --monitor --threshold 5h=80:95,7d=90\nnglimit --fail-on warning --threshold 24h=85:98\n```\n\nFormat: `KEY=WARNING[:DANGER]` where KEY is one of `5h`, `24h`, `7d`, `30d`.\nPer-window thresholds override `--warning`/`--danger` for those windows.\n\nIn monitor mode, press `r` to refresh immediately and `q` or `Esc` to quit.\nIt renders an abtop-style dashboard with NeuroGate quota windows, warning\nalerts, reset timers, remaining credits/requests, and optional local\nCodex/Claude agent context from `abtop --status-json`.\n\nDesktop notifications:\n\n```bash\nnglimit --notify\nnglimit --watch 60 --notify\nnglimit --monitor --notify\n```\n\n`--notify` sends a local desktop alert when a quota window escalates into\n`warning` or `danger`. It keeps one in-process state map, so polling and\nmonitor loops do not spam the same alert on every refresh. De-escalation after a\nwindow reset is silent.\n\nCI/automation threshold:\n\n```bash\nnglimit --fail-on warning\nnglimit --fail-on danger --json\nnglimit --warning 80 --danger 95 --fail-on warning\n```\n\nCompact one-line output for widgets/status bars:\n\n```bash\nnglimit --compact\nnglimit --compact --with-abtop\n```\n\n## Output\n\nHuman output:\n\n```text\nNeuroGate limits\n  5h   warning reset in 2h 30m\n       credits  39/50 (78.0%, left 11)\n       requests 610/1000 (61.0%, left 390)\n```\n\nJSON output:\n\n```json\n{\n  \"source\": \"neurogate\",\n  \"windows\": [\n    {\n      \"window\": \"5h\",\n      \"level\": \"warning\",\n      \"credits\": { \"used\": 39.0, \"limit\": 50.0, \"remaining\": 11.0, \"percent\": 78.0 }\n    }\n  ],\n  \"abtop\": null\n}\n```\n\n## Safety\n\n- API key is read only from the environment variable `NEUROGATE_API_KEY`.\n- The key is never written to disk.\n- Errors do not print the key.\n- JSON output intentionally omits account identity fields.\n- `--with-abtop` uses `abtop --status-json`, which is the compact,\n  privacy-preserving abtop payload without local paths, prompts, chat text, or\n  session IDs.\n- `--monitor` uses the same privacy-safe summaries and keeps the API key out of\n  the terminal output.\n- `--notify` only passes quota summary text to a local OS notification helper:\n  Windows PowerShell toast/fallback popup, macOS `osascript`, or Linux/BSD\n  `notify-send`.\n- No telemetry, no external network calls except NeuroGate `/v1/me`.\n\n## Configuration\n\nEnvironment variables:\n\n- `NEUROGATE_API_KEY`: NeuroGate API key.\n- `NEUROGATE_API_BASE`: API base URL, default `https://api.neurogate.space`.\n- `ABTOP_BIN`: abtop binary path, default `abtop`.\n\nCLI options:\n\n```bash\nnglimit --help\n```\n\n## Discussions\n\nIdeas, feature requests, and NeuroGate/Codex/Droid workflow notes are welcome\nin GitHub Discussions:\n\nhttps://github.com/xodapi/neurogate-limit-watch/discussions\n\nSee [ROADMAP.md](ROADMAP.md) for the current improvement backlog.\n\n## Supported OS\n\n- Windows (x86_64)\n- macOS (aarch64)\n- Linux (x86_64, aarch64)\n- Android/Termux — see [docs/termux.md](docs/termux.md)\n\n## Tests\n\n```bash\ncargo test --locked\ncargo clippy --all-targets -- -D warnings\ncargo fmt --check\ncargo run --locked -- --demo --json\n```\n\n## What works\n\n- Native Rust CLI and GUI (build with `--features gui`).\n- NeuroGate `/v1/me` polling with robust schema tolerance.\n- 5h / 24h / 7d / 30d credit and request windows.\n- Human, JSON, and compact output modes.\n- Full-screen ratatui monitor with gauges, sparklines, color coding.\n- Monitor presets: `full`, `compact`, `mini` for different terminal sizes.\n- Per-window thresholds: `--threshold 5h=80:95,7d=90`.\n- `.env` file next to the binary or working directory.\n- Custom warning/danger thresholds.\n- Desktop notifications with escalation tracking.\n- Demo/mock mode without a key.\n- Optional local abtop integration.\n- CI and release workflow for native binaries (Windows, Linux, macOS, ARM).\n- PowerShell install/uninstall scripts.\n- Termux/Android install guide.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxodapi%2Fneurogate-limit-watch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxodapi%2Fneurogate-limit-watch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxodapi%2Fneurogate-limit-watch/lists"}