{"id":20002584,"url":"https://github.com/abhishekkr/raguel","last_synced_at":"2026-03-02T11:02:08.689Z","repository":{"id":137959636,"uuid":"12055647","full_name":"abhishekkr/raguel","owner":"abhishekkr","description":"raguel - the shell archangel","archived":false,"fork":false,"pushed_at":"2019-04-08T19:29:27.000Z","size":143,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-04T15:41:00.537Z","etag":null,"topics":["bash","dsl","library","linux","shell"],"latest_commit_sha":null,"homepage":"http://abhishekkr.github.io/raguel/","language":"Shell","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/abhishekkr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-08-12T12:44:20.000Z","updated_at":"2019-04-08T19:29:29.000Z","dependencies_parsed_at":"2023-03-22T05:49:50.261Z","dependency_job_id":null,"html_url":"https://github.com/abhishekkr/raguel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abhishekkr/raguel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhishekkr%2Fraguel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhishekkr%2Fraguel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhishekkr%2Fraguel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhishekkr%2Fraguel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhishekkr","download_url":"https://codeload.github.com/abhishekkr/raguel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhishekkr%2Fraguel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29999223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T09:59:02.300Z","status":"ssl_error","status_checked_at":"2026-03-02T09:59:02.001Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bash","dsl","library","linux","shell"],"created_at":"2024-11-13T05:22:20.430Z","updated_at":"2026-03-02T11:02:08.662Z","avatar_url":"https://github.com/abhishekkr.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"### raguel\n\nMythological Context: http://en.wikipedia.org/wiki/Raguel_(archangel)\nReference: ArchAngel, Name means The friend of God.\n\nIt's here to be the friend of Shell Gods to create minion scripts to serve\nthe SYSTEMS.\n\n```ASCII\n                     \\\\                        //\\\\   _______________________\n || /===  |====||   |====}}  \\\\  \\\\    //===     ||   |                     |\n ||//          ||   \\\\__//   ||  ||    \\\\__      ||   | Shell Script Friend |\n ||       ||===||   //  \\\\   ||  ||    //        ||   | Yes It's Old School |\n ||       ||___||   \\\\___}}   \\\\_||//  \\\\__//   _||   |_____________________|\n\n```\n\nFor ways it can improve Shell Scripting, refer Wiki.\n\nIt's best suited to Bourne Shell,\nthough it's made compatible to others as much possible.\n\n***\n***\n\n### Spells available:\n\n#### [Display](https://github.com/abhishekkr/raguel/blob/master/doc/display.md)\n\n* Shout out a message as a Banner\n```Shell\n  shout $MESSAGE\n  RAGUEL_SHOUT_CHAR='~' RAGUEL_SHOUT_CHAR_COUNT=50 shout $MESSAGE\n```\n\n\n#### [Looper](https://github.com/abhishekkr/raguel/blob/master/doc/looper.md)\n\n* Loop a given command run for given count\n```Shell\n  repeat_run $TIMES_TO_REPEAT \"$COMMAND_TO_RUN\"\n```\n\n\n#### [Git](https://github.com/abhishekkr/raguel/blob/master/doc/git.md)\n\n* Set Env Var RAGUEL_GIT_LOCAL_SHA to latest Local SHA in Current DIR\n```Shell\n  local_sha\n```\n\n* Set Env Var RAGUEL_GIT_REMOTE_SHA to latest Remote SHA in Current DIR\n```Shell\n  remote_sha\n```\n\n\n#### [Configurator](https://github.com/abhishekkr/raguel/blob/master/doc/configurator.md)\n\n* Non-Interactive Package Manager\n```Shell\n  auto_install $PackageName\n\n  \u003e auto_install, auto_uninstall\n```\n\n* Info ENV Var for Distro\n```Shell\n  $RAGUEL_DISTRO_TYPE : telling what distro family is RHEL, Debian, etc.\n \n  $RAGUEL_PACKAGE_INSTALL : setting the auto-install command here\n\n  $RAGUEL_PACKAGE_UNINSTALL : setting the auto-uninstall command here\n\n  $RAGUEL_NODENAME : the nodename grabbed from uname goes here\n\n  $RAGUEL_ARCH : architecture information grabbed from uname goes here\n```\n\n\n#### [Checker](https://github.com/abhishekkr/raguel/blob/master/doc/checker.md)\n\n```Shell\n  All the checkers have if_{check}, then_if_{check}, else_if_{check}, if_not_{check}, then_if_not_{check}, else_if_not_{check}\n```\n\n```Shell\n  So every check has a negation check version. And they both have then_, else_ checks for enabling chaining of checks as in get \u0026\u0026, || boolean functionality among checks.\n```\n\n* then_run , else_run , end_if\n```Shell\n  Every check can have following command on same line to run if check passes. Otherwise use then_run, else_run in combination with any check. It also provides 'end_if' to explicitly close Check block and make look good.\n```\n\n##### The example shown for if_equal can be used in permutation/combination with any other checks.\n\n* Check for equality of 2 arguments\n```Shell\n  if_equal $ARG1 $ARG2 \"$CMD_IF_PASSED\"\n\n  if_equal $ARG1 $ARG2\n  then_run \"$CMD_IF_PASSED\"\n\n  if_equal $ARG1 $ARG2\n  else_run \"$CMD_IF_FAILED\"\n\n  if_equal $ARG1 $ARG2\n  then_run \"$CMD_IF_PASSED\"\n  else_run \"$CMD_IF_FAILED\"\n\n  if_equal $ARG1 $ARG2\n  then_run \"$CMD_IF_PASSED\"\n  else_run \"$CMD_IF_FAILED\"\n  end_if\n\n  if_equal $ARG1 $ARG2\n  then_if_equal $ARG3 $ARG4\n  then_if_equal $ARG5 $ARG6\n  then_run \"$CMD_IF_PASSED_1\"\n  else_if_equal $ARG7 $ARG8\n  then_run \"$CMD_IF_PASSED_2\"\n  else_run \"$CMD_IF_FAILED\"\n  end_if\n\n  \u003e spells: if_equal, then_if_equal, else_if_equal, if_not_equal, then_if_not_equal, else_if_not_equal\n```\n\n\n* Check for Regular File existence\n```Shell\n  if_file $FILEPATH\n\n  \u003e spells: if_file, then_if_file, else_if_file, if_not_file, then_if_not_file, else_if_not_file\n```\n\n\n* Check for Directory existence\n```Shell\n  if_dir $DIRNAME\n\n  \u003e spells: if_dir, then_if_dir, else_if_dir, if_not_dir, then_if_not_dir, else_if_not_dir\n```\n\n* Check for File being empty in size\n```Shell\n  if_file_empty $FILEPATH\n\n  \u003e spells: if_file_empty, then_if_file_empty, else_if_file_empty, if_not_file_empty, then_if_not_file_empty, else_if_not_file_empty\n```\n\n* Check for File being Executable\n```Shell\n  if_file_executable $FILENAME\n\n  \u003e spells: if_file_executable, then_if_file_executable, else_if_file_executable, if_not_file_executable, then_if_not_file_executable, else_if_not_file_executable\n```\n\n* Check for File being Writable\n```Shell\n  if_file_writable $FILENAME\n\n  \u003e spells: if_file_writable, then_if_file_writable, else_if_file_writable, if_not_file_writable, then_if_not_file_writable, else_if_not_file_writable\n```\n\n* Check for File being SymLink\n```Shell\n  if_link $FILENAME\n\n  \u003e spells: if_link, then_if_link, else_if_link, if_not_link, then_if_not_link, else_if_not_link\n```\n\n* Check for Env Variable being defined\n```Shell\n  if_var $VARNAME\n\n  \u003e spells: if_var, then_if_var, else_if_var, if_not_var, then_if_not_var, else_if_not_var\n```\n\n* Check if given Git Repo dir has latest RAGUEL_GIT_REMOTE_BRANCH changes\n```Shell\n  if_git_latest $VARNAME\n\n  \u003e spells: if_git_latest, then_if_git_latest, else_if_git_latest, if_not_git_latest, then_if_not_git_latest, else_if_not_git_latest\n```\n\n* Check if a particular System Command is accessible or not\n```Shell\n  if_cmd $CMDNAME\n\n  \u003e spells: if_cmd, then_if_cmd, else_if_cmd, if_not_cmd, then_if_not_cmd, else_if_not_cmd\n```\n\n\n\n#### [Deployer](https://github.com/abhishekkr/raguel/blob/master/doc/deployer.md)\n\n* Get the latest Code at DeployDir from the Remote Repo and backup current Repo, need to run service reset explicitly\n```Shell\n  deploy_latest $GIT_URL $DEPLOY_DIR\n```\n\n* Rollback the DeployDir to BackUp, need to run service reset explicitly\n```Shell\n  deploy_rollback $DEPLOY_DIR\n```\n\nRefer [this EXAMPLE](https://github.com/abhishekkr/raguel/blob/master/examples/deploy.dead.drop_with_deployer.sh) on how to get rolling with it.\n\n***\n***\n\n#### Quick Examples:\n\n```Shell\n#!bash\n\nRAGUEL_URL=\"https://github.com/abhishekkr/raguel/archive/master.tar.gz\"\nRAGUEL_TGZ=\"raguel.tgz\"\nRAGUEL_SRC=\"./raguel-master/src/raguel.sh\"\n\ncurl -kL -o $RAGUEL_TGZ $RAGUEL_URL\ntar -zxf raguel.tgz\n\ncat \u003e ./setup_my_box \u003c\u003c EOF\n#!bash\n\n. $RAGUEL_SRC --source-only\nGEMRC_URL=\"https://raw.github.com/abhishekkr/tux-svc-mux/master/rc/gemrc\"\n\n\nif_not_file \"\\$HOME/.gemrc\"\n  then_run \"curl -kL -o \\$HOME/.gemrc \\$GEMRC_URL\"\n\nif_not_cmd \"ruby\" then_run \"auto_install ruby\"\nif_not_cmd \"gem\" then_run \"auto_install rubygems\"\nif_not_cmd \"bundle\" then_run \"gem install bundler\"\nEOF\n\nbash ./setup_my_box\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhishekkr%2Fraguel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhishekkr%2Fraguel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhishekkr%2Fraguel/lists"}