{"id":28650536,"url":"https://github.com/lighttigerxiv/caffeine-cli","last_synced_at":"2025-06-13T05:05:50.577Z","repository":{"id":274790056,"uuid":"924080846","full_name":"lighttigerXIV/caffeine-cli","owner":"lighttigerXIV","description":"A caffeine cli app to keep the screen awake. (Linux Only)","archived":false,"fork":false,"pushed_at":"2025-01-30T20:04:50.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T12:20:30.691Z","etag":null,"topics":["caffeine","cli","linux","rust","timer"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/caffeine-cli","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/lighttigerXIV.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-01-29T11:35:20.000Z","updated_at":"2025-01-30T20:05:07.000Z","dependencies_parsed_at":"2025-01-29T12:40:47.206Z","dependency_job_id":null,"html_url":"https://github.com/lighttigerXIV/caffeine-cli","commit_stats":null,"previous_names":["lighttigerxiv/caffeine-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lighttigerXIV/caffeine-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lighttigerXIV%2Fcaffeine-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lighttigerXIV%2Fcaffeine-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lighttigerXIV%2Fcaffeine-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lighttigerXIV%2Fcaffeine-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lighttigerXIV","download_url":"https://codeload.github.com/lighttigerXIV/caffeine-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lighttigerXIV%2Fcaffeine-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259584828,"owners_count":22880202,"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":["caffeine","cli","linux","rust","timer"],"created_at":"2025-06-13T05:05:49.906Z","updated_at":"2025-06-13T05:05:50.545Z","avatar_url":"https://github.com/lighttigerXIV.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ☕ Caffeine Cli\n\nJust another caffeine tool, but this one should work. It uses systemd inhibit to manage the idling part.\n\n# How To Install\n\nTo install run:\n\n```bash\ncargo install caffeine-cli\n```\n\nAlternatively you can manually download the release binary in the [releases](https://github.com/lighttigerXIV/caffeine-cli/releases) page.\n\n# Usage\n\nTo install it as you can use cargo to add it or manually add the library in cargo.toml:\n\n```bash\ncargo add caffeine-cli\n```\n\nTo add it in the cargo.toml:\n\n```toml\ncaffeine-cli = \"1.0.1\"\n```\n\nYou can also use this as a library:\n\nTo start and get a session you can use the init_session command:\n\n```rust\n// Starts an endless session\nlet session = init_session(None).unwrap();\n\n// Starts with a protected session (no other sessions can be created if there's an active session)\nlet session = init_protected_session(None).unwrap();\n\n// For a timed session (seconds)\nlet session = init_session(Some(4 * 60)).unwrap();\n\n// Starts with a timed protected session\nlet session = init_protected_session(Some(4 * 60)).unwrap();\n```\n\nTo end a session:\n\n```rust\n// Ends the given session\nend_session(session);\n\n// Ends the current protected session\nend_protected_session();\n```\n\n# Commands\n\nYou can run the following commands:\n\n`caffeine-cli {command}`\n\n| Command | Description                                                   |\n| ------- | ------------------------------------------------------------- |\n| enable  | Enables the caffeine session with an infinnite amount of time |\n| timed   | Enables the caffeine session with x amount of minutes         |\n| disable | Disables the current session                                  |\n| status  | Shows the status of the current session                       |\n\nAlternatively you can run the app and select the options in the menu:\n\n\u003cimg src=\"./cli-preview.webp\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flighttigerxiv%2Fcaffeine-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flighttigerxiv%2Fcaffeine-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flighttigerxiv%2Fcaffeine-cli/lists"}