# 才发现：一直没当回事的终端版Copilot还可以

* 抖音：<https://v.douyin.com/iJ8XoxJ4/>
* B站：<https://www.bilibili.com/video/BV1S8411d7dQ/>

> Copilot for CLI
>
> <https://githubnext.com/projects/copilot-cli>

这个终端版Copilot

其实我很早就拿到体验资格了

但是一直没把它当回事哈

正巧今天用了一下（觉得还不错）

给大家看一下啊

是这样的我不是有一个Git库吗

我想删除远端的一个tag

但是我忘了具体的Git语法了

所以呢

我就想起这个终端版的Copilot

直接在这两个问号

就是用这个Copilot了

然后呢git

看看之前我使用过这个命令（自动补全了）

就这个git删除远端tag

回车

大家看：它提示我是删除1.0.0这个tag

但是我想改一下

所以呢我可以选第二个这个回车

然后输入我这个tag名比如叫

v

看看这回他就帮我改成这个了

然后我就可以直接执行了

选第一个回车然后按一下y

好可以了

然后他这个还支持直接git问号

去提问git相关的东西

然后这个gh?

是关于GitHub的一些提示啊

再给大家演示一下官方这个例子啊

它是这样的

问号问号

我们展示所有js文件

好

这个命令是展示所有js文件对吧

然后我们

告诉他

忽略

node\_modules

好Ta忽略了

然后呢我们再自定义

我们来统计

每个js的函数

好出来了

相当于这三次描述

我们其实是想统计

这个目录下所有js文件的行数

好我们直接执行 y

264行

23行


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sunzsh.gitbook.io/xiaoshan.bug/cai-fa-xian-yi-zhi-mei-dang-hui-shi-de-zhong-duan-ban-copilot-hai-ke-yi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
