{"id":24962998,"url":"https://github.com/shuakami/fuckrun","last_synced_at":"2026-04-27T21:31:49.507Z","repository":{"id":271971827,"uuid":"914864877","full_name":"shuakami/FuckRun","owner":"shuakami","description":"A lightweight cross-platform process manager for Python applications with monitoring and auto-restart capabilities.","archived":false,"fork":false,"pushed_at":"2025-01-22T06:12:56.000Z","size":197,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T23:29:59.265Z","etag":null,"topics":["auto-restart","automation","cli","cross-platform","daemon","devops","monitoring","process-manager","python","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shuakami.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-10T13:18:11.000Z","updated_at":"2025-02-01T19:03:35.000Z","dependencies_parsed_at":"2025-01-11T05:31:22.641Z","dependency_job_id":"c3a41bb5-f160-4e0a-95ac-125d4aeb4e44","html_url":"https://github.com/shuakami/FuckRun","commit_stats":null,"previous_names":["shuakami/fuckrun"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/shuakami/FuckRun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuakami%2FFuckRun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuakami%2FFuckRun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuakami%2FFuckRun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuakami%2FFuckRun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shuakami","download_url":"https://codeload.github.com/shuakami/FuckRun/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuakami%2FFuckRun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32356598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["auto-restart","automation","cli","cross-platform","daemon","devops","monitoring","process-manager","python","rust"],"created_at":"2025-02-03T09:54:28.606Z","updated_at":"2026-04-27T21:31:49.490Z","avatar_url":"https://github.com/shuakami.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FuckRun 🚀\n\n[![简体中文](https://img.shields.io/badge/简体中文-red.svg?style=flat-square)](./README_ZH_CN.md)\n[![Version](https://img.shields.io/badge/version-1.0.0-FBC02D.svg?style=flat-square)]()\n[![Build](https://img.shields.io/badge/build-passing-FF9800.svg?style=flat-square)]()\n[![Platform](https://img.shields.io/badge/platform-Windows%20|%20Linux%20|%20macOS-2196F3.svg?style=flat-square)]()\n\n\u003e Welcome to the world of efficient program management! FuckRun is here to be your trusty assistant—taking care of running your processes, managing logs, and ensuring smooth operation with minimal effort.\n\n## Why Do You Need FuckRun? \n\nAs your project grows and you run more processes, you might find yourself overwhelmed by:\n- Multiple terminal windows for different tasks\n- Difficulty locating logs for each program\n- Sudden crashes without notifications\n- The hassle of manually restarting programs\n\nThat's where **FuckRun** steps in—streamlining everything into a well-organized system:\n- Manage all your processes from one place\n- Auto-record logs for every action\n- Instant notifications when something goes wrong\n- Automatically restart programs if needed\n\n## Unified Output Format \n\nTo make integration easier, **FuckRun** uses a simple, consistent output format for program statuses, allowing external programs (like Python) to easily parse and handle the data.\n\n### Output Format Explanation\n\nEvery status message follows this format:\n```\nSTATUS:ACTION:NAME[:PID]\n```\n\nWhere:\n- `STATUS` is a fixed prefix, indicating the message is a status update.\n- `ACTION` describes the action taken, such as:\n  - `STARTING`: Program is starting\n  - `STARTED`: Program has started (includes PID)\n  - `STOPPING`: Program is stopping\n  - `STOPPED`: Program has stopped\n  - `RUNNING`: Program is running (includes PID)\n- `NAME` is the program's name.\n- `PID` is the process ID (only for `STARTED` and `RUNNING` statuses).\n\n### Python Parsing Example\n\n```python\ndef parse_fuckrun_status(line):\n    \"\"\"Parses the output from FuckRun\"\"\"\n    if not line.startswith(\"STATUS:\"):\n        return None\n        \n    parts = line.strip().split(\":\")\n    if len(parts) \u003c 3:\n        return None\n        \n    status = {\n        \"action\": parts[1],\n        \"name\": parts[2],\n        \"pid\": int(parts[3]) if len(parts) \u003e 3 else None\n    }\n    return status\n\n# Example Usage\nimport subprocess\n\n# Start a program\nprocess = subprocess.Popen(\n    [\"fuckrun\", \"start\", \"-n\", \"web\"], \n    stdout=subprocess.PIPE,\n    text=True\n)\n\n# Read the output\nfor line in process.stdout:\n    status = parse_fuckrun_status(line)\n    if status:\n        print(f\"Program {status['name']} {status['action']}\")\n        if status['pid']:\n            print(f\"PID: {status['pid']}\")\n```\n\n### Example Status Output\n\n```bash\n# When starting a program\nSTATUS:STARTING:web\nSTATUS:STARTED:web:1234\n\n# When checking the status\nSTATUS:RUNNING:web:1234\n\n# When stopping a program\nSTATUS:STOPPING:web\nSTATUS:STOPPED:web\n\n# If an error occurs\nError: [Error message] \n```\n\n## Getting Started - 5-Minute Quickstart 🏃\n\n\u003e ⚠️ Before you begin:\n\u003e 1. Ensure you have [Git](https://git-scm.com/) installed\n\u003e 2. Avoid paths with spaces or Chinese characters\n\u003e 3. If you encounter permission issues, try running as Administrator\n\n### Step 1: Install FuckRun\n\nOpen your terminal (press Win+R and type `cmd` on Windows), and run:\n\n```bash\n# 1. Clone the repository\ngit clone https://github.com/yourusername/fuckrun\n\n# 2. Enter the directory\ncd fuckrun\n\n# 3. Build and install\ncargo build --release\n```\n\n\u003e 💡 If the build is slow, you can [download the precompiled version](https://github.com/yourusername/fuckrun/releases)\n\n### Step 2: Create a Configuration File\n\nCreate a `config.yaml` in your project directory:\n\n```yaml\n# config.yaml\nprocesses:\n  # 'web' is the name of the program, you can change it\n  web:\n    # Use python to run app.py\n    program: python\n    args: [\"app.py\"]\n    # Working directory for the program\n    working_dir: ./app\n    # Automatically restart on crash\n    auto_restart: true\n```\n\n\u003e 💡 More advanced configuration options are explained later.\n\n### Step 3: Start Your Program\n\n```bash\n# Start the program named 'web'\nfuckrun start -n web\n```\n\nYou're done! Now, FuckRun will manage your program.\n\nWant to check the status of your program? Try these commands:\n```bash\n# Check the program status\nfuckrun status -n web\n\n# View program logs\nfuckrun logs -n web -f\n```\n\n## What's Next?\n\n- 👉 [Learn about all the commands](docs/commands_en.md)\n- 👉 [Complete guide to the configuration file](docs/config_en.md)\n- 👉 [Health check configuration tutorial](docs/health-check_en.md)\n- 👉 [Common troubleshooting solutions](docs/troubleshooting_en.md)\n\n\u003e For Chinese documentation:\n\u003e - 👉 [命令使用指南](docs/commands.md)\n\u003e - 👉 [配置文件完整指南](docs/config.md)\n\u003e - 👉 [健康检查配置教程](docs/health-check.md)\n\u003e - 👉 [常见问题解决方案](docs/troubleshooting.md)\n\n## Understanding How FuckRun Works 🔍\n\n\u003e Knowing how FuckRun operates will help you use it more effectively.\n\nThe core concept behind **FuckRun** is simple: it's like a caretaker for your programs. Here's how it works:\n\n1. **Starting Programs**: When you instruct **FuckRun** to start a program:\n   - It creates an independent process to run your program\n   - Collects the program's output into log files\n   - Records the program's status (PID, start time, etc.)\n\n2. **Monitoring**: While the program runs, **FuckRun** will:\n   - Regularly check if the program is still running\n   - Log the program's output\n   - Alert you immediately if something goes wrong\n\n3. **Auto Recovery**: If the program encounters an issue, **FuckRun** will:\n   - Log the error\n   - Attempt to restart the program\n   - Notify you of what happened\n\nHere's an overview of the process:\n```ascii\n[Your Program] \u003c─────┐\n                    │\n                    ▼\n              [FuckRun Assistant]\n                    │\n          ┌────────┴────────┐\n          ▼                ▼\n    [Manage Program]    [Log Outputs]\n    - Start/Stop        - Standard Logs\n    - Health Checks     - Error Logs\n    - Auto-restart      - System Logs\n```\n\n## Common Commands Guide ⌨️\n\n\u003e This section teaches you the most commonly used **FuckRun** commands with examples.\n\n### Start a Program\n\n```bash\n# Basic start command\nfuckrun start -n web\n\n# Start and view logs\nfuckrun start -n web --tail\n\n# Start multiple programs\nfuckrun start -n web -n api -n worker\n\n# Specify application directory\nfuckrun start -n web --app-dir ./deployments/web/app\n\n# Auto restart and specify directory\nfuckrun start -n web --app-dir ./deployments/web/app --daemon --auto-restart\n```\n\n### Stop a Program\n\n```bash\n# Stop normally\nfuckrun stop -n web\n\n# Force stop (use only if the program is unresponsive)\nfuckrun stop -n web --force\n\n# Stop all programs\nfuckrun stop --all\n```\n\n### Check Status\n\n```bash\n# Check a single program's status\nfuckrun status -n web\n\n# Check all programs' status\nfuckrun status --all\n\n# Output status in JSON format (useful for programmatic handling)\nfuckrun status -n web --json\n```\n\n### View Logs\n\n```bash\n# View the latest logs\nfuckrun logs -n web\n\n# View logs in real-time\nfuckrun logs -n web -f\n\n# View only error logs\nfuckrun logs -n web --error\n\n# View the last 100 lines of logs\nfuckrun logs -n web -n 100\n```\n\n\u003e 💡 Add `-f` to follow logs in real-time, similar to `tail -f`.\n\nWant to know more commands? You can:\n- Run `fuckrun help` to see all commands\n- Run `fuckrun help \u003ccommand\u003e` to get help on specific commands\n- Check out the [full command documentation](docs/commands_en.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuakami%2Ffuckrun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuakami%2Ffuckrun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuakami%2Ffuckrun/lists"}