Build it yourself · Python

Build your first terminal app.

You'll clone a small flashcards game that runs right in your terminal, play it, add your own cards, and share it. Zero dependencies, just Python — the perfect first program to read end to end.

What you're building

A flashcards game in the terminal

hibot-python-cli is a command-line program — it runs in your terminal, not a browser. It quizzes you on a set of flashcards, checks your answers, and keeps score. There are no dependencies at all: nothing to install beyond Python itself. That makes it the cleanest place to learn the building blocks — loops, input, lists, and how a program is organized.

By the end you'll have it running, you'll have added your own flashcards, and you'll know how to share it so others can play.

Python Zero dependencies Terminal app Open source
Before you start

Two things to have ready

  • Python 3.10 or newerGet it from python.org. To check what you have, open a terminal and type python --version. Nothing else to install — this app has no dependencies.
  • A code editor (recommended: Cursor)Any editor opens the files. We like Cursor because its built-in AI can explain each line and help when you get stuck.
The easy-mode way to follow along

Let an AI editor sit beside you

Cursor is a code editor with an AI built in. Open the project in it and you can highlight any line and ask "what does this do?", or describe a change in plain English and watch it edit the file. New builders get 50% off their first month through our link.

The walkthrough

From clone to shared, one step at a time

  1. Get the code onto your computer

    In your terminal, "clone" the repo — that just means download a copy you can edit. Then step into the new folder.

    # copy the project to your computer git clone https://github.com/Cartooli/hibot-python-cli.git cd hibot-python-cli

    No Git installed? On the repo page, click the green Code button → Download ZIP, then unzip it.

  2. Run it — nothing to install

    Because there are no dependencies, you can run it right away:

    python cli.py

    The game starts in your terminal. Type an answer and press Enter, type skip to pass, or q to quit. Want a shorter round? Try python cli.py --limit 5.

  3. Look around the files

    Open the folder in your editor. There are only a few pieces:

    cli.py — the program: it reads your input, asks each card, and keeps score.
    cards.py — the flashcards themselves, as a simple Python list. This is the data.
    sanitize.py — tidies up what you type so comparisons are fair.
    tests/ — automatic checks that prove the game logic works.

  4. Make your first change

    Open cards.py and add a flashcard of your own to the list:

    CARDS = [ # ...existing cards... {"question": "Capital of Japan?", "answer": "Tokyo"}, ]

    Save the file and run python cli.py again. Your new card is in the deck. Notice you changed the app's behavior without touching cli.py at all — that's the payoff of keeping data separate from logic.

  5. Save your work with Git

    Lock in your change. Make your own empty repo on GitHub first, then:

    git add . git commit -m "Add my own flashcards" git remote set-url origin https://github.com/YOUR-USERNAME/YOUR-REPO.git git push -u origin main

    New to this? Our guide to pull requests walks through saving and publishing work on GitHub.

  6. Share it

    A terminal app doesn't get a web address like a website — instead you share the code. Once it's pushed to your public GitHub repo, anyone can run it with the same two steps you used: clone it, then python cli.py. Send them the repo link and they're playing your version in under a minute.

When something breaks

Totally normal — here's the fix

Where to go next

Keep building

Ready for the web? Try another starter, or dig into the tools.

You built a terminal app. What's next?

Add more cards, then move up to the web starters. New builders: let Cursor write the next version with you — 50% off your first month through our link.

ⓘ Affiliate disclosure

Disclosure: The Cursor links on this page are referral links — new users get 50% off their first month when they sign up through them, and code.hibot.space may earn a commission at no additional cost to you. This helps keep these guides free. Every other link on this page is a clean URL with no referral code.