Skip to main content

About Terminal Integration

Cheetah AI provides full terminal integration, allowing you to execute shell commands, manage long-running processes, and automate development workflows through natural language. Instead of switching between your editor and terminal, you can ask the AI to run commands, interpret their output, and take action based on the results. Terminal integration is particularly powerful in Agent mode, where the AI can run commands as part of larger workflows. For example, when implementing a feature, the Agent might install dependencies, run tests, and fix any failures automatically.

Running Commands

Execute any shell command by asking the AI in natural language:
The AI translates your request into the appropriate command, executes it, and shows you the output. You don’t need to remember exact command syntax - describe what you want to accomplish and the AI figures out the right command.

Command Output Handling

The AI doesn’t just run commands - it reads and interprets the output to provide meaningful assistance: Error Interpretation - When a command fails, the AI analyzes the error message and explains what went wrong. It can often suggest fixes or automatically attempt to resolve the issue. Result Analysis - After running tests, the AI can summarize which tests passed and failed, identify patterns in failures, and suggest fixes for failing tests. Workflow Continuation - Based on command results, the AI decides what to do next. If tests pass, it might proceed to the next step. If they fail, it might investigate and fix the issues. Example interaction:

Working Directory

By default, commands run in your workspace root directory. You can specify a different directory when needed:
The AI handles path resolution automatically, so you can use relative paths from your workspace root.

Persistent Terminals

Some processes need to run continuously, like development servers, file watchers, or database connections. Cheetah AI supports persistent terminals for these long-running processes.

Starting Background Processes

When you start a process in a persistent terminal, it continues running in the background while you work on other tasks. The AI can start multiple persistent terminals for different processes.

Managing Background Processes

You can check on and control background processes:

Why Use Persistent Terminals?

Persistent terminals solve several problems: Non-blocking - Regular commands block the AI until they complete. Persistent terminals let the AI continue working while processes run in the background. Continuous processes - Development servers, watchers, and similar tools are designed to run continuously. Persistent terminals keep them running as long as you need them. Output access - You can check the output of background processes at any time, which is useful for monitoring logs or debugging issues.

Common Use Cases

Package Management

The AI understands package managers (npm, yarn, pnpm) and can install, update, and manage dependencies. It reads package.json to understand your project’s dependency structure.

Git Operations

The AI can perform most git operations. For commits, it analyzes your changes and generates appropriate commit messages. For complex operations like rebasing or resolving conflicts, it provides guidance and executes commands step by step.

Build and Test

The AI understands build tools and test frameworks. It can run specific tests, interpret test output, and help fix failing tests.

Database Operations

For projects with database tooling, the AI can run migrations, seeds, and other database commands.

Command Timeout Behavior

Regular commands have timeout behavior to prevent blocking: Standard commands - Commands timeout after 8 seconds of inactivity. This handles most quick commands like installs, builds, and tests. Long operations - For commands that take longer, the AI waits for completion signals rather than timing out. Background processes - Processes in persistent terminals run indefinitely until you stop them.

Safety Considerations

The AI exercises caution with potentially destructive commands: Confirmation required - Commands that could cause data loss or system changes require confirmation:
  • rm -rf and recursive deletions
  • Database drops or truncations
  • Force pushes to remote repositories
  • System-level modifications
Explanation provided - Before running risky commands, the AI explains what the command will do and asks for confirmation. Alternatives suggested - When possible, the AI suggests safer alternatives to destructive operations.

Tips and Best Practices

Avoid Pagers for Long Output

Commands like git diff or git log may open interactive pagers (vim, less) that can block execution. Pipe output to cat to avoid this:
The AI often handles this automatically, but you can be explicit if needed. Request multiple related commands in sequence:
The AI executes them in order and handles any errors that occur along the way.

Use Persistent Terminals for Servers

Development servers should always run in persistent terminals:
This keeps the server running while you continue working on other tasks.

Check Command Results

After running commands, you can ask about the results:

Let the AI Handle Errors

When commands fail, the AI can often diagnose and fix the issue: