{"id":15445729,"url":"https://github.com/scriptnull/vici","last_synced_at":"2025-04-19T20:42:22.256Z","repository":{"id":57392075,"uuid":"66789089","full_name":"scriptnull/vici","owner":"scriptnull","description":"Your webhook robot :ribbon:","archived":false,"fork":false,"pushed_at":"2016-09-28T06:35:08.000Z","size":1360,"stargazers_count":22,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T01:47:35.850Z","etag":null,"topics":["remote-execution","script-runner","vici","vici-server","webhook"],"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/scriptnull.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":"2016-08-28T20:25:15.000Z","updated_at":"2023-09-08T17:14:11.000Z","dependencies_parsed_at":"2022-09-26T17:00:21.053Z","dependency_job_id":null,"html_url":"https://github.com/scriptnull/vici","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptnull%2Fvici","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptnull%2Fvici/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptnull%2Fvici/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptnull%2Fvici/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scriptnull","download_url":"https://codeload.github.com/scriptnull/vici/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249795202,"owners_count":21326777,"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":["remote-execution","script-runner","vici","vici-server","webhook"],"created_at":"2024-10-01T19:45:53.203Z","updated_at":"2025-04-19T20:42:22.236Z","avatar_url":"https://github.com/scriptnull.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vici\n\n[![Join the chat at https://gitter.im/scriptnull/vici](https://badges.gitter.im/scriptnull/vici.svg)](https://gitter.im/scriptnull/vici?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Run Status](https://api.shippable.com/projects/57c3ab672c7f4e0e00a55c2d/badge?branch=master)](https://app.shippable.com/projects/57c3ab672c7f4e0e00a55c2d)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)]()\n[![Docker Pulls](https://img.shields.io/docker/pulls/scriptnull/vici.svg?maxAge=2592000)](https://hub.docker.com/r/scriptnull/vici/)\n[![vici](https://img.shields.io/badge/robot-vici-orange.svg)](https://github.com/scriptnull/vici)\n[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)\n\nYour webhook robot :ribbon:\n\n\u003e Named after vici ( Pronounced Vicky ) from [Small Wonder TV series](https://en.wikipedia.org/wiki/Small_Wonder_(TV_series)).\n\n# Install\n\n### via git\n```bash\n# with ssh\ngit clone git@github.com:scriptnull/vici.git\n\n# with https\ngit clone https://github.com/scriptnull/vici.git\n\nnpm install\n\nnpm start\n```\n\n### via npm\n```bash\nnpm install -g vici\n\n# start vici\nvici\n```\n\n### via docker\n```bash\ndocker run -p 4454:4454 -e VICI_SECRET=\"top_secret_key\" scriptnull/vici:latest\n```\n\n# Configure\n`vici` is a web server, that can execute scripts for the action you instruct.\n\nActions can be configured by giving a special file called `vici.yml`.\n\n```yml\nactions:\n  - name: echoHello\n    script: \"/scripts/echoHello.sh\"\n    \n  - name: deploy-myapp\n    script: \"/scripts/deploy-myapp.sh\"\n```\n\nThe above `vici.yml` will give you a `POST /do/{action-name}` endpoint, which on requested will execute the script corresponding to that action.\n\nAll the action scripts receive 2 arguments.\n\n1. `payload` - The payload sent in the request body.\n2. `query` - The query parameters as JSON value.\n\n```\nPOST /do/echoHello?key=value\n\n{ \"hello\" : \"world\" }\n```\n\n```bash\n# echoHello.js\necho \"Hello world\"\necho \"payload is $1\" \necho \"query is $2\"\n```\n\n# Security\nFor now, all your requests to vici server must contain the VICI_SECRET as a  query parameter or header.\n\n- query - `POST /do/echoHello?secret=my_simple_vici_secret`\n- header - `X-VICI-SECRET : my_simple_vici_secret`\n\n# Settings\nvici settings can be changed by changing appropriate environment variables.\n\n| Env | Usage | Defaults |\n|-----|---------|--------|\n| VICI_YML_PATH |  path to find the vici yml file | vici.yml inside vici repository |\n| VICI_PORT     | port to be used for vici server | 4454 |\n| VICI_SECRET   | secret phrase to authenticate with vici | my_simple_vici_secret |\n\n# Advanced\n### Handling success and failures\nvici can execute some other actions specified in the yml, in case of success or failure of one action.\n\nsuccess and failure is determined by the exit code of the script provided in the action.\n\n```yml\nactions:\n  - name: notify-gitter\n    script: \"/scripts/notify-gitter.js\"\n    \n  - name: echoHello\n    script: \"/scripts/echoHello.sh\"\n    on_success:\n      - do: notify-gitter\n        payload:\n          url: \"https://gitter.im/some-webhook-url\"\n          message: \"Executed echoHello successfully\"\n    on_failure:\n      - do: notify-gitter\n        payload:\n          url: \"https://gitter.im/some-webhook-url\"\n          message: \"Failed to execute echoHello\"\n```\n\n\u003e __BONUS__ : [Script for notifying gitter](https://github.com/scriptnull/vici/blob/master/scripts/notify-gitter.js)\n\nIf `echoHello` is success, it will trigger the actions in `on_success` serially. In this case, only one action i.e. `notify-gitter`\n\n`do` tag instructs vici to send a HTTP request to vici server. `payload` tag helps define payload to be sent in the HTTP request.\n\n### docker - cooking\n`scriptnull/vici` image is built on top of `debian` installed with `node.js`. So, you should be able to execute bash, python, node.js etc. scripts. If you are using `docker`, this gets even more fun. You can cook the flavour of vici, you want.\n\nDockerfile for cooking flavour of vici, that could exceute ruby scripts looks like this\n\n```Dockerfile\nFROM scriptnull/vici:latest\n\nRUN apt-get install ruby-full -y\n```\n\n### docker - mounting scripts\nMount volumes from host, to provide vici.yml and scripts.\n```bash\ndocker run -p 4454:4454 -v /scripts:/scripts scriptnull/vici:latest\n```\n\n### docker - mounting docker\nHost's docker can be accessed from inside of vici, by mounting the docker sock.\n```bash\ndocker run -p 4454:4454  -v /var/run/docker.sock:/var/run/docker.sock scriptnull/vici:latest\n```\nThis is useful for cases, where vici is used to automate deployments via docker.\n\n\n# Contributing\nAlways welcome.\n\n# Thanks\nThanks for taking time to check `vici`. It means a lot to the project.\n\n# Badge\nIf you are using vici in your stack, for automating deployments, remote execution etc. Support `vici` project by adding a badge in your project.\n\n[![vici](https://img.shields.io/badge/robot-vici-orange.svg)](https://github.com/scriptnull/vici)\n\n```\n[![vici](https://img.shields.io/badge/robot-vici-orange.svg)](https://github.com/scriptnull/vici)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptnull%2Fvici","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscriptnull%2Fvici","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptnull%2Fvici/lists"}