All Projects → marceloboeira → confirm-before

marceloboeira / confirm-before

Licence: MIT license
✅ Are you sure? No? Confirm Before - Sanity check for your shell commands

Programming Languages

rust
11053 projects
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to confirm-before

Xamarin-Android
PSPDFKit for Android wrapper for the Xamarin platform.
Stars: ✭ 18 (+12.5%)
Mutual labels:  wrapper
hubot-alias
Action alias for hubot
Stars: ✭ 21 (+31.25%)
Mutual labels:  alias
aka
Simple, single-file-executable command-line tool which lets you define per directory config files as aliases for shell commands.
Stars: ✭ 28 (+75%)
Mutual labels:  alias
JikanKt
A Kotlin wrapper for Jikan REST API
Stars: ✭ 17 (+6.25%)
Mutual labels:  wrapper
wstrade-api
API Wrapper for Wealthsimple Trade
Stars: ✭ 91 (+468.75%)
Mutual labels:  wrapper
node-atol-wrapper
Node.js обертка для ДТО версии 10 компании АТОЛ
Stars: ✭ 28 (+75%)
Mutual labels:  wrapper
MVDribbbleKit
A modern Objective-C wrapper for the Dribbble API.
Stars: ✭ 31 (+93.75%)
Mutual labels:  wrapper
islpy
Python wrapper for isl, an integer set library
Stars: ✭ 58 (+262.5%)
Mutual labels:  wrapper
packetevents
PacketEvents is a powerful packet library. Our packet wrappers are efficient and easy to use. We support many protocol versions. (1.8+)
Stars: ✭ 235 (+1368.75%)
Mutual labels:  wrapper
Xamarin-iOS
PSPDFKit for iOS wrapper for the Xamarin platform.
Stars: ✭ 14 (-12.5%)
Mutual labels:  wrapper
Clamor
The Python Discord API Framework
Stars: ✭ 14 (-12.5%)
Mutual labels:  wrapper
mlgauge
A simple library to benchmark the performance of machine learning methods across different datasets.
Stars: ✭ 22 (+37.5%)
Mutual labels:  wrapper
py-SMART
Wrapper for smartctl (smartmontools)
Stars: ✭ 42 (+162.5%)
Mutual labels:  wrapper
python3
Python 3 wrapper for Nim
Stars: ✭ 16 (+0%)
Mutual labels:  wrapper
adl
🍿 anime-downloader + trackma wrapper
Stars: ✭ 91 (+468.75%)
Mutual labels:  wrapper
WebDGap
WebDGap allows you to convert any website or HTML/CSS/JavaScript web application to a native Windows, Mac, Linux, PhoneGap, and Chrome application/extension.
Stars: ✭ 106 (+562.5%)
Mutual labels:  wrapper
genshinstats
A dead python library that can get the stats of Genshin Impact players using Mihoyo's API.
Stars: ✭ 217 (+1256.25%)
Mutual labels:  wrapper
node-freshdesk-api
Node wrapper for Freshdesk v2 API
Stars: ✭ 24 (+50%)
Mutual labels:  wrapper
nanoleaf-aurora
A java wrapper for the Nanoleaf Aurora API
Stars: ✭ 19 (+18.75%)
Mutual labels:  wrapper
viup
A V wrapper for the cross-platform UI library, IUP.
Stars: ✭ 36 (+125%)
Mutual labels:  wrapper

No? Confirm Before

Sanity check for your shell commands

Installing

brew tap marceloboeira/formulas
brew install marceloboeira/formulas/confirm-before

Motivation

I have recently started working with a lot of DevOps CLIs that interact with staging and production servers.

My shell setup includes aliases like:

alias ks=`kubectl --context staging`
alias kp=`kubectl --context production`

However, 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.:

alias kp=`confirm-before kubectl --context production`

Then, ...

$ kp apply -F *
Are you sure? (y/n)

Future

I might create other sanity check levels/modes:

$ alias dangerous=`confirm-before --math dangerous --production`
$ dangerous get foo
How much is 19 - 3?

Conditionals, because it can become very annoying to confirm read-only commands...

$ alias dangerous=`confirm-before --matching delete|d|rm|apply dangerous --production`
$ dangerous delete foo
Are you sure? (y/n)
...
$ dangerous get foo -> doesn't match the regexp
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].