{"id":16705497,"url":"https://github.com/storopoli/dead-man-switch","last_synced_at":"2026-02-02T09:26:53.130Z","repository":{"id":229322735,"uuid":"772901582","full_name":"storopoli/dead-man-switch","owner":"storopoli","description":"Rust no-BS Dead Man's Switch library, TUI and Web Interface","archived":false,"fork":false,"pushed_at":"2024-10-02T08:51:26.000Z","size":1355,"stargazers_count":17,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-13T19:30:50.765Z","etag":null,"topics":["dead-man-switch","privacy","security","tui","web"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/storopoli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["storopoli"]}},"created_at":"2024-03-16T07:25:32.000Z","updated_at":"2024-10-02T08:51:30.000Z","dependencies_parsed_at":"2024-05-01T01:27:47.818Z","dependency_job_id":"633ebbce-a288-47a3-b7ac-d5c4363fe2e8","html_url":"https://github.com/storopoli/dead-man-switch","commit_stats":null,"previous_names":["storopoli/dead-man-switch"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/storopoli%2Fdead-man-switch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/storopoli%2Fdead-man-switch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/storopoli%2Fdead-man-switch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/storopoli%2Fdead-man-switch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/storopoli","download_url":"https://codeload.github.com/storopoli/dead-man-switch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221818374,"owners_count":16885736,"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":["dead-man-switch","privacy","security","tui","web"],"created_at":"2024-10-12T19:30:24.927Z","updated_at":"2026-02-02T09:26:53.124Z","avatar_url":"https://github.com/storopoli.png","language":"Rust","funding_links":["https://github.com/sponsors/storopoli"],"categories":[],"sub_categories":[],"readme":"# Dead Man's Switch\n\n[![AGPL-v3](https://img.shields.io/badge/License-AGPL\u0026nbsp;v3-lightgrey.svg)](https://opensource.org/license/agpl-v3/)\n[![Crates.io](https://img.shields.io/crates/v/dead-man-switch)](https://crates.io/crates/dead-man-switch)\n[![docs](https://img.shields.io/crates/v/dead-man-switch?color=yellow\u0026label=docs)](https://docs.rs/dead-man-switch)\n[![startos](https://img.shields.io/badge/startos-blue)](https://github.com/storopoli/dead-man-switch-startos)\n\nThis is a simple implementation of a\n[Dead Man's Switch](https://en.wikipedia.org/wiki/Dead_man%27s_switch).\n\nUse at your own risk.\nCheck the f****(as in friendly) code.\n\n![screenshot](https://github.com/storopoli/dead-man-switch/raw/main/screenshot.png)\n\nDead man's switches are designed to require positive action\nor they will automatically deploy.\nThey are ideal for situations where you are worried about unforeseen death,\nkidnapping, or memory loss.\nIf you don’t engage the trigger for a certain amount of time,\nthe switch automatically sends the desired message.\n\n## Features\n\n- **Simple**: Easy to use and setup.\n- **Reliable**: Implemented in Rust.\n- **Minimal**: Very few dependencies and needs minimal resources.\n- **Warning**: Sends a warning email before the final email.\n- **Attachments** (Optional): Send attachments with the final email.\n\n## How it Works\n\n\u003e If you want a very simple explanation and the motivation behind the project,\n\u003e check my blog post [here](https://storopoli.com/posts/2024-03-23-dead-man-switch.html).\n\nUpon starting the program it will create a [`config.toml`](config.example.toml)\nfile in an OS-agnostic config file location:\n\n- Linux: `$XDG_CONFIG_HOME`, i.e. `$HOME/.config`, `/home/alice/.config`\n- macOS: `$HOME/Library/Application Support`, i.e. `/Users/Alice/Library/Application Support`\n- Windows: `{FOLDERID_RoamingAppData}`, i.e. `C:\\Users\\Alice\\AppData\\Roaming`\n\nEdit the `config.toml` file to your liking.\nSome default values are provided for inspiration.\n\nDead Man's Switch comprises of two timers:\n\n1. **Warning Timer**: This timer is set to the `timer_warning` (seconds) value\n   in the `config.toml` file.\n   If the user do not check-in before timer reaches 0,\n   it will send a warning email to the users' own specified email address,\n   the `from` in the `config.toml`.\n1. **Dead Man's Timer**: After the warning timer expires, the timer will change\n   to a Dead Man's timer, and the timer will be set to the `timer_dead_man` (seconds).\n   If the user do not check-in before timer reaches 0,\n   it will send the final email to the specified email address in the `config.toml`,\n   i.e. the `to` in the `config.toml`.\n\nIf you want to send attachments with the Dead Man's email,\nyou can specify the `attachments` option config in the `config.toml`\nand provide the _absolute_ path to the file you want to attach.\n\nTo check-in, you just need to press the `c` key as in **c**heck-in.\n\n## Installation\n\nThere are several ways to install Dead Man's Switch:\n\n1. [Crates.io](https://crates.io/crates/dead-man-switch): `cargo install --locked dead-man-switch-tui`.\n1. [GitHub](https://github.com/storopoli/dead-man-switch): `cargo install --git --locked https://github.com/storopoli/dead-man-switch -p dead-man-switch-tui`.\n1. From source: Clone the repository and run `cargo install --locked --path .`.\n1. Using Nix: `nix run github:storopoli/dead-man-switch`.\n1. Using Nix Flakes: add this to your `flake.nix`:\n\n   ```nix\n   {\n     # ...\n     inputs.dead-man-switch = {\n       url = \"github:storopoli/dead-man-switch\";\n       inputs = {\n         nixpkgs.follows = \"nixpkgs\";\n         flake-parts.follows = \"flake-parts\";\n       };\n     };\n\n     outputs = inputs @ { self, ... }:\n     {\n       imports = [\n         {\n           nixpkgs.overlays = [\n             # ...\n             inputs.dead-man-switch.overlays.default\n           ];\n         }\n       ];\n     };\n\n   }\n   ```\n\n   Then `dead-man-switch` will be available as `pkgs.dead-man-switch`;\n\n## Using as a Library\n\nDead Man's Switch can be used as a library.\nThis includes all the functions necessary to configure and send emails;\nalong with the timers.\n\nTo do so you can add the following to your `Cargo.toml`:\n\n```toml\n[dependencies]\ndead-man-switch = \"0.9.0\"\n```\n\n## Web Interface\n\nThe Dead Man's Switch is also available as a web interface.\n\n![web interface](https://github.com/storopoli/dead-man-switch/raw/main/web-interface.png)\n\nTo use the web interface, please follow the instructions below:\n\n1. Change the configuration template file with your own values:\n\n   ```bash\n   cp config.example.toml config.toml\n   ```\n\n1. Copy the Docker Compose example file:\n\n   ```bash\n   cp docker-compose.example.yml docker-compose.yml\n   ```\n\n1. Run the Docker Compose:\n\n   ```bash\n   docker-compose up --detach\n   ```\n\n1. Make sure to [reverse proxy](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/)\n   the web interface with proper security measures such as HTTPS.\n\n## StartOS package\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/storopoli/dead-man-switch-startos/refs/heads/master/icon.png\" alt=\"Project Logo\" width=\"21%\"\u003e\n\u003c/p\u003e\n\nThe Web Interface can be easy deployed to any device that runs [startos](https://start9.com/).\nCheck the instructions at [`storopoli/dead-man-switch-startos`](https://github.com/storopoli/dead-man-switch-startos)\n\n## License\n\nThe source code is licensed under an\n[AGPL v3 License](https://opensource.org/license/agpl-v3/)\n\n[![AGPL-v3](https://upload.wikimedia.org/wikipedia/commons/thumb/0/06/AGPLv3_Logo.svg/320px-AGPLv3_Logo.svg.png)](https://opensource.org/license/agpl-v3/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstoropoli%2Fdead-man-switch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstoropoli%2Fdead-man-switch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstoropoli%2Fdead-man-switch/lists"}