{"id":44487832,"url":"https://github.com/milldr/crono","last_synced_at":"2026-03-13T15:33:46.706Z","repository":{"id":337901015,"uuid":"1155726104","full_name":"milldr/crono","owner":"milldr","description":"CLI for Cronometer automation via Kernel.sh","archived":false,"fork":false,"pushed_at":"2026-02-16T20:33:58.000Z","size":433,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-17T03:02:19.316Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/milldr.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-02-11T20:46:42.000Z","updated_at":"2026-02-16T20:34:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/milldr/crono","commit_stats":null,"previous_names":["milldr/crono"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/milldr/crono","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milldr%2Fcrono","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milldr%2Fcrono/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milldr%2Fcrono/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milldr%2Fcrono/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milldr","download_url":"https://codeload.github.com/milldr/crono/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milldr%2Fcrono/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29561782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T21:50:49.831Z","status":"ssl_error","status_checked_at":"2026-02-17T21:46:15.313Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-02-13T02:16:02.574Z","updated_at":"2026-03-13T15:33:46.692Z","avatar_url":"https://github.com/milldr.png","language":"TypeScript","funding_links":["https://ko-fi.com/milldr"],"categories":[],"sub_categories":[],"readme":"# 🍎 crono\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/milldr)\n\nCLI for Cronometer automation via [Kernel.sh](https://kernel.sh).\n\nCronometer has no public API, so crono automates the web UI through Kernel.sh browser automation. Log macros from your terminal in seconds.\n\n![crono quick-add demo](demo.gif)\n\n## Motivation\n\nCronometer is great for logging food — barcode scanning and manual search cover most meals at home. But when you're eating out or don't have a barcode, the workflow gets clunky: take a photo, ask an AI to estimate the macros, then manually punch those numbers into the app as a quick add.\n\ncrono closes that loop. Give your AI agent a skill that knows how to call crono, and it goes from estimating macros to actually logging them — no manual step in between. On top of that, your agent can query your diary, pull export data, and answer questions about your nutrition without you ever opening the app.\n\n## Quickstart\n\n### 1. Install\n\n```bash\nnpm install -g @milldr/crono\n```\n\n### 2. Log in\n\n```bash\ncrono login\n```\n\nYou'll be prompted for three things:\n\n- **Kernel API key** — get one at [kernel.sh](https://kernel.sh)\n- **Cronometer email** — your Cronometer account email\n- **Cronometer password** — stored securely in your system keychain\n\n```\n┌  crono login\n│\n◇  Kernel API key\n│  sk-abc...\n│\n◒  Validating API key...\n◇  API key valid.\n│\n◇  Cronometer email\n│  you@example.com\n│\n◇  Cronometer password\n│  ****\n│\n└  Credentials saved.\n```\n\n### 3. Log a meal\n\n```bash\ncrono quick-add -p 30 -c 100 -f 20 -a 14 -m Dinner -d yesterday\n```\n\n```\n┌  crono quick-add\n│\n◒  Logging into Cronometer...\n◇  Done.\n│\n└  Added: 30g protein, 100g carbs, 20g fat, 14g alcohol → Dinner on 2026-02-15\n```\n\n## Commands\n\n### `crono login`\n\nSet up or update your Kernel API key and Cronometer credentials. If credentials already exist, pressing Enter keeps the current value.\n\n```bash\ncrono login\n```\n\n### `crono quick-add`\n\nAdd a quick macro entry to your Cronometer diary.\n\n```bash\ncrono quick-add [options]\n```\n\n**Options:**\n\n| Flag | Long            | Description                                      |\n| ---- | --------------- | ------------------------------------------------ |\n| `-p` | `--protein \u003cg\u003e` | Grams of protein                                 |\n| `-c` | `--carbs \u003cg\u003e`   | Grams of carbohydrates                           |\n| `-f` | `--fat \u003cg\u003e`     | Grams of fat                                     |\n| `-a` | `--alcohol \u003cg\u003e` | Grams of alcohol                                 |\n| `-m` | `--meal \u003cname\u003e` | Meal category (Breakfast, Lunch, Dinner, Snacks) |\n| `-d` | `--date \u003cdate\u003e` | Date (YYYY-MM-DD, yesterday, -1d)                |\n\nAt least one macro flag (`-p`, `-c`, `-f`, or `-a`) is required.\n\n**Examples:**\n\n```bash\n# Log 30g protein\ncrono quick-add -p 30\n\n# Log full meal macros\ncrono quick-add -p 30 -c 100 -f 20\n\n# Log to Dinner category\ncrono quick-add -p 30 -c 50 -f 15 --meal Dinner\n\n# Log to yesterday\ncrono quick-add -p 30 -d yesterday -m Dinner\n\n# Log alcohol\ncrono quick-add -a 14 -m Dinner\n\n# Combine everything\ncrono quick-add -p 30 -c 50 -f 10 -a 14 -d -3d -m Dinner\n```\n\n### `crono add custom-food`\n\nCreate a custom food in Cronometer with specified macros.\n\n```bash\ncrono add custom-food \u003cname\u003e [options]\n```\n\n**Options:**\n\n| Flag | Long            | Description                                 |\n| ---- | --------------- | ------------------------------------------- |\n| `-p` | `--protein \u003cg\u003e` | Grams of protein                            |\n| `-c` | `--carbs \u003cg\u003e`   | Grams of carbohydrates                      |\n| `-f` | `--fat \u003cg\u003e`     | Grams of fat                                |\n|      | `--log [meal]`  | Also log to diary (optionally specify meal) |\n\nAt least one macro flag (`-p`, `-c`, or `-f`) is required.\n\n**Examples:**\n\n```bash\n# Create a custom food with all macros\ncrono add custom-food \"Wendy's Chicken Sandwich\" -p 50 -c 100 -f 50\n\n# Just protein and carbs\ncrono add custom-food \"Post-Workout Shake\" -p 40 -c 60\n\n# Create and immediately log to Uncategorized\ncrono add custom-food \"Wendy's Chicken Sandwich\" -p 50 -c 100 -f 50 --log\n\n# Create and immediately log to Dinner\ncrono add custom-food \"Wendy's Chicken Sandwich\" -p 50 -c 100 -f 50 --log Dinner\n```\n\n### `crono log`\n\nLog a saved food to your diary by name. Works with custom foods, custom recipes, and database items.\n\n```bash\ncrono log \u003cname\u003e [options]\n```\n\n**Options:**\n\n| Flag | Long                 | Description                                      |\n| ---- | -------------------- | ------------------------------------------------ |\n| `-m` | `--meal \u003cname\u003e`      | Meal category (Breakfast, Lunch, Dinner, Snacks) |\n| `-s` | `--servings \u003ccount\u003e` | Number of servings (default: 1)                  |\n\n**Examples:**\n\n```bash\n# Log a custom food\ncrono log \"Wendy's Chicken Sandwich\"\n\n# Log to a specific meal\ncrono log \"Wendy's Chicken Sandwich\" -m Dinner\n\n# Log multiple servings\ncrono log \"Post-Workout Shake\" -s 2 -m Snacks\n```\n\n### `crono weight`\n\nCheck your weight from Cronometer. Defaults to today if no date or range is specified.\n\n```bash\ncrono weight [options]\n```\n\n**Options:**\n\n| Flag | Long              | Description                               |\n| ---- | ----------------- | ----------------------------------------- |\n| `-d` | `--date \u003cdate\u003e`   | Date (YYYY-MM-DD)                         |\n| `-r` | `--range \u003crange\u003e` | Range (7d, 30d, or YYYY-MM-DD:YYYY-MM-DD) |\n|      | `--json`          | Output as JSON                            |\n\n`-d` and `-r` are mutually exclusive.\n\n**Examples:**\n\n```bash\n# Today's weight\ncrono weight\n# → 212.5 lbs\n\n# Specific date\ncrono weight -d 2026-02-05\n\n# Last 7 days\ncrono weight -r 7d\n# → 2026-02-11: 212.5\n# → 2026-02-10: 212.7\n# → 2026-02-09: 215.5\n# → ...\n\n# JSON output for scripting\ncrono weight --json\n# → {\"date\":\"2026-02-11\",\"weight\":212.5,\"unit\":\"lbs\"}\n\n# Range as JSON\ncrono weight -r 7d --json\n# → [{\"date\":\"2026-02-11\",\"weight\":212.5,\"unit\":\"lbs\"}, ...]\n```\n\n### `crono diary`\n\nView daily nutrition totals (calories, protein, carbs, fat) from Cronometer. Defaults to today if no date or range is specified.\n\n```bash\ncrono diary [options]\n```\n\n**Options:**\n\n| Flag | Long              | Description                               |\n| ---- | ----------------- | ----------------------------------------- |\n| `-d` | `--date \u003cdate\u003e`   | Date (YYYY-MM-DD)                         |\n| `-r` | `--range \u003crange\u003e` | Range (7d, 30d, or YYYY-MM-DD:YYYY-MM-DD) |\n| `-t` | `--targets`       | Show macro targets and progress           |\n|      | `--json`          | Output as JSON                            |\n\n`-d` and `-r` are mutually exclusive.\n\n**Examples:**\n\n```bash\n# Today's nutrition\ncrono diary\n# → 1847 kcal | P: 168g | C: 142g | F: 58g\n\n# Specific date\ncrono diary -d 2026-02-05\n\n# Last 7 days\ncrono diary -r 7d\n# → 2026-02-11: 1847 kcal | P: 168g | C: 142g | F: 58g\n# → 2026-02-10: 2103 kcal | P: 155g | C: 200g | F: 72g\n# → ...\n\n# Show targets and progress\ncrono diary --targets\n# → 2994 kcal (109% of 2746) | P: 239g | C: 311g | F: 95g\n\n# Targets with range (includes averages)\ncrono diary --targets -r 3d\n# → 2026-03-12: 2994 kcal (109% of 2746) | P: 239g | C: 311g | F: 95g\n# → 2026-03-11: 2770 kcal (100% of 2759) | P: 238g | C: 273g | F: 88g\n# → 2026-03-10: 2678 kcal (97% of 2750)  | P: 248g | C: 279g | F: 87g\n# → ───\n# → Average:    2814 kcal (102% of 2752)  | P: 242g | C: 288g | F: 90g\n\n# JSON output for scripting\ncrono diary --json\n# → {\"date\":\"2026-02-11\",\"calories\":1847,\"protein\":168,\"carbs\":142,\"fat\":58}\n\n# Range as JSON\ncrono diary -r 7d --json\n# → [{\"date\":\"2026-02-11\",\"calories\":1847,\"protein\":168,\"carbs\":142,\"fat\":58}, ...]\n```\n\n### `crono export`\n\nExport data directly from Cronometer's API — no browser automation, much faster than `diary` or `weight`.\n\n```bash\ncrono export \u003ctype\u003e [options]\n```\n\n**Types:**\n\n| Type         | Description                         |\n| ------------ | ----------------------------------- |\n| `nutrition`  | Daily nutrition totals (macros)     |\n| `exercises`  | Exercise entries with duration/cals |\n| `biometrics` | Biometric measurements (weight, BP) |\n\n**Options:**\n\n| Flag | Long              | Description                               |\n| ---- | ----------------- | ----------------------------------------- |\n| `-d` | `--date \u003cdate\u003e`   | Date (YYYY-MM-DD)                         |\n| `-r` | `--range \u003crange\u003e` | Range (7d, 30d, or YYYY-MM-DD:YYYY-MM-DD) |\n|      | `--csv`           | Output as raw CSV                         |\n|      | `--json`          | Output as JSON                            |\n\n`-d` and `-r` are mutually exclusive. `--csv` and `--json` are mutually exclusive.\n\n**Examples:**\n\n```bash\n# Today's nutrition\ncrono export nutrition\n# → 1847 kcal | P: 168g | C: 142g | F: 58g\n\n# Last 7 days of nutrition as JSON\ncrono export nutrition -r 7d --json\n\n# Today's exercises\ncrono export exercises\n# → Running: 30 min, 350 kcal\n\n# Biometrics for last 30 days\ncrono export biometrics -r 30d\n# → 2026-02-11: Weight: 212.5 lbs\n# → 2026-02-09: Blood Pressure: 120/80 mmHg\n\n# Raw CSV export\ncrono export nutrition -r 30d --csv\n```\n\n**GWT overrides:** If Cronometer updates break the export, override GWT values in `~/.config/crono/config.json` or via environment variables:\n\n```bash\nexport CRONO_GWT_PERMUTATION=\u003cnew-value\u003e\nexport CRONO_GWT_HEADER=\u003cnew-value\u003e\n```\n\n## Requirements\n\n- Node.js 18+\n- [Kernel.sh](https://kernel.sh) account (for browser automation)\n- [Cronometer](https://cronometer.com) account\n\n## Development\n\n```bash\ngit clone https://github.com/milldr/crono.git\ncd crono\nnpm install\n\n# Run in dev mode\nnpm run dev -- login\nnpm run dev -- quick-add -p 30\nnpm run dev -- weight -r 7d\nnpm run dev -- diary\n\n# Run tests\nnpm test\n\n# Build\nnpm run build\n```\n\n## Support\n\nI build and maintain projects like crono in my free time as personal hobbies. They're completely free and always will be. If you find this useful and want to show some support, feel free to buy me a coffee:\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/milldr)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilldr%2Fcrono","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilldr%2Fcrono","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilldr%2Fcrono/lists"}