{"id":25232018,"url":"https://github.com/pkarpovich/turtle-harbor","last_synced_at":"2026-03-08T01:11:03.563Z","repository":{"id":276222627,"uuid":"924084973","full_name":"pkarpovich/turtle-harbor","owner":"pkarpovich","description":"Docker-like script manager daemon for macOS with automatic restarts and cron scheduling","archived":false,"fork":false,"pushed_at":"2026-03-05T12:48:25.000Z","size":330,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-05T16:38:13.822Z","etag":null,"topics":["cron-scheduler","daemon","macos","process-manager","rust","script-management"],"latest_commit_sha":null,"homepage":"","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/pkarpovich.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":"2025-01-29T11:44:36.000Z","updated_at":"2026-03-05T12:48:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"9ea4d329-c396-443b-b341-9c288f46b046","html_url":"https://github.com/pkarpovich/turtle-harbor","commit_stats":null,"previous_names":["pkarpovich/turtle-harbor"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/pkarpovich/turtle-harbor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkarpovich%2Fturtle-harbor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkarpovich%2Fturtle-harbor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkarpovich%2Fturtle-harbor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkarpovich%2Fturtle-harbor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pkarpovich","download_url":"https://codeload.github.com/pkarpovich/turtle-harbor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkarpovich%2Fturtle-harbor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30240445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"ssl_error","status_checked_at":"2026-03-08T00:55:48.608Z","response_time":53,"last_error":"SSL_read: 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":["cron-scheduler","daemon","macos","process-manager","rust","script-management"],"created_at":"2025-02-11T12:54:59.186Z","updated_at":"2026-03-08T01:11:03.556Z","avatar_url":"https://github.com/pkarpovich.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Turtle Harbor\n\nTurtle Harbor is a daemon for managing scripts with automatic restart capabilities and cron scheduling. It\nprovides a Docker-like experience with familiar CLI commands (`th up`, `th down`, `th ps`) and YAML configuration,\nmaking it easy to manage local scripts and processes with the same patterns you use for containers.\n\nSupports macOS (ARM/Intel) and Linux (ARM/x86).\n\n## Features\n\n- Automatic restart of failed processes\n- Cron-based scheduling\n- Process status monitoring\n- Per-script logging\n- Robust state management\n- Simple CLI interface\n- Environment file support (`.env`) for secrets management\n- Cross-platform service install (`th install` / `th uninstall`)\n\n## Installation\n\n### Via Homebrew (macOS)\n\n```bash\nbrew install pkarpovich/apps/turtle-harbor\n```\n\n### From GitHub Releases\n\nDownload the latest release for your platform from [Releases](https://github.com/pkarpovich/turtle-harbor/releases), then extract and place `th` and `turtled` on your `PATH`:\n\n```bash\ntar -xzf turtle-harbor-*.tar.gz\nsudo mv th turtled /usr/local/bin/\n```\n\n### From Source\n\n```bash\ncargo build --release\n```\n\n## Usage\n\n### Configuration\n\nCreate a `scripts.yml` file in your working directory:\n\n```yaml\nsettings:\n  log_dir: \"./logs\"\n\nscripts:\n  backend:\n    command: \"./backend.sh\"\n    restart_policy: \"always\"\n    max_restarts: 5\n    cron: \"0 */1 * * * * *\"\n    env_file: \".env\"\n    env:\n      LOG_LEVEL: \"info\"\n```\n\n### Managing the Daemon\n\n```bash\n# Install as a system service (starts on boot)\nth install\n\n# With HTTP health endpoint\nth install --http-port 8080\n\n# Remove the system service\nth uninstall\n\n# Or run the daemon directly\nturtled\n```\n\n### CLI Commands\n\n```bash\n# Start all scripts\nth up\n\n# Start a specific script\nth up backend\n\n# Stop a script\nth down backend\n\n# View process status\nth ps\n\n# View logs\nth logs backend\n```\n\n## Configuration\n\n### Script Parameters\n\n| Parameter      | Description                              | Values            |\n|----------------|------------------------------------------|-------------------|\n| command        | Command to execute                       | String            |\n| restart_policy | Restart policy                           | \"always\", \"never\" |\n| max_restarts   | Maximum number of restarts               | Number (optional) |\n| cron           | Cron expression for scheduling           | String (optional) |\n| env_file       | Path to `.env` file for environment vars | String (optional) |\n| env            | Inline environment variables             | Map (optional)    |\n| context        | Working directory for the script         | String (optional) |\n| venv           | Python virtualenv path                   | String (optional) |\n\n### Environment Variables\n\nScripts can receive environment variables from two sources:\n\n- **`env_file`**: Path to a `.env` file (relative to `context` or working directory). Supports `KEY=VALUE` pairs, `#` comments, empty lines, and single/double quoted values.\n- **`env`**: Inline key-value map in `scripts.yml`.\n\nWhen both are specified, inline `env` values override `env_file` values for the same key.\n\n### Restart Policies\n\n- `always`: Automatically restart on failure\n- `never`: No automatic restart\n\n## File Locations\n\n### Production\n\n| Path | macOS | Linux |\n|------|-------|-------|\n| Socket | `~/Library/Application Support/turtle-harbor/daemon.sock` | `$XDG_RUNTIME_DIR/turtle-harbor.sock` |\n| State | `~/Library/Application Support/turtle-harbor/state.json` | `~/.local/share/turtle-harbor/state.json` |\n| Logs | `~/Library/Logs/turtle-harbor/` | `~/.local/share/turtle-harbor/logs/` |\n\n### Development\n\n| Path | Location |\n|------|----------|\n| Socket | `/tmp/turtle-harbor.sock` |\n| State | `/tmp/turtle-harbor-state.json` |\n| Logs | `./logs/` |\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## Development\n\n### Prerequisites\n\n- Rust (latest stable)\n- macOS or Linux\n- Cargo\n\n### Building\n\n```bash\ncargo fetch\ncargo build\ncargo build --release\n```\n\n### Testing\n\n```bash\ncargo test\n```\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkarpovich%2Fturtle-harbor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpkarpovich%2Fturtle-harbor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkarpovich%2Fturtle-harbor/lists"}