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.
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.
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.
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.
From clone to shared, one step at a time
-
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-cliNo Git installed? On the repo page, click the green Code button → Download ZIP, then unzip it.
-
Run it — nothing to install
Because there are no dependencies, you can run it right away:
python cli.pyThe game starts in your terminal. Type an answer and press Enter, type
skipto pass, orqto quit. Want a shorter round? Trypython cli.py --limit 5. -
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. -
Make your first change
Open
cards.pyand 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.pyagain. Your new card is in the deck. Notice you changed the app's behavior without touchingcli.pyat all — that's the payoff of keeping data separate from logic. -
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 mainNew to this? Our guide to pull requests walks through saving and publishing work on GitHub.
-
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.
Totally normal — here's the fix
- "command not found: python"Try
python3 cli.pyinstead. If neither works, Python isn't installed — grab it from python.org. - "can't open file 'cli.py'"You're in the wrong folder. Run
cd hibot-python-clifirst so you're inside the project. - "No module named 'cards'"Run the program from inside the project folder —
cli.pyneedscards.pyandsanitize.pybeside it. - It quit right awayYou may have typed
q. Run it again and answer a card to keep going.
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.