šŸ“² Inspired by Twilio we started to build our own (pico)cli to send sms

adriens

adriens

Posted on July 28, 2022

šŸ“² Inspired by Twilio we started to build our own (pico)cli to send sms

ā” About

Back in 2019, while trying to send notifications for a personal (Arduino MKR WiFi 1010) IoT project :

Making legacy mailboxes smarter with Arduino IoT Cloud platform and IFTTT

Less than a year ago, I started to look forward 3d printing and Arduino, wondering how to create useful things with the little knowledge I had, and also, serverless, I mean only by relying on SaaS services so I can only focus on my part and deploy production ready services. Idea Genesis This year th

favicon linkedin.com

Well... I felt the need to send sms... and used IFTTT to achieve this... but also discovered Twilio... and started to follow them on social medias.

šŸ˜® The post that teased me

Then... one day.. I discovered that blog post :

Image description

Explaining step by step how to build from scratch a Java Client to send sms based on :

  • Twilio SMS API : "API that helps you add robust messaging capabilities to your applications."
  • SDKMAN! : "a tool for managing parallel versions of multiple Software Development Kits"
  • JBang! : "edit and run self-contained source-only Java programs with unprecedented ease."
  • picocli : "a mighty tiny command line interface"

Finally I saw the conclusion :

Image description

Even better I saw the following tweet :

I was mesmerized by the simplicity and started to think...

šŸ¤” "One day, we will implement this at the office"

šŸ”­ Start dreaming

Since that day, I neved stopped dreaming about the opportunity to create such a cli ā£ļø

I mean... like....

Do It Yes GIF by Movie Trivia Schmoedown

Discover & share this Do It Yes GIF by Movie Trivia Schmoedown with everyone you know. GIPHY is how you search, share, discover, and create GIFs.

favicon giphy.com

šŸ€ The opportunity

Then one day the opportunity came : my Team was in charge of creating a new batch that should :

āœ… Use our internal sms API
āœ… Send sms in a batch mode while taking csv as input

That was it, we had the opportunity to create something clean and cool around the sms experience :

We would create a nicely, efficient and well designed cli šŸ¤—

šŸš€ Straight to the MVP

šŸ“œ cli guidelines

First, we wanted to build a userexperience around the cli to make it also as much user-friendly as possible.

Therefore we started to learn more about cli design best practices :

Then this site which is an amazing set of dedicated resources:

Image description

šŸ‘‰ You can folllow the underlying repo :

GitHub logo cli-guidelines / cli-guidelines

A guide to help you write better command-line programs, taking traditional UNIX principles and updating them for the modern day.

Command Line Interface Guidelines

An open-source guide to help you write better command-line programs, taking traditional UNIX principles and updating them for the modern day.

This is the source code for the guide. To read it, go to clig.dev.

Join us on Discord if you want to discuss the guide, or just chat about CLI design.

Contributing

The content of the guide lives in a single Markdown file, content/_index.md. The website is built using Hugo.

To run Hugo locally to see your changes, run:

$ brew install hugo
$ cd <path>/<to>/cli-guidelines/
$ hugo server

To view the site on an external mobile device, run:

hugo server --bind 0.0.0.0 --baseURL http://$(hostname -f):1313

License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.




āœØ Finally... the first sms

Finally, our first MVP was up... from the terminal :

Image description

to the mobile phone :

Image description

šŸ›¤ļø Roadmap

Next steps are :

  • Refactoring for better performances
  • Reporting features
  • Implement csv send mode in batch
  • cli packaging using JReleaser to ease its distribution (Docker, Homebrew, Macports, native,...)

šŸæ Demo

Finally we could manage go get a new experience.

Discover below the software in its very early stages :

šŸ”– Resources

šŸ“‘ SMS APIs

šŸ¦ Twitter accounts worth following šŸ„‡

Stay tuned for more šŸ˜Š.

šŸ’– šŸ’Ŗ šŸ™… šŸš©
adriens
adriens

Posted on July 28, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related