nlsh-rs

Crates.ionlsh-rs
lib.rsnlsh-rs
version0.1.2
created_at2026-01-25 17:27:08.169047+00
updated_at2026-01-25 21:08:10.034074+00
descriptiontranslate natural language to shell commands using AI
homepagehttps://github.com/uwuclxdy/nlsh-rs
repositoryhttps://github.com/uwuclxdy/nlsh-rs
max_upload_size
id2069130
size126,411
cloudy (uwuclxdy)

documentation

README

nlsh-rs - Natural Language Shell written in Rust

asciicast

Inspired by nlsh

Requirements

  1. Rust

Installation

from crates.io (recommended):

cargo install nlsh-rs

latest commit:

curl -sSL https://raw.githubusercontent.com/uwuclxdy/nlsh-rs/main/install.sh | sh

Setup

Configure AI provider

nlsh-rs api

Select provider and enter credentials. Config is stored in ~/.config/nlsh-rs/config.toml.

Supported Providers

  • Gemini - free tier available at aistudio.google.com/apikey
  • Ollama - local models
  • OpenAI-Compatible APIs - chatgpt or compatible APIs (LMStudio, Groq, etc.)

You can get free OpenAI compatible API access to some models at https://www.askcodi.com/ and https://openrouter.ai/models?q=free

Usage

$ nlsh-rs
nlsh-rs> show disk usage
→ df -h
[enter to execute, ctrl+c to cancel]
...
$ nlsh-rs "show disk usage"
→ df -h
[enter to execute, ctrl+c to cancel]
...

flags:

  • --help - show help
  • api - configure API provider
  • uninstall - remove nlsh-rs

How it works

  1. translates natural language to shell commands using AI
  2. asks for confirmation
  3. command runs in parent shell and appears in history

TODO

[ ] support for rotation of multiple API keys in case of rate limits [ ] support for providing more context to the model

Credits

for inspiration and prompt: https://github.com/junaid-mahmood/nlsh

Commit count: 17

cargo fmt