DEV Community

Cover image for How to Develop an Interactive CLI with C# to Manage SendGrid Dynamic Email Templates
Dev Power
Dev Power

Posted on

How to Develop an Interactive CLI with C# to Manage SendGrid Dynamic Email Templates

I like developing my own CLIs and installing them using the dotnet tool command. I can then use them to make some manual tasks easier for myself. Recently I started playing with SendGrid Dynamic Email Templates. They have a great user interface but I wanted to do things programmatically.

I used CliFx before and was already familiar with how fast you can develop a CLI. The fun part of this project was to make the CLI interactive by using the Sharprompt library.

It basically works like this:
asciicast

If you're interested in expanding on it, you can find the source code here. It's open-source so feel free to clone and play around.

I also wrote a step-by-step article (quite long though) to explain how all the tools work together here

Discussion (0)