If you are on hashnode before June 30th 2023, you may already be aware there is a hackathon by 1Password.
While I might share some tips with interested participants who need direction while others might consider this a spoiler too.
Hoping to help all my fellow participants on how can they contribute and possibly win $1000 in the category of Most 1Password Shell Plugins contributed.
Let's get started with the basics!
Go to the hackathon link and register first :p
You need to know at least one programming language to be aware of syntax and how code works
Learn Golang basics (My favourite youtube channel, and no this is not a paid promotion)
What are we building?
Shell plugins!!! Actions that get invoked by 1Password CLI when you fire a command like "aws s3". Read more.
What do these actions do?
These actions invoke and inject variables and much more which you have stored in 1Password before the commands are invoked but only after 1Passwords authentication. Now your secrets/passwords/keys are safe there and not lying on the desktop in some folder like (c:/windows/win32/system/nothing.txt and made them hidden OR uploaded on a cloud drive. Just a pun :p.)
Start learning
Try and understand basic plugin code here
Existing plugins are located in this path (https://github.com/1Password/shell-plugins/tree/main/plugins)
The aws, ngrok, and fastly are great starters to help you with the next set of plugins to be developed. Read them, run them, and test them to get acquainted.
Start building and why
Now if you notice plugins like aws which have environment variables to get key, secret and probably the zone. Here are a few famous and other CLIs that use environment variables in a similar fashion
Few famous providers have CLIs and possibly set variables through env. for which you can build shell plugins:
Azure
Auth0
Authy
Bitbucket
Firebase
Jenkins
Kafka
MongoDB
Pusher
Redis
SonarScanner CLI
I am not going to explain what they do because the internet is full of resources that talk about these famous. Watch Videos, and read articles. Simply research !!!
Implementation Steps?
Steps | Time |
Research on using CLI for the application | 3 hours |
Refer to basic plugin code, and samples and then implement | 2-3 hours |
Testing | 1-2 hour |
Total | 6 -8hours |
Now typically, you might take 20-30 hours to get acquainted with the golang, the starter part and then each plugin. The ticker shows 9 days*10 hours/day = 90 hours.
If all this was simple then why am I not building it? you may ask.
Well, I am trying to build something different on the hackathon. Either it may end up being an "aha" or "LOL" moment. But giving it a shot.
Also, I wished for such guidance during my early work career. So trying to help fellow participants with directions. Cheers.