Β· Steve Grice  Β· 1 min read

How to Make a CLI in Python

Want to use your Python program as its own executable? It’s pretty easy to do - watch on!

Timestamps

  • 0:00 Intro
  • 0:13 Overview
  • 0:40 Step 1: Add project skeleton
  • 1:58 IMPORTANT: adding entry_points
  • 2:54 Step 2: Add source code
  • 3:20 Step 3: Make sure it works
  • 4:01 Step 4: BONUS: Set up argparse
  • 4:15 Writing sample lib code
  • 5:00 Setting up parser
  • 5:33 Adding subparser
  • 6:14 Handling the args
  • 7:11 Showing off the finished product
  • 7:45 Wrap-up
Contents
Back to Blog