ShellSage
ShellSage AI Assist explaining and fixing terminal output on mobile
AI WORKFLOWS

AI Assist: Explain and Fix Any Terminal Output with One Tap

Learn how to use ShellSage's AI Assist to easily understand and correct terminal outputs.


With ShellSage, you can quickly explain and fix terminal output using the AI Assist feature, Sage. This tutorial will guide you through using Sage to interpret command results and suggest corrections with just a tap.

What is AI Assist in ShellSage?

AI Assist, powered by Sage, is ShellSage's built-in AI advisor designed to help you navigate command-line outputs. Whether you're a developer, sysadmin, or SRE, you know that terminal outputs can be cryptic. Sage simplifies this process by providing plain-English explanations and actionable fixes for any command you run.

When you execute a command in the ShellSage terminal, Sage is ready to assist you. If the command produces an error or even if it succeeds, you can long-press the output line or tap the "Ask Sage" option in the terminal AppBar. This opens a bottom sheet where you can choose to either get an explanation or a suggested fix for the command.

"Sage not only explains outputs but also helps correct them, making troubleshooting much smoother."

This feature is particularly useful for those who may not be fully familiar with every command or output message. It can save you time and frustration, allowing you to focus on more critical tasks.

How to Use the Explain Feature

To get started with the Explain feature, you first need to run a command in the ShellSage terminal. For example, let’s say you want to check the disk usage of your system:

df -h

After you run this command, you may see outputs that look like this:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       50G   20G   30G  40% /

Now, if you want to understand this output better, long-press the output line or tap the "Ask Sage" button. This will bring up the bottom sheet with two options: Explain and Fix. Select the Explain option.

Sage will then provide a breakdown of the output. For instance, it may explain that the first line indicates the filesystem type and size, while subsequent lines show how much space is used and available. This clarity can help you make informed decisions based on the output.

"Understanding outputs is crucial for effective system management, and Sage makes it easy."

The Explain feature is not just limited to disk usage commands. It can be applied to a variety of commands across different contexts, making it a versatile tool in your command-line toolkit.

When Should You Use the Fix Feature?

The Fix feature comes into play when you encounter errors in your command outputs. For example, if you try to change a directory that doesn't exist:

cd /nonexistent_directory

Upon executing this command, you will receive an error message indicating that the directory does not exist. To get a better understanding and a potential solution, tap "Ask Sage" and select the Fix option. Sage will analyze the error and suggest a safer or correct command.

In this case, Sage might suggest a command to create the directory first:

mkdir /nonexistent_directory

or it might suggest checking the current directory with:

ls

This feature is particularly helpful in preventing mistakes. The suggested command will typically include a safety check, ensuring that you are not running potentially harmful commands inadvertently.

How to Engage in a Back-and-Forth with Sage

If you need further clarification or want to ask Sage additional questions, you can engage in a back-and-forth conversation. This is especially useful if the output is complex or if you want to explore related commands.

To start a chat with Sage, tap the sparkle AI button. This opens a chat interface where you can ask questions in plain English. For example, you might type, "What does the output of the df command mean?" or even attach a screenshot of the output.

What does this error mean?

This conversational interface allows you to dive deeper into specific issues and gain insights that are tailored to your needs. You can also tap any command Sage suggests to insert it directly into your terminal prompt for quick execution.

"The ability to chat with Sage adds a layer of interactivity that enhances learning and troubleshooting."

This feature is particularly advantageous in a mobile environment, where typing long commands can be cumbersome. Using voice input, you can dictate your questions and let Sage handle the rest.

Best Practices for Using AI Assist

To make the most out of the AI Assist feature in ShellSage, consider the following best practices:

By following these practices, you can maximize the efficiency and effectiveness of your interactions with Sage, turning potential frustrations into learning experiences.

Conclusion

The AI Assist feature in ShellSage revolutionizes the way you handle terminal outputs. With the ability to explain and fix issues with just a tap, it empowers users to become more proficient in command-line operations. Whether you're debugging a script, managing a server, or simply exploring commands, Sage serves as a reliable companion.

By leveraging the Explain and Fix features, engaging in conversations, and following best practices, you can enhance your command-line skills and streamline your workflow. Embrace the power of AI Assist and transform your terminal experience today.

⚡ Key takeaways

Saqlain Bukhari
Your Questions, Answered

Frequently Asked Questions

You can access AI Assist by long-pressing the command output or tapping 'Ask Sage' in the terminal AppBar.
AI Assist can be used with any command output in the terminal, whether successful or erroneous.
Yes, users on the trial version have a limit of 60 calls per hour, while Pro users can make 600 calls per hour.
Yes, you can dictate your questions to Sage using voice input, making it easier to interact with the AI.
Download ShellSage free
ShellSage is an AI-first SSH terminal with Sage built in: it explains output, fixes broken commands, and previews the blast radius before anything runs. Start on the free Hobby plan with no credit card, and get a 7-day full-Pro trial when you want everything.
← More tutorials