{"id":16611064,"url":"https://github.com/lucas-labs/kurv","last_synced_at":"2025-03-16T21:31:03.797Z","repository":{"id":212060801,"uuid":"729340512","full_name":"lucas-labs/kurv","owner":"lucas-labs","description":"𝐤𝐮𝐫𝐯 › process manager to deamonize/run background processes","archived":false,"fork":false,"pushed_at":"2025-02-11T11:18:11.000Z","size":230,"stargazers_count":16,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T14:32:24.351Z","etag":null,"topics":["collaborate","daemon","daemonize","daemons","lightweight","node","process-manager","processes","rust"],"latest_commit_sha":null,"homepage":"https://kurv.lucode.dev","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/lucas-labs.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}},"created_at":"2023-12-09T00:10:52.000Z","updated_at":"2025-02-12T13:58:32.000Z","dependencies_parsed_at":"2024-09-09T22:26:08.823Z","dependency_job_id":"8f643097-b39b-4cc7-8419-dac062390b15","html_url":"https://github.com/lucas-labs/kurv","commit_stats":null,"previous_names":["lucas-labs/kurv"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucas-labs%2Fkurv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucas-labs%2Fkurv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucas-labs%2Fkurv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucas-labs%2Fkurv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucas-labs","download_url":"https://codeload.github.com/lucas-labs/kurv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830949,"owners_count":20354854,"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":["collaborate","daemon","daemonize","daemons","lightweight","node","process-manager","processes","rust"],"created_at":"2024-10-12T01:34:32.885Z","updated_at":"2025-03-16T21:31:03.790Z","avatar_url":"https://github.com/lucas-labs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\".github/icon-logo-h64.svg\" height=\"128\"\u003e\u003c/p\u003e\n\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e𝐤𝐮𝐫𝐯 is a process manager, mainly for Node.js and Python applications. It's written in \u003ccode\u003eRust\u003c/code\u003e. It daemonizes your apps so that they can run in the background. It also restarts them if they crash.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cimg align=\"center\" alt=\"Crates.io Version\" src=\"https://img.shields.io/crates/v/kurv?style=flat-square\u0026color=%2318181b\u0026link=https%3A%2F%2Fcrates.io%2Fcrates%2Fkurv\"\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://kurv.lucode.dev\" target=\"_blank\"\u003eDocs\u003c/a\u003e • \u003ca href=\"https://crates.io/crates/kurv\" target=\"_blank\"\u003eCrate\u003c/a\u003e • \u003ca href=\"https://github.com/lucas-labs/kurv/tree/master?tab=readme-ov-file#readme\" target=\"_blank\"\u003eReadme\u003c/a\u003e\u003c/p\u003e\n\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n\u003e [!WARNING]  \n\u003e Heads up, this project is my Rust-learning playground and not production-ready yet:\n\u003e \n\u003e   - I built this because my apps needed a process manager, and I had an itch to learn Rust. So, here it is... my first Rust project!\n\u003e   - No tests yet (oops!)\n\u003e   - Tested only on Windows 11\n\u003e   - Rust newbie alert! 🚨\n\u003e   - Using it for my own projects, but not on a grand scale\n\n\n## Why 𝐤𝐮𝐫𝐯?\n\n\n\nSo, why the name 𝐤𝐮𝐫𝐯? Well, it means \"basket\" in many languages I don't speak, like Norwegian (but it sounded cool 😄). Think of 𝐤𝐮𝐫𝐯 as a basket for your apps. In kurv, we call each deployed app as an `egg`. So, let's go and collect some eggs 🥚 in your basket 🧺.\n\n\n## Installation\n\n\u003e [!NOTE] \n\u003e 𝐤𝐮𝐫𝐯 can run either as a server or as a CLI client, using the same binary. \n\u003e\n\u003e The server is responsible for managing the eggs, while the client is used to interact with the server and tell it what to do or ask it for information.\n\n### Download binaries\n\nDownload the latest release [from GitHub](https://github.com/lucas-labs/kurv/releases). \n\n### crates.io\n\nYou can also install it from [crates.io](https://crates.io/crates/kurv) using `cargo`:\n\n```bash\ncargo install kurv\n```\n\n## Usage \n\n![kurv usage](.github/kurv.gif)\n\n\n### Start the server\n\nTo get the server rolling, type:\n\n```bash\nkurv server\n```\n\n\u003e [!IMPORTANT]\n\u003e - 𝐤𝐮𝐫𝐯 will create a file called `.kurv` where it will store the current\n\u003e state of the server. The file will be created in the same directory where\n\u003e the binary is located or in the path specified by the `KURV_HOME_KEY`\n\u003e environment variable.\n\u003e\n\u003e - since 𝐤𝐮𝐫𝐯 can be used both as a server and as a client, if you want\n\u003e to run it as a server, you need to set the `KURV_SERVER` environment\n\u003e to `true`. This is just a safety measure to prevent you from running\n\u003e the server when you actually want to run the client.\n\u003e To bypass this, you can use the `--force` flag (`kurv server --force`)\n\n### Collect some 🥚\nTo deploy/start/daemonize an app (collect an egg), do:\n\n```bash\nkurv collect \u003cegg-cfg-path\u003e\n```\n\nThe path should point to a YAML file that contains the configuration for the egg. \n\nIt should look something like this:\n\n```yaml title=\"myegg.kurv\"\nname: fastapi # the name of the egg / should be unique\ncommand: poetry # the command/program to run\nargs: # the arguments to pass to the command\n  - run\n  - serve\ncwd: /home/user/my-fastapi-app # the working directory in which the command will be run\nenv: # the environment variables to pass to the command\n  FASTAPI_PORT: 8080\n```\n\nThis will run the command `poetry run serve` in `/home/user/my-fastapi-app` with the environment variable `FASTAPI_PORT` set to `8080`.\n\nIf for some reason, the command/program crashes or exits, 𝐤𝐮𝐫𝐯 will revive it!\n\n### Show me my eggs\n\nIf you want a summary of the current state of your eggs, run:\n\n```zsh\n$ kurv list\n\n🥚 eggs snapshot\n\n╭───┬───────┬───────────┬─────────┬───┬────────╮\n│ # │ pid   │ name      │ status  │ ↺ │ uptime │\n├───┼───────┼───────────┼─────────┼───┼────────┤\n│ 1 │ 35824 │ fastapi   │ running │ 0 │   1s   │\n│ 2 │ 0     │ fastapi-2 │ stopped │ 0 │   -    │\n╰───┴───────┴───────────┴─────────┴───┴────────╯\n```\n\nFor details on a specific egg:\n\n``` sh\n$ kurv egg \u003cegg:name|id|pid\u003e\n```\n\nThis will show you the egg's configuration, process details, etc.\n\n### Stop an egg\n\nTo halt an egg without removing it:\n\n``` sh\n$ kurv stop \u003cegg:name|id|pid\u003e\n```\n\nThis will stop the process but keep its configuration in the basket in case\nyou want to start it again later.\n\n### Remove an egg\n\nTo actually remove an egg, run:\n\n``` sh\n$ kurv remove \u003cegg:name|id|pid\u003e\n```\n\nIt will stop the process and remove the egg from the basket.\n\n### Restart\n\nIf you need the process to be restarted, run:\n\n``` sh\n$ kurv restart \u003cegg:name|id|pid\u003e\n```\n\n### To do list\n\n𝐤𝐮𝐫𝐯 is still under development. Here are some of the things I'm planning to add:\n\n- [ ] Simple password protection\n- [ ] Remotely manage eggs\n- [ ] SSL support\n- [ ] Handle cors correctly\n\nAnd last but not least:\n\n- [ ] Tests (I know, I know... 🤭)\n\n#### Plugins / extensions\n\nSince 𝐤𝐮𝐫𝐯 is a process manager, we can easily extend its functionality by adding \nplugin eggs (simple eggs managed by 𝐤𝐮𝐫𝐯 itself that provide additional functionality). \n\nHere are some ideas I have for plugins:\n\n- [ ] Web UI\n- [ ] Log Viewer \n- [ ] Log Rotation\n\n### Inspiration\n\n#### pm2\nInspired by the robust process manager, [pm2](https://pm2.keymetrics.io/), my goal with 𝐤𝐮𝐫𝐯 was to create a lightweight alternative. Not that pm2 is a resource hog, but I found myself in a server with extremely limited resources. Plus, I was itching for an excuse to dive into Rust, and voila, 𝐤𝐮𝐫𝐯 was born.\n\n#### eggsecutor\nDerived from [eggsecutor](https://github.com/lucas-labs/kurv), 𝐤𝐮𝐫𝐯 adopted the whimsical term \"eggs\" to represent deployed applications.\n\n#### pueue\nInsights from [pueue](https://github.com/Nukesor/pueue) were instrumental in helping me understand how to manage processes in Rust.\n\n\n\u003cbr\u003e\u003cbr\u003e\n\n-------\nWith 🧉 from Argentina 🇦🇷\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucas-labs%2Fkurv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucas-labs%2Fkurv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucas-labs%2Fkurv/lists"}