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

1 1

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

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more