nexish

Crates.ionexish
lib.rsnexish
version0.2.6
created_at2025-05-21 10:59:43.002966+00
updated_at2025-05-29 20:14:57.7996+00
descriptionA simple, experimental shell written in Rust for learning purpose.
homepagehttps://github.com/santoshxshrestha/nexish
repositoryhttps://github.com/santoshxshrestha/nexish
max_upload_size
id1683281
size62,666
Santosh Shrestha (santoshxshrestha)

documentation

https://github.com/santoshxshrestha/nexish#readme

README

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.

🖋️ Nerd Font Support (for Icons/Symbols)

Some parts of nexish use special Unicode symbols and icons (such as device logos) from Nerd Fonts.
For the best experience, configure your terminal to use a Nerd Font. Otherwise, some symbols may appear as squares or question marks.

  • How to use Nerd Fonts:
    • Download a patched font from Nerd Fonts.
    • Set your terminal emulator to use this font (check your terminal's settings/preferences).
  • If you do not use a Nerd Font: The shell will still work, but icons/logos may not display properly.

📦 Installation

You have three options: via Cargo, via prebuilt script, or manual install.

🔹 1. Easiest: Install via Cargo (Recommended)

If you have Rust installed, you can install directly from crates.io:

cargo install nexish

This is the most "Rusty" and portable way.
It automatically downloads, compiles, and installs the latest version to your $HOME/.cargo/bin.

If you want even faster installs with prebuilt binaries, check out cargo-binstall:

cargo binstall nexish

🔹 2. Quick Install via Script

Alternative: 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.


🔹 3. 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

If installed with Cargo:

cargo uninstall 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!

Commit count: 105

cargo fmt