3 Easy Termux Projects You Can Build on Android

Learn Termux by building 3 easy projects on Android. Check the weather, download audio, and create a simple to-do app without root.

If you like using Linux tools, Termux is a powerful app that turns your Android phone into a Linux terminal. With Termux, you can run hundreds of commands, host servers, and automate daily tasks without needing root access.

3 Easy Termux Projects for Android: Weather Terminal, YouTube MP3 Downloader, and To-Do List CLI App

Termux is very useful, but it can be a bit challenging for beginners. That’s why I’ve put together these three quick projects to help you get started.

Each project takes less than 30 minutes to finish. They will help you learn useful commands by building things you can actually use. You don’t need to be a Linux expert to follow along. Just follow the steps, and you’ll see exactly how powerful your phone can be!

Prerequisites

Before you jump into the projects, let’s make sure your Termux setup is ready. These are simple steps, but they will save you time and prevent common errors later.

1. Install Termux

First, download Termux from the right source.

Do not download Termux from the Google Play Store. That version is outdated and will give you errors. I highly recommend downloading it from F-Droid or GitHub.

2. Update Termux Packages

After installing Termux, open it and run this command to update everything:

pkg update && pkg upgrade -y

If the process stops and asks a question like: ... (Y/I/N/O/D/Z) [default=N] ?, just press Enter. Do this until it finishes and you see the $ prompt again.

3. Install Basic Packages

These are common packages used across most Termux projects:

pkg install curl wget git nano -y

You might install more tools as we go, but these are a good start.

4. Enable Storage Access

By default, Termux cannot see your phone's photos or music. To fix this, you need to link Termux to your device storage. Run this command:

termux-setup-storage

You will see a pop-up asking for storage permission. Click Allow. This creates a shortcut folder at ~/storage that links Termux to your phone's internal storage. Now you can easily move files between Termux and your phone.

5. Basic Linux Knowledge

You don’t need to be a pro, but you should know a few basic commands like cd, ls, cp, mv, and how to run a shell script. If you don’t, don’t worry. I’ll explain what each command does as we go.

Related Post: Termux Tutorial for Beginners

With everything set up, you're ready to start the first project. Let’s get into it.


Project #1: Check the Weather in Your Terminal

Let’s start with something simple but useful. We will check the weather for your city (or any other city) inside Termux using just one command. This is a great way to learn how to use curl and APIs to get information from the internet without building a full app.

What You'll Need

  • An internet connection
  • curl (this should be installed already if you followed the steps above)

Method 1: Use wttr.in (No API Key Needed)

This is the fastest way to check the weather. Just type this command:

curl wttr.in

You will see a beautiful weather report. It shows the current temperature and wind speed, followed by a forecast for the rest of today and the next two days.

Check a specific city: To see the weather for a different location, just add the city name to the command. For example:

curl wttr.in/lilongwe

Get a short output: If you only want a quick line of text, use this:

curl wttr.in/lilongwe?format=3

Example output: Lilongwe: 🌦 +18°C

Method 2: Use an API (Advanced)

If you want more control or to build your own weather tool later, you can use the OpenWeatherMap API. This is how professional apps get their data.

Step 1: Get Your API Key Go to https://openweathermap.org/api and sign up for a free account. They will email you an API Key.

Step 2: Run This Command

curl "https://api.openweathermap.org/data/2.5/weather?q=lilongwe&appid=YOUR_API_KEY&units=metric"

Replace YOUR_API_KEY with the API key you received by email. You’ll get a JSON output with all the weather details.

Step 3: Make it look clean (Optional) The JSON output from the command above looks very messy. To make it easy to read, install a tool called jq:

pkg install jq -y

Now run the command again like this to see only the temperature and the weather description:

curl -s "https://api.openweathermap.org/data/2.5/weather?q=lilongwe&appid=YOUR_API_KEY&units=metric" | jq '.main.temp, .weather[0].description'

Why This Is Useful

  • It is much faster than opening a browser or a heavy app.
  • It works perfectly even on slow phones.
  • Great intro to using curl and working with APIs to get real-time data from the web.

Now that you know how to get live data from the web, let’s try something even more useful. In the next project, we will turn Termux into a powerful tool for downloading your favorite music and podcasts!


Project #2: YouTube‑to‑MP3 Downloader

Do you want to save audio from your favorite YouTube videos directly to your phone? With Termux, you can do this easily using a tool called yt-dlp. This is a powerful tool that works great for downloading media through the terminal.

What You'll Need

  • A stable internet connection
  • Latest version of yt-dlp
  • ffmpeg (used to convert video to audio)

Disclaimer: This tool is for educational purposes and personal use only. Ensure you have the rights or permission to download any content, and always respect the creator's terms of service.

Step 1: Install yt-dlp and ffmpeg

First, you need to install Python and the media tools. Run these commands one by one:

pkg install ffmpeg -y
pkg install python -y
pip install yt-dlp

yt-dlp is installed using Python’s pip package manager. That’s why you need to install Python first before installing yt-dlp.

Step 2: Download YouTube Video as MP3

Once installed, you can now download any video as an audio file. Replace the link below with the URL of the YouTube video you want:

yt-dlp -x --audio-format mp3 https://www.youtube.com/watch?v=VIDEO_ID

What this command does:

  • -x → Tells the tool to extract only the audio.
  • --audio-format mp3 → Makes sure the final file is an MP3.

Step 3: Find Your MP3 File

By default, the audio file is saved inside Termux’s home directory. To see it in your phone's regular Music folder, move it using this command:

mv filename.mp3 ~/storage/music/

(Note: This only works if you followed the storage setup in the Prerequisites section!)

Bonus: Download a Full Playlist

If you want to download every song in a playlist at once, just use the playlist link:

yt-dlp -x --audio-format mp3 https://www.youtube.com/playlist?list=YOUR_PLAYLIST_ID

Why This Is Useful

  • Offline Listening: Save lectures, podcasts, or music to listen to later without using data.
  • No Ads: You don't have to deal with sketchy websites or pop-up ads.
  • High Quality: You get the best audio quality available directly from the source.

Great job! You have turned Termux into a media downloader. For our final project, we are going to build something from scratch. You will learn how to create your own To-Do List app that runs in your terminal!


Project #3: Simple To‑Do List CLI App

Let’s finish this list with a very useful project: building your own to-do list app that runs inside Termux. You will learn how to create a simple script that saves your tasks to a text file. This is perfect for keeping track of reminders on the go.

What You'll Need

  • Basic knowledge of terminal commands.
  • nano (a simple text editor already in Termux).

Step 1: Create a Script File

First, we need to create a new file for your app. Type:

nano todo.sh

Now, copy and paste the code below into the screen:

#!/data/data/com.termux/files/usr/bin/bash

TODO_FILE="$HOME/todo.txt"

function show_menu() {
  echo "1. View To-Do List"
  echo "2. Add Task"
  echo "3. Remove Task"
  echo "4. Exit"
}

function view_list() {
  if [ -f "$TODO_FILE" ]; then
    nl "$TODO_FILE"
  else
    echo "No to-do list found."
  fi
}

function add_task() {
  echo -n "Enter task: "
  read task
  echo "$task" >> "$TODO_FILE"
  echo "Task added."
}

function remove_task() {
  view_list
  echo -n "Enter task number to remove: "
  read num
  sed -i "${num}d" "$TODO_FILE"
  echo "Task removed."
}

while true; do
  echo
  show_menu
  echo -n "Choose an option: "
  read choice
  case $choice in
    1) view_list ;;
    2) add_task ;;
    3) remove_task ;;
    4) exit ;;
    *) echo "Invalid option." ;;
  esac
done

To save and exit, press Ctrl + X, then press Y, and then press Enter.

Step 2: Make the Script Executable

Before you can use the app, you must give Termux permission to run it as a program. Type:

chmod +x todo.sh

Step 3: Run Your App

Start your new to-do list by typing:

./todo.sh

You will see a menu where you can add, view, or delete tasks. Everything is saved in a simple text file called todo.txt.

Bonus Tip: Add an Alias

If you don't want to type ./todo.sh every time, you can create a shortcut. Run this command:

echo 'alias todo="$HOME/todo.sh"' >> ~/.bashrc
source ~/.bashrc

Now, you can just type todo from anywhere in Termux to open your list!

Why This Is Useful

  • Practice: You just built a real tool using code.
  • Private: Your notes are stored locally on your phone, not on a cloud server.
  • Lightweight: It uses almost no battery or memory.

That’s the final project! You’ve now completed 3 hands-on Termux mini projects that are both fun and functional.


Customization Tips

Now that you’ve finished three Termux projects, let’s take it a step further. You can make Termux faster, cleaner, and more personal with these easy tips:

1. Add Shortcuts (Aliases)

Shortcuts, or aliases, save you time by making long commands very short. You can add them to your settings file (.bashrc) like this:

echo 'alias todo="$HOME/todo.sh"' >> ~/.bashrc
echo 'alias weather="curl wttr.in/lilongwe?format=3"' >> ~/.bashrc
source ~/.bashrc

Now, instead of typing a long command, you can just type todo or weather to get instant results!

2. Add Extra Keyboard Keys

The standard phone keyboard is missing important keys like ESC, CTRL, and Arrows. You can add a row of these keys to the top of your keyboard:

Open the settings file:

nano ~/.termux/termux.properties

Add this line:

extra-keys = [['ESC','TAB','CTRL','ALT','LEFT','RIGHT','UP','DOWN']]

Save and exit (Ctrl + X, then Y, then Enter).

Apply the changes:

termux-reload-settings

3. Make Your Terminal Look Cool

You can make Termux show a "Welcome" banner or your phone info every time you open it.

  • Install figlet for banners: pkg install figlet
  • Try neofetch to display system info: pkg install neofetch
  • Edit your ~/.bashrc to auto-show them when you launch Termux
echo "figlet Welcome" >> ~/.bashrc
echo "neofetch" >> ~/.bashrc

Now, every time you launch the app, you will see a professional-looking welcome screen!


Conclusion

Termux is a full toolbox right in your pocket. By finishing these three projects, you have learned how to check the weather, download audio, and build your own app.

These projects are just the start. You can go even further by hosting servers, automating tasks, or building security tools. If you found this guide useful, feel free to share it with others who want to learn Linux or coding from their phone.

Note: If you get stuck or need help with any of the steps, please leave a comment below. I am here to help!

About the author

Stephano kambeta
Proudly African 🇲🇼. Modern life, shaped by the echoes of traditional drums.

إرسال تعليق