Skip to content

Chat to AI

Chat to AI allows you to directly interact with AI in the terminal, and AI will help you complete terminal operations tasks.

Overview

Chaterm provides two AI interaction methods, allowing you to choose the most appropriate way to collaborate with AI based on different scenarios:

  • In-Terminal AI Interaction: Quickly execute simple tasks
  • AI Sidebar Interaction: Plan complex tasks and have detailed conversations

In-Terminal AI Interaction

Function Description

In the terminal window, use shortcut keys to quickly pop up an AI dialog box. Enter the operation you want to perform, and AI will help you complete terminal operations tasks.

Usage

  1. Open Dialog: In the terminal window, use shortcut keys (usually Ctrl+K or Cmd+K)
  2. Enter Request: In the pop-up dialog, describe the operation you want to perform
  3. AI Processing: AI will understand your request and generate corresponding commands
  4. Execute Command: After confirmation, the command will automatically be inserted into the terminal input box for execution

Use Cases

  • Quick Command Generation: Need to execute an operation but unsure of the specific command
  • Simple Task Execution: Execute single or simple command combinations
  • Command Query: Query the usage or parameters of a command

Examples

  • "View files in the current directory"
  • "Check system memory usage"
  • "Restart nginx service"

AI Sidebar Interaction

Function Description

In the terminal window, use shortcut keys to quickly open the AI conversation sidebar. AI will automatically obtain the current terminal's context information to help you complete terminal operations tasks.

Usage

  1. Open Sidebar: In the terminal window, use shortcut keys (usually Ctrl+L or Cmd+L)
  2. View Context: AI will automatically obtain the current terminal's output content and status
  3. Describe Task: Enter your task requirements in the sidebar
  4. AI Analysis: AI will analyze based on terminal context and provide suggestions
  5. Execute Operation: Execute corresponding operations according to AI's suggestions

Use Cases

  • Complex Task Planning: Tasks that require multiple steps to complete
  • Problem Troubleshooting: Diagnose problems based on terminal output
  • Detailed Consultation: Scenarios that require multiple rounds of conversation with AI
  • Context-Related Operations: Operations that need to be executed based on current terminal state

Context Understanding

The AI sidebar will automatically obtain the following information:

  • Current terminal output content
  • Terminal history
  • Current working directory
  • System environment information

Shortcuts

FunctionmacOSWindows/Linux
Open AI Command Generation DialogCommand + KCtrl + K
Send to AI / Toggle AI SidebarCommand + LCtrl + L

For more shortcut information, please refer to the Shortcuts Settings documentation.

Usage Tips

Describe Clear Task Objectives

  • Clearly state the goals you want to achieve
  • Provide necessary context information
  • Explain any special requirements or constraints

Make Full Use of Context

  • When using Ctrl+L to open the sidebar, AI will automatically obtain terminal context
  • When describing tasks, you can reference specific output in the terminal
  • Let AI provide suggestions based on current state

Execute Complex Tasks Step by Step

For complex tasks:

  1. First use Ctrl+L to open the sidebar for planning
  2. Discuss task steps with AI
  3. Gradually execute commands suggested by AI
  4. Adjust strategy based on execution results

Combine with Command Snippets

  • Save commonly used commands generated by AI as command snippets
  • Use command snippets to quickly execute repetitive tasks
  • Optimize and improve command snippets through AI

Best Practices

Simple Tasks

  • Use Ctrl+K to quickly generate and execute commands
  • Suitable for one-time or simple operations

Complex Tasks

  • Use Ctrl+L to open the sidebar for detailed planning
  • Make full use of AI's context understanding capabilities
  • Conduct multiple rounds of conversation to gradually improve the solution

Learning and Exploration

  • Use AI to learn new commands and tools
  • Ask for detailed explanations and parameters of commands
  • Explore different solutions

Notes

Tip

  • Carefully check AI-generated command suggestions before execution
  • For commands involving system modifications, it is recommended to verify in a test environment first
  • Make full use of AI's context understanding and provide clear descriptions

Security Notice

  • Do not let AI execute commands that may cause data loss or system damage
  • For sensitive operations, always confirm manually
  • Regularly review commands suggested by AI to ensure they comply with security standards

License