{"id":22733377,"url":"https://github.com/gillstrom/cycles","last_synced_at":"2025-07-08T17:34:07.067Z","repository":{"id":36200157,"uuid":"40504384","full_name":"gillstrom/cycles","owner":"gillstrom","description":"Calculate sleep cycles to wake up more refreshed.","archived":false,"fork":false,"pushed_at":"2015-11-01T12:43:54.000Z","size":156,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-26T09:16:07.008Z","etag":null,"topics":["cli","cycle","duration","sleep","wake"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/gillstrom.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}},"created_at":"2015-08-10T20:25:20.000Z","updated_at":"2023-02-16T02:16:00.000Z","dependencies_parsed_at":"2022-08-31T05:03:20.387Z","dependency_job_id":null,"html_url":"https://github.com/gillstrom/cycles","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gillstrom%2Fcycles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gillstrom%2Fcycles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gillstrom%2Fcycles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gillstrom%2Fcycles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gillstrom","download_url":"https://codeload.github.com/gillstrom/cycles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246266250,"owners_count":20749754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cli","cycle","duration","sleep","wake"],"created_at":"2024-12-10T20:14:18.657Z","updated_at":"2025-03-30T01:45:22.189Z","avatar_url":"https://github.com/gillstrom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cycles [![Build Status](https://travis-ci.org/gillstrom/cycles.svg?branch=master)](https://travis-ci.org/gillstrom/cycles)\n\n\u003e Calculate sleep cycles to wake up more refreshed.\n\n*The human body goes through 90 minute sleep cycles during the night, and you feel more refreshed if you wake up at the end of a sleep cycle than if you wake up during a sleep cycle.*\n\n\n## Install\n\n```\n$ npm install --save cycles\n```\n\n\n## CLI\n\n```\n$ npm install --global cycles\n```\n```\n$ cycles --help\n\n  Usage\n    $ cycles\n    $ cycles \u003cBedtime\u003e\n    $ cycles --wake \u003cTime to wake up\u003e\n\n  Options\n    -d, --duration \u003cCycle duration in minutes\u003e\n    -w, --wake \u003cTime to wake up\u003e\n```\n\n\n## Usage\n\n```js\nvar cycles = require('cycles');\n\ncycles.sleep('23:37');\n/*\n\t{\n\t\t2: '02:37',\n\t\t3: '04:07',\n\t\t4: '05:37',\n\t\t5: '07:07',\n\t\t6: '08:37',\n\t\t7: '10:07'\n\t}\n*/\n\ncycles.wake('06:55');\n/*\n\t{\n\t\t2: '03:55',\n\t\t3: '02:25',\n\t\t4: '00:55',\n\t\t5: '23:25',\n\t\t6: '21:55',\n\t\t7: '20:25'\n\t}\n*/\n\ncycles.wake('06:55', {duration: 60});\n/*\n\t{\n\t\t2: '04:55',\n\t\t3: '03:55',\n\t\t4: '02:55',\n\t\t5: '01:55',\n\t\t6: '00:55',\n\t\t7: '23:55'\n\t}\n*/\n```\n\n\n## API\n\n### cycles.sleep([time], [opts])\n\n#### time\n\nType: `string`  \nDefault: Current time\n\nReturns an object with times to wake up for 2 to 7 sleep cycles.\n\n#### opts\n\nType: `object`\n\nOptions to pass to the function\n\n##### opts.duration\n\nType: `number`  \nDefault: `90`\n\nSet the cycle duration in minutes.\n\n### cycles.wake(times, [opts])\n\n#### time\n\n*Required*  \nType: `string`\n\nReturns an object with times to fall asleep for 2 to 7 sleep cycles.\n\n#### opts\n\nType: `object`\n\nOptions to pass to the function\n\n##### opts.duration\n\nType: `number`  \nDefault: `90`\n\nSet the cycle duration in minutes.\n\n\n## License\n\nMIT © [Andreas Gillström](http://github.com/gillstrom)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgillstrom%2Fcycles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgillstrom%2Fcycles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgillstrom%2Fcycles/lists"}