llm-coding-tools-rig
Lightweight, high-performance Rig framework Tool implementations for coding tools.
Features
- File operations - Read, write, edit, glob, grep with two access modes:
absolute::*- Unrestricted filesystem accessallowed::*- Sandboxed to configured directories
- Shell execution - Cross-platform command execution with timeout
- Web fetching - URL content retrieval with format conversion
- Todo management - Shared-state todo list tracking
- Context strings - LLM guidance text for tool usage (re-exported from core)
Installation
Add to your Cargo.toml:
[]
= "0.1"
Quick Start
Minimal runnable agent (requires OPENAI_API_KEY):
use ;
use ;
use openai;
use ;
use Prompt;
async
Example preamble output (truncated):
# Environment
Working directory: /home/user/project
# Tool Usage Guidelines
## `Read` Tool
Reads files from disk.
## `Bash` Tool
Executes shell commands.
Usage
File tools come in absolute::* (unrestricted) and allowed::* (sandboxed) variants:
use ;
use ;
use AllowedPathResolver;
use PathBuf;
let read = new;
let resolver = new.unwrap;
let sandboxed_read: = new;
let sandboxed_write = new;
Other tools: BashTool, WebFetchTool, TodoTools.
Use SystemPromptBuilder to register tools and pass pb.build() to .preamble(). Set working_directory() so the environment section is populated.
Context strings are re-exported in llm_coding_tools_rig::context (e.g., BASH, READ_ABSOLUTE).
Examples
# Basic toolset setup with SystemPromptBuilder
# Sandboxed file access with allowed::* tools
License
Apache 2.0