Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewpetrochenkov/launchd-generator
:rocket: launchd.plist generator
https://github.com/andrewpetrochenkov/launchd-generator
cli generator launchd macos
Last synced: 2 months ago
JSON representation
:rocket: launchd.plist generator
- Host: GitHub
- URL: https://github.com/andrewpetrochenkov/launchd-generator
- Owner: andrewpetrochenkov
- License: unlicense
- Created: 2019-02-27T18:28:25.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-03T21:02:45.000Z (about 4 years ago)
- Last Synced: 2024-06-29T08:22:27.310Z (7 months ago)
- Topics: cli, generator, launchd, macos
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![](https://img.shields.io/badge/OS-Unix-blue.svg?longCache=True)]()
[![](https://img.shields.io/pypi/v/launchd-generator.svg?maxAge=3600)](https://pypi.org/project/launchd-generator/)
[![](https://img.shields.io/npm/v/launchd-generator.svg?maxAge=3600)](https://www.npmjs.com/package/launchd-generator)[![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)
[![](https://github.com/andrewp-as-is/launchd-generator/workflows/tests42/badge.svg)](https://github.com/andrewp-as-is/launchd-generator/actions)### Installation
```bash
$ [sudo] pip install launchd-generator
``````bash
$ [sudo] npm i -g launchd-generator
```#### How it works
`script.py` -> `script.py.plist`, `script.sh` -> `script.sh.plist````
#!/usr/bin/envKEY: VALUE
CUSTOM_KEY@type: VALUE # custom key. @type required - array/bool/integer/string
```#### Features
+ generate launchd.plist from any script
+ define [launchd.plist keys](http://www.manpagez.com/man/5/launchd.plist/) in script comments#### Examples
`agent.sh`
```bash
#!/usr/bin/env bash
# StartInterval: 10
````agent.sh.plist`
```xml
ProgramArguments/path/to/agent.sh
/path/to/agent.sh.plistStartInterval
10
````agent.py`
```python
#!/usr/bin/env python
"""
WatchPaths: ~/Desktop
WatchPaths: ~/Downloads
"""
````agent.py.plist`
```xml
ProgramArguments/path/to/agent.py
/path/to/agent.py.plistWatchPaths
/Users/username/Desktop
/Users/username/Downloads```
```bash
$ cd ~/Library/LaunchAgents && find . \( -name "*.sh" -o -name "*.py" \) | xargs launchd-generator
```#### Related
+ [`classifiers-generator` - python classifiers generator](https://pypi.org/project/classifiers-generator/)
+ [`commands-generator` - shell commands generator](https://pypi.org/project/commands-generator/)
+ [`launchd-generator` - launchd.plist generator](https://pypi.org/project/launchd-generator/)
+ [`readme-generator` - `README.md` generator](https://pypi.org/project/readme-generator/)
+ [`setupcfg-generator` - `setup.cfg` generator](https://pypi.org/project/setupcfg-generator/)
+ [`travis-generator` - `.travis.yml` generator](https://pypi.org/project/travis-generator/)#### Links
+ [launchd.plist(5)](http://www.manpagez.com/man/5/launchd.plist/)