{"id":18084797,"url":"https://github.com/coderofsalvation/hubot-script-shellcmd","last_synced_at":"2025-04-12T20:10:08.984Z","repository":{"id":21059144,"uuid":"24358365","full_name":"coderofsalvation/hubot-script-shellcmd","owner":"coderofsalvation","description":"easy integration, execution and outputting of shellcommands +(line by line output instead of whole output at once)","archived":false,"fork":false,"pushed_at":"2021-07-12T03:22:56.000Z","size":12,"stargazers_count":46,"open_issues_count":4,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T20:09:50.788Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderofsalvation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":"https://gumroad.com/l/hGYGh"}},"created_at":"2014-09-23T05:43:40.000Z","updated_at":"2024-06-21T16:16:22.000Z","dependencies_parsed_at":"2022-08-18T05:11:08.857Z","dependency_job_id":null,"html_url":"https://github.com/coderofsalvation/hubot-script-shellcmd","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/coderofsalvation%2Fhubot-script-shellcmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fhubot-script-shellcmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fhubot-script-shellcmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fhubot-script-shellcmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderofsalvation","download_url":"https://codeload.github.com/coderofsalvation/hubot-script-shellcmd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625493,"owners_count":21135513,"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":[],"created_at":"2024-10-31T15:08:14.546Z","updated_at":"2025-04-12T20:10:08.964Z","avatar_url":"https://github.com/coderofsalvation.png","language":"CoffeeScript","funding_links":["https://gumroad.com/l/hGYGh"],"categories":[],"sub_categories":[],"readme":"hubot-script-shellcmd\n=====================\n\nEasily list/Execute shellcommands from a specified folder, and logs to rsyslog\nwhenever possible.\n\n### Commands:\n\n* Hubot shellcmd - list (bash)shell commands \n* Hubot shellcmd \u003cfoo\u003e - performs bashshell command\n\n### Example\n\n    # install\n    cd \u003cyourhubotdir\u003e\n    npm install hubot-script-shellcmd\n\n    # optional: separate your shellcmds from the npm module\n    cp -R node_modules/hubot-script-shellcmd/bash .\n\n    # run bot\n    (add 'hubot-script-shellcmd' to external-scripts.json if needed)\n    node_modules/.bin/hubot\n\nIn hubot:\n\n    you\u003e hubot shellcmd\n\n    hubot\u003e Available commands:\n    hubot\u003e   helloworld\n\n    you\u003e hubot shellcmd helloworld \n    hubot\u003e helloworld\n\n### Why\n\nSometimes its easier to trigger bashscripts or do things in bash (git deployment, server mintenance thingies, remote stuff e.g.)\n\n###  Configuration:\n\nJust drop / paste your bash-scripts into `hubot_dir/node_modules/hubot-script-shellcmd/src/bash/handlers/`\nDone.\n\n\u003e In case you separated your bashscripts from the npm module (see Example Section) the directory is `bash/handlers` in hubot's working directory\n\n# Optional: rename the 'shellcmd' directive\n\nSome people would prefer typing `foo helloworld` instead of `shellcmd helloworld`.\nIn that case please introduce this environmentvariable:\n\n    HUBOT_SHELLCMD_KEYWORD='foo'\n  \n    (for more env-var usage see the next section)\n\nFor example:\n\n    $ HUBOT_SHELLCMD_KEYWORD='foo' .bin/hubot \n    hubot\u003e hubot foo\n    Available commands:\n      helloworld\n\n# Optional: specify different paths\n\nThe plugin uses a main bash-script as entry point for the your bash-scripts in `handlers/*` for security reasons.\nBy default it will point to `bash/handler`, for most people this will be fine.\nSome people, who want to bypass this behavious can specify their own startup-script by setting an (startup) env-var:\n\n    HUBOT_SHELLCMD=\"/foo/bar/myhandler\" \n\nin short, you can run hubot like this on the commandline:\n\n    $ HUBOT_SHELLCMD=\"/foo/bar/myhandler\" node \u003chubotfile\u003e\n\nor just put this somewhere in your code:\n\n    process.env.HUBOT_SHELLCMD=\"/foo/bar/myhandler\";\n\nor just put this in your .bashrc or shellscript before launching hubot\n\n    export HUBOT_SHELLCMD=\"/foo/bar/myhandler\" \n\nThe default handler works fine, but you could define one like this:\n\nmyhandler:\n\n    allowed=\"dofoo bar reset\"\n    for cmd in allowed; do \n      [[ \"$1\" == \"$cmd\" ]] \u0026\u0026 \"$@\" # execute if allowed\n    done\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Fhubot-script-shellcmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderofsalvation%2Fhubot-script-shellcmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Fhubot-script-shellcmd/lists"}