AI Shell is aA CLI that converts natural language into shell commands.

set up

Note: The minimum supported version of Node.js is v14

1. Install:

npm install -g

2. Find your API key from OpenAI

3. Set up your API

ai-shell config set OPENAI_KEY=<your token>

will create a .ai-shell document.


ai <prompt>

For example:

ai list all log files

You’ll then get output like this, where you can choose to run the suggested command, modify the command through the prompt, or cancel:

◇  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

Special characters

Note that some shells handle certain characters, such as ? or * or special characters that look like file paths. If you encounter strange behavior, you can surround the prompt with quotes to avoid problems, like this:

ai 'what is my ip address'

silent mode (skip explanation)

flags can be used -s or --silent Disable and skip explanation sections

ai -s list all log files

Or save options as preferences with this command:

ai-shell config set SILENT_MODE=true

#Shell #Homepage #Documentation #Download #Natural #Language #Shell #Command #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *