{ "tasks": [ { "id": "list-files-by-size", "keywords": [ "list", "files", "size", "largest", "biggest", "sort" ], "category": "files", "command": "ls -lhS", "description": "List files sorted by size (largest first)", "examples": [ { "desc": "List all files by size", "cmd": "ls -lhS" }, { "desc": "List only files (no directories)", "cmd": "ls -lhS | grep -v '^d'" }, { "desc": "Show top 10 largest", "cmd": "ls -lhS | head -11" } ], "related": [ "find-large-files", "disk-usage" ], "flags_explained": { "-l": "Long format (detailed info)", "-h": "Human readable sizes (KB, MB, GB)", "-S": "Sort by size (largest first)" } }, { "id": "find-large-files", "keywords": [ "find", "large", "big", "files", "disk", "space", "100mb", "size" ], "category": "files", "command": "find . -type f -size +100M -exec ls -lh {} \\;", "description": "Find files larger than 100MB", "examples": [ { "desc": "Find files larger than 100MB", "cmd": "find . -type f -size +100M -exec ls -lh {} \\;" }, { "desc": "Find files larger than 1GB", "cmd": "find . -type f -size +1G -exec ls -lh {} \\;" }, { "desc": "Find and sort by size", "cmd": "find . -type f -size +100M -exec ls -lh {} \\; | sort -k5 -hr" } ], "related": [ "list-files-by-size", "disk-usage" ], "flags_explained": { "-type f": "Only files (not directories)", "-size +100M": "Size greater than 100 megabytes", "-exec": "Execute command on each found file" } }, { "id": "search-in-files", "keywords": [ "search", "grep", "find", "text", "pattern", "recursive", "content" ], "category": "text", "command": "grep -r \"pattern\" .", "description": "Search for text pattern in files recursively", "examples": [ { "desc": "Search recursively in current directory", "cmd": "grep -r \"error\" ." }, { "desc": "Case-insensitive search", "cmd": "grep -ri \"error\" ." }, { "desc": "Show line numbers", "cmd": "grep -rn \"error\" ." }, { "desc": "Search only specific file types", "cmd": "grep -r --include=\"*.log\" \"error\" ." } ], "related": [ "find-and-replace", "count-occurrences" ], "flags_explained": { "-r": "Recursive search in subdirectories", "-i": "Case-insensitive matching", "-n": "Show line numbers" } }, { "id": "find-and-replace", "keywords": [ "replace", "sed", "find", "change", "substitute", "text" ], "category": "text", "command": "sed -i 's/old/new/g' file.txt", "description": "Find and replace text in files", "examples": [ { "desc": "Replace in single file", "cmd": "sed -i 's/old/new/g' file.txt" }, { "desc": "Replace in all files recursively", "cmd": "find . -type f -exec sed -i 's/old/new/g' {} +" }, { "desc": "Replace with backup", "cmd": "sed -i.bak 's/old/new/g' file.txt" } ], "related": [ "search-in-files" ], "flags_explained": { "-i": "Edit files in-place", "s/old/new/g": "Substitute old with new globally", ".bak": "Create backup with .bak extension" } }, { "id": "compress-folder", "keywords": [ "compress", "archive", "tar", "gzip", "zip", "backup", "folder" ], "category": "files", "command": "tar -czf archive.tar.gz folder/", "description": "Compress a folder into tar.gz archive", "examples": [ { "desc": "Create compressed archive", "cmd": "tar -czf archive.tar.gz folder/" }, { "desc": "Extract archive", "cmd": "tar -xzf archive.tar.gz" }, { "desc": "View archive contents", "cmd": "tar -tzf archive.tar.gz" } ], "related": [ "extract-archive", "compress-files" ], "flags_explained": { "-c": "Create archive", "-z": "Compress with gzip", "-f": "File name follows", "-x": "Extract archive", "-t": "List contents" } }, { "id": "disk-usage", "keywords": [ "disk", "usage", "space", "du", "size", "directory", "how much" ], "category": "files", "command": "du -sh */", "description": "Show disk usage of directories", "examples": [ { "desc": "Show size of each subdirectory", "cmd": "du -sh */" }, { "desc": "Show top 10 largest directories", "cmd": "du -sh */ | sort -hr | head -10" }, { "desc": "Total size of current directory", "cmd": "du -sh ." } ], "related": [ "find-large-files", "list-files-by-size" ], "flags_explained": { "-s": "Summary only (don't show subdirectories)", "-h": "Human readable sizes", "*/ ": "All directories in current path" } }, { "id": "find-files-by-name", "keywords": [ "find", "files", "name", "search", "locate", "filename" ], "category": "files", "command": "find . -name \"*.txt\"", "description": "Find files by name pattern", "examples": [ { "desc": "Find all .txt files", "cmd": "find . -name \"*.txt\"" }, { "desc": "Case-insensitive search", "cmd": "find . -iname \"*.txt\"" }, { "desc": "Find files modified today", "cmd": "find . -name \"*.txt\" -mtime 0" } ], "related": [ "search-in-files", "find-large-files" ], "flags_explained": { "-name": "Match by exact name pattern", "-iname": "Case-insensitive name matching", "-mtime": "Modified time in days" } }, { "id": "monitor-cpu", "keywords": [ "cpu", "monitor", "top", "usage", "process", "performance", "watch" ], "category": "system", "command": "top", "description": "Monitor CPU and process usage in real-time", "examples": [ { "desc": "Interactive process monitor", "cmd": "top" }, { "desc": "Monitor and auto-refresh every 2 seconds", "cmd": "watch -n 2 'top -b -n 1 | head -20'" }, { "desc": "Show CPU usage sorted", "cmd": "ps aux --sort=-%cpu | head -10" } ], "related": [ "monitor-memory", "list-processes" ], "flags_explained": { "-b": "Batch mode (non-interactive)", "-n": "Number of iterations", "--sort": "Sort by specified column" } }, { "id": "monitor-memory", "keywords": [ "memory", "ram", "usage", "free", "available", "monitor" ], "category": "system", "command": "free -h", "description": "Display memory usage information", "examples": [ { "desc": "Show memory in human-readable format", "cmd": "free -h" }, { "desc": "Monitor memory continuously", "cmd": "watch -n 1 free -h" }, { "desc": "Show memory in megabytes", "cmd": "free -m" } ], "related": [ "monitor-cpu", "disk-usage" ], "flags_explained": { "-h": "Human readable (KB, MB, GB)", "-m": "Show in megabytes", "-g": "Show in gigabytes" } }, { "id": "download-file", "keywords": [ "download", "wget", "curl", "file", "url", "http", "get" ], "category": "network", "command": "wget URL", "description": "Download file from URL", "examples": [ { "desc": "Download file", "cmd": "wget https://example.com/file.zip" }, { "desc": "Download with custom name", "cmd": "wget -O newname.zip https://example.com/file.zip" }, { "desc": "Download using curl", "cmd": "curl -O https://example.com/file.zip" }, { "desc": "Resume interrupted download", "cmd": "wget -c https://example.com/file.zip" } ], "related": [ "check-connectivity", "test-url" ], "flags_explained": { "-O": "Save with different name", "-c": "Continue/resume download", "curl -O": "Download file keeping original name" } }, { "id": "check-ports", "keywords": [ "port", "network", "listen", "netstat", "ss", "open", "check" ], "category": "network", "command": "ss -tulpn", "description": "Check which ports are open and listening", "examples": [ { "desc": "Show all listening ports", "cmd": "ss -tulpn" }, { "desc": "Show only TCP ports", "cmd": "ss -tlpn" }, { "desc": "Check specific port", "cmd": "ss -tulpn | grep :80" }, { "desc": "Using netstat (older method)", "cmd": "netstat -tulpn" } ], "related": [ "check-connectivity", "firewall-status" ], "flags_explained": { "-t": "TCP ports", "-u": "UDP ports", "-l": "Listening sockets", "-p": "Show process using port", "-n": "Numeric addresses (no DNS lookup)" } }, { "id": "count-lines", "keywords": [ "count", "lines", "wc", "words", "characters", "file" ], "category": "text", "command": "wc -l file.txt", "description": "Count lines, words, or characters in files", "examples": [ { "desc": "Count lines in file", "cmd": "wc -l file.txt" }, { "desc": "Count words", "cmd": "wc -w file.txt" }, { "desc": "Count all files in directory", "cmd": "wc -l *.txt" }, { "desc": "Count total lines of code", "cmd": "find . -name \"*.py\" -exec wc -l {} + | tail -1" } ], "related": [ "search-in-files" ], "flags_explained": { "-l": "Count lines", "-w": "Count words", "-c": "Count bytes" } }, { "id": "file-permissions", "keywords": [ "permissions", "chmod", "change", "access", "rights", "owner" ], "category": "files", "command": "chmod 755 file.sh", "description": "Change file permissions", "examples": [ { "desc": "Make script executable", "cmd": "chmod +x script.sh" }, { "desc": "Set specific permissions (rwxr-xr-x)", "cmd": "chmod 755 file.sh" }, { "desc": "Change recursively", "cmd": "chmod -R 755 directory/" }, { "desc": "View current permissions", "cmd": "ls -l file.sh" } ], "related": [ "change-owner" ], "flags_explained": { "+x": "Add execute permission", "755": "rwxr-xr-x (owner: all, group: read+exec, others: read+exec)", "-R": "Recursive (apply to all files in directory)" } }, { "id": "find-duplicates", "keywords": [ "duplicate", "files", "same", "find", "fdupes", "identical" ], "category": "files", "command": "find . -type f -exec md5sum {} + | sort | uniq -w32 -dD", "description": "Find duplicate files by content", "examples": [ { "desc": "Find duplicate files using checksums", "cmd": "find . -type f -exec md5sum {} + | sort | uniq -w32 -dD" }, { "desc": "Find duplicate files by name", "cmd": "find . -type f | rev | cut -d/ -f1 | rev | sort | uniq -d" }, { "desc": "Using fdupes (if installed)", "cmd": "fdupes -r ." } ], "related": [ "find-files-by-name", "disk-usage" ], "flags_explained": { "md5sum": "Calculate file checksum", "uniq -d": "Show only duplicate lines", "fdupes -r": "Recursive duplicate finder" } }, { "id": "process-kill", "keywords": [ "kill", "process", "stop", "terminate", "pid", "pkill" ], "category": "system", "command": "kill PID", "description": "Stop/kill a running process", "examples": [ { "desc": "Kill process by PID", "cmd": "kill 1234" }, { "desc": "Force kill process", "cmd": "kill -9 1234" }, { "desc": "Kill process by name", "cmd": "pkill firefox" }, { "desc": "Kill all processes matching pattern", "cmd": "pkill -f \"python script.py\"" } ], "related": [ "list-processes", "monitor-cpu" ], "flags_explained": { "-9": "Force kill (SIGKILL)", "pkill": "Kill by process name", "-f": "Match full command line" } }, { "id": "list-processes", "keywords": [ "process", "list", "ps", "running", "show", "all" ], "category": "system", "command": "ps aux", "description": "List all running processes", "examples": [ { "desc": "List all processes", "cmd": "ps aux" }, { "desc": "Find specific process", "cmd": "ps aux | grep firefox" }, { "desc": "Show process tree", "cmd": "ps auxf" }, { "desc": "Sort by memory usage", "cmd": "ps aux --sort=-%mem | head -10" } ], "related": [ "monitor-cpu", "process-kill" ], "flags_explained": { "a": "Show processes from all users", "u": "User-oriented format", "x": "Include processes without controlling terminal" } }, { "id": "create-symlink", "keywords": [ "symlink", "link", "symbolic", "ln", "shortcut", "alias" ], "category": "files", "command": "ln -s /path/to/file link-name", "description": "Create symbolic link to file or directory", "examples": [ { "desc": "Create symbolic link", "cmd": "ln -s /path/to/original /path/to/link" }, { "desc": "Link to current directory", "cmd": "ln -s /path/to/file ." }, { "desc": "View where link points", "cmd": "ls -l link-name" } ], "related": [ "file-permissions" ], "flags_explained": { "-s": "Create symbolic (soft) link", "-f": "Force (overwrite existing link)", "readlink": "Show where link points" } }, { "id": "compare-files", "keywords": [ "compare", "diff", "difference", "files", "changes" ], "category": "text", "command": "diff file1.txt file2.txt", "description": "Compare two files and show differences", "examples": [ { "desc": "Show differences between files", "cmd": "diff file1.txt file2.txt" }, { "desc": "Side-by-side comparison", "cmd": "diff -y file1.txt file2.txt" }, { "desc": "Unified diff format (like git)", "cmd": "diff -u file1.txt file2.txt" }, { "desc": "Compare directories", "cmd": "diff -r dir1/ dir2/" } ], "related": [ "find-duplicates" ], "flags_explained": { "-y": "Side-by-side output", "-u": "Unified format (easier to read)", "-r": "Recursive (compare directories)" } }, { "id": "check-connectivity", "keywords": [ "ping", "network", "connectivity", "test", "connection", "reachable" ], "category": "network", "command": "ping google.com", "description": "Test network connectivity to host", "examples": [ { "desc": "Ping host continuously", "cmd": "ping google.com" }, { "desc": "Send only 4 packets", "cmd": "ping -c 4 google.com" }, { "desc": "Ping specific IP", "cmd": "ping 8.8.8.8" } ], "related": [ "check-ports", "download-file" ], "flags_explained": { "-c": "Count (number of packets to send)", "-i": "Interval between packets in seconds" } }, { "id": "watch-command", "keywords": [ "watch", "repeat", "monitor", "refresh", "continuously", "auto" ], "category": "system", "command": "watch -n 2 command", "description": "Execute command repeatedly and display results", "examples": [ { "desc": "Watch disk usage every 2 seconds", "cmd": "watch -n 2 df -h" }, { "desc": "Monitor directory contents", "cmd": "watch -n 1 ls -lh" }, { "desc": "Highlight changes", "cmd": "watch -d -n 1 'ps aux | grep firefox'" } ], "related": [ "monitor-cpu", "monitor-memory" ], "flags_explained": { "-n": "Interval in seconds", "-d": "Highlight differences between updates" } }, { "id": "extract-archive", "keywords": [ "extract", "unzip", "decompress", "tar", "archive", "unpack" ], "category": "files", "command": "tar -xzf archive.tar.gz", "description": "Extract compressed archive files", "examples": [ { "desc": "Extract tar.gz archive", "cmd": "tar -xzf archive.tar.gz" }, { "desc": "Extract to specific directory", "cmd": "tar -xzf archive.tar.gz -C /path/to/dir" }, { "desc": "Extract .zip file", "cmd": "unzip archive.zip" }, { "desc": "Extract .tar.bz2 file", "cmd": "tar -xjf archive.tar.bz2" } ], "related": [ "compress-folder" ], "flags_explained": { "-x": "Extract archive", "-z": "Decompress gzip", "-j": "Decompress bzip2", "-C": "Change to directory before extracting" } }, { "id": "copy-files", "keywords": [ "copy", "cp", "duplicate", "files", "clone", "backup" ], "category": "files", "command": "cp -r source/ dest/", "description": "Copy files and directories", "examples": [ { "desc": "Copy a single file", "cmd": "cp file.txt backup.txt" }, { "desc": "Copy a directory recursively", "cmd": "cp -r src/ dest/" }, { "desc": "Copy preserving all attributes", "cmd": "cp -a src/ dest/" }, { "desc": "Copy only when source is newer", "cmd": "cp -u file.txt dest/" } ], "related": [ "move-rename", "sync-directories" ], "flags_explained": { "-r": "Recursive (copy directories)", "-a": "Archive mode (preserve all attributes)", "-u": "Update (copy only when source is newer)", "-v": "Verbose (show each file copied)" } }, { "id": "move-rename", "keywords": [ "move", "rename", "mv", "relocate", "files" ], "category": "files", "command": "mv old.txt new.txt", "description": "Move or rename files and directories", "examples": [ { "desc": "Rename a file", "cmd": "mv old.txt new.txt" }, { "desc": "Move a file into a directory", "cmd": "mv file.txt dir/" }, { "desc": "Move multiple files", "cmd": "mv *.txt archive/" }, { "desc": "Prompt before overwriting", "cmd": "mv -i file.txt dest/" } ], "related": [ "copy-files", "delete-files" ], "flags_explained": { "-i": "Interactive (prompt before overwrite)", "-n": "No-clobber (never overwrite existing)", "-v": "Verbose (show each move)" } }, { "id": "delete-files", "keywords": [ "delete", "remove", "rm", "erase", "files", "directory" ], "category": "files", "command": "rm file.txt", "description": "Delete files and directories", "examples": [ { "desc": "Delete a file", "cmd": "rm file.txt" }, { "desc": "Delete a directory and its contents", "cmd": "rm -r dir/" }, { "desc": "Prompt before each deletion", "cmd": "rm -i *.txt" }, { "desc": "Force delete without prompts", "cmd": "rm -rf dir/" } ], "related": [ "move-rename", "find-files-by-name" ], "flags_explained": { "-r": "Recursive (delete directories)", "-f": "Force (ignore nonexistent, never prompt)", "-i": "Interactive (prompt before each delete)", "-v": "Verbose (show each file deleted)" } }, { "id": "create-directory", "keywords": [ "create", "directory", "folder", "mkdir", "make", "new" ], "category": "files", "command": "mkdir new-folder", "description": "Create new directories", "examples": [ { "desc": "Create a directory", "cmd": "mkdir project" }, { "desc": "Create nested directories", "cmd": "mkdir -p a/b/c" }, { "desc": "Create multiple directories", "cmd": "mkdir src tests docs" }, { "desc": "Set permissions on creation", "cmd": "mkdir -m 700 private" } ], "related": [ "copy-files", "file-permissions" ], "flags_explained": { "-p": "Create parent directories as needed (no error if existing)", "-m": "Set permission mode on the new directory", "-v": "Verbose (print each created directory)" } }, { "id": "change-ownership", "keywords": [ "owner", "ownership", "chown", "group", "user", "permissions" ], "category": "files", "command": "chown user:group file.txt", "description": "Change file owner and group", "examples": [ { "desc": "Change owner of a file", "cmd": "chown alice file.txt" }, { "desc": "Change owner and group", "cmd": "chown alice:devs file.txt" }, { "desc": "Change recursively", "cmd": "chown -R alice:devs project/" }, { "desc": "Change group only", "cmd": "chown :devs file.txt" } ], "related": [ "file-permissions" ], "flags_explained": { "-R": "Recursive (apply to all files in directory)", "user:group": "Set both owner and group", "-v": "Verbose (report changes)" } }, { "id": "sync-directories", "keywords": [ "sync", "rsync", "mirror", "backup", "copy", "incremental" ], "category": "files", "command": "rsync -av source/ dest/", "description": "Synchronize directories efficiently", "examples": [ { "desc": "Sync a directory locally", "cmd": "rsync -av src/ dest/" }, { "desc": "Sync to a remote host over SSH", "cmd": "rsync -av src/ user@host:/path/" }, { "desc": "Mirror (delete extras in dest)", "cmd": "rsync -av --delete src/ dest/" }, { "desc": "Show progress during transfer", "cmd": "rsync -av --progress src/ dest/" } ], "related": [ "copy-files", "compress-folder" ], "flags_explained": { "-a": "Archive mode (recursive, preserve attributes)", "-v": "Verbose output", "--delete": "Delete files in dest not present in source", "--progress": "Show transfer progress per file" } }, { "id": "find-recent-files", "keywords": [ "recent", "modified", "newest", "find", "files", "today", "changed" ], "category": "files", "command": "find . -type f -mtime -1", "description": "Find recently modified files", "examples": [ { "desc": "Files modified in the last 24 hours", "cmd": "find . -type f -mtime -1" }, { "desc": "Files modified in the last 7 days", "cmd": "find . -type f -mtime -7" }, { "desc": "Files modified in the last 30 minutes", "cmd": "find . -type f -mmin -30" }, { "desc": "List newest files by time", "cmd": "ls -lt | head" } ], "related": [ "find-files-by-name", "find-large-files" ], "flags_explained": { "-mtime -1": "Modified less than 1 day ago", "-mmin -30": "Modified less than 30 minutes ago", "-type f": "Only files (not directories)" } }, { "id": "find-empty-dirs", "keywords": [ "empty", "directories", "folders", "find", "delete", "clean" ], "category": "files", "command": "find . -type d -empty", "description": "Find and remove empty directories", "examples": [ { "desc": "Find empty directories", "cmd": "find . -type d -empty" }, { "desc": "Find empty files", "cmd": "find . -type f -empty" }, { "desc": "Delete empty directories", "cmd": "find . -type d -empty -delete" } ], "related": [ "find-files-by-name", "delete-files" ], "flags_explained": { "-type d": "Only directories", "-empty": "Match empty files/directories", "-delete": "Delete matched entries" } }, { "id": "sort-lines", "keywords": [ "sort", "order", "arrange", "lines", "alphabetical", "numeric" ], "category": "text", "command": "sort file.txt", "description": "Sort lines of text in a file", "examples": [ { "desc": "Sort alphabetically", "cmd": "sort file.txt" }, { "desc": "Sort numerically", "cmd": "sort -n numbers.txt" }, { "desc": "Sort in reverse order", "cmd": "sort -r file.txt" }, { "desc": "Sort and remove duplicates", "cmd": "sort -u file.txt" } ], "related": [ "unique-lines", "count-lines" ], "flags_explained": { "-n": "Numeric sort (treat values as numbers)", "-r": "Reverse the sort order", "-u": "Output only unique lines", "-k": "Sort by a specific field/column" } }, { "id": "unique-lines", "keywords": [ "unique", "duplicate", "uniq", "distinct", "deduplicate", "count" ], "category": "text", "command": "sort file.txt | uniq", "description": "Filter or count repeated lines", "examples": [ { "desc": "Remove duplicate lines", "cmd": "sort file.txt | uniq" }, { "desc": "Count occurrences of each line", "cmd": "sort file.txt | uniq -c" }, { "desc": "Show only duplicated lines", "cmd": "sort file.txt | uniq -d" }, { "desc": "Show only unique (non-repeated) lines", "cmd": "sort file.txt | uniq -u" } ], "related": [ "sort-lines", "word-frequency" ], "flags_explained": { "-c": "Prefix each line with its count", "-d": "Only print duplicated lines", "-u": "Only print lines that are not repeated" } }, { "id": "extract-columns", "keywords": [ "columns", "fields", "awk", "extract", "print", "select" ], "category": "text", "command": "awk '{print $1}' file.txt", "description": "Extract columns or fields from text", "examples": [ { "desc": "Print the first column", "cmd": "awk '{print $1}' file.txt" }, { "desc": "Print first and third columns", "cmd": "awk '{print $1, $3}' file.txt" }, { "desc": "Use a custom delimiter (CSV)", "cmd": "awk -F',' '{print $2}' data.csv" }, { "desc": "Cut by character delimiter", "cmd": "cut -d',' -f1 data.csv" } ], "related": [ "search-in-files", "find-and-replace" ], "flags_explained": { "$1": "Reference to the first field/column", "-F','": "Set the input field separator to a comma", "print": "Output the selected fields", "cut -d -f": "Cut by delimiter and select fields" } }, { "id": "view-file", "keywords": [ "view", "read", "display", "less", "head", "tail", "page" ], "category": "text", "command": "less file.txt", "description": "View file contents with paging", "examples": [ { "desc": "Page through a file", "cmd": "less file.txt" }, { "desc": "Show the first 20 lines", "cmd": "head -20 file.txt" }, { "desc": "Show the last 20 lines", "cmd": "tail -20 file.txt" }, { "desc": "Follow a log file live", "cmd": "tail -f /var/log/syslog" } ], "related": [ "count-lines", "search-in-files" ], "flags_explained": { "head -N": "Show the first N lines", "tail -N": "Show the last N lines", "tail -f": "Follow file as it grows (live updates)" } }, { "id": "json-query", "keywords": [ "json", "jq", "parse", "query", "extract", "api", "data" ], "category": "text", "command": "jq '.key' file.json", "description": "Parse and query JSON data", "examples": [ { "desc": "Extract a top-level field", "cmd": "jq '.name' file.json" }, { "desc": "Extract a nested field", "cmd": "jq '.user.email' file.json" }, { "desc": "List array elements", "cmd": "jq '.items[]' file.json" }, { "desc": "Pretty-print JSON from an API", "cmd": "curl -s URL | jq ." } ], "related": [ "search-in-files", "check-website" ], "flags_explained": { ".key": "Select the value of a field", ".[]": "Iterate over array elements", "-r": "Raw output (no JSON quotes)", ".": "Identity filter (pretty-print whole input)" } }, { "id": "word-frequency", "keywords": [ "frequency", "count", "words", "occurrences", "most", "common", "histogram" ], "category": "text", "command": "tr ' ' '\\n' < file.txt | sort | uniq -c | sort -nr", "description": "Count word or value frequency", "examples": [ { "desc": "Most common words in a file", "cmd": "tr ' ' '\\n' < file.txt | sort | uniq -c | sort -nr" }, { "desc": "Top 10 most frequent lines", "cmd": "sort file.txt | uniq -c | sort -nr | head -10" }, { "desc": "Count matches of a pattern", "cmd": "grep -o 'error' file.log | wc -l" } ], "related": [ "unique-lines", "count-lines" ], "flags_explained": { "tr ' ' '\\n'": "Split words onto separate lines", "uniq -c": "Count occurrences of each line", "sort -nr": "Sort by count, highest first" } }, { "id": "dns-lookup", "keywords": [ "dns", "dig", "nslookup", "domain", "resolve", "lookup", "records" ], "category": "network", "command": "dig example.com", "description": "Look up DNS records for a domain", "examples": [ { "desc": "Look up A records", "cmd": "dig example.com" }, { "desc": "Short answer only", "cmd": "dig +short example.com" }, { "desc": "Look up MX (mail) records", "cmd": "dig example.com MX" }, { "desc": "Reverse DNS lookup", "cmd": "dig -x 8.8.8.8" } ], "related": [ "check-connectivity", "check-website" ], "flags_explained": { "+short": "Show only the concise answer", "MX": "Query mail-exchange records", "-x": "Perform a reverse (PTR) lookup" } }, { "id": "copy-to-remote", "keywords": [ "scp", "copy", "remote", "transfer", "upload", "download", "ssh" ], "category": "network", "command": "scp file.txt user@host:/path/", "description": "Copy files to or from a remote host", "examples": [ { "desc": "Upload a file to a server", "cmd": "scp file.txt user@host:/path/" }, { "desc": "Download a file from a server", "cmd": "scp user@host:/path/file.txt ." }, { "desc": "Copy a directory recursively", "cmd": "scp -r dir/ user@host:/path/" }, { "desc": "Use a specific SSH port", "cmd": "scp -P 2222 file.txt user@host:/path/" } ], "related": [ "sync-directories", "download-file" ], "flags_explained": { "-r": "Recursive (copy directories)", "-P": "Specify the remote SSH port", "-C": "Enable compression during transfer" } }, { "id": "check-website", "keywords": [ "website", "http", "status", "curl", "headers", "url", "test" ], "category": "network", "command": "curl -I https://example.com", "description": "Check a website's status and headers", "examples": [ { "desc": "Show response headers only", "cmd": "curl -I https://example.com" }, { "desc": "Show only the HTTP status code", "cmd": "curl -o /dev/null -s -w '%{http_code}\\n' https://example.com" }, { "desc": "Follow redirects", "cmd": "curl -IL https://example.com" }, { "desc": "Measure total response time", "cmd": "curl -o /dev/null -s -w '%{time_total}\\n' https://example.com" } ], "related": [ "download-file", "check-connectivity" ], "flags_explained": { "-I": "Fetch headers only (HEAD request)", "-L": "Follow redirects", "-s": "Silent mode (no progress meter)", "-w": "Write out custom info (e.g. status code)" } }, { "id": "public-ip", "keywords": [ "ip", "public", "address", "external", "myip", "network" ], "category": "network", "command": "curl -s ifconfig.me", "description": "Find your public and local IP addresses", "examples": [ { "desc": "Show your public IP", "cmd": "curl -s ifconfig.me" }, { "desc": "Alternative public IP service", "cmd": "curl -s https://api.ipify.org" }, { "desc": "Show local IP addresses", "cmd": "ip addr show" }, { "desc": "Show default gateway", "cmd": "ip route | grep default" } ], "related": [ "check-connectivity", "check-ports" ], "flags_explained": { "-s": "Silent mode (suppress progress output)", "ip addr": "Show network interface addresses", "ip route": "Show the routing table" } }, { "id": "disk-free", "keywords": [ "disk", "free", "space", "df", "available", "filesystem", "mount" ], "category": "system", "command": "df -h", "description": "Show available disk space on filesystems", "examples": [ { "desc": "Show disk usage human-readable", "cmd": "df -h" }, { "desc": "Show filesystem types", "cmd": "df -hT" }, { "desc": "Show usage for current directory", "cmd": "df -h ." }, { "desc": "Show inode usage", "cmd": "df -i" } ], "related": [ "disk-usage", "find-large-files" ], "flags_explained": { "-h": "Human-readable sizes (KB, MB, GB)", "-T": "Show the filesystem type", "-i": "Show inode information instead of blocks" } }, { "id": "system-uptime", "keywords": [ "uptime", "load", "running", "system", "boot", "how long" ], "category": "system", "command": "uptime", "description": "Show system uptime and load average", "examples": [ { "desc": "Show uptime and load", "cmd": "uptime" }, { "desc": "Pretty uptime format", "cmd": "uptime -p" }, { "desc": "Show when the system booted", "cmd": "uptime -s" }, { "desc": "Show last reboot times", "cmd": "last reboot | head" } ], "related": [ "monitor-cpu", "monitor-memory" ], "flags_explained": { "-p": "Pretty format (e.g. 'up 3 hours')", "-s": "Show system boot time", "load average": "Avg processes waiting over 1/5/15 minutes" } }, { "id": "service-status", "keywords": [ "service", "systemctl", "status", "start", "stop", "restart", "daemon" ], "category": "system", "command": "systemctl status nginx", "description": "Manage and inspect system services", "examples": [ { "desc": "Check a service's status", "cmd": "systemctl status nginx" }, { "desc": "Start a service", "cmd": "sudo systemctl start nginx" }, { "desc": "Restart a service", "cmd": "sudo systemctl restart nginx" }, { "desc": "Enable a service at boot", "cmd": "sudo systemctl enable nginx" } ], "related": [ "view-logs", "list-processes" ], "flags_explained": { "status": "Show whether a service is running", "start/stop": "Start or stop the service now", "restart": "Stop then start the service", "enable/disable": "Control whether it starts at boot" } }, { "id": "view-logs", "keywords": [ "logs", "journalctl", "systemd", "errors", "syslog", "debug" ], "category": "system", "command": "journalctl -xe", "description": "View and follow system logs", "examples": [ { "desc": "Show recent log entries", "cmd": "journalctl -xe" }, { "desc": "Follow logs live", "cmd": "journalctl -f" }, { "desc": "Logs for a specific service", "cmd": "journalctl -u nginx" }, { "desc": "Logs since boot", "cmd": "journalctl -b" } ], "related": [ "service-status", "kernel-messages" ], "flags_explained": { "-f": "Follow (live tail) new log entries", "-u": "Filter by systemd unit/service", "-b": "Show logs from the current boot", "-xe": "Add explanations and jump to the end" } }, { "id": "find-process-by-port", "keywords": [ "port", "process", "lsof", "which", "using", "pid", "listening" ], "category": "system", "command": "lsof -i :8080", "description": "Find which process is using a port", "examples": [ { "desc": "Find process on a port", "cmd": "lsof -i :8080" }, { "desc": "Alternative using ss", "cmd": "ss -tulpn | grep :8080" }, { "desc": "Find files opened by a process", "cmd": "lsof -p 1234" }, { "desc": "Kill the process using a port", "cmd": "kill $(lsof -t -i :8080)" } ], "related": [ "check-ports", "process-kill" ], "flags_explained": { "-i :PORT": "Show processes using a network port", "-p PID": "List files opened by a specific process", "-t": "Terse output (PIDs only, for scripting)" } }, { "id": "schedule-cron", "keywords": [ "cron", "crontab", "schedule", "job", "automate", "periodic", "task" ], "category": "system", "command": "crontab -e", "description": "Schedule recurring tasks with cron", "examples": [ { "desc": "Edit your crontab", "cmd": "crontab -e" }, { "desc": "List your scheduled jobs", "cmd": "crontab -l" }, { "desc": "Run a script every day at 2am", "cmd": "0 2 * * * /path/to/script.sh" }, { "desc": "Run a one-off task later", "cmd": "echo 'task.sh' | at now + 1 hour" } ], "related": [ "watch-command", "service-status" ], "flags_explained": { "-e": "Edit the current user's crontab", "-l": "List the current user's cron jobs", "* * * * *": "min hour day-of-month month day-of-week", "at": "Schedule a single future command" } }, { "id": "cpu-info", "keywords": [ "cpu", "cores", "processor", "lscpu", "hardware", "info", "architecture" ], "category": "system", "command": "lscpu", "description": "Show CPU and hardware information", "examples": [ { "desc": "Show CPU architecture details", "cmd": "lscpu" }, { "desc": "Count the number of cores", "cmd": "nproc" }, { "desc": "Show memory and CPU summary", "cmd": "free -h && lscpu | head" }, { "desc": "List block devices", "cmd": "lsblk" } ], "related": [ "monitor-cpu", "monitor-memory" ], "flags_explained": { "lscpu": "Display CPU architecture from sysfs", "nproc": "Print the number of processing units", "lsblk": "List block storage devices" } }, { "id": "kernel-messages", "keywords": [ "dmesg", "kernel", "messages", "hardware", "boot", "driver", "errors" ], "category": "system", "command": "dmesg", "description": "View kernel ring buffer messages", "examples": [ { "desc": "Show kernel messages", "cmd": "dmesg" }, { "desc": "Human-readable timestamps", "cmd": "dmesg -T" }, { "desc": "Follow new kernel messages", "cmd": "dmesg -w" }, { "desc": "Filter for USB events", "cmd": "dmesg | grep -i usb" } ], "related": [ "view-logs", "service-status" ], "flags_explained": { "-T": "Show human-readable timestamps", "-w": "Wait and follow new messages", "-l": "Restrict output to given log levels" } }, { "id": "git-status", "keywords": [ "git", "status", "changes", "staged", "modified", "version", "control" ], "category": "git", "command": "git status", "description": "Show the working tree status", "examples": [ { "desc": "Show changed and staged files", "cmd": "git status" }, { "desc": "Short status format", "cmd": "git status -s" }, { "desc": "Show changes vs last commit", "cmd": "git diff" }, { "desc": "Show staged changes", "cmd": "git diff --staged" } ], "related": [ "git-log", "git-discard" ], "flags_explained": { "-s": "Short, compact status output", "git diff": "Show unstaged line-by-line changes", "--staged": "Show changes already staged for commit" } }, { "id": "git-log", "keywords": [ "git", "log", "history", "commits", "graph", "version", "control" ], "category": "git", "command": "git log --oneline", "description": "View commit history", "examples": [ { "desc": "Compact one-line history", "cmd": "git log --oneline" }, { "desc": "Show a branch graph", "cmd": "git log --oneline --graph --all" }, { "desc": "Last 5 commits", "cmd": "git log -5" }, { "desc": "Commits by an author", "cmd": "git log --author='Alice'" } ], "related": [ "git-status", "git-discard" ], "flags_explained": { "--oneline": "One commit per line (short hash + subject)", "--graph": "Draw an ASCII commit graph", "--all": "Include all branches", "--author": "Filter commits by author" } }, { "id": "git-discard", "keywords": [ "git", "discard", "undo", "revert", "reset", "restore", "changes" ], "category": "git", "command": "git restore file.txt", "description": "Undo or discard local changes", "examples": [ { "desc": "Discard changes to a file", "cmd": "git restore file.txt" }, { "desc": "Unstage a file", "cmd": "git restore --staged file.txt" }, { "desc": "Discard all uncommitted changes", "cmd": "git checkout ." }, { "desc": "Undo the last commit (keep changes)", "cmd": "git reset --soft HEAD~1" } ], "related": [ "git-status", "git-log" ], "flags_explained": { "restore": "Restore a file to its committed state", "--staged": "Move a file out of the staging area", "reset --soft HEAD~1": "Undo last commit, keep changes staged" } }, { "id": "current-user", "keywords": [ "user", "whoami", "id", "current", "username", "groups", "uid" ], "category": "users", "command": "whoami", "description": "Show information about the current user", "examples": [ { "desc": "Print the current username", "cmd": "whoami" }, { "desc": "Show user and group IDs", "cmd": "id" }, { "desc": "List groups you belong to", "cmd": "groups" }, { "desc": "Show your home and shell", "cmd": "echo $HOME $SHELL" } ], "related": [ "who-logged-in", "file-permissions" ], "flags_explained": { "whoami": "Print the effective username", "id": "Print user and group IDs", "groups": "List the groups the user belongs to" } }, { "id": "who-logged-in", "keywords": [ "who", "logged", "users", "online", "sessions", "w", "login" ], "category": "users", "command": "who", "description": "Show who is currently logged in", "examples": [ { "desc": "List logged-in users", "cmd": "who" }, { "desc": "Show users and what they're doing", "cmd": "w" }, { "desc": "Show recent login history", "cmd": "last | head" }, { "desc": "Count logged-in users", "cmd": "who | wc -l" } ], "related": [ "current-user", "list-processes" ], "flags_explained": { "who": "List currently logged-in users", "w": "Show users plus their active processes", "last": "Show a history of logins" } }, { "id": "git-commit", "keywords": [ "commit", "save", "record", "changes", "stage" ], "category": "git", "command": "git commit -m \"message\"", "description": "Record staged changes to the repository", "examples": [ { "desc": "Stage all and commit", "cmd": "git commit -am \"message\"" }, { "desc": "Commit specific files", "cmd": "git add file.txt && git commit -m \"msg\"" }, { "desc": "Amend last commit", "cmd": "git commit --amend" } ], "related": [ "git-status", "git-push", "git-discard" ], "flags_explained": { "-m": "Commit message inline", "-a": "Auto-stage all tracked modified files", "--amend": "Replace the previous commit" } }, { "id": "git-branch", "keywords": [ "branch", "branches", "list", "create", "new" ], "category": "git", "command": "git branch", "description": "List, create, or delete branches", "examples": [ { "desc": "List local branches", "cmd": "git branch" }, { "desc": "Create a branch", "cmd": "git branch feature-x" }, { "desc": "Delete a branch", "cmd": "git branch -d feature-x" } ], "related": [ "git-checkout", "git-merge" ], "flags_explained": { "-a": "List all branches incl. remote", "-d": "Delete a merged branch", "-D": "Force-delete a branch" } }, { "id": "git-checkout", "keywords": [ "checkout", "switch", "branch", "change", "move" ], "category": "git", "command": "git switch branch-name", "description": "Switch to a different branch (modern: git switch)", "examples": [ { "desc": "Switch branch", "cmd": "git switch main" }, { "desc": "Create and switch", "cmd": "git switch -c new-feature" }, { "desc": "Legacy syntax", "cmd": "git checkout main" } ], "related": [ "git-branch", "git-merge" ], "flags_explained": { "-c": "Create the branch then switch to it", "-": "Switch to previous branch (git switch -)" } }, { "id": "git-merge", "keywords": [ "merge", "combine", "integrate", "join", "branch" ], "category": "git", "command": "git merge branch-name", "description": "Merge another branch into the current branch", "examples": [ { "desc": "Merge a feature branch", "cmd": "git merge feature-x" }, { "desc": "Merge without fast-forward", "cmd": "git merge --no-ff feature-x" }, { "desc": "Abort a conflicted merge", "cmd": "git merge --abort" } ], "related": [ "git-branch", "git-checkout" ], "flags_explained": { "--no-ff": "Always create a merge commit", "--abort": "Cancel and restore pre-merge state", "--squash": "Combine into a single staged change" } }, { "id": "git-stash", "keywords": [ "stash", "shelve", "save", "temporary", "wip" ], "category": "git", "command": "git stash", "description": "Temporarily shelve uncommitted changes", "examples": [ { "desc": "Stash changes", "cmd": "git stash" }, { "desc": "Restore last stash", "cmd": "git stash pop" }, { "desc": "List stashes", "cmd": "git stash list" } ], "related": [ "git-status", "git-discard" ], "flags_explained": { "pop": "Apply and remove the latest stash", "list": "Show all stashes", "-u": "Include untracked files" } }, { "id": "git-diff", "keywords": [ "diff", "changes", "compare", "difference", "modified" ], "category": "git", "command": "git diff", "description": "Show changes between commits, working tree, and index", "examples": [ { "desc": "Unstaged changes", "cmd": "git diff" }, { "desc": "Staged changes", "cmd": "git diff --staged" }, { "desc": "Between branches", "cmd": "git diff main..feature" } ], "related": [ "git-status", "git-log" ], "flags_explained": { "--staged": "Show staged (cached) changes", "--stat": "Summary of changed files", "--name-only": "Only file names" } }, { "id": "git-clone", "keywords": [ "clone", "download", "copy", "repository", "repo" ], "category": "git", "command": "git clone ", "description": "Clone a repository into a new directory", "examples": [ { "desc": "Clone a repo", "cmd": "git clone https://github.com/user/repo.git" }, { "desc": "Shallow clone", "cmd": "git clone --depth 1 " }, { "desc": "Clone to a named dir", "cmd": "git clone mydir" } ], "related": [ "git-pull", "git-remote" ], "flags_explained": { "--depth": "Limit history to N commits (shallow)", "--branch": "Clone a specific branch", "-b": "Short for --branch" } }, { "id": "git-pull", "keywords": [ "pull", "fetch", "update", "sync", "download" ], "category": "git", "command": "git pull", "description": "Fetch from remote and integrate into current branch", "examples": [ { "desc": "Pull current branch", "cmd": "git pull" }, { "desc": "Pull with rebase", "cmd": "git pull --rebase" }, { "desc": "Pull a specific remote/branch", "cmd": "git pull origin main" } ], "related": [ "git-push", "git-clone" ], "flags_explained": { "--rebase": "Rebase local commits onto fetched head instead of merging", "--ff-only": "Refuse if a merge commit would be needed" } }, { "id": "git-push", "keywords": [ "push", "upload", "publish", "send", "remote" ], "category": "git", "command": "git push", "description": "Upload local commits to the remote repository", "examples": [ { "desc": "Push current branch", "cmd": "git push" }, { "desc": "Push and set upstream", "cmd": "git push -u origin feature-x" }, { "desc": "Push tags", "cmd": "git push --tags" } ], "related": [ "git-pull", "git-commit" ], "flags_explained": { "-u": "Set upstream tracking for the branch", "--tags": "Push tags too", "--force-with-lease": "Safer force push" } }, { "id": "git-undo-commit", "keywords": [ "undo", "revert", "reset", "uncommit", "rollback" ], "category": "git", "command": "git reset --soft HEAD~1", "description": "Undo the last commit but keep the changes staged", "examples": [ { "desc": "Undo commit, keep changes staged", "cmd": "git reset --soft HEAD~1" }, { "desc": "Undo commit and unstage", "cmd": "git reset HEAD~1" }, { "desc": "Revert a pushed commit safely", "cmd": "git revert " } ], "related": [ "git-discard", "git-commit" ], "flags_explained": { "--soft": "Keep changes staged", "--mixed": "Keep changes but unstage (default)", "HEAD~1": "One commit before HEAD" } }, { "id": "add-user", "keywords": [ "add", "create", "user", "account", "useradd" ], "category": "users", "command": "sudo adduser ", "description": "Create a new user account", "examples": [ { "desc": "Create a user (interactive)", "cmd": "sudo adduser alice" }, { "desc": "Low-level create with home", "cmd": "sudo useradd -m bob" }, { "desc": "Create a system user", "cmd": "sudo useradd -r svcuser" } ], "related": [ "delete-user", "change-password", "add-to-group" ], "flags_explained": { "-m": "Create the home directory", "-r": "Create a system account", "-s": "Set the login shell" } }, { "id": "delete-user", "keywords": [ "delete", "remove", "user", "account", "userdel" ], "category": "users", "command": "sudo deluser ", "description": "Delete a user account", "examples": [ { "desc": "Delete a user", "cmd": "sudo deluser alice" }, { "desc": "Delete user and home dir", "cmd": "sudo deluser --remove-home alice" }, { "desc": "Low-level delete", "cmd": "sudo userdel -r bob" } ], "related": [ "add-user" ], "flags_explained": { "--remove-home": "Also delete the user's home directory", "-r": "(userdel) remove home and mail spool" } }, { "id": "change-password", "keywords": [ "password", "passwd", "change", "reset", "credentials" ], "category": "users", "command": "passwd", "description": "Change a user's password", "examples": [ { "desc": "Change your own password", "cmd": "passwd" }, { "desc": "Change another user's (root)", "cmd": "sudo passwd alice" }, { "desc": "Expire a password now", "cmd": "sudo passwd -e alice" } ], "related": [ "add-user" ], "flags_explained": { "-e": "Force password change on next login", "-l": "Lock the account", "-u": "Unlock the account" } }, { "id": "add-to-group", "keywords": [ "group", "add", "member", "groups", "usermod" ], "category": "users", "command": "sudo usermod -aG ", "description": "Add a user to a supplementary group", "examples": [ { "desc": "Add user to sudo group", "cmd": "sudo usermod -aG sudo alice" }, { "desc": "Add to docker group", "cmd": "sudo usermod -aG docker $USER" }, { "desc": "Show a user's groups", "cmd": "groups alice" } ], "related": [ "add-user", "run-as-sudo" ], "flags_explained": { "-a": "Append (don't replace existing groups)", "-G": "Supplementary group list" } }, { "id": "apt-install", "keywords": [ "install", "apt", "package", "add", "software" ], "category": "packages", "command": "sudo apt install ", "description": "Install a package with APT (Debian/Ubuntu)", "examples": [ { "desc": "Install a package", "cmd": "sudo apt install htop" }, { "desc": "Install without prompts", "cmd": "sudo apt install -y nginx" }, { "desc": "Install a specific version", "cmd": "sudo apt install nginx=1.18.0-0ubuntu1" } ], "related": [ "apt-update", "apt-remove", "apt-search" ], "flags_explained": { "-y": "Assume yes to prompts", "--no-install-recommends": "Skip recommended packages" } }, { "id": "apt-update", "keywords": [ "update", "upgrade", "apt", "refresh", "patch" ], "category": "packages", "command": "sudo apt update && sudo apt upgrade", "description": "Refresh package lists and upgrade installed packages", "examples": [ { "desc": "Refresh package index", "cmd": "sudo apt update" }, { "desc": "Upgrade everything", "cmd": "sudo apt upgrade -y" }, { "desc": "Full dist upgrade", "cmd": "sudo apt full-upgrade" } ], "related": [ "apt-install", "list-installed" ], "flags_explained": { "update": "Refresh the package index", "upgrade": "Install newer versions of installed packages", "-y": "Assume yes" } }, { "id": "apt-search", "keywords": [ "search", "find", "apt", "package", "lookup" ], "category": "packages", "command": "apt search ", "description": "Search for available packages", "examples": [ { "desc": "Search by keyword", "cmd": "apt search image editor" }, { "desc": "Show package details", "cmd": "apt show gimp" }, { "desc": "Find which package owns a file", "cmd": "dpkg -S /usr/bin/python3" } ], "related": [ "apt-install", "list-installed" ], "flags_explained": { "search": "Full-text search of package names/descriptions", "show": "Detailed package info" } }, { "id": "apt-remove", "keywords": [ "remove", "uninstall", "apt", "delete", "purge" ], "category": "packages", "command": "sudo apt remove ", "description": "Remove an installed package", "examples": [ { "desc": "Remove a package", "cmd": "sudo apt remove htop" }, { "desc": "Remove with config files", "cmd": "sudo apt purge nginx" }, { "desc": "Remove unused dependencies", "cmd": "sudo apt autoremove" } ], "related": [ "apt-install" ], "flags_explained": { "remove": "Uninstall but keep config", "purge": "Remove including config files", "autoremove": "Drop orphaned dependencies" } }, { "id": "list-installed", "keywords": [ "list", "installed", "packages", "dpkg", "query" ], "category": "packages", "command": "apt list --installed", "description": "List installed packages", "examples": [ { "desc": "List all installed", "cmd": "apt list --installed" }, { "desc": "Count installed packages", "cmd": "dpkg -l | grep -c '^ii'" }, { "desc": "Search installed", "cmd": "apt list --installed | grep nginx" } ], "related": [ "apt-install", "apt-search" ], "flags_explained": { "--installed": "Only show installed packages", "-l": "(dpkg) list packages" } }, { "id": "docker-ps", "keywords": [ "docker", "containers", "ps", "running", "list" ], "category": "docker", "command": "docker ps", "description": "List running containers", "examples": [ { "desc": "Running containers", "cmd": "docker ps" }, { "desc": "All containers incl. stopped", "cmd": "docker ps -a" }, { "desc": "Only container IDs", "cmd": "docker ps -q" } ], "related": [ "docker-logs", "docker-stop", "docker-exec" ], "flags_explained": { "-a": "Show all (incl. stopped)", "-q": "Quiet — only IDs", "--format": "Custom Go-template output" } }, { "id": "docker-images", "keywords": [ "docker", "images", "list", "local", "repository" ], "category": "docker", "command": "docker images", "description": "List locally stored images", "examples": [ { "desc": "List images", "cmd": "docker images" }, { "desc": "Remove an image", "cmd": "docker rmi " }, { "desc": "Prune dangling images", "cmd": "docker image prune" } ], "related": [ "docker-run", "docker-ps" ], "flags_explained": { "-a": "Include intermediate images", "-q": "Only image IDs", "prune": "Remove unused images" } }, { "id": "docker-run", "keywords": [ "docker", "run", "start", "container", "launch" ], "category": "docker", "command": "docker run ", "description": "Create and start a container from an image", "examples": [ { "desc": "Run interactively", "cmd": "docker run -it ubuntu bash" }, { "desc": "Run detached with port map", "cmd": "docker run -d -p 8080:80 nginx" }, { "desc": "Run and auto-remove", "cmd": "docker run --rm alpine echo hi" } ], "related": [ "docker-ps", "docker-stop", "docker-exec" ], "flags_explained": { "-d": "Detached (background)", "-it": "Interactive + TTY", "-p": "Publish host:container port", "--rm": "Remove on exit", "-v": "Mount a volume" } }, { "id": "docker-logs", "keywords": [ "docker", "logs", "output", "container", "debug" ], "category": "docker", "command": "docker logs ", "description": "Fetch the logs of a container", "examples": [ { "desc": "Show logs", "cmd": "docker logs web" }, { "desc": "Follow live logs", "cmd": "docker logs -f web" }, { "desc": "Last 100 lines", "cmd": "docker logs --tail 100 web" } ], "related": [ "docker-ps", "docker-exec" ], "flags_explained": { "-f": "Follow log output live", "--tail": "Show only the last N lines", "-t": "Show timestamps" } }, { "id": "docker-exec", "keywords": [ "docker", "exec", "shell", "enter", "container" ], "category": "docker", "command": "docker exec -it bash", "description": "Run a command inside a running container", "examples": [ { "desc": "Open a shell", "cmd": "docker exec -it web bash" }, { "desc": "Run a one-off command", "cmd": "docker exec web ls /app" }, { "desc": "As a specific user", "cmd": "docker exec -u root -it web sh" } ], "related": [ "docker-ps", "docker-logs" ], "flags_explained": { "-it": "Interactive + TTY", "-u": "Run as a specific user", "-e": "Set an environment variable" } }, { "id": "docker-stop", "keywords": [ "docker", "stop", "kill", "container", "remove" ], "category": "docker", "command": "docker stop ", "description": "Stop a running container", "examples": [ { "desc": "Stop a container", "cmd": "docker stop web" }, { "desc": "Stop all running", "cmd": "docker stop $(docker ps -q)" }, { "desc": "Force kill", "cmd": "docker kill web" } ], "related": [ "docker-ps", "docker-run" ], "flags_explained": { "stop": "Graceful stop (SIGTERM then SIGKILL)", "kill": "Immediate SIGKILL", "-t": "Seconds to wait before killing" } } ], "categories": { "files": { "name": "File Operations", "tasks": [ "list-files-by-size", "find-large-files", "compress-folder", "disk-usage", "find-files-by-name", "file-permissions", "find-duplicates", "create-symlink", "extract-archive", "copy-files", "move-rename", "delete-files", "create-directory", "change-ownership", "sync-directories", "find-recent-files", "find-empty-dirs" ] }, "text": { "name": "Text Processing", "tasks": [ "search-in-files", "find-and-replace", "count-lines", "compare-files", "sort-lines", "unique-lines", "extract-columns", "view-file", "json-query", "word-frequency" ] }, "system": { "name": "System Monitoring", "tasks": [ "monitor-cpu", "monitor-memory", "process-kill", "list-processes", "watch-command", "disk-free", "system-uptime", "service-status", "view-logs", "find-process-by-port", "schedule-cron", "cpu-info", "kernel-messages" ] }, "network": { "name": "Network Operations", "tasks": [ "download-file", "check-ports", "check-connectivity", "dns-lookup", "copy-to-remote", "check-website", "public-ip" ] }, "git": { "name": "Git Version Control", "tasks": [ "git-status", "git-log", "git-discard", "git-commit", "git-branch", "git-checkout", "git-merge", "git-stash", "git-diff", "git-clone", "git-pull", "git-push", "git-undo-commit" ] }, "users": { "name": "User Management", "tasks": [ "current-user", "who-logged-in", "add-user", "delete-user", "change-password", "add-to-group" ] }, "packages": { "name": "Package Management", "tasks": [ "apt-install", "apt-update", "apt-search", "apt-remove", "list-installed" ] }, "docker": { "name": "Docker", "tasks": [ "docker-ps", "docker-images", "docker-run", "docker-logs", "docker-exec", "docker-stop" ] } } }