{"id":51117646,"url":"https://github.com/nadimtuhin/cryo","last_synced_at":"2026-06-24T23:30:21.768Z","repository":{"id":366372051,"uuid":"1276041878","full_name":"nadimtuhin/cryo","owner":"nadimtuhin","description":"Automatically throttle runaway CPU and memory hogs on macOS and Linux","archived":false,"fork":false,"pushed_at":"2026-06-21T14:40:04.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-21T15:21:33.442Z","etag":null,"topics":["automation","bash","cli","dev-tools","macos","process-management","throttling"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/nadimtuhin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-06-21T13:20:40.000Z","updated_at":"2026-06-21T14:40:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nadimtuhin/cryo","commit_stats":null,"previous_names":["nadimtuhin/cryo"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/nadimtuhin/cryo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nadimtuhin%2Fcryo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nadimtuhin%2Fcryo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nadimtuhin%2Fcryo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nadimtuhin%2Fcryo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nadimtuhin","download_url":"https://codeload.github.com/nadimtuhin/cryo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nadimtuhin%2Fcryo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34753781,"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":["automation","bash","cli","dev-tools","macos","process-management","throttling"],"created_at":"2026-06-24T23:30:20.507Z","updated_at":"2026-06-24T23:30:21.742Z","avatar_url":"https://github.com/nadimtuhin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cryo\n\nAutomatically throttle runaway CPU and memory hogs on macOS and Linux.\n\nLeave cryo running in the background. If a process starts eating too much CPU or RAM, cryo drops its priority so your machine stays responsive. It also cleans up abandoned dev tools that hang around in the background.\n\n## Features\n\n- **CPU throttling** — processes using over 5% CPU go to nice +10. Anything over 50% drops to nice +19.\n- **Memory throttling** — same logic for processes consuming excessive RAM.\n- **Worker cleanup** — hunts down and kills orphaned eslint, puppeteer, vitest, or Claude snapshot processes.\n- **Dry run** — see what cryo would prioritize or terminate before making changes.\n- **Dashboard** — minimal terminal view of active throttles and cleanup stats.\n\n## Quick start\n\n```bash\n# Preview what would be reniced\ncryo --once --dry-run\n\n# Run in the foreground\ncryo\n\n# Run as a background daemon\nnohup cryo \u003e /tmp/cryo.log 2\u003e\u00261 \u0026\n```\n\n## Install\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/nadimtuhin/cryo/main/install.sh | bash\n```\n\nRequires Bash 4+. If you are on default macOS Bash (version 3), upgrade via Homebrew:\n\n```bash\nbrew install bash\n```\n\n## Configuration\n\n| Flag | Default | Description |\n|------|---------|-------------|\n| `--once` | false | Run one pass and exit |\n| `--dry-run` | false | Preview changes without modifying processes |\n| `--interval N` | 60 | Seconds between passes |\n| `--threshold N` | 5.0 | CPU % threshold to trigger priority drop |\n| `--mem-threshold N` | 5.0 | Memory % threshold to trigger priority drop |\n| `--top N` | 0 (all) | Limit visualization to the top N resource users |\n| `--eslint-max-age N` | 600 | Max lifetime for eslint workers in seconds |\n| `--puppeteer-max-age N` | 600 | Max lifetime for puppeteer/chrome workers |\n| `--vitest-max-age N` | 300 | Max lifetime for vitest processes |\n| `--claude-snapshot-max-age N` | 300 | Max lifetime for shell snapshot processes |\n| `--kill` | — | Stop the active daemon |\n| `--help` | — | Show usage options |\n\n## Example output\n\n```\ncryo  14:23:05  ⟳ 60s  cpu≥5.0%  mem≥5.0%\n──────────────────────────────────────────────────\n  PROCESS (PID)                  CPU%    MEM%  NICE\n──────────────────────────────────────────────────\n  ● eslint (84211)                67.3%    2.1%  +19\n  └                                                     67.3%    2.1%  +19\n  ▲ node (83302)                  12.8%    3.4%  +10\n  └                                                     12.8%    3.4%  +10\n  ○ chromium (84901)               0.0%    6.2%  +10\n  └                                                      0.0%    6.2%  +10\n──────────────────────────────────────────────────\n  3 processes throttled\n  ✖ killed 2 stale/orphan eslint worker(s)\n```\n\nIndicators:\n- **● (red)** — high CPU usage (50%+)\n- **▲ (yellow)** — moderate CPU usage (threshold to 50%)\n- **○ (cyan)** — high memory usage\n\n## Mechanics\n\nOn every interval, cryo:\n1. Gathers processes owned by the current user.\n2. Skips system processes (like WindowServer or launchd) and itself.\n3. Automatically applies lower execution priorities to processes exceeding threshold values.\n4. Searches for orphaned dev workers and runs a cleanup cycle.\n\nThrottling is one-way: cryo can lower a process's priority but cannot raise it back without root, so a throttled process stays niced until it exits.\n\n## Why use this?\n\nYou don't always know when a build task or test runner will spin out of control. Instead of manually chasing down PIDs or running every task under `nice`, cryo watches your system and handles the spikes for you.\n\n## Development\n\nStandalone test suite, no dependencies:\n\n```bash\nbash test_cryo.sh\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnadimtuhin%2Fcryo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnadimtuhin%2Fcryo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnadimtuhin%2Fcryo/lists"}