<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          AI Shell自然語言轉(zhuǎn) shell 命令

          聯(lián)合創(chuàng)作 · 2023-09-30 11:53

          AI Shell 是一個將自然語言轉(zhuǎn)換為 shell 命令的 CLI 。

          設(shè)置

          注意:Node.js 的最低支持版本是 v14

          1. 安裝:

          npm install -g @builder.io/ai-shell

          2. 從 OpenAI 找到你的 API 密鑰

          3. 設(shè)置你的 API 

          ai-shell config set OPENAI_KEY=<your token>

          將在主目錄中創(chuàng)建一個 .ai-shell 文件。

          用法

          ai <prompt>

          例如:

          ai list all log files

          然后你會得到這樣的輸出,你可以選擇運行建議的命令,通過提示修改命令,或者取消:

          ◇  Your script:
          │
          │  find . -name "*.log"
          │
          ◇  Explanation:
          │
          │  1. Searches for all files with the extension ".log" in the current directory and any subdirectories.
          │
          ◆  Run this script?
          │  ● ? Yes (Lets go!)
          │  ○ ?? Revise
          │  ○ ? Cancel
          └

          特殊字符

          請注意,某些 shell 會處理某些字符,如 ? 或 * 或看起來像文件路徑的特殊字符。如果遇到奇怪的行為,可以將提示用引號括起來以避免出現(xiàn)問題,如下所示:

          ai 'what is my ip address'

          靜音模式(跳過解釋)

          可以使用標(biāo)志 -s 或 --silent 禁用和跳過解釋部分

          ai -s list all log files

          或使用此命令將選項保存為首選項:

          ai-shell config set SILENT_MODE=true
          瀏覽 9
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  逼特逼在线观看视频 | 一道本一区二区三区在线视频 | 精品国产一级A片黄毛网站 | 色偷偷伊人 | 污污污www精品国产网站 |