github / github/copilot-cli

Bring back the GitHub Copilot in the CLI commands to not break workflows

オープン
#53 コメント 37 件 リアクション 104 件 担当者 0 名 GitHub で見る
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

> [!IMPORTANT]
> After 6 month and still no word being heard from GitHub (despite this being the most reacted issue), the community started to roll their own version.
> I will update this as more stand out.
>
> - 🥇 [`shell-ai`](https://github.com/Deltik/shell-ai) by @Deltik ([comment](https://github.com/github/copilot-cli/issues/53#issuecomment-3677715868))
> Cross-platform, cross-shell, works with lots of providers (funnily enough not GitHub lol). Requires an API key.
> - 🥈 @NSPC911's version ([comment](https://github.com/github/copilot-cli/issues/53#issuecomment-3557093912), [download](https://github.com/NSPC911/dotfiles/blob/main/readonly_Documents/PowerShell/suggest-and-explain.ps1))
> PowerShell only, works with ollama and OpenCode (nice !), requires [`bat`](https://github.com/sharkdp/bat) to be installed.
> - 🥉 ~~[My own implementation](https://github.com/github/copilot-cli/issues/53#issuecomment-3754883048)~~
> ~~PowerShell only (yet), uses the official Copilot CLI and a free 0x cost model and uses the same old aliases. Can't refine a command yet, some issues with quotes, model change and prompt refinement to come later.~~
> *Edit :*
> This implementation still works but isn't recommended anymore with the recent price changes. A codex-powered version is available instead [here](https://github.com/github/copilot-cli/issues/53#issuecomment-4670361483).
> Still PowerShell only and still can't refine commands, but it's still much better than what we had before. Check the link for full explaner and how you can still use it for free.

---

### Describe the feature or problem you'd like to solve

The Copilot in the CLI has been a regular part of my workflow, always useful for getting very quickly a command on the fly or explaining one. Bringing it back here would be a massive W.

### Proposed solution

You could add the old features through either a command (`/suggest`, `/explain`), or directly with flags. The further behavior (copy/execute/refine) should be ideally kept.

### Example prompts or workflows

Here are some prompts I did use :

```pwsh
copilot --suggest "in powershell, how to reload the profile ?"
```

```pwsh
copilot --suggest "pwsh 7, windows, from the current directory and going recursively, list all folders containing files ending in '.fxp', echo the full path"
```

```pwsh
copilot --suggest "pwsh 7, recursively list all file extensions"
```

```pwsh
copilot --explain "ls -Ahosp --color=always --group-directories-first"
```

### Additional context

_No response_

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。