Using cloud firestore in dart command line application

How can I create a dart command line application which writes and reads data to/from my cloud firestore db ?

What are the configurations needed and can I run this as a standalone application ?