# anyhook

> Listen webhooks from github or bitbucket and run execute commands

Latest version **0.6.0** (published 2017-01-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install anyhook
pnpm add anyhook
yarn add anyhook
bun add anyhook
```

Provides the command `anyhook`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.0 |
| Published | 2017-01-26 |
| First published | 2016-07-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | rumkin |
| Maintainers | rumkin |
| Keywords | deployment, ci, continuous-integration, webhooks, web-hooks, hooks |

## Links

- npm: https://www.npmjs.com/package/anyhook
- Repository: https://github.com/rumkin/anyhook
- Homepage: https://github.com/rumkin/anyhook#readme
- Issues: https://github.com/rumkin/anyhook/issues
- npm.io page: https://npm.io/package/anyhook

## Dependencies (4)

- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [express](https://npm.io/package/express.md) ^4.14.0
- [argentum](https://npm.io/package/argentum.md) ^0.5.4
- [body-parser](https://npm.io/package/body-parser.md) ^1.16.0

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 0.6.0 (latest) — 2017-01-26
- 0.5.1 — 2017-01-20
- 0.5.0 — 2017-01-20
- 0.4.4 — 2017-01-20
- 0.4.3 — 2017-01-20
- 0.4.2 — 2017-01-20
- 0.4.1 — 2017-01-20
- 0.4.0 — 2017-01-20
- 0.3.0 — 2017-01-20
- 0.2.0 — 2016-07-10

## README

# Anyhook

Capture web hooks from github and bitbucket and call associated bash scripts.

## Installation

Install via npm:
```bash
npm i anyhook -g
```

## Usage

Create `webhook.json`:
```json
{
    "repoName": {
        "token": "8ecc7e51-b2d6-4f75-ad32-2971ca04a76f",
        "enabled": true,
        "branch": "master",
        "exec": [
            "echo \"Updated: $WEBHOOK_REPO\" > /var/log/repo-name.log",
            {
                "cmd": "bash",
                "args": ["-c", "echo \"Updated: $WEBHOOK_REPO\""],
                "stdio": "/var/log/repo-name.log",
            }
        ]
    }
}
```

**NOTE** Both commands in example are equivalent.

Then run anyhook app:
```bash
anyhook --port=8080
```

Now it will listen `0.0.0.0:8080` address. Webhooks URL is
`/api/webhook/:repoName`.

## License

MIT.

---
_Source: https://npm.io/package/anyhook · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
