{"_id":"@bytelab.studio/ksm","_rev":"1-dd46aaa4ef3f8c1a1332e8d231f61aa2","name":"@bytelab.studio/ksm","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@bytelab.studio/ksm","version":"1.0.0","keywords":["server","management","server-management"],"author":{"name":"Christoph Koschel"},"license":"MIT","_id":"@bytelab.studio/ksm@1.0.0","maintainers":[{"name":"koschel-christoph","email":"christoph.koschel86@gmail.com"}],"bin":{"ksm":"out/bin/ksm.js","ksm-cycle":"out/bin/ksm-cycle.js"},"dist":{"shasum":"3b21cfac075d77a35ed74bb317303566131daf79","tarball":"https://registry.npmjs.org/@bytelab.studio/ksm/-/ksm-1.0.0.tgz","fileCount":38,"integrity":"sha512-S0orbSDlGRxXdVsIgzwC8llSl1BWuyjxuDqqaz3yFM4exRwWH1yhufoeOLA1IXAdTAWyMQulo5uPGmxJFI882Q==","signatures":[{"sig":"MEUCIA6ixZIQtOEzs+Smb9uQD8nVxHuz2275HKnY2u4LCNUbAiEA9htIeu1pnaqSygQCatP5/E+Y/q2MrQWw4uZ4MGlpW/U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49519},"main":"out/api.js","types":"dec/api.d.ts","engines":{"node":">=15.0.0"},"gitHead":"c9c27727fbe637dab6953ebf3d8f1c35adf2b432","scripts":{"test":"echo \"Error: no test specified\" && exit 0","postinstall":"node ./scripts/postinstall.js","preuninstall":"node ./scripts/preuninstall.js"},"_npmUser":{"name":"koschel-christoph","email":"christoph.koschel86@gmail.com"},"_npmVersion":"8.19.4","description":"A KISS server management tool","directories":{},"_nodeVersion":"16.20.2","dependencies":{"@koschel-christoph/node.options":"^1.0.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ksm_1.0.0_1728370104827_0.7734578493398561","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@bytelab.studio/ksm","version":"1.1.0","description":"A KISS server management tool","main":"out/api.js","types":"dec/api.d.ts","author":{"name":"Christoph Koschel"},"license":"MIT","keywords":["server","management","server-management"],"scripts":{"test":"echo \"Error: no test specified\" && exit 0","postinstall":"node ./scripts/postinstall.js","preuninstall":"node ./scripts/preuninstall.js"},"bin":{"ksm":"out/bin/ksm.js","ksm-cycle":"out/bin/ksm-cycle.js"},"dependencies":{"@koschel-christoph/node.options":"^1.0.2"},"engines":{"node":">=15.0.0"},"gitHead":"7663323e91b52ec9bfddbed125847dc389f594aa","_id":"@bytelab.studio/ksm@1.1.0","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-wkwb1z1W3wJumWsVryQFZhy+OcV+gXIxBH3wf/8W4hxaHknMpg1jPyECLJ6Z9j2DtL67PHkQ6YGsgzh2VnZghw==","shasum":"3510c064eb8c4921f482f7736a6bbf07248f79ee","tarball":"https://registry.npmjs.org/@bytelab.studio/ksm/-/ksm-1.1.0.tgz","fileCount":38,"unpackedSize":51337,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6xSaA2E3uPd4jtmwQWlz1cgMxQ/NeXo4XTrybEe8oKQIhALCGHgZoOxtOjkkKVwH0gn7o9w+l5YpAaOImD6Sags0c"}]},"_npmUser":{"name":"koschel-christoph","email":"christoph.koschel86@gmail.com"},"directories":{},"maintainers":[{"name":"koschel-christoph","email":"christoph.koschel86@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ksm_1.1.0_1728585803146_0.6711220327345895"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-08T06:48:24.701Z","modified":"2024-10-10T18:43:23.522Z","1.0.0":"2024-10-08T06:48:24.998Z","1.1.0":"2024-10-10T18:43:23.327Z"},"author":{"name":"Christoph Koschel"},"license":"MIT","keywords":["server","management","server-management"],"description":"A KISS server management tool","maintainers":[{"name":"koschel-christoph","email":"christoph.koschel86@gmail.com"}],"readme":"# KSM\n\nA server manager following the KISS principle.\n(**K**ISS **S**erver **M**anager)\n\n## What is KISS\n\n-----------------\n\nThe **KISS** principle stands for \"**K**eep **I**t **S**imple, **S**tupid\", and it emphasizes simplicity in design and\nimplementation. The\nidea is that systems, software, or processes should be kept as simple as possible because simplicity leads to greater\nreliability, easier maintenance, and better usability.\n\nIn the context of software development, KISS encourages developers to:\n\n- Avoid unnecessary complexity.\n- Write clear and understandable code.\n- Use straightforward and minimalistic designs.\n- Focus on solving the problem with the simplest approach that works.\n\nThe underlying philosophy is that most problems can be solved more effectively with simpler solutions, and complex\nsolutions are more prone to errors, harder to maintain, and can lead to unnecessary complications.\n\n**- ChatGPT**\n\n-----------------\n\n## Philosophy\n\nKSM focuses on simple server management that:\n\n- Keeps servers running\n- Can be easily configured from the server's project\n- Aims for a plug-and-play experience\n- Works with any server, regardless of its language or runtime\n\n## Installation\n\n```shell\nnpm install -g @bytelab.studio/ksm\n```\n\n> The installation requires root privileges because cronjob and other system-wide configuration files must be created.\n\n## Commands\n\n```shell\nksm install\n```\n\nAdds a server to the serverlist when a config file isn't given, the command looks in the current directory for\na `ksm.json` file.\nOptional the `--start` flag can be set to start the server as well.\n\n```shell\nksm uninstall\n```\n\nRemoves a server from the serverlist when a config file isn't given, the command looks in the current directory for\na `ksm.json` file. Also, when the server is running it will be killed by ksm\n\n```shell\nksm list\n```\n\nList all added servers.\n\n## Configuration\n\n```typescript\ninterface ServerConfig {\n    cwd: string;\n    ports: {\n        http: number;\n        https: number;\n    }\n    env: Record<string, string | boolean | number>;\n    command: string[];\n}\n```\n\n### Sample configuration\n\nAn example configuration for a express.js app\n\n```json\n{\n    \"cwd\": \".\",\n    \"ports\": {\n        \"http\": 2000,\n        \"https\": 2001\n    },\n    \"env\": {\n        \"debug\": false\n    },\n    \"command\": [\n        \"node\",\n        \"./app/main.js\"\n    ]\n}\n```\n\nThe ports will be automatically added to the env as `HTTPS_PORT` and `HTTP_PORT`.\nThe `cwd` property is relative to the config file.\nThe `proxy` property is for the integrated ksm-proxy. But can be disabled at any time.\n\n### Template configuration\n\n```json\n{\n    \"cwd\": \".\",\n    \"ports\": {\n        \"http\": 0,\n        \"https\": 0\n    },\n    \"env\": {},\n    \"command\": []\n}\n```\n\n### Base configuration\n\nKSM comes with base configuration located at `/etc/ksm/config.json`\n\n```json\n{\n    \"env\": {\n        \"KSM_CONFIG\": \"/etc/ksm/config.json\",\n        \"KSM_SERVERLIST\": \"/etc/ksm/serverlist\"\n    }\n}\n```\n\nWhich is for configure environment variables and extensions\nlike [ksm-proxy](https://github.com/bytelab-studio/ksm-proxy).\n\n## Contribution\n\nContributions are welcome! If you'd like to help improve KSM, feel free to submit a pull request or open an issue.\nWhether it's bug fixes, new features, or documentation improvements, all contributions are appreciated.\n","readmeFilename":"README.md"}