The Deska blog
Help Text People Actually Read
Learn how to write help text people actually read for your CLI tools. Improve developer experience with clear structure, examples, and contextual guidance.
12 min read
Writing help text people actually read is a core skill for any developer building command line tools. Most developers treat the --help flag as an afterthought, resulting in dense blocks of text that users ignore. A well crafted CLI should be self documenting, guiding the user from basic usage to advanced flags without forcing them to open a browser. When the help output is structured correctly, it reduces friction and lowers the barrier to entry for your tool.
The Hierarchy of Information
When a user types a help command, they are usually in one of three states. They are either looking for a specific flag, trying to remember the basic syntax, or exploring what the tool can do. Your help text should cater to these states in a logical order.
The most effective structure starts with a brief description, followed by usage examples. Only after these should you list the available commands and options. This ensures that the most relevant information hits the user's eyes first.
- Name and version: Identify the tool and its current release.
- Usage string: Show the exact pattern for running the command.
- Brief description: Explain what the tool does in one or two sentences.
- Commands: List available subcommands if applicable.
- Options and Flags: Detail the modifiers available to the user.
- Examples: Provide concrete instances of the tool in action.
Designing the Usage String
The usage string is the first thing a user looks for. It must be concise. Use standard conventions like square brackets for optional arguments and angle brackets for required ones. Avoid overcomplicating this line. If your tool has dozens of permutations, show the most common pattern and point them to subcommands for more detail.
Poorly formatted usage strings lead to syntax errors. If a user cannot glance at the first line and understand how to invoke the binary, they will likely give up. Consistency is more important than creativity here. Follow the patterns established by POSIX or popular modern tools like Git or Docker.
Organizing Options and Flags
A long list of flags sorted alphabetically is rarely helpful. Instead, group your options by function. Put the most common flags like --verbose or --output at the top. Grouping related options together helps users find what they need through spatial association.
Each flag description should start with a verb. Instead of writing The output file path, write Specify the output file path. This active voice makes the documentation feel more like a guide and less like a dictionary. Always include the default value if one exists. Knowing that a flag defaults to true or a specific directory saves the user from having to test the tool just to see what happens.
Examples as the Primary Teacher
Developers learn by doing. A single well placed example is often worth more than five paragraphs of technical description. Your examples should cover the 80 percent use case. Do not just show the most complex version of a command. Show the simplest one first.
Consider a section at the bottom of your help output dedicated to examples. Use comments to explain what each example does. This provides a safe template for users to copy and paste into their terminal. When users feel confident copying an example, they are more likely to explore the rest of your tool.
How Modern Workspaces Change the Context
The way we interact with CLI tools is evolving. While a standard terminal is the traditional home for these tools, modern environments allow for more integrated workflows. Tools like Deska provide an infinite canvas where you can run multiple terminals side by side.
When you are working in a workspace that allows you to see your code editor and several terminal panels at once, the readability of help text becomes even more critical. You might be running a coding agent in one panel while checking the help output of a library in another.
| Feature | Standard Terminal | Deska Workspace |
|---|---|---|
| Visibility | Single stream of text | Multiple persistent panels |
| Context | Lost on scroll | Side by side with code |
| Interaction | Manual typing | Ask Deska voice/chat control |
| Agents | Separate windows | Integrated coding agents |
In an environment where terminals are part of a larger visual layout, your help text needs to be scannable. Excessive padding or huge ASCII art banners can waste valuable screen real estate on a shared canvas.
Implementing Contextual Help
Do not dump every single detail into the root help command. Use a nested approach. The main help should show subcommands. Each subcommand should have its own specific help output. This keeps the information density manageable.
If a user makes a mistake, provide helpful error messages that suggest the correct flag. If they type --helpp, your tool should suggest --help. This kind of proactive guidance is part of writing help text people actually read. It turns a frustrating error into a learning moment.
Local First Documentation and Privacy
When building tools, consider where your documentation lives. Many modern tools rely on external websites. However, a local-first approach ensures that help text is always available, even without an internet connection. This is vital for developers working in secure environments or while traveling.
Keeping your documentation and help logic within the binary or local files respects user privacy. It avoids unnecessary pings to a central server just to see how a flag works. This alignment with local workflows is a hallmark of high quality developer tools.
The Role of AI in CLI Interaction
We are entering an era where AI agents frequently interact with our CLI tools. When you run agents like Claude Code or OpenCode within agent threads, these models read your help text to understand how to execute commands.
Clean, structured, and predictable help text makes it easier for AI to assist you. If your help text is ambiguous, the agent might hallucinate arguments. By writing clear help text for humans, you are also optimizing your tool for the automated agents of the future. You can even monitor these agent interactions through a mobile app if your workspace supports secure remote relays.
FAQ
How do I write a good CLI help command?
Focus on the usage string and practical examples first. Group flags by their functionality rather than alphabetically. Use active verbs for descriptions and always mention default values.
What is the best format for terminal help text?
Follow POSIX standards for usage strings. Use a width of 80 characters to ensure compatibility with different terminal sizes. Use indentation and white space to separate sections logically.
Should I use color in my CLI help output?
Color can improve readability by highlighting keywords and flags. However, always check if the output is a TTY and provide a way to disable colors for users who prefer plain text or use screen readers.
Improving Your Development Workflow
Writing great help text is just one part of building a better developer experience. If you are looking for a way to organize your tools, terminals, and AI agents in a single workspace, try Deska. It provides a free desktop application for Mac, Windows, and Linux that helps you manage your development environment more effectively. You can download the app and start building your workspace on an infinite canvas today.