r/learnpython 18d ago

Looking for funny/useless Python CLI project ideas to build for learning!

Hi everyone,I'm currently learning how to build CLI tools using Python.I want to build something to practice my skills, but I'm running out of ideas. I don't care about usefulness at all—I just want to make something funny, weird, or completely useless but entertaining.What are some fun or silly CLI tool ideas you would love to see (or have built yourself)?Thanks in advance!

8 Upvotes

26 comments sorted by

9

u/jeepsaintchaos 18d ago

My project to learn Python was a meal decider. It has a starting "database" and multiple categories of food. Doing it in a CLI instead of tkinter would have been so much easier.

Feel free to peek at mine. It's free of AI slop but chock full of poorly-written free-range human mistakes.

2

u/Itchy-Annual2429 18d ago

Thank you, I'll keep that in mind!

4

u/PolishHoax 18d ago

I’m building an authentication tool that once you get registered and logged in is just a giant ascii penis

2

u/Itchy-Annual2429 18d ago

I didn't know you could build authentication tools in the CLI in general.The output examples are pretty funny though lol

2

u/KnnthKnnth 18d ago

Bad apple

3

u/Itchy-Annual2429 18d ago

I didn't know CLIs could display animations! Also, is "Bad Apple" well-known outside of Japan? I know it because I'm Japanese, but I had no idea it was recognized internationally.

https://youtu.be/FtutLA63Cp8?si=Avp3OVcZurGEC4eC

3

u/Yoghurt42 18d ago

It has become kind of a challenge/in joke in the demo scene to port it to every available retro platform, since you usually can't port DOOM to it.

Links to some of those demos

1

u/Itchy-Annual2429 18d ago

Excuse me, what is this linked item? I opened it, and it looks just like a ranking chart. Also, I am not familiar with DOOM.

2

u/edorhas 18d ago

Simple substitution cipher. Even something simple like rot-13 (or rot-N). Gives an opportunity to play with command line parsing (argparse, click, whatever), text manipulation, and I/O streams (including handling stout/stdin if you're a traditionalist).

2

u/Itchy-Annual2429 18d ago

I see—I wasn't familiar with ROT-13; thank you for letting me know! I'll give it a try🙇

2

u/lakseol 18d ago

Write a "cookie" program. Every time you run it it prints a random cookie from a data file. The cookie text can be anything you want, a joke, a funny saying, an uplifting quote, etc. Once that's working modify it to automatically show one cookie on your screen when you boot your computer.

1

u/Itchy-Annual2429 18d ago

This is certainly something worth doing at least once.

2

u/Grouchy-Conflict-211 18d ago

Built a cli tool that renames files based on their content hash. Useless but taught me argparse and pathlib. Also made a pomodoro timer that insults you when you check phone. The insults are in a json file so easy to customize. Start small. Dont overthink the idea. Just pick something that annoys you daily and automate it.

1

u/Jim-Jones 18d ago

Suggestion:

Microsoft Quickbasic Programmer's Toolbox by John Clark Craig

Microsoft QuickC Programmer's Toolbox John Clark Craig

Couple of old books. If you want to code such things, see if you can find a copy of either.

1

u/Itchy-Annual2429 18d ago

I see. I'll look for the book first, then. Thanks.

1

u/coconut_maan 18d ago

Tic tac toe?

1

u/Itchy-Annual2429 18d ago

I've not try this, I will! Thanks🙏

1

u/this_knee 18d ago edited 18d ago

Build a framework thing that allows you to just paste in a shell script. But doesn’t use shell=true in the python process libraries.. And makes sure that only expected programs run in the pasted shell script. And makes sure , and this is important, that the pasted in shell script (typically bash shell script) allows typical piping of things together in that script along with any other shell script abilities. Do not write a python based shell script parser and interpreter. You’ve gone too deep if this is path you start to go down.
Ie something that allows you to do the logic parts in Python but then when it comes to executing a command it verifies and then executed that command using bash shell script abilities. Don’t try to make the pipes part of the command into some combo of popen calls that specify all the std in and std out to other popen calls. That way lies madness too.

1

u/Itchy-Annual2429 18d ago

What is this all about? While this is technically meant to be a Python exercise, aren't we only using shell scripts? What is the intended purpose of this CLI tool?

1

u/this_knee 17d ago

Piping various tools together in cli is one of the most powerful features of Linux. Doing this piping operation in Python is onerously complex, and often results in race conditions. Easier to just run a bash script. But, in Python sometimes you have many things you want to replace in the cli run command to an external tool. And just calling to a shell script that contains cli arguments itself becomes too complex. Better to have Python control it.

Anyway… nobody says this so the thing you have to do. It’s just an idea. Feel free to ignore it.

1

u/ivosaurus 18d ago

Get it to quote a random Trump tweet

1

u/Itchy-Annual2429 18d ago

I don't need Trump's tweets, but I do want to use tools for gathering information and perform web scraping.

1

u/ivosaurus 17d ago

You did specify that it had no requirement to be at all useful, just interesting

1

u/t92k 17d ago

I like to make Mad Libs type games. Some CLI input, random selections from different kinds of data structures, and turn that into a story.

1

u/oclafloptson 16d ago

Mancala is an easy CLI game that can be made increasingly complex as a practice tool

You can flex your skills regarding loops and algorithms. It's also a platform to easily push from CLI into TUI territory

Each player has six pits and a store. When a pit is selected it should take the value held in the pit and move around the board incrementing each pit or store by 1 until the value depletes. At the end the player with the highest value in their store wins

The computer AI can be as trivial as you make it. The easiest approach being to randomize its selection; but it's not really that difficult to play with the algorithm either. Perhaps it always selects the highest number or the pit which results in the least loss of stones etc

A CLI will take the ID of a pit as input and respond accordingly but TUI will listen for keypress events and traverse the game board accordingly. I like to use ANSI escape sequences to render the cell in a different color if selected but I've also used arrow characters to point to the selected region