engshell支持自然语言交互的 shell

联合创作 · 2023-09-30 11:53

engshell 是一个适用于任何操作系统的英语 shell,由 LLM 提供支持。

如何使用

  • 安装依赖: pip install -r requirements.txt
  • 在engshell目录下创建 keys.py 定义 OPENAI_KEY
  • 运行 python engshell.py 打开engshell
  • 可选:将 engshell 目录添加到 PATH 环境变量以从任何地方访问它。

笔记:

  • --llm 鼓励从代码执行中进行 LLM 查询。
  • --debug 允许 engshell 在失败时调试自己的代码。
  • --showcode 显示正在执行的代码。
  • clear 重置 engshell 的内存以及控制台。

例子

注意,需要使用英文进行交互,中文仅为帮助理解:

  • record my screen for the next 10 seconds, then save it as an mp4.
    在接下来的 10 秒内录制我的屏幕,然后将其保存为 mp4。
  • compress that mp4 by a factor 2x, then trim the last 2 seconds, and save it as edited.mp4.
    将该 mp4 压缩 2 倍,然后修剪最后 2 秒,并将其保存为 edited.mp4。
  • check the weather, then ask gpt3 what i should wear today
    检查天气,然后问 gpt3 我今天应该穿什么
  • print files in current directory in a table by type
    按类型在表中打印当前目录中的文件
  • Use DALL-E to generate a picture of a cat wearing a suit, then open my web browser to the picture
    使用DALL-E生成一张穿着西装的猫的图片,然后打开我的网络浏览器到图片
  • save text files for the first 10 fibonacci numbers
    保存前 10 个斐波那契数的文本文件
  • print headlines from CBC CBC 的头条新闻
  • print a cake recipe, then open up amazon to where i can buy these ingredients. open each ingredient in a new tab
    打印一份蛋糕食谱,然后打开亚马逊到我可以买到这些原料的地方。在新标签页中打开每种成分
  • make my wallpaper a picture of a castle (requires UNSPLASH_API_KEY to be set)
    将我的壁纸设为城堡图片(需要设置 UNSPLASH_API_KEY)

复杂性测试:

  • get info about france economy from wikipedia, then make a word doc about it --llm
    从维基百科获取有关法国经济的信息,然后制作一个关于它的文档 --llm
  • solve d^2y/dx^2 = sin(2x) + x with sympy --debug
    用 sympy --debug 求解 d^2y/dx^2 = sin(2x) + x
  • find the second derivative of C1 + C2x + x**3/6 - sin(2x)/4 with respect to x --debug
    求 C1 + C2x + x**3/6 - sin(2x)/4 关于 x 的二阶导数 --debug
  • make a powerpoint presentation about Eddington Luminosity based on the wikipedia sections --debug -llm
    根据维基百科部分 --debug -llm 制作关于 Eddington Luminosity 的 powerpoint 演示
  • download and save a $VIX dataset and a $SPY dataset
    下载并保存一个 $VIX 数据集和一个 $SPY 数据集
  • merge the two, labelling the columns accordingly, then save it
    合并两者,相应地标记列,然后保存

 

 

 

 

 

浏览 14
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报