Use natural language to interact with PowerShell. Powered by OpenAI.
Inspiration: https://github.com/microsoft/Codex-CLI
NOTE: Nothing is perfect! Read and check the commands thoroughly before you run them. Treat the AI generated commands as commands you find on the internet (because they are commands from the internet). Do not run a command that you do not understand.
PS> # Get a list of the 5 most CPU intensive processes
Hit Ctrl + Insert
PS> Get-Process | Sort-Object CPU -Descending | Select-Object -First 5 # Get a list of the 5 most CPU intensive processes
PS> Get-Command | Get-Random | Get-Help -Full
Hit Ctrl + Insert
PS> Get-Command | Get-Random | Get-Help -Full # Retrieve a random command and display its full help information.
gh repo clone Shresht7/NLPowerShell
or
git clone https://github.com/Shresht7/NLPowerShell.git
Import-Module -Name <Path\To\This\Module>
NOTE: If you add it to a
$PSModulePath
(either directly, by installing or by symlinking it), you canImport-Module
by using the module name (i.e.Import-Module -Name NLPowerShell
). PowerShell will automatically import any modules in$PSModulePath
if you use any provided cmdlet (likeSet-NLPowerShellConfig
below).
NOTE: Adding the import to your
$PROFILE
will automatically import the module on startup.
Set-NLPowerShellConfig -API_KEY (Read-Host "API_KEY" -AsSecureString)
Import-Module <Path\To\This\Module>
PS> # Get a list of markdown files
Ctrl + Insert
PS> Get-ChildItem -Path . -Filter "*.md" # Get a list of markdown files
PS> Get-Date
Ctrl + Insert
PS> Get-Date # Get the current date
This project is licensed under the MIT License