Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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/env

KEY: 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.plist

StartInterval
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.plist

WatchPaths

/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/)


readme42.com