Hello weirdos,
Welcome to this week’s Sloth Bytes. I hope you had a great week.

Every AI Agent Has Its Strengths. Why Use Just One?
BLACKBOX AI runs all coding agents in parallel including Blackbox Agent, Claude Code, Codex, and Gemini to tackle your problem simultaneously.
An LLM judge then evaluates each solution, ranks them, and automatically selects the best, most reliable code. That implementation becomes your PR.
No switching tabs. No manual comparisons. Just the smartest agents competing to give you the perfect solution.
The results speak for themselves:
Trusted by 30M+ developers
35+ IDE integrations
End-to-end encrypted
One platform. All the agents. The best answer wins.

Command-Line Interface (CLI)

Everyone has used a command-line interface at least ONCE in their lives.
If you've ever run npm install, pushed code with Git, or watched any type of coding tutorial, congrats, you've touched the command line.
What Exactly Is a Command Line Interface
The terms get mashed together a lot, but they’re not actually the same thing:
Terminal / terminal emulator — the window that displays text and accepts keyboard input.
Shell — the program that reads commands and launches other programs. Bash, Zsh, Fish, and PowerShell are shells.
CLI — any command-line interface exposed by a program, like
git,docker, ornpm.
A command-line interface lets you control a program by typing commands instead of clicking through a graphical interface. A shell gives you an environment for running those commands, navigating files, connecting programs with pipes, and writing scripts.
Imagine it like texting your computer commands instead of clicking buttons.
Instead of: right-click → New → Folder → type name
You type:
mkdir new_folder_yayyyDone. One line. One second.
It's fast. It's efficient. It looks intimidating at first, but it's mostly just verbs.
You're literally just telling your computer to do stuff
Does This Still Matter If We Have GUIs? 🤓

Well… You must be a web developer, but also a fair question!
It's true we have beautiful GUIs for everything now: GitHub Desktop, Docker Desktop, etc.
GUIs and CLIs are often two interfaces to the same underlying system.
GitHub Desktop can perform the same Git operations you could request with commands like
git push.Docker Desktop exposes container operations that are also available through Docker’s CLI and APIs.
The important part isn’t that every button secretly types a command. It’s that learning the underlying concepts makes you less dependent on one specific interface.
When you click "Push" in GitHub Desktop, it's running
git push.When you start a container in Docker Desktop, it's running
docker run.
The GUI is just plastic surgery for the CLI.
Why Developers Still Learn the CLI
A lot of developer tooling exposes a CLI because commands are easy to document, automate, run remotely, and put inside scripts or CI/CD pipelines.
CI/CD pipelines, Cloud platforms, Infrastructure as code, etc.
When CLI Beats GUI
1. Automation
Come on, you’re a programmer. You should know this.
If you have something you do 50 times a day, write a script for it.
A lot of GUIs don’t have this feature which means you have to use your little human brain and keep doing the same mouse clicks.
Ex: Want to resize 10,000 images?
With a GUI, you're clicking for days.
But with a CLI:
for img in *.jpg; do
magick "$img" -resize 800x600 "thumb_$img"
doneTwo minutes. Done.
Even if the GUI has this feature, guess how they did it 😉
2. Reproducibility
CLI workflows can be highly reproducible because the exact commands can be saved in scripts and version control. But the environment still matters: operating system, shell, tool versions, permissions, files, environment variables, and network state can all change the result.
Documentation becomes actual commands you can copy-paste:
# Setup dev environment
git clone repo
cd repo
npm install
#cp command = copy paste files and directories
cp .env.example .env
npm run devAnyone with the expected tools and environment can follow the same documented steps. That’s much easier to review and automate than a paragraph saying “click this, then click that.”
AI coding tools absolutely love the CLI for this reason.
AI coding tools also benefit from command-line interfaces because commands are structured, inspectable actions. Some agents can operate GUIs too, but a command like docker compose up -d is usually easier to execute, log, reproduce, and verify than a sequence of mouse clicks.
But you can tell it to run docker compose up -d and it works perfectly every time.
The future of development is increasingly AI-assisted (whether you like it or not)
And AI speaks CLI fluently.
Shells vs Terminal Emulators
Common shells:
Bash — extremely common on Linux and servers, and widely used for shell scripts.
Zsh — the default interactive shell on modern macOS and compatible with much Bash-style interactive usage.
Fish — a user-friendly interactive shell with its own syntax, so Bash scripts are not automatically Fish scripts.
PowerShell — Microsoft’s cross-platform shell; unlike traditional Unix shells, its pipelines pass structured objects rather than only text.
Terminal emulators: These are the apps that host your shell session. The choice mostly affects the terminal experience—not what Git, Docker, npm, or other CLI programs fundamentally do.
iTerm2 (macOS) - Split panes, search history, deep customization. The gold standard for Mac users.
Alacritty (Cross-platform) - GPU-accelerated, blazing fast, minimal features. For speed freaks.
Warp (Cross-platform) - Modern terminal with AI features, IDE-like autocomplete, and command blocks.
Ghostty (macOS/Linux) - New, stupid fast, native performance. Built by the Zig creator.
For most development work, your terminal emulator matters less than the shell and commands you’re using. Syntax can differ substantially between Bash/Zsh/Fish and PowerShell, so don’t assume every snippet is portable across shells.
The commands might be a little different but they’ll do the same thing.
The Only Commands You Actually Need to Know
Hot take: you don't need to memorize hundreds of commands. You need like 10.
Here are 10 commands I use a lot. These examples are primarily Unix-style commands you’ll see in Bash/Zsh on Linux and macOS; PowerShell has different commands and semantics for several of them.
pwd— Print working directory. Shows your current location in the file system.ls— List files and directories.cd— Change directory.mkdir— Create a directory.touch— Create a file if it does not exist, or update its timestamps if it does.rm— Remove files. Removing directories requires options such as-r; double-check destructive commands because there may be no trash/undo.grep— Search text for matching patterns.find— Search directory trees by name, type, and other conditions.curl— Transfer data using URLs; commonly used to test HTTP APIs and download files.ssh— Securely connect to remote machines.
Obviously there’s more, but this is a good foundation.
CLI Life Hacks You Should Know About
1. Grep - Search Text Across Files
grep searches for text patterns across your entire codebase. It's like Ctrl+F but for your whole project.
Use cases:
Find where functions are called
Locate API endpoints across files
Hunt down TODO comments
Search error logs
Find imports or dependencies
Examples:
# Search recursively for a function with line numbers
grep -rn "myFunction" src/
# Find API endpoints while skipping common build/dependency folders
grep -r "/api/users" . --exclude-dir=node_modules --exclude-dir=dist
# Chain filters: find useState, exclude lines containing test, keep lines containing User
grep -r "useState" src/ | grep -v "test" | grep "User"2. For Loops - Automate Repetitive Tasks
For loops execute the same command on multiple items. Perfect for batch operations that would take forever clicking through a GUI.
Use cases:
Rename multiple files at once
Process images/videos in bulk
Run tests across multiple packages
Check status of multiple services
Create multiple config files
Examples:
# Rename .jsx files directly inside src/ to .tsx
for file in src/*.jsx; do
[ -e "$file" ] || continue
mv "$file" "${file%.jsx}.tsx"
done
# Check which local services respond successfully
for port in 3000 3001 3002 3003; do
curl -fsS "http://localhost:$port/health" >/dev/null \
&& echo "$port: UP" \
|| echo "$port: DOWN"
done
# Process images in parallel, then wait for all jobs
for image in images/*.jpg; do
[ -e "$image" ] || continue
magick "$image" -resize 800x600 "thumbnails/$(basename "$image")" &
done
wait3. Curl - Make HTTP Requests
curl makes HTTP requests from your terminal.
Use cases:
Test your local API during development
Check if endpoints are working
Debug authentication flows
Test file uploads
Measure API response times
Examples:
# GET request with pretty-printed JSON
curl http://localhost:3000/api/users | jq
# POST request with auth
curl -X POST http://localhost:3000/api/login \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "test123"}'
# Save auth token and reuse it
TOKEN=$(curl -s -X POST http://localhost:3000/api/login \
-d '{"email": "[email protected]", "password": "test123"}' | jq -r '.token')
curl -H "Authorization: Bearer $TOKEN" http://localhost:3000/api/protected4. Aliases - Create Command Shortcuts
Aliases are custom shortcuts for commands you use frequently. Type less, do more.
Use cases:
Shorten long git commands
Create quick navigation shortcuts
Simplify Docker commands
Make common dev tasks one word
Examples:
# Add these to ~/.bashrc or ~/.zshrc
# Git shortcuts
alias gs='git status'
alias ga='git add .'
alias gp='git push'
# Docker shortcuts
alias dc='docker compose'
alias dcu='docker compose up -d'
# Navigation shortcuts
alias ..='cd ..'
alias projects='cd ~/Projects'5. Pipes - Chain Commands Together
Pipes (|) take the output of one command and feed it as input to another. This is how you combine simple tools to solve complex problems.
Use cases:
Filter and process data in stages
Search through command outputs
Format and transform data
Count, sort, and analyze results
Build powerful one-liners
Examples:
# Find the 10 largest entries under the current directory
du -ah . | sort -rh | head -10
# Count how many times each ERROR line appears
grep "ERROR" app.log | sort | uniq -c | sort -rn
# Count JavaScript files while pruning node_modules
find . -path './node_modules' -prune -o -name '*.js' -type f -print | wc -l
# Get Git contributors sorted by commit count
git log --format='%an' | sort | uniq -c | sort -rn
# Follow logs and show lines containing error
tail -f app.log | grep -i "error"Modern Tools That Make the CLI less painful
Here's something that doesn't get talked about enough: the terminal has gotten dramatically better in the past few years.
Developers rewrote crusty Unix utilities in Rust with modern UX in mind. The result? Tools that are faster, smarter, and way more pleasant to use.
ripgrep (rg) - grep on steroids. It's 5-10x faster, respects .gitignore automatically, and VSCode uses it internally. That's how good it is.
bat - cat with syntax highlighting, git integration, and line numbers. Once you try it, regular cat feels like a flip phone.
exa (now eza) - makes ls readable with colors, icons, and git status inline.
zoxide - Learns which directories you visit most. Instead of cd ~/Projects/work/client-project/src/components/, I type z comp. Saves 60% of my navigation keystrokes.
If you want to keep learning
Version control explained — learn the Git fundamentals behind commits, branches, and collaboration.
How to undo Git mistakes — reset vs revert vs restore when your terminal adventures go sideways.
CI/CD explained — how command-line tools become automated test and deployment pipelines.
If you’re a nerd, check these out:
The Front-End Developer's Guide to the Terminal - Excellent deep dive
Command Line for Beginners - freeCodeCamp's comprehensive guide
Bash Scripting Quirks & Safety Tips - CLI practical advice

Thanks to everyone who submitted!
diogoagc (careful it’s a php solution…), aahan0511, mkgp-dev, grcc492, dicksonmayaz, SanjnaSukirti, giacomib, gcavelier, sairambokka, Siddhesh-Ballal, NeoScripter, jsjasee, and AspenTheRoyal!
When Should You Go to Sleep?
You’re setting an alarm for the next morning and know how long you want to sleep.
Your job is to figure out what time you need to go to bed to get that amount of sleep.
Each input has two parts:
The alarm time (when you’ll wake up).
The sleep duration (how long you want to sleep).
Return the time you should go to bed — in 24-hour format ("HH:MM").
bedTime(["07:50", "07:50"])
output = ["00:00"]
bedTime(["06:15", "10:00"], ["08:00", "10:00"], ["09:30", "10:00"])
output = ["20:15", "22:00", "23:30"]
bedTime(["05:45", "04:00"], ["07:10", "04:30"])
output = ["01:45", "02:40"]How To Submit Answers
Reply with
A link to your solution (github, twitter, personal blog, portfolio, replit, etc)
or if you’re on the web version leave a comment!
If you want to be mentioned here, I’d prefer if you sent a GitHub link or Replit!
That’s all from me!
Have a great week, be safe, make good choices, and have fun coding.
If I made a mistake or you have any questions, feel free to comment below or reply to the email!
See you all next week.
What'd you think of today's email?
Want to advertise in Sloth Bytes?
If your company is interested in reaching an audience of developers and programming enthusiasts, you may want to advertise with us here.




