#ls #interaction #nexish

app nexish

A simple, experimental shell written in Rust for learning purpose

3 releases

Uses new Rust 2024

new 0.1.2 May 22, 2025
0.1.1 May 21, 2025
0.1.0 May 21, 2025

#132 in Hardware support

Download history

76 downloads per month

MIT license

17KB
306 lines

nexish

nexish is a simple, experimental shell created as a learning project in Rust.


🚀 Overview

This project is designed primarily for learning and experimentation with:

  • Rust's standard library (std::fs, std::process, etc.)
  • Command-line argument parsing (manual and with crates like clap)
  • File system interaction
  • Basic shell design and command implementation

✨ Features

  • Basic shell prompt and command loop
  • Built-in commands: ls, cd, pwd, mkdir, touch, rmdir, and more
  • Manual flag parsing (with plans for clap integration)
  • Directory listing and navigation
  • Minimalist and focused on understanding, not production

🛠️ Prerequisites

Rust

You need Rust installed.


📦 Installation

You have two options: automated script or manual install.

🔹 1. Quick Install via Script

Recommended: Installs the latest release binary to your system PATH.

curl -sSfL https://raw.githubusercontent.com/santoshxshrestha/nexish/main/scripts/install.sh | bash
  • This script will:
    1. Build nexish in release mode (if Rust is present).
    2. Copy the binary to /usr/local/bin.
    3. Make it executable.

Tip: You may need to enter your password for sudo privileges.


🔹 2. Manual Build & Install

If you prefer full control or want to customize the build:

  1. Clone the repository:

    git clone https://github.com/santoshxshrestha/nexish.git
    cd nexish
    
  2. Build the Release Binary:

    cargo build --release
    

    This places the binary at target/release/nexish.

  3. Copy to a PATH directory (e.g., /usr/local/bin):

    sudo cp target/release/nexish /usr/local/bin/nexish
    
  4. (Optional) Ensure executable permission:

    sudo chmod +x /usr/local/bin/nexish
    
  5. Run from anywhere:

    nexish
    

🗑️ Uninstallation

You can uninstall using the provided script or manually:

🔹 1. Quick Uninstall via Script

curl -sSfL https://raw.githubusercontent.com/santoshxshrestha/nexish/main/scripts/uninstall.sh | bash

🔹 2. Manual Uninstall

Remove the binary from your PATH:

sudo rm /usr/local/bin/nexish

or

sudo rm /usr/bin/nexish

If you also want to remove your cloned repository:

rm -rf ~/nexish

🖥️ Usage

After installation, start the shell by typing:

nexish

You can use commands like:

ls
cd
pwd
ls -a
mkdir
touch
rmdir

⚠️ Notes

  • Learning project: Not all edge cases are handled.
  • Not intended for production use.
  • Suggestions and contributions are welcome as part of the learning process.

📄 License

License: MIT

Made as a Rust learning exercise. Enjoy exploring!

Dependencies

~11–20MB
~312K SLoC