{"id":17270367,"url":"https://github.com/ilgooz/spm","last_synced_at":"2025-07-30T07:32:50.071Z","repository":{"id":57574605,"uuid":"110544629","full_name":"ilgooz/spm","owner":"ilgooz","description":"A process manager similar to systemd and foreman with stop feature, written in Go.","archived":false,"fork":false,"pushed_at":"2017-11-14T13:10:46.000Z","size":555,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-16T08:19:26.247Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/ilgooz.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}},"created_at":"2017-11-13T12:19:21.000Z","updated_at":"2019-12-05T09:17:24.000Z","dependencies_parsed_at":"2022-09-18T06:33:46.126Z","dependency_job_id":null,"html_url":"https://github.com/ilgooz/spm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilgooz%2Fspm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilgooz%2Fspm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilgooz%2Fspm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilgooz%2Fspm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilgooz","download_url":"https://codeload.github.com/ilgooz/spm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228108269,"owners_count":17870780,"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":[],"created_at":"2024-10-15T08:19:26.948Z","updated_at":"2024-12-04T12:24:48.183Z","avatar_url":"https://github.com/ilgooz.png","language":"Go","readme":"### spm - Simple Process Manager\nspm is somewhere between systemd and [foreman](https://github.com/ddollar/foreman).\n\nIt runs as a daemon. You can start spm daemon by running `spm` command with no arguments. Once you done that you are ready to start and manage your jobs(processes) with spm commands. spm reads it's jobs from an extended Procfile syntax. You are eligible to start or stop jobs, see running jobs and their logs. Your processes executed as shell commands so you're allowed to use shell syntax in your Procfile. \n\nOur extended version of Procfile syntax supports comments with `#` sign and multilines with `\\`.\n\n## Why spm\nAll other foreman like process managers doesn't have a proper stop feature to end running jobs which spm has. spm works in a client/server convention, spm daemon listens for job commands(listed at `spm -h`) from it's clients through unix sockets. You are also able to use multiple Procfiles and start/stop multiple jobs in a Procfile which gives a huge flexiblity when you need to work with bunch of long running processes. Jobs are recognized by their names, make sure that your jobs has unique names otherwise spm will not start an already running job with same name that you started before.\n\n## Installation and Usage\n```\n$ go get github.com/ilgooz/spm/cmd/spm\n$ spm -h\n\nSimple Process Manager.\n\nUsage: spm [OPTIONS] COMMAND [arg...]\n       spm [ --help ]\n\nOptions:\n\n  -f, --file=~/.Procfile    Location of Procfile\n  -h, --help                Print usage\n\nCommands:\n\n    start           Start all jobs defined in Procfile\n    start \u003cjobs\u003e    Starts jobs if present in Procfile\n    stop            Stop all current jobs\n    stop \u003cjobs\u003e     Stop jobs if currently running\n    list            Lists all running jobs\n    logs \u003cjob\u003e      Prints last 200 lines of job's logfile \n\nDocumentation can be found at https://github.com/ilgooz/spm\n```\n\n## Example\n\nFollowing Procfile has two jobs (tabs for legibility): \n\n```\n# Serve spm's github repository on local machine\nrepo:   rm -rf spm \u0026\u0026 \\\n        git clone https://github.com/ilgooz/spm.git \u0026\u0026 \\\n        http-server ./spm -p 8080\n\n# Download and serve a webpage on local machine\napod: \\\n\n        # Create directory that will be served\n        rm -rf astropix \u0026\u0026 \\\n        mkdir astropix \u0026\u0026 \\\n        cd astropix \u0026\u0026 \\\n\n        # Downloads the content of https://apod.nasa.gov/apod/astropix.html\n        wget -A.jpg -e robots=off -k \\ \n        --user-agent=\"Mozilla/5.0 (compatible; Konqueror/3.0.0/10; Linux)\" \\\n        --no-check-certificate https://apod.nasa.gov/apod/astropix.html \u0026\u0026 \\\n\n        # Rename file as index\n        mv $(ls *.html | head -1) index.html \u0026\u0026 \\\n\n        # Serve webpage\n        http-server -p 8081\n```\n\nSuppose that we have the Procfile above inside a folder named _test_. After starting the daemon by `spm` command we will be able to run jobs, inside our Procfile, from the clients, namely, other terminal windows or tabs.\n\n1. Run `spm` command to start daemon:\n\n    ```\n    $ spm\n    2016/11/07 22:20:22 spm.go:209: deamon started\n    ```\n\n    ![](https://cloud.githubusercontent.com/assets/7649229/20076221/4d9cb57e-a540-11e6-911b-d5b33722b131.png)\n\n1. Run `spm start` (or a specific job e.g. `spm start apod`) command from different terminal tab. Since our Procfile reside in the folder named _test_, we have to define its path using `-f` flag:\n\n    ```\n    $ spm -f test start\n    2016/11/07 22:20:23 spm.go:122: done\n    ```\n\n    ![](https://cloud.githubusercontent.com/assets/7649229/20076317/a00a0370-a540-11e6-9bc8-21640f097168.png)\n\n1. Log files are being saved under /tmp folder with a job specific name, so that it's possible to see logs by `spm logs \u003cjobname\u003e` command:\n\n    ```\n    $ spm logs apod\n    ```\n\n1. List all running jobs using `spm list` command:\n\n    ```\n    $ spm list\n    ```\n    \n1. Stop running jobs using `spm stop` command (or a specific job e.g. `spm stop apod`):\n\n    ```\n    $ spm stop\n    ```\n\n    ![](https://cloud.githubusercontent.com/assets/7649229/20076337/b64b1b42-a540-11e6-9a39-80a3235d696c.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filgooz%2Fspm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filgooz%2Fspm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filgooz%2Fspm/lists"}