pi-rs  by jshachm

Rust-based terminal AI programming assistant

Created 1 month ago
573 stars

Top 56.4% on SourcePulse

GitHubView on GitHub
Project Summary

A lightweight, terminal-based AI programming assistant built in Rust, pi-rs is inspired by pi-coding-agent. It targets developers and power users seeking an efficient, interactive AI tool directly within their command-line environment, offering multi-LLM support and integrated development utilities.

How It Works

This project leverages Rust for a performant, resource-efficient implementation with an interactive TUI built using ratatui. It supports numerous LLM providers (OpenAI, Anthropic, Google, Ollama, etc.) and features a robust tool system for file operations and shell commands. A flexible skill system customizes AI behavior, while context compression automatically summarizes long conversations for improved efficiency.

Quick Start & Requirements

  • Installation: Clone the repository (git clone https://github.com/yourusername/pi-rs.git), navigate into the directory, and build using cargo build --release. The binary will be located at target/release/pi.
  • Prerequisites: Rust toolchain, LLM provider API keys (e.g., MOONSHOT_API_KEY).
  • Running: Execute ./target/release/pi --model <provider-model> "<your message>". Example: ./target/release/pi --model moonshot-v1-8k "你好,你会做什么?".
  • Documentation: No explicit quick-start or demo links provided beyond the repository URL.

Highlighted Details

  • Multi-Provider LLM Support: Integrates with OpenAI, Anthropic, Google, Moonshot, Ollama, Azure OpenAI, Mistral, and Groq.
  • Tool System: Includes file operations (read, write, edit), shell commands (bash, grep, find, ls), and epkg (multi-source package manager for RPM, DEB, Alpine, Arch, Conda).
  • Interactive TUI: User-friendly terminal interface powered by ratatui.
  • Session Management: JSONL-based tree structure for conversations.
  • Skill System: Load custom skills for tailored AI behavior.
  • Context Compression: Automatic summarization of long dialogues.
  • Sandboxing: Isolated environment with custom mounts, env vars, and types.
  • Performance: Binary size ~8 MB, runtime memory ~9 MB.

Maintenance & Community

No specific details regarding maintainers, community channels (like Discord/Slack), sponsorships, or a public roadmap are present in the provided README content.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Permissive MIT license allows commercial use and integration into closed-source projects.

Limitations & Caveats

The README uses placeholder URLs for cloning the repository. There is no explicit mention of alpha/beta status, known bugs, or unsupported platforms. The epkg tool's effectiveness depends on the execution environment's package sources.

Health Check
Last Commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
617 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.