nsh is an open source project that allows you to use natural language to execute terminal commands.
To install the app, follow these steps:
- Clone the repository: git clone https://github.com/nikodem-wrona/nsh.git
- Navigate to the scripts directory:
cd nsh/scripts
- Run the install script:
./install.sh
- The app will be installed in
/Users/$USER/nsh
It will build the app and copy the necessary files and dependencies to the installation directory.
App needs a api key to work. You can get one here. It reads the key from from an environment variable called OPEN_AI_API_KEY
. You can set it by running the following command:
export OPEN_AI_API_KEY=<your_api_key>
Once you have installed the app, you can start using it to execute terminal commands using natural language.
To start the app, run the following command:
node /Users/$USER/nsh/nsh/index.js
The app will prompt you to enter a command.
Here are some examples of the types of commands you can execute:
-
Create a new directory called 'mydir'
-
List all files in the current directory
-
Remove the file 'myfile.txt'
-
Move the file 'myfile.txt' to the directory 'mydir'
-
Rename the file 'oldname.txt' to 'newname.txt'
The app uses gpt-3.5-turbo
model from OpenAI to generate the commands.
To uninstall the app, follow these steps:
- Navigate to the scripts directory:
cd nsh/scripts
- Run the uninstall script:
./uninstall.sh
The app will be removed from your system.
The uninstall script will remove the nsh
directory from your home directory and all its contents.
Contributions from anyone who is interested in improving this app are really welcomed! If you would like to contribute, please follow these steps:
Fork the repository
- Create a new branch for your changes:
git checkout -b my-new-feature
- Make your changes and commit them:
git commit -am 'add some feature'
- Push your changes to your fork:
git push origin my-new-feature
- Submit a pull request
Please make sure that your code is well-documented and that you have added tests for any new functionality.
This project is licensed under the MIT License - see the LICENSE file for details.
PS: Thanks to adam-golab for the idea how to name the app.