clue

Clue - Linux Command Line Tips Utility

Made for: Undergrads Warning: Vibe Coding

A bash-only Linux command line utility that displays helpful Linux tips automatically as you work, helping you learn new commands and improve your terminal skills.

πŸš€ Quick Install

Install clue with a single command:

curl -s https://tareqmahmood.github.io/clue/install.sh | bash

After installation, restart your terminal or run:

source ~/.bashrc

πŸ“‹ Features

🎯 How It Works

Once installed, clue integrates with your bash prompt and automatically displays tips based on your command usage:

$ ls -la
total 24
drwxr-xr-x 3 user user 4096 Sep  7 10:30 .
drwxr-xr-x 5 user user 4096 Sep  7 10:29 ..
-rw-r--r-- 1 user user  123 Sep  7 10:30 file.txt

$ cd projects

$ pwd
/home/user/projects

$ git status
On branch main
nothing to commit, working tree clean

$ ls

[clue tip #23 - beginner]
Use `head` to see the first 10 lines of a file. Great for checking file headers or previewing content.
Example: head filename.txt

$ 

πŸ”§ Usage

Automatic Mode

Tips appear automatically every 5 commands (configurable). No action needed!

Manual Mode

# Show random tip from current mode
clue

# Show tip from specific difficulty level
clue -m beg           # Beginner tips
clue -m int           # Intermediate tips
clue -m adv           # Advanced tips
clue -m all           # Random tip from any level

# Full names also work
clue -m beginner
clue -m intermediate
clue -m advanced

# Show specific tip by number
clue -i 15            # Show tip #15 from current mode

# Help
clue -h

βš™οΈ Configuration

Edit ~/.clue/config.sh to customize settings:

#!/bin/bash
# clue configuration

# Interval between tips (number of commands)
CLUE_INTERVAL=20

# Default mode (beg, int, adv, all)
# Aliases: beginner, intermediate, advanced, all
CLUE_MODE=beg

Configuration Options

πŸ“– Sample Tips

Beginner Level

[clue tip #12 - beginner]
Use `ls -lh` to see human-readable file sizes instead of raw bytes. The -h flag makes output much more readable.
Example: ls -lh

Intermediate Level

[clue tip #45 - intermediate]
Use `find` with `-type f` to search only for files, or `-type d` for directories. Much more precise than basic find.
Example: find /path -type f -name "*.txt"

Advanced Level

[clue tip #78 - advanced]
Process substitution with `<()` lets you use command output as if it were a file. Powerful for complex pipelines.
Example: diff <(sort file1) <(sort file2)

πŸ› οΈ Installation Options

curl -s https://tareqmahmood.github.io/clue/install.sh | bash

Local Installation (Development)

git clone https://github.com/tareqmahmood/clue.git
cd clue
./install.sh local

πŸ“ File Structure

After installation, clue creates the following structure:

~/.clue/
β”œβ”€β”€ clue.sh          # Main script
β”œβ”€β”€ config.sh        # Configuration file
β”œβ”€β”€ beginner.txt     # Beginner tips
β”œβ”€β”€ intermediate.txt # Intermediate tips
β”œβ”€β”€ advanced.txt     # Advanced tips
└── uninstall.sh     # Uninstall script

πŸ—‘οΈ Uninstall

To completely remove clue from your system:

~/.clue/uninstall.sh

This will:

Restart bash to see the effect.

πŸ” What’s Included

Beginner Tips

Intermediate Tips

Advanced Tips

🀝 Contributing

Contributions are welcome! Feel free to:

πŸ“„ License

This project is open source. Feel free to use, modify, and distribute.

πŸ› Troubleshooting

Tips not appearing?

  1. Make sure you’ve sourced your bashrc: source ~/.bashrc
  2. Check if clue integration exists: grep -A 5 "BEGIN CLUE" ~/.bashrc
  3. Verify counter is working: echo $CLUE_COUNTER

Reset configuration?

rm ~/.clue/config.sh
curl -s https://tareqmahmood.github.io/clue/uninstall.sh | bash
curl -s https://tareqmahmood.github.io/clue/install.sh | bash

Manual tip testing?

~/.clue/clue.sh -m beginner

Happy learning! πŸŽ“ Clue helps you discover new Linux commands naturally as you work.