1 个不稳定版本
0.1.1 | 2022年12月14日 |
---|
#111 in #bash
18KB
172 行
Copilot,你的终端伙伴
一个 CLI 工具,可以从人类可读的描述中生成 shell 脚本。
安装
您可以在终端中运行以下命令来安装 plz
。
curl -fsSL https://raw.githubusercontent.com/m1guelpf/plz-cli/main/install.sh | sh -
安装后,您可能需要关闭并重新打开终端。或者,您可以从 最新版本 下载与您的操作系统对应的二进制文件。
用法
plz
使用 GPT-3。要使用它,您需要从 您的仪表板 获取一个 API 密钥,并将其保存到 OPENAI_API_KEY
(您也可以将其保存到 bash/zsh 配置文件中以在会话之间保持持久性)。
export OPENAI_API_KEY='sk-XXXXXXXX'
配置好环境后,运行 plz
后跟您想要执行的操作(例如 plz "show me all options for the plz cli"
)。
要获取所有可用选项的完整概述,请运行 plz --help
$ plz --help
Generates bash scripts from the command line
Usage: plz [OPTIONS] <PROMPT>
Arguments:
<PROMPT> Description of the command to execute
Options:
-y, --force Run the generated program without asking for confirmation
-h, --help Print help information
-V, --version Print version information
开发
请确保您已安装最新的 Rust 版本(使用 rustup)。然后,您可以通过运行 cargo build
来构建项目,并通过 cargo run
运行它。
许可协议
该项目在 MIT 许可下开源。有关更多信息,请参阅 许可文件。
依赖关系
~19–34MB
~556K SLoC