Build a Command Line Interface(CLI) Program with .NET Core

Dev·edium
The Startup
Published in
16 min readJun 20, 2019

--

Step-by-Step Guide to Creating CLI Tools in .NET Core

Photo by Goran Ivos on Unsplash

Scenario

We have a web application. The application is for companies in the construction industry to manage their delivery tickets. The application is a modern web application built on the MEAN stack with a well designed RESTful API. The API is consumed by the in-house built web portal and the Android/iOS app. The API is also open to any third-party program for integration.

Everything looks good. More and more customers signed up to use this application. One of the most requested functions from customers is to export the tickets in a certain format and import into their accounting system for billing purposes.

We thought the open API was enough. But challenges here are:

  • Almost every customer uses a different accounting software. Some of them prefer XML. Some of them prefer CSV. Very few like JSON.
  • Most of those accounting systems are still on-premise software installed in their local network.
  • Even if some customers are using the same accounting software, they could ask for a different format with different data fields.
  • Most customers don’t have in-house developers

--

--