DEV Community

Cover image for ๐Ÿ“ฒ Inspired by Twilio we started to build our own (pico)cli to send sms
adriens for opt-nc

Posted on

๐Ÿ“ฒ 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 ๐Ÿ˜Š.

Top comments (2)

Collapse
 
adriens profile image
adriens
Collapse
 
adriens profile image
adriens • Edited