Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shreshthgoyal/naturalshell
AI-powered bridge from natural language to shell commands in CLI.
https://github.com/shreshthgoyal/naturalshell
Last synced: about 2 months ago
JSON representation
AI-powered bridge from natural language to shell commands in CLI.
- Host: GitHub
- URL: https://github.com/shreshthgoyal/naturalshell
- Owner: shreshthgoyal
- License: mit
- Created: 2024-02-18T12:25:41.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-03-02T03:59:19.000Z (11 months ago)
- Last Synced: 2024-03-02T04:35:19.822Z (11 months ago)
- Language: JavaScript
- Size: 86.9 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# NaturalShell
AI-powered bridge from natural language to shell commands in CLI.
![npm version](https://img.shields.io/npm/v/naturalshell)
![License](https://img.shields.io/badge/License-MIT-yellow.svg)![Gif Demo](https://i.ibb.co/CzdQkSH/Screencast-from-20-02-24-12-46-21-AM-IST.gif)
NaturalShell is a Node.js package that simplifies the command line, allowing you to use natural language to generate and understand shell commands.
## Requirements
- ```GEMINI_API_KEY``` is required which you can get from [here](https://aistudio.google.com/app/apikey).
- ```npm``` should be installed## Features
- **Natural Language Understanding**: Easily convert your English sentences into shell commands.
- **Command Explanation**: Get explanations for what each command does, enhancing your understanding of shell operations.
- **Command Editing**: Directly edit the suggested command before execution, giving you full control.
- **Cross-Platform Support**: Whether you're on Linux, macOS, or Windows, NaturalShell works seamlessly.## Setup
Ensure you have Node.js (version 14 or later) installed. Then, install NaturalShell globally using npm:
```sh
npm install -g naturalshell
```Retrieve your API key from [Google AI Studio](https://aistudio.google.com/app/apikey).
>Note: If you haven't already, you'll have to create an account and set up a project to get your API key. (It's free of cost!)
## Usage
Simply run `nsh` or `naturalshell` followed by your query in natural language:
```sh
nsh -m "find all txt files in the current directory"
```NaturalShell will interpret your command and offer a shell command suggestion with its explaination, which you can:
- **Run directly** by pressing `Enter`
- **Edit** to make adjustments
- **Understand** by clearing your doubts.
- **Cancel** if it's not what you were looking for## Contributing
We welcome contributions to NaturalShell! Whether it's adding new features, improving documentation, or reporting bugs, please feel free to make a pull request or open an issue.
## License
NaturalShell is open-sourced software licensed under the [MIT license](LICENSE).