Seal is a lightweight, Unix-like shell written in Rust. It provides a familiar command-line interface with support for essential shell features, including built-in commands, external program execution, input/output redirection, and piping. Seal is my personal thing as result this may contain some explicit content.
- Built-in Commands:
cd [dir]: Change the current working directory. Supports~for the home directory.echo [args]: Print arguments to the standard output.pwd: Print the current working directory.type [command]: Indicate how a command would be interpreted (builtin or external).exit: Exit the shell.
- External Command Execution: Seamlessly runs programs available in your
$PATH. - Redirection:
>or1>: Redirect standard output to a file (truncates).2>: Redirect standard error to a file (truncates).>>or1>>: Append standard output to a file.2>>: Append standard error to a file.
- Pipelining: Support for basic command piping (
cmd1 | cmd2). - Quote Handling: Supports single quotes (
'), double quotes ("), and backslashes (\) for complex command arguments. - Line Editing: Powered by
rustylinefor a smooth terminal experience with history and line editing capabilities.
- Rust (2024 edition or later)
-
direct installation (build from source).
curl -fSSL https://raw.githubusercontent.com/4rjxn/seal/refs/heads/trunk/invoke.sh | sh -
Clone the repository:
git clone https://github.com/4rjxn/seal.git cd seal -
Build the project:
cargo build --release
-
Run the shell:
./target/release/seal
>> pwd
/home/user/seal
>> echo Hello, Seal!
Hello, Seal!>> echo "Hello, World" > hello.txt
>> cat hello.txt
Hello, World
>> ls non_existent_file 2> error.log>> ls | grep .rs
main.rs
parser.rs>> echo "This is a \"quoted\" argument"
This is a "quoted" argumentrustyline: For command-line editing and history.nix: For Unix system calls (fork, exec, signals).is_executable: To verify executable permissions in$PATH.
This project is open-source and available under the GNU General Public License version 2.0 (GPL-2.0).