Tutorial 5: Command Line Basics
Tutorial 5: Command Line Basics — easy-to-understand guide based on official docs
Tutorial 5: Command Line Basics
Imagine your computer as a kitchen. A web app is like a restaurant where you order from a menu. The terminal is like being the chef—you have a cutting board, a knife, and total control. Hermes Agent’s CLI (Command Line Interface) is that chef’s workspace, but for AI. It’s a full-screen text-based app that lives right inside your terminal, not a website. You type, it responds, and you can see everything happening in real time.
Step 1: Get Set Up (One Command)
Before you can cook, you need ingredients. For Hermes, that’s just one command:
hermes setup --portal
This does two things: it installs the basic settings, and it connects you to Nous Portal (a service that gives your agent access to powerful AI models). Think of it as plugging in your oven. After this, you’re ready to start chatting.
Step 2: Start a Conversation
Now, open your terminal and type:
hermes chat
That’s it. You’re now inside the Hermes CLI. You’ll see a prompt where you can type your first question. For example, try:
What’s the weather like in Tokyo?
The agent will stream its answer right in front of you—like watching a chef chop vegetables, you see every step as it happens.
Step 3: Use Slash Commands (Your Shortcut Keys)
Just like a video game has cheat codes, Hermes has slash commands. Type / and you’ll see a list of autocomplete suggestions. For example:
/help– shows you all available commands/clear– wipes the conversation history/save– saves your current chat to a file
You don’t need to memorize them. Just press / and let the autocomplete guide you. It’s like having a map inside the kitchen.
Step 4: Edit Your Message (Multiline Editing)
Made a typo? Need to write a long, multi-line question? The CLI supports multiline editing. Press Enter to go to a new line (instead of sending), and Shift+Enter to send when you’re done. This is perfect for writing detailed prompts or pasting code snippets without breaking them.
Step 5: Interrupt and Redirect
Sometimes the agent goes off on a tangent. No problem. Just press Ctrl+C to stop the current response. Then you can type a new message to redirect it. This is like telling the chef, “Wait, I actually wanted pasta, not pizza.” You’re in control, always.
Step 6: Check Your History
The CLI remembers your past conversations. Use the up and down arrow keys to scroll through previous messages. This is handy when you want to revisit an idea or copy an old answer. No more digging through browser tabs.
Bonus: The Fancy TUI (Optional)
If you want an even prettier interface, Hermes also ships a modern TUI (Terminal User Interface) with pop-up overlays, mouse selection, and non-blocking input. Launch it with:
hermes --tui
This is like upgrading your kitchen from a basic stove to a professional chef’s range. It’s still in the terminal, just with more bells and whistles. You can click, drag, and see things in floating windows. But don’t worry—the basic CLI is completely fine for daily use.
Summary
- Setup:
hermes setup --portal - Start:
hermes chat - Use
/for commands - Edit with multiline, stop with
Ctrl+C - Scroll for history
- Optional:
hermes --tuifor a fancier view
The CLI is built for people who love the terminal—fast, keyboard-driven, and without distractions. Once you get the hang of it, you’ll wonder why you ever used a web interface.
Next up: In Tutorial 6, we’ll dive into using tools—how to let your agent search the web, read files, and run code. See you there!
📖 Official Docs
This article is based on the official Hermes Agent documentation:Official docs › reference/cli-commands