Close Menu
    Facebook X (Twitter) Instagram
    Wifi PortalWifi Portal
    • Blogging
    • SEO & Digital Marketing
    • WiFi / Internet & Networking
    • Cybersecurity
    • Tech Tools & Mobile / Apps
    • Privacy & Online Earning
    Facebook X (Twitter) Instagram
    Wifi PortalWifi Portal
    Home»Tech Tools & Mobile / Apps»The fastest ways to find files from the command-line on Linux
    Tech Tools & Mobile / Apps

    The fastest ways to find files from the command-line on Linux

    adminBy adminFebruary 5, 2026No Comments5 Mins Read
    Facebook Twitter LinkedIn Telegram Pinterest Tumblr Reddit WhatsApp Email
    The fastest ways to find files from the command-line on Linux
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Summary

    • I use an AI CLI (ai) in Termux to fetch commands and answers without leaving the terminal.
    • I installed termai, added a Gemini/OpenAI API key, then run ai to query, generate scripts, or analyze files.
    • I pipe scripts or logs into AI to explain, debug, or scan for malicious code quickly.

    The one thing that slows me down (or at least used to slow me down) was having to look up documentation or commands while working with Termux. So I found a way to bring an AI assistant (not a coding agent) into Termux. Now I can look up commands and search for stuff on the fly without leaving the terminal. It’s helping me learn Termux faster and saves me the trouble of switching between apps.

    How it works

    I installed a script that lets me use the command-line interface versions of Google Gemini or ChatGPT within Termux. Accessing it is as simple as type ai, followed by a query. For example, if I want to find out what command updates the repos and packages in Termux, I could give it a prompt like this.

    The CLI tool prints just the commands I need. You can ask for similar commands to install any other package too. You can ask this cli tool to give you curl or wget commands for loading scripts or configuration files. For example, I could ask it for a script that personalizes the Termux theme.

    It also comes in handy if you want AI to write small scripts for you without spinning up a coding agent like Gemini CLI (which Termux can also do). Simply type ai, specify what you want the script to do and what language you want it to be in. Then type > and the script file name. When you press enter, the new script will be created in the same directory. For example, you could ask the AI to write a Bash script for generating random passwords.

    ai write a small bash script for generating a random password>pass.sh

    Then you can run it with the Bash command like so.

    bash pass.sh

    The scripts don’t have to be that simple or trivial either. For example, you could whip up a Python script that scours Reddit or LinkedIn for job leads and produces the output in a CSV file.

    When working with Termux, you’ll inevitably come across scripts that other people have written, and you want to use. This handy tool can also help you understand those scripts, debug them, and even scan them for malicious code. All you have to do is cat that script and pipe it through to the ai prompt.

    cat pass.sh | ai what does this script do?
    The CLI tool can explain what a script does.

    The cat command displays the contents of the file and the pipe | hands off the output of cat to the ai command. You can do the same for error logs or configuration files too.

    How to set up the AI assistant within Termux

    You’ll need three things to make things work.

    1. Termux. Install the Termux app from F-Droid or GitHub because the Play Store version is severely limited.
    2. An API key from Google Gemini or OpenAI. The Gemini API key is free with some limited usage.
    3. The Git tool for fetching the installer script. Make sure you always examine a script before running it.

    Once you’ve installed Termux, open the app and run this command to update the repositories and packages.

    pkg update && pkg upgrade -y

    Now we can install git.

    pkg install git

    We’re ready to install the CLI assistant tool. Here’s the GitHub repo link for the tool. Let’s start by making a new folder for it and jumping into it.

    mkdir ai
    cd ai

    Next, we’ll use the git tool to clone the repository.

    git clone https://github.com/estiaksoyeb/termai

    Let’s cd into this repo and run the installer.

    cd termai
    bash install.sh
    Installing the AI assistant tool with Termux.

    You should see a message that “termai” was successfully installed. The script automatically clears the cloned directories, so you don’t need to worry about manual cleanup. Just press “Y” and hit Enter when prompted.

    With the CLI tool installed globally, all we need now is the API key to activate it. Let’s try using the ai command.

    ai hello

    On the first run, it’ll ask which AI model you want to use. Press 1 for Gemini and 2 for OpenAI. Then open Google’s AI Studio website and login with a Google account. Look for the “Get API Key” button and press it. Create a new project here and copy the API key.

    Go back to Termux and paste the Gemini API Key where requested. As long as the API key is correct, and you have free tokens, you can access Gemini within Termux. You can follow the query with or without quotes to get a response.

    If you want to change the API key later on or if you want to edit the system prompt, you can edit the configuration file with this command.

    ai --config
    Configuring the AI tool in Termux.

    To remove the tool and its configuration files, you can run these three commands.

    rm $PREFIX/bin/ai
    rm -rf ~/.programs/termai
    rm -rf ~/.local/share/termai

    You now have a handy little assistant to pull up commands and get help with errors. This tool can also help you understand scripts and error logs. It can even write scripts.

    commandline fastest Files Find Linux Ways
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Telegram Email
    Previous ArticleData breach at fintech firm Betterment exposes 1.4 million accounts
    Next Article How to Choose the Best Prompts to Monitor Your AI Search Visibility
    admin
    • Website

    Related Posts

    The Ray-Ban Meta (Gen 1) smart glasses just scored a rare 25% discount at Amazon

    April 20, 2026

    The best robot vacuum in Australia: reliable, effective, effort-free automated cleaners

    April 20, 2026

    Monitor spec sheets hide the one thing that actually decides whether a display feels premium

    April 19, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    Search Blog
    About
    About

    At WifiPortal.tech, we share simple, easy-to-follow guides on cybersecurity, online privacy, and digital opportunities. Our goal is to help everyday users browse safely, protect personal data, and explore smart ways to earn online. Whether you’re new to the digital world or looking to strengthen your online knowledge, our content is here to keep you informed and secure.

    Trending Blogs

    The Ray-Ban Meta (Gen 1) smart glasses just scored a rare 25% discount at Amazon

    April 20, 2026

    The best robot vacuum in Australia: reliable, effective, effort-free automated cleaners

    April 20, 2026

    Monitor spec sheets hide the one thing that actually decides whether a display feels premium

    April 19, 2026

    Apple account change alerts abused to send phishing emails

    April 19, 2026
    Categories
    • Blogging (65)
    • Cybersecurity (1,403)
    • Privacy & Online Earning (172)
    • SEO & Digital Marketing (850)
    • Tech Tools & Mobile / Apps (1,684)
    • WiFi / Internet & Networking (232)

    Subscribe to Updates

    Stay updated with the latest tips on cybersecurity, online privacy, and digital opportunities straight to your inbox.

    WifiPortal.tech is a blogging platform focused on cybersecurity, online privacy, and digital opportunities. We share easy-to-follow guides, tips, and resources to help you stay safe online and explore new ways of working in the digital world.

    Our Picks

    The Ray-Ban Meta (Gen 1) smart glasses just scored a rare 25% discount at Amazon

    April 20, 2026

    The best robot vacuum in Australia: reliable, effective, effort-free automated cleaners

    April 20, 2026

    Monitor spec sheets hide the one thing that actually decides whether a display feels premium

    April 19, 2026
    Most Popular
    • The Ray-Ban Meta (Gen 1) smart glasses just scored a rare 25% discount at Amazon
    • The best robot vacuum in Australia: reliable, effective, effort-free automated cleaners
    • Monitor spec sheets hide the one thing that actually decides whether a display feels premium
    • Apple account change alerts abused to send phishing emails
    • Apple AirPods Pro 3 review: A masterclass in sound, a lesson in lock-in
    • Samsung Galaxy S23 Ultra versus vivo X300 Ultra
    • Here’s How Netflix Plans to Add TikTok-Style Videos to Its Mobile App
    • Social media bans might steer kids into riskier corners of the internet
    © 2026 WifiPortal.tech. Designed by WifiPortal.tech.
    • Home
    • About Us
    • Contact Us
    • Privacy Policy
    • Terms and Conditions
    • Disclaimer

    Type above and press Enter to search. Press Esc to cancel.