SkillAgentSearch skills...

AIShell

AI Shell is a simple GUI-based terminal application built with Rust šŸ¦€ and the iced ā„ļø GUI library. It allows users to enter shell commands šŸ’» and view the output within a graphical interface šŸ–„ļø.

Install / Use

/learn @Shubham0850/AIShell
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

AI Shell šŸš€

AI Shell Screenshot

AI Shell is a simple GUI-based terminal application built with Rust šŸ¦€ and the iced ā„ļø GUI library. It allows users to enter shell commands šŸ’» and view the output within a graphical interface šŸ–„ļø.

Why Rust ?

Here's an updated table focusing on the Size aspect, incorporating typical application sizes:

| Aspect | Rust | C++ | Go | Python (PyInstaller) | Java (JAR files) | Electron (JavaScript) | |-------------|--------------------------------------------------------|------------------------------------------------------|------------------------------------------------------|------------------------------------------------------|------------------------------------------------------|------------------------------------------------------| | Size | - ~8.3 MB (as in your app)<br>- Produces small, standalone binaries without large runtimes | - ~10-15 MB<br>- Can produce small binaries but may require manual optimization | - ~10-20 MB<br>- Includes garbage collector, slight overhead | - ~20-30 MB<br>- Requires bundling interpreter and libraries | - ~50-100 MB<br>- Requires JVM, adds overhead | - ~50-150 MB<br>- Includes Chromium and Node.js runtime, leading to large sizes |

Key Takeaways:

  • Rust's Small Binary Size: Your 8.3MB application showcases Rust's efficiency in producing compact binaries, which is especially beneficial for distribution, faster downloads, and reduced storage requirements.

  • Comparison with Other Frameworks:

    • Python: Applications bundled with tools like PyInstaller often exceed 20 MB because they need to include the Python interpreter and all dependencies.
    • Java: Java applications require the Java Virtual Machine (JVM), adding significant overhead and increasing the overall size.
    • Electron: Apps built with Electron can easily exceed 50 MB because they bundle a Chromium browser and Node.js runtime.
  • No Need for Large Runtimes: Rust compiles directly to machine code, eliminating the need for a virtual machine or interpreter at runtime, which contributes to smaller application sizes.

Features ✨

  • Command Execution: Enter shell commands šŸ’» and view their output in a scrollable window šŸ“œ.
  • Graphical User Interface: Built using the iced ā„ļø library for a modern and responsive GUI šŸ–„ļø.
  • Splash Screen: Displays a splash screen šŸŽ‰ on startup.
  • Custom Application Icon: Includes a custom icon šŸ–¼ļø when running on macOS šŸŽ.

Technologies Used šŸ› ļø

  • Rust šŸ¦€: A systems programming language focused on safety šŸ›”ļø and performance šŸš€.
    • Version: 1.56 or later (edition 2021)
  • iced ā„ļø: A cross-platform GUI library for Rust, inspired by Elm 🌳.
    • Version: 0.12.1
    • Features Used:
      • canvas šŸŽØ
      • tokio ⚔
  • cargo-bundle šŸ“¦: A tool for bundling Rust applications into distributable formats.
    • Used to create a macOS šŸŽ application bundle (.app) with a custom icon šŸ–¼ļø.
  • winit 🪟: A window handling library in Rust.
    • Used indirectly through iced ā„ļø for window management and setting the application icon šŸ–¼ļø.

Project Structure šŸ—‚ļø

ai_shell/
ā”œā”€ā”€ Cargo.toml
ā”œā”€ā”€ resources/
│   ā”œā”€ā”€ AppIcon.icns       # Application icon šŸ–¼ļø for macOS bundling
│   ā”œā”€ā”€ icon.png           # Icon image šŸ–¼ļø used in the application
│   └── splash.png         # Splash screen image šŸŽ‰ (optional)
└── src/
    ā”œā”€ā”€ executor.rs        # Module handling command execution šŸ’»
    └── main.rs            # Main application code šŸ–„ļø

Building and Running šŸ—ļø

  1. Clone the Repository šŸ“„:

    git clone https://github.com/shubham0850/AIShell.git
    cd AIShell
    
  2. Build the Application šŸ› ļø:

    cargo build
    
  3. Run the Application ā–¶ļø:

    cargo run
    

    For development with live reloading ā™»ļø:

    cargo install cargo-watch
    cargo watch -x run
    
  4. Build the Application for Distribution šŸ“¦:

    cargo install cargo-bundle  # Install cargo-bundle if not already installed
    cargo bundle --release      # Build and bundle the application
    

    This command will create a bundled application in the target/release/bundle/ directory, including a macOS .app bundle with the custom icon šŸ–¼ļø specified in Cargo.toml.

License šŸ“„

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments šŸ™

  • Thanks to the iced ā„ļø community for providing an excellent GUI library for Rust šŸ¦€.

Contact šŸ“¬


Feel free to customize this README to better suit your project. Include any additional sections or information that you think would be helpful for users and contributors.

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated5mo ago
Forks0

Languages

Rust

Security Score

87/100

Audited on Oct 4, 2025

No findings