β‘ A Rust-native fork of sigoden/aichat, built 100% in safe Rust and replacing
onig_syswith pure-Rustfancy-regexfor regex functionality.
This fork prioritizes safety, portability, and a streamlined build process by eliminating C dependencies, offering a truly native Rust experience.
- π‘οΈ Safe & Portable: Zero C dependenciesβno
onig_sys, only the pure-Rustfancy-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.
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:
- π« Eliminate C FFI & Dependencies: Replaces Oniguruma C bindings with the excellent, pure-Rust
fancy-regexengine. - π οΈ Simplify Build Process: No more hassles with system C libraries or complex toolchain setups. Just
cargo! - π Enhance Memory Safety: Leverages Rustβs strong memory safety guarantees throughout the entire codebase by removing unsafe C bindings.
- π Improve Portability: Builds and runs seamlessly on various architectures and environments, including musl-based systems (like Alpine Linux), Windows, and containerized setups.
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/aichatEnsure you have the Rust toolchain installed. Then:
cargo install --git https://github.com/bengtfrost/aichat --branch maingit 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//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)
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
The process for creating new releases, including version bumping, tagging, and uploading binaries, is documented in: π docs/RELEASE.md
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.
- 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-regexcrate 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.