Skip to content

bengtfrost/aichat

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1,044 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦€ aichat

Made with Rust License

⚑ A Rust-native fork of sigoden/aichat, built 100% in safe Rust and replacing onig_sys with pure-Rust fancy-regex for regex functionality.

This fork prioritizes safety, portability, and a streamlined build process by eliminating C dependencies, offering a truly native Rust experience.


✨ Highlights

  • πŸ›‘οΈ Safe & Portable: Zero C dependenciesβ€”no onig_sys, only the pure-Rust fancy-regex. Enjoy improved memory safety and easier cross-compilation.
  • βš™οΈ Easy to Build: Pure Cargo workflow. Build with a single command on Linux, macOS, or Windows without needing external C toolchains.
  • πŸš€ Feature-Complete: Retains all of AIChat's powerful features: shell assistant, interactive chat-REPL, Retrieval Augmented Generation (RAG), configurable agents, response streaming, and more.

πŸš€ Why This Fork?

The upstream AIChat project utilizes syntect for syntax highlighting, which historically relied on onig_sys (bindings to the Oniguruma C library). This fork was created to:

  1. 🚫 Eliminate C FFI & Dependencies: Replaces Oniguruma C bindings with the excellent, pure-Rust fancy-regex engine.
  2. πŸ› οΈ Simplify Build Process: No more hassles with system C libraries or complex toolchain setups. Just cargo!
  3. πŸ”’ Enhance Memory Safety: Leverages Rust’s strong memory safety guarantees throughout the entire codebase by removing unsafe C bindings.
  4. 🌍 Improve Portability: Builds and runs seamlessly on various architectures and environments, including musl-based systems (like Alpine Linux), Windows, and containerized setups.

πŸ“¦ Installation

1. Prebuilt Binaries (Recommended)

Download the latest release for your platform from the GitHub Releases page.

Example (Linux x86_64):

# Replace <version> and <platform-triple> with actual values from releases
# e.g., v0.29.0 and x86_64-unknown-linux-gnu
wget https://github.com/bengtfrost/aichat/releases/download/<version>/aichat-<version>-<platform-triple>.tar.gz
tar -xzf aichat-<version>-<platform-triple>.tar.gz
chmod +x aichat
sudo mv aichat /usr/local/bin/aichat

2. Install via Cargo (from Git)

Ensure you have the Rust toolchain installed. Then:

cargo install --git https://github.com/bengtfrost/aichat --branch main

3. Build from Source

git clone https://github.com/bengtfrost/aichat.git
cd aichat
cargo install --path .
# The binary will be located at target/release/aichat or typically in ~/.cargo/bin/

πŸ“‚ Project Structure

/aichat
β”œβ”€β”€ Cargo.toml # Project manifest (e.g., version 0.29.0-native)
β”œβ”€β”€ src/ # Rust source code (100% safe Rust)
β”œβ”€β”€ vendor/ # Patched crates (e.g., onig_sys_dummy, onig_dummy)
β”œβ”€β”€ docs/ # Documentation: build, release, contributing guides
β”‚ β”œβ”€β”€ BUILD.md # Detailed build instructions
β”‚ β”œβ”€β”€ RELEASE.md # Release process guide
β”‚ └── CONTRIBUTING.md# Contribution guidelines
β”œβ”€β”€ README.md # This file
β”œβ”€β”€ LICENSE-APACHE # Apache 2.0 License text
β”œβ”€β”€ .gitignore # Specifies intentionally untracked files
└── target/ # Build artifacts (not committed to version control)

πŸ› οΈ Getting Started & Development

For detailed build instructions, development environment setup, and troubleshooting, please see: πŸ‘‰ docs/BUILD.md

If you'd like to contribute to the project, we welcome your help! Please read our contribution guidelines: πŸ‘‰ docs/CONTRIBUTING.md


πŸ“€ Release & Distribution

The process for creating new releases, including version bumping, tagging, and uploading binaries, is documented in: πŸ‘‰ docs/RELEASE.md


πŸ“œ License

This project is licensed under the Apache License 2.0.

A copy of the license can be found in the LICENSE-APACHE file in this repository.


πŸ™Œ Credits & Acknowledgements

  • Original Project: A huge thank you to @sigoden for creating the original sigoden/aichat.
  • This Fork & Maintenance: bengtfrost/aichat by @bengtfrost.
  • Core Regex Engine: The fancy-regex crate and its contributors, for providing a robust pure-Rust regex solution.
  • The Rust Community: For creating and maintaining such a powerful and productive language and ecosystem.

About

πŸš€ All-in-one LLM CLI | 🐚 Shell Assistant | πŸ’¬ Chat-REPL | πŸ“š RAG | πŸ› οΈ AI Tools | πŸ€– Agents | Connects to MistralAI, OpenAI, Claude, Gemini, Ollama, Groq & more!

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Rust 81.9%
  • HTML 13.3%
  • Shell 3.2%
  • PowerShell 1.1%
  • Nushell 0.5%