写在开头
大家好,我是kele。
这里是每天十五分钟,了解一个关键概念的第一期,这个合集的目的是为了分享一些常用的知识点或者是概念,很适合将要使用AI的小白或者是刚使用AI不久的人群扫盲食用。每天你只需要花费简短的时间,就可以收获一个知识点,今天我将以OpenCode为例,讲清楚CLI / GUI / TUI 到底是什么,并且把思维导图放到了最后,帮助你理解。
一、OpenCode的几种使用方式
OpenCode的官方网站提供了多种下载方式(https://opencode.ai/zh/download),但总的使用方式只有三种:
1)GUI(Graphical User Interface,图形桌面界面):
独立桌面图形程序,拥有独立窗口、图标、按钮、鼠标拖拽、弹窗、原生系统通知、图片渲染等图形元素。
普通人友好,这个界面不仅可以与agent进行交互,还可以使用 斜杠/命令。输入问题的时候像是在“微信聊天”一样,实际操作与一般软件相同,不需要因为某些快捷键(比如复制、粘贴)的不同去重新适应。

2)TUI(Terminal User Interface,终端交互式文本界面):
运行在终端内部、用字符 / 色块 / 分栏模拟窗口布局的交互式界面,属于CLI 程序的增强形态,常驻终端窗口,键盘快捷键导航、分多面板实时交互
程序员喜爱,这是我比较喜欢使用的界面,因为日常工作使用的是 IDEA ,但是现在OpenCode的通过ACP接入IDEA,有时候会卡死,有时候就没有响应,所以我经常会直接打开项目目录,在CMD中直接使用TUI与agent交互写代码。

3)CLI(Command Line Interface,纯命令行界面)
一般没有人这样用,纯文本指令交互,无内置可视化面板,输入一行命令、执行、输出文本结果后立刻退出,只靠参数 / 子指令控制程序,无常驻交互式窗口
与agent的交互,很少用一次性的交互方式,更多的是执行命令(比如 切换目录,删除文件、发送请求等等)

写在最后
最后放一张思维导图,
喜欢这篇文章的话记得点赞、关注
我们下期再见~

Preface
Hello everyone, I am kele.
This is the first episode of “Fifteen Minutes a Day to Understand a Key Concept”. The purpose of this series is to share some commonly used knowledge points or concepts, which are very suitable for beginners who are about to use AI or have just started using AI to learn basics. Every day you only need to spend a short time to harvest a knowledge point. Today, I will use OpenCode as an example to explain what CLI / GUI / TUI are and put the mind map at the end to help you understand.
1. The Three Usage Modes of OpenCode
The official website of OpenCode provides multiple download methods (https://opencode.ai/zh/download), but there are only three usage modes in total:
1) GUI (Graphical User Interface, Graphical Desktop Interface):
An independent desktop graphical program with its own window, icons, buttons, mouse dragging, pop-up messages, native system notifications, and image rendering. It is friendly to ordinary people. This interface allows interaction with the agent and the use of slash / commands. When posing questions, it feels like chatting on WeChat, and the actual operation is the same as regular software without needing to adapt to different shortcuts (such as copy, paste).
2) TUI (Terminal User Interface, Terminal Interactive Text Interface):
An interactive interface running inside the terminal, using characters or color blocks to simulate window layouts. It is an enhanced form of a CLI program, permanently residing in the terminal window with keyboard shortcuts for navigation and real-time interaction across multiple panels. It is preferred by programmers. I personally like to use this interface because I use IDEA for daily work, but sometimes the ACP integration with IDEA causes freezes or lack of response. So, I often open the project directory and directly use the TUI in the CMD to interact with the agent for coding.
3) CLI (Command Line Interface, Pure Command Line Interface):
Pure text instruction interaction. It lacks a built-in visualization panel, executes a single command, outputs a text result, and then exits immediately. It controls the program through parameters or sub-directives without a permanent interactive window. Few people use one-time interactions with an agent; it is mostly used for executing commands like changing directories, deleting files, or sending requests.
Conclusion
Here is the mind map. If you like this article, please give a thumbs up and follow. See you in the next episode~
我们下期再见~