{"id":15297148,"url":"https://github.com/maxrimue/node-autostart","last_synced_at":"2025-10-07T10:30:55.239Z","repository":{"id":36734749,"uuid":"41041343","full_name":"maxrimue/node-autostart","owner":"maxrimue","description":"manage autostart items in CLI and with an API","archived":true,"fork":false,"pushed_at":"2018-04-11T13:52:38.000Z","size":222,"stargazers_count":18,"open_issues_count":22,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-01-30T20:05:57.629Z","etag":null,"topics":["autostart","cli","node"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/maxrimue.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":"2015-08-19T15:03:43.000Z","updated_at":"2024-01-30T20:05:57.630Z","dependencies_parsed_at":"2022-07-20T10:23:48.963Z","dependency_job_id":null,"html_url":"https://github.com/maxrimue/node-autostart","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrimue%2Fnode-autostart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrimue%2Fnode-autostart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrimue%2Fnode-autostart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrimue%2Fnode-autostart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxrimue","download_url":"https://codeload.github.com/maxrimue/node-autostart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219877409,"owners_count":16554890,"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":["autostart","cli","node"],"created_at":"2024-09-30T19:15:23.930Z","updated_at":"2025-10-07T10:30:49.895Z","avatar_url":"https://github.com/maxrimue.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Due to tight resources and serious issues with this project, I'm deprecating it. I highly recommend [auto-launch](https://www.npmjs.com/package/auto-launch), it has a similar API and should be easy to switch over to. Sorry for the circumstances.\n\n\n# node-autostart   \n[![Build Status](https://travis-ci.org/maxrimue/node-autostart.svg)](https://travis-ci.org/maxrimue/node-autostart)\n[![Build status](https://ci.appveyor.com/api/projects/status/rm9qiglp1lafov9u?svg=true)](https://ci.appveyor.com/project/maxrimue/node-autostart)\n[![Coverage Status](https://coveralls.io/repos/maxrimue/node-autostart/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/maxrimue/node-autostart?branch=master)\n[![Dependency Status](https://david-dm.org/maxrimue/node-autostart.svg)](https://david-dm.org/maxrimue/node-autostart) [![devDependency Status](https://david-dm.org/maxrimue/node-autostart/dev-status.svg)](https://david-dm.org/maxrimue/node-autostart#info=devDependencies)\n[![npm](https://img.shields.io/npm/dt/node-autostart.svg)](https://www.npmjs.com/package/node-autostart)\n\nnode-autostart is a Node.js module that enables your module to activate autostart easily. You can also use it as a global module to set-up autostart for anything and anywhere via the command line interface (CLI). Currently, it supports:\n\n- [x] Linux\n- [x] OS X\n- [x] Windows\n\n### Install:  \n\n```\nnpm install -g node-autostart\n```   \nfor use in CLI, and:   \n```\nnpm install --save node-autostart\n```   \nas a dependency for your module.\n\n## Documentation\nYou can use `node-autostart` both programmatically and per CLI. 'Enabling autostart' means to make the OS run a certain command at logon of the user who 'enabled the autostart' via a program. The command could be, for example, `npm start` in a certain directory, or whatever floats your boat. Here's an example for use via the CLI:   \n```\n  autostart enable -n \"MyAwesomeApp\" -p \"/home/me/MyAwesomeApp\" -c \"npm start\"\n```\nto enable,\n```\n  autostart check -n \"MyAwesomeApp\"\n```\nto see if it is enabled, and:\n```\n  autostart disable -n \"MyAwesomeApp\"\n```\nto disable it.\nTo use it inside your Node.js app, look at the \u003cb\u003eAPI for Programmatic Use\u003c/b\u003e, if you want to use it in the CLI, use `autostart -h` for further information.\n\n### API for Programmatic Use\n\nFirst, require this module inside your app like this:\n```javascript\nvar autostart = require('node-autostart')\n```\nNow, you can simply enable autostart and disable it, and you can also check if it is enabled:\n```javascript\nautostart.enableAutostart(key, command, path, function (err) {\n  if(err) console.error(err);\n})\n\nautostart.disableAutostart(key, function (err) {\n  if(err) console.error(err);\n})\n\nautostart.isAutostartEnabled(key, function (err, isEnabled) {\n  if(err) console.error(err);\n\n  if(isEnabled) {\n    console.log('Autostart is enabled');\n  }\n  else {\n    console.log('Autostart is not enabled');\n  }\n\n})\n```\nIf you wish, you can also use Promises instead of Callbacks:\n```javascript\nautostart.enableAutostart(key, command, path).then(() =\u003e {\n  // Success!\n}).catch((err) =\u003e {\n  console.error(err);\n  // Something bad happened\n});\n\nautostart.disableAutostart(key).then(() =\u003e {\n  // Success!\n}).catch((err) =\u003e {\n  console.error(err);\n  // Something bad happened\n});\n\nautostart.isAutostartEnabled(key).then((isEnabled) =\u003e {\n  console.log('Autostart is ' + isEnabled ? 'enabled' : 'not enabled');\n  // Success!\n}).catch((err) =\u003e {\n  console.error(err);\n  // Something bad happened\n});\n```\n#### Variables\n`key`: Unique identifier for startup items (always required! (Make it unique))\n\n`command`: Command to be executed in the specified path\n\n`path`: Place in which the command will be executed (Use `process.cwd()` if you just want it to happen in your current working directory)\n#### Functions\n`.enableAutostart`\nRequires `key`, `command` and `path`, returns `err`.\n\n`.disableAutostart`\nRequires `key`, returns `err`.\n\n`.isAutostartEnabled`\nRequires `key`, returns `err` and `isEnabled`.\n\n### License\nThe MIT License (MIT)\n\nCopyright (c) 2015 Max Rittmüller\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxrimue%2Fnode-autostart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxrimue%2Fnode-autostart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxrimue%2Fnode-autostart/lists"}