A command-line sleep tracker that logs, analyzes, and reports sleep patterns. Version 1.4.0 is the latest stable release. Data is stored locally in SQLite at ~/.sleep-compiler/sleep.db with no cloud dependencies. Key differentiators: it operates entirely offline, supports active sleep sessions (sleep now / wake now), generates reports with quality thresholds and consistency scores, and exports CSV. Alternatives like Sleep as Android require a mobile app; sleep-compiler runs in the terminal for developers and privacy-conscious users.
npm install sleep-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates logging a sleep entry and retrieving a report programmatically using named imports.
Use import statements instead of require(). Update your package.json to include "type": "module" or use .mjs extension.
Do not manually modify or delete files in ~/.sleep-compiler/. Use the status command to check active sessions.
Always provide times in 24-hour format, e.g., '23:30' for 11:30 PM or '07:15' for 7:15 AM.
Use `sleep-compiler export --format csv` instead of `sleep-compiler export`.
Start a sleep session with `sleep-compiler sleep now` before calling `wake now`.
Add "type": "module" to package.json or rename file to .mjs.
Use 24-hour format: hours 00-23, minutes 00-59. Example: '23:30'.