惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
V
V2EX
博客园 - 【当耐特】
WordPress大学
WordPress大学
爱范儿
爱范儿
美团技术团队
宝玉的分享
宝玉的分享
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
小众软件
小众软件
量子位
Hugging Face - Blog
Hugging Face - Blog
B
Blog RSS Feed
Recorded Future
Recorded Future
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 聂微东
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
博客园 - 叶小钗
GbyAI
GbyAI
Y
Y Combinator Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
F
Full Disclosure
G
Google Developers Blog
D
Docker
T
Tailwind CSS Blog
C
Check Point Blog
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
T
The Blog of Author Tim Ferriss
B
Blog
博客园 - 三生石上(FineUI控件)
博客园 - Franky
H
Help Net Security
MyScale Blog
MyScale Blog
U
Unit 42
D
DataBreaches.Net
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
I
InfoQ
阮一峰的网络日志
阮一峰的网络日志
The GitHub Blog
The GitHub Blog
L
LangChain Blog
有赞技术团队
有赞技术团队
Martin Fowler
Martin Fowler
Microsoft Security Blog
Microsoft Security Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
How to Manage Shell Commands Without Turning zsh or bash Into a Junk Drawer
Valeriy Bagr · 2026-05-07 · via DEV Community

How to Manage Shell Commands Without Turning zsh or bash Into a Junk Drawer

A dark terminal desk setup with scattered command notes, shell history, aliases, and a clean command glossary interface.

Shell history is great until it becomes a haunted attic. The command is probably there somewhere, wedged between three failed attempts, one typo, and a sudo moment that should not be legally discussed.

I built Gloss because I kept re-searching the same shell commands and spreading useful aliases across zsh, bash, notes, and random config files. This post is not really “use my tool, please clap.” It is more about the workflow problem that pushed me to build it — and the simple alternatives that are honestly good enough for many people.

The Problem: Shell History Is Not Knowledge

Shell history remembers what happened. It does not always remember why it mattered.

That difference becomes painful over time.

A command like this may be useful:

find . -name "*.log" -mtime +7 -delete

Enter fullscreen mode Exit fullscreen mode

But when it appears in history later, it has no context. Was it safe? Was it for the current project? Did I test it first? Did I copy it from somewhere? Did it work, or was it one of the failed attempts before the actual command?

Shell history is chronological, not meaningful. It is a receipt drawer. Useful sometimes, but not exactly a knowledge system.

I still use history constantly. With tools like fzf, searching history becomes much nicer. Ctrl+R with fuzzy search is one of those tiny upgrades that makes the terminal feel less hostile.

But history has a ceiling. It is good for commands I recently used. It is weaker for commands I use once every few weeks, commands with dangerous flags, commands that need a note, or commands that belong to a specific category like Git, Docker, network checks, deployment, WordPress cleanup, or “things I should understand before pressing Enter.”

That is where I wanted something more deliberate.

Why Aliases Alone Become Messy

Aliases are the first obvious fix. And they are useful. Very useful.

alias gs="git status"
alias gp="git push"
alias ll="ls -lah"

Enter fullscreen mode Exit fullscreen mode

A good alias turns a repeated command into muscle memory. One word instead of a small ceremony.

The problem starts when aliases become a private language nobody documented, including the person who wrote them. After enough time, .zshrc, .bashrc, or .bash_aliases can become a junk drawer with syntax highlighting.

You open the file and see:

alias dcu="docker compose up"
alias dcd="docker compose down"
alias fixperms="sudo chown -R $USER:$USER ."
alias thing2="some command I apparently trusted in 2024"

Enter fullscreen mode Exit fullscreen mode

Very professional. Museum-quality chaos.

Aliases are fast, but they are not always self-explanatory. They also do not naturally answer questions like:

  • What does this alias do?
  • Why did I create it?
  • Is it still useful?
  • Is it safe?
  • Which project or workflow does it belong to?
  • Do I have five versions of the same idea?

For small sets of aliases, no problem. For years of terminal usage, things get weird.

Why Notes Are Too Far From the Terminal

The next solution is notes.

A Markdown file. Notion. Obsidian. Apple Notes. A private wiki. A giant commands.md file that starts clean and ends like a basement.

Notes are better than history because they can include explanations:

## Check HTTP headers

Use this when debugging redirects or CDN/cache behavior.

curl -I https://example.com

Enter fullscreen mode Exit fullscreen mode

That is already much better. Context exists. The command is readable. Future-me has a fighting chance.

But notes have another problem: distance.

When I am in the terminal, switching to a browser or notes app often breaks the flow. It is not a huge interruption. It is just enough friction to make me not do it. And when friction wins, the command goes back into history, or worse, into a random alias with no explanation.

There are tools that bridge this gap. For example, QOwnNotes command-line snippet manager can search command snippets stored in notes using fzf or peco. That is a nice idea: keep notes as the source, but make snippets accessible from the command line.

I like that pattern. It proves the core need is real: commands need memory, search, and proximity to the terminal.

The Text File + fzf Solution

Before building anything, the obvious question is: why not just use a text file and fzf?

Honestly? That works.

You can create a simple file:

git status # check repo state git
curl -I https://example.com # inspect HTTP headers curl network
tar -czf archive.tar.gz folder # create compressed archive tar gzip
docker system prune -af # remove unused Docker data docker cleanup

Enter fullscreen mode Exit fullscreen mode

Then search it:

cat commands.txt | fzf

Enter fullscreen mode Exit fullscreen mode

Or make a tiny function:

cmds() {
  selected=$(cat "$HOME/.commands.txt" | fzf)
  printf '%s\n' "$selected"
}

Enter fullscreen mode Exit fullscreen mode

That is already useful. It is simple, transparent, and easy to back up. Nobody needs a new app for every problem. Sometimes the correct architecture is “a file, a pipe, and a little self-control.”

There are also mature tools in this space. pet is a command-line snippet manager that lets you save, tag, search, and execute snippets. It can use fuzzy finders and has been around long enough to prove that command snippets are not a fake problem. navi approaches the idea from the interactive cheatsheet side, which is great when commands need parameters or guided input.

Those tools are worth checking out. They solve overlapping problems, and depending on your workflow, one of them may be the better fit.

So why did I still build gloss?

Because I wanted a particular shape of workflow.

Where I Wanted More Structure

The text-file version is elegant, but I wanted a bit more structure around my own command mess.

Not a full knowledge base. Not an AI command explainer. Not a shell replacement. Just a small local place where reusable shell commands can live with enough context to be useful later.

The missing pieces for me were:

  • descriptions that are separate from the command itself
  • tags for grouping commands by workflow
  • a TUI for browsing and editing without opening a separate notes app
  • scan/import from existing zsh and bash config files
  • managed alias sync with preview and backups
  • local storage, no account, no cloud requirement

That became Gloss.

Gloss Home Screen TUI

Gloss is a small local-first CLI/TUI tool for reusable shell commands. It stores commands locally, lets me search them in a terminal UI, scans shell configs, and can sync selected aliases into one managed block.

The goal is not to make terminal work fancy. The goal is to stop re-solving the same small problems.

How Gloss Handles Commands

The basic Gloss workflow is simple.

Launch the TUI:

gloss

Enter fullscreen mode Exit fullscreen mode

Or add an entry:

gloss add

Enter fullscreen mode Exit fullscreen mode

An entry is just:

  • command
  • description
  • tags

For example:

curl -I https://example.com

Enter fullscreen mode Exit fullscreen mode

Description:

Check HTTP response headers without downloading the body

Enter fullscreen mode Exit fullscreen mode

Tags:

network, curl, debug

Enter fullscreen mode Exit fullscreen mode

That sounds small, but this small bit of structure helps. A command stops being a mysterious line from the past and becomes a reusable note that still belongs in the terminal.

Gloss TUI showing saved command entries grouped by tags with search and filter controls.

Gloss also supports direct commands:

gloss list
gloss list --tag git
gloss scan
gloss edit <command>
gloss delete <command>

Enter fullscreen mode Exit fullscreen mode

The TUI is for browsing and editing. The CLI commands are for quick actions. Nothing revolutionary. That is partly the point.

How Scan and Import Help Clean Up zsh and bash

The part I personally needed most was scanning existing shell files.

Gloss can scan common shell config locations such as:

~/.zshrc
~/.bashrc
~/.bash_aliases

Enter fullscreen mode Exit fullscreen mode

Run:

gloss scan

Enter fullscreen mode Exit fullscreen mode

In the TUI, scan results can include aliases, simple functions, and executable scripts from configured paths. Then I can choose what to import.

Gloss scan/import screen showing aliases and shell functions detected from zsh or bash config files.

This matters because most reusable commands already exist somewhere. They are just not organized. Some are aliases. Some are functions. Some are scripts. Some are ancient fossils from a setup you barely remember.

Importing them into a glossary does not force them to become aliases. It just makes them findable, readable, and editable. That is a safer first step than “rewrite my shell config, good luck everybody.”

How Managed Alias Sync Works

Alias sync is the dangerous part, so I wanted it boring.

Boring is good here.

Gloss does not rewrite the whole shell file. It writes aliases inside one managed block:

# >>> gloss aliases >>>
alias gs="git status"
alias ll="ls -lah"
# <<< gloss aliases <<<

Enter fullscreen mode Exit fullscreen mode

Everything outside that block stays untouched.

The flow is:

  1. add a managed alias in Gloss
  2. preview the sync block
  3. sync when ready
  4. Gloss writes or replaces only the managed block
  5. backup is created only if an existing shell file actually changes

That backup behavior matters. Creating endless backups for no-op syncs would be annoying. Not creating backups when modifying shell files would be reckless. The middle ground is simple: backup when sync changes an existing file.

Example:

gloss alias add
gloss alias sync

Enter fullscreen mode Exit fullscreen mode

This is mainly for people who want aliases, but do not want alias management to become a hand-edited swamp.

What I Intentionally Did Not Build

It is tempting to keep adding features. That is how a small command glossary becomes a life management platform with plugins, sync, AI summaries, a graph view, and probably a calendar for some reason.

I tried not to do that.

Gloss is not:

  • a shell replacement
  • a shell history analyzer
  • a package manager
  • an AI command generator
  • a full dotfiles manager
  • a cloud sync product
  • a replacement for fzf, pet, or navi

That last point is important. Gloss overlaps with snippet tools, but it does not try to win every category. A commands.txt file with fzf may be enough. pet may be better if you want snippet execution and mature snippet management. navi may be better if you want interactive cheatsheets with parameters.

Gloss is more narrowly about keeping reusable commands documented, searchable, importable from shell configs, and optionally syncable as managed aliases.

That is the lane.

A Practical Setup I Would Recommend

For a sane shell-command workflow, I would not start by installing five tools and reorganizing everything. That is how “productivity” becomes procrastination wearing a nice jacket.

I would start smaller:

  1. Keep normal shell history.
  2. Add fzf history search if you do not already use it.
  3. Keep aliases for commands you run constantly.
  4. Save less frequent but important commands somewhere searchable.
  5. Use gloss, pet, navi, or a plain text file depending on how much structure you need.

A simple rule helps:

  • If I run it daily, it can be an alias.
  • If I need to understand it later, it needs a description.
  • If I keep searching it again, it belongs in a glossary/snippet system.
  • If it modifies shell config, it needs preview and backups.

That rule is not science. It is more like putting labels on boxes before the garage wins.

Installing Gloss

Gloss is open source under the MIT license, written in Go, and supports macOS/Linux with zsh and bash.

Install script:

curl -fsSL https://raw.githubusercontent.com/Architeg/gloss/main/scripts/install.sh | bash

Enter fullscreen mode Exit fullscreen mode

Homebrew:

brew install Architeg/tap/gloss

Enter fullscreen mode Exit fullscreen mode

Run:

gloss

Enter fullscreen mode Exit fullscreen mode

Repo:
https://github.com/Architeg/gloss

Project page:
https://worksfine.dev/gloss/

Final Thoughts

Managing shell commands is not about becoming a terminal wizard. It is about not making the same tiny decisions forever.

Shell history is useful. Aliases are useful. Notes are useful. A text file with fzf is useful. But once commands start spreading across all of them, the workflow gets blurry. Gloss is my attempt to make that middle space cleaner: local, searchable, documented, and close to the terminal.


The terminal does not need another shiny layer of complexity. It needs fewer forgotten commands, fewer mystery aliases, and fewer browser searches for things already solved once. How do you manage the commands you know you will need again?

FAQ

  • What problem does Gloss solve?
    Gloss helps manage reusable shell commands that are too important to leave buried in history but not used often enough to remember perfectly. It gives them descriptions, tags, search, scan/import, and optional managed alias sync.

  • Is Gloss better than using aliases in zsh or bash?
    Not exactly. Aliases are still great for commands used constantly. Gloss is more useful for commands that need context, tags, or occasional lookup. It can also sync selected commands as aliases when that makes sense.

  • Can I just use a text file with fzf instead?
    Yes. A text file plus fzf is a good minimal solution. Gloss is for users who want more structure: separate descriptions, tags, TUI editing, shell config scanning, and safer alias sync with backups.

  • Does Gloss replace tools like pet or navi?
    No. pet is a mature command-line snippet manager, and navi is an interactive cheatsheet tool. gloss focuses on a local command glossary plus zsh/bash scan/import and managed alias syncing.

  • Is it safe to let a tool write to .zshrc or .bashrc?
    Caution is reasonable. Gloss only writes inside a dedicated managed block, leaves unrelated shell config untouched, and creates backups when sync changes an existing shell file. Still, preview the block before syncing and keep your dotfiles backed up.


How do you manage reusable commands? Drop your setup, questions, or criticism in the comments — I’d like to see what works for other people.