{"id":17767948,"url":"https://github.com/marceloboeira/confirm-before","last_synced_at":"2025-03-15T14:30:28.497Z","repository":{"id":71790227,"uuid":"121649723","full_name":"marceloboeira/confirm-before","owner":"marceloboeira","description":"✅ Are you sure? No? Confirm Before - Sanity check for your shell commands","archived":false,"fork":false,"pushed_at":"2019-02-22T10:59:58.000Z","size":17,"stargazers_count":16,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-27T02:42:26.742Z","etag":null,"topics":["alias","cli","confirmation-modal","rust","wrapper"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/marceloboeira.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":"2018-02-15T16:04:28.000Z","updated_at":"2024-07-26T21:52:02.000Z","dependencies_parsed_at":"2023-02-27T17:45:52.421Z","dependency_job_id":null,"html_url":"https://github.com/marceloboeira/confirm-before","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marceloboeira%2Fconfirm-before","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marceloboeira%2Fconfirm-before/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marceloboeira%2Fconfirm-before/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marceloboeira%2Fconfirm-before/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marceloboeira","download_url":"https://codeload.github.com/marceloboeira/confirm-before/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243742494,"owners_count":20340658,"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":["alias","cli","confirmation-modal","rust","wrapper"],"created_at":"2024-10-26T20:52:11.018Z","updated_at":"2025-03-15T14:30:28.488Z","avatar_url":"https://github.com/marceloboeira.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://memecrunch.com/meme/5RNOG/are-you-sure/image.jpg?w=552\u0026c=1\" width=\"400\"\u003e\n  \u003ch3 align=\"center\"\u003eNo? Confirm Before\u003c/h3\u003e\n  \u003cp align=\"center\"\u003eSanity check for your shell commands\u003cp\u003e\n\u003c/p\u003e\n\n## Installing\n\n```\nbrew tap marceloboeira/formulas\nbrew install marceloboeira/formulas/confirm-before\n```\n\n## Motivation\n\nI have recently started working with a lot of DevOps CLIs that interact with staging and production servers.\n\nMy shell setup includes aliases like:\n\n```\nalias ks=`kubectl --context staging`\nalias kp=`kubectl --context production`\n```\n\nHowever, I frequently find myself almost running something wrong by not paying attention if its production/staging. Therefore, I decided to create this small 'command wrapper' for me to make sure if I really want to run that command against production. e.g.:\n\n```\nalias kp=`confirm-before kubectl --context production`\n```\n\nThen, ...\n\n```\n$ kp apply -F *\nAre you sure? (y/n)\n```\n\n## Future\n\nI might create other sanity check levels/modes:\n\n```\n$ alias dangerous=`confirm-before --math dangerous --production`\n$ dangerous get foo\nHow much is 19 - 3?\n```\n\nConditionals, because it can become very annoying to confirm read-only commands...\n\n```\n$ alias dangerous=`confirm-before --matching delete|d|rm|apply dangerous --production`\n$ dangerous delete foo\nAre you sure? (y/n)\n...\n$ dangerous get foo -\u003e doesn't match the regexp\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarceloboeira%2Fconfirm-before","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarceloboeira%2Fconfirm-before","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarceloboeira%2Fconfirm-before/lists"}