https://github.com/paulhendricks/create-context
https://github.com/paulhendricks/create-context
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/paulhendricks/create-context
- Owner: paulhendricks
- Created: 2024-12-13T15:14:14.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-03-21T21:09:37.000Z (3 months ago)
- Last Synced: 2025-03-21T22:22:06.385Z (3 months ago)
- Language: Rust
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Create Context
This tool recursively scans a given directory, finds files matching a given glob pattern, concatenates their contents into a specified output format, and prints them to standard output. It’s designed to help you feed code into large language models with a uniform code-block format.
## Features
- Recursively walks a directory.
- Uses a glob pattern (like `**/*.rs`) to filter files.
- Concatenates matched files into a series of ```` ```rust ``` ```` code blocks.
- Prints all results to `stdout`.## Installation
You need [Rust and Cargo](https://www.rust-lang.org/tools/install).
To install this binary from source:
```bash
git clone [email protected]:paulhendricks/create-context.git
cd create-context
cargo install --path .
cargo run -- --dir . --pattern '**/*.rs'
create-context --dir . --pattern '**/*.rs'
``````bash
rg zmq -l .
rg zmq -l src | xargs create-context --dir . --files
```