|
1 | | -# rig-coding-tools |
| 1 | +# llm-coding-tools |
2 | 2 |
|
3 | | -## Additional Setup Required!! |
| 3 | +[](https://crates.io/crates/llm-coding-tools-core) |
| 4 | +[](https://crates.io/crates/llm-coding-tools-rig) |
| 5 | +[](https://docs.rs/llm-coding-tools-rig) |
| 6 | +[](https://github.com/Sewer56/llm-coding-tools/actions) |
4 | 7 |
|
5 | | -<!-- DELETE THIS SECTION AFTER COMPLETING SETUP --> |
| 8 | +Lightweight, high-performance coding tool implementations for LLM-powered development agents. Plug and play into your favourite frameworks like [Rig](https://github.com/0xPlaygrounds/rig). |
6 | 9 |
|
7 | | -Additional setup might be required. |
8 | | -Once you do the stuff under this text, delete this section. |
| 10 | +## About This Workspace |
9 | 11 |
|
10 | | -### Code Coverage |
11 | | -To setup code coverage for this project: |
| 12 | +This workspace contains multiple Rust crates for integrating coding tools with LLM agents: |
12 | 13 |
|
13 | | -1. Go to [Codecov][codecov], add your project. |
14 | | -2. Go to [Settings -> Secrets and variables -> Actions][gh-actions-secrets] in your repo and add a repository secret named `CODECOV_TOKEN`. |
15 | | -3. Do the same in [Settings -> Secrets and variables -> Dependabot][gh-actions-dependabot]. |
| 14 | +- **[llm-coding-tools-core](./src/llm-coding-tools-core/)**: Framework-agnostic core operations and utilities |
| 15 | +- **[llm-coding-tools-rig](./src/llm-coding-tools-rig/)**: Rig framework-specific Tool implementations |
16 | 16 |
|
17 | | -The instructions on the Codecov page will provide the token to use. |
| 17 | +## Features |
18 | 18 |
|
| 19 | +- **File Operations**: Read, write, edit files with line-numbered output |
| 20 | +- **Search**: Glob pattern matching and regex content search |
| 21 | +- **Shell**: Cross-platform command execution with timeout |
| 22 | +- **Web**: URL fetching with HTML-to-markdown conversion |
| 23 | +- **Task Delegation**: Sub-agent spawning for complex workflows |
| 24 | +- **Path Security**: Choose between unrestricted or sandboxed file access |
| 25 | +- **Context Strings**: Embedded LLM guidance for tool usage |
19 | 26 |
|
20 | | -### Setup API Key (crates.io) |
| 27 | +## Feature Flags (llm-coding-tools-core) |
21 | 28 |
|
22 | | -You'll need to set up an API key to publish to `crates.io` on tag. |
23 | | - |
24 | | -- Generate your API key in [crates.io (Account Settings -> API Tokens)][crates-io-key]. |
25 | | -- Go to [Settings -> Secrets and variables -> Actions][gh-actions-secrets] in your repo and add environment secret named `CRATES_IO_TOKEN`. |
26 | | -- Paste your API key. |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | -### Fill in README Documentation |
32 | | - |
33 | | -This repository uses a two-level README structure: |
34 | | - |
35 | | -| File | Purpose | What to Write | |
36 | | -|------|---------|---------------| |
37 | | -| `README.MD` (this file) | GitHub landing page | Project overview, quick start example, badges | |
38 | | -| [`src/rig-coding-tools/README.MD`](./src/rig-coding-tools/README.MD) | crates.io page | Detailed features, installation, comprehensive usage examples | |
39 | | - |
40 | | ------------------------ |
41 | | - |
42 | | -[](https://crates.io/crates/rig-coding-tools) |
43 | | -[](https://docs.rs/rig-coding-tools) |
44 | | -[](https://github.com/Sewer56/rig-coding-tools/actions) |
45 | | - |
46 | | -Basic coding tools for rig based LLM agents |
| 29 | +- `tokio` (default): Async mode with tokio runtime |
| 30 | +- `blocking`: Sync/blocking mode, mutually exclusive with `async` |
47 | 31 |
|
48 | 32 | ## Quick Start |
49 | 33 |
|
50 | 34 | Add to your `Cargo.toml`: |
51 | 35 |
|
52 | 36 | ```toml |
53 | 37 | [dependencies] |
54 | | -rig-coding-tools = "0.1.0" |
| 38 | +llm-coding-tools-rig = "0.1" |
55 | 39 | ``` |
56 | 40 |
|
57 | 41 | ```rust |
58 | | -// TODO: Add a minimal example showing the most common use case |
| 42 | +use llm_coding_tools_rig::absolute::{ReadTool, WriteTool, GlobTool}; |
| 43 | +use llm_coding_tools_rig::{BashTool, PreambleBuilder, TodoTools}; |
| 44 | +use rig::tool::ToolSet; |
| 45 | + |
| 46 | +// Track tools and generate LLM guidance |
| 47 | +let mut pb = PreambleBuilder::new(); |
| 48 | +let todos = TodoTools::new(); |
| 49 | + |
| 50 | +let toolset = ToolSet::builder() |
| 51 | + .static_tool(pb.track(ReadTool::<true>::new())) |
| 52 | + .static_tool(pb.track(WriteTool::new())) |
| 53 | + .static_tool(pb.track(GlobTool::new())) |
| 54 | + .static_tool(pb.track(BashTool::new())) |
| 55 | + .static_tool(pb.track(todos.read)) |
| 56 | + .static_tool(pb.track(todos.write)) |
| 57 | + .build(); |
| 58 | + |
| 59 | +// Generate preamble for agent system prompt |
| 60 | +let preamble = pb.build(); |
| 61 | + |
| 62 | +// Use with rig agent: |
| 63 | +// let agent = client.agent("gpt-4o") |
| 64 | +// .preamble(&preamble) |
| 65 | +// .tools(toolset) |
| 66 | +// .build(); |
59 | 67 | ``` |
60 | | -See the [rig-coding-tools crate documentation](./src/rig-coding-tools/README.MD) for detailed usage. |
61 | 68 |
|
62 | | -## Crates |
| 69 | +## Examples |
63 | 70 |
|
64 | | -- [rig-coding-tools](./src/rig-coding-tools/README.MD): Core library <!-- TODO: Update description --> |
| 71 | +```bash |
| 72 | +# Basic toolset setup |
| 73 | +cargo run --example basic -p llm-coding-tools-rig |
65 | 74 |
|
66 | | -## Developer Manual |
| 75 | +# Complete agent configuration (recommended starting point) |
| 76 | +cargo run --example full_agent -p llm-coding-tools-rig |
67 | 77 |
|
68 | | -For step-by-step development guidance, see the [Developer Manual](https://reloaded-project.github.io/reloaded-templates-rust/manual/). |
| 78 | +# Sandboxed file access |
| 79 | +cargo run --example sandboxed -p llm-coding-tools-rig |
| 80 | +``` |
| 81 | + |
| 82 | +## Documentation |
| 83 | + |
| 84 | +- [llm-coding-tools-core README](./src/llm-coding-tools-core/README.md) |
| 85 | +- [llm-coding-tools-rig README](./src/llm-coding-tools-rig/README.md) |
| 86 | +- [Developer Guidelines](./src/AGENTS.md) |
69 | 87 |
|
70 | 88 | ## Contributing |
71 | 89 |
|
72 | | -We welcome contributions! See the [Contributing Guide](https://reloaded-project.github.io/reloaded-templates-rust/manual/#contributing) for details. |
| 90 | +Contributions are welcome! Please ensure all tests pass and the code follows our guidelines. |
73 | 91 |
|
74 | 92 | ## License |
75 | 93 |
|
76 | 94 | Licensed under [Apache 2.0](./LICENSE). |
77 | | - |
78 | | -[codecov]: https://app.codecov.io |
79 | | -[gh-actions-secrets]: https://github.com/Sewer56/rig-coding-tools/settings/secrets/actions |
80 | | -[gh-actions-dependabot]: https://github.com/Sewer56/rig-coding-tools/settings/secrets/dependabot |
81 | | -[gh-pages]: https://github.com/Sewer56/rig-coding-tools/settings/pages |
82 | | -[crates-io-key]: https://crates.io/settings/tokens |
83 | | -[nuget-key]: https://www.nuget.org/account/apikeys |
|
0 commit comments