PowerGPT
PowerGPT是一个纯PowerShell编写的轻量工具,允许用户通过自然语言描述任务来自动生成并执行PowerShell命令,简化Windows命令行操作。
• Copy the embed code to showcase this product on your website
• Share on X to spread the word about this amazing tool
写PowerShell脚本需要一定的专业知识,有时也较为麻烦,但我们常常会有在Windows下用进行批量操作的需求。PowerGPT
是一个纯PowerShell编写的轻量工具,只需要打出PowerGPT <要执行的任务>
就可以让AI帮你编写命令并执行。安装十分简单,在PowerShell中运行:Install-Module PowerGPT
首次运行时需要输入OpenAI API Key,在国内环境下时需要打开系统代理。powershell$ .\PowerGPT.ps1 "print first lines and last lines for each file in current folder"The description is too vague, do you mean:[0] For each file in current directory, print the first line and then print the last line of the file.[1] For each file in current directory, print the first line of the file. After that, for each file, print the last line of the file.Choose one description that matches your task: : 1Will execute script:-----Get-ChildItem | ForEach-Object { $file = $_.FullName Write-Host "First line of $file:" Get-Content $file -TotalCount 1}Get-ChildItem | ForEach-Object { $file = $_.FullName Write-Host "Last line of $file:" Get-Content $file -Tail 1}-----continue?([y]es, [n]o)-----
Github: https://github.com/ouromoros/PowerGPT