From aa4c9e27956f4cb6206199168366430f84cbba9d Mon Sep 17 00:00:00 2001 From: Olivier D'Ancona Date: Thu, 27 Feb 2025 19:05:52 -0800 Subject: [PATCH 01/13] Deleted docs folder --- docs/.gitignore | 1 - docs/book.toml | 9 - docs/src/SUMMARY.md | 24 --- docs/src/assets/filter.png | Bin 51976 -> 0 bytes docs/src/explanations/glob_pattern_filter.md | 50 ------ docs/src/explanations/glob_pattern_tool.md | 1 - docs/src/explanations/glob_patterns.md | 67 -------- docs/src/explanations/tokenizers.md | 18 -- docs/src/how_to/exclude_files_from_tree.md | 1 - docs/src/how_to/filter_files.md | 103 ------------ docs/src/how_to/install.md | 51 ------ docs/src/how_to/save_generated_prompt.md | 1 - docs/src/introduction.md | 71 -------- docs/src/references/command_line_options.md | 1 - docs/src/references/default_template.md | 1 - docs/src/tutorials/getting_started.md | 1 - docs/src/tutorials/templates.md | 52 ------ docs/src/tutorials/use_filter.md | 155 ------------------ docs/src/tutorials/using_glob_pattern_tool.md | 1 - docs/src/tutorials/using_templates.md | 1 - 20 files changed, 609 deletions(-) delete mode 100644 docs/.gitignore delete mode 100644 docs/book.toml delete mode 100644 docs/src/SUMMARY.md delete mode 100644 docs/src/assets/filter.png delete mode 100644 docs/src/explanations/glob_pattern_filter.md delete mode 100644 docs/src/explanations/glob_pattern_tool.md delete mode 100644 docs/src/explanations/glob_patterns.md delete mode 100644 docs/src/explanations/tokenizers.md delete mode 100644 docs/src/how_to/exclude_files_from_tree.md delete mode 100644 docs/src/how_to/filter_files.md delete mode 100644 docs/src/how_to/install.md delete mode 100644 docs/src/how_to/save_generated_prompt.md delete mode 100644 docs/src/introduction.md delete mode 100644 docs/src/references/command_line_options.md delete mode 100644 docs/src/references/default_template.md delete mode 100644 docs/src/tutorials/getting_started.md delete mode 100644 docs/src/tutorials/templates.md delete mode 100644 docs/src/tutorials/use_filter.md delete mode 100644 docs/src/tutorials/using_glob_pattern_tool.md delete mode 100644 docs/src/tutorials/using_templates.md diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 7585238..0000000 --- a/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -book diff --git a/docs/book.toml b/docs/book.toml deleted file mode 100644 index 03aedb1..0000000 --- a/docs/book.toml +++ /dev/null @@ -1,9 +0,0 @@ -[book] -authors = ["ODAncona","Mufeed VH"] -language = "en" -multilingual = false -src = "src" -title = "Code2prompt Documentation" - -[output.html] -mathjax-support = true \ No newline at end of file diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md deleted file mode 100644 index 61d2be4..0000000 --- a/docs/src/SUMMARY.md +++ /dev/null @@ -1,24 +0,0 @@ -# Summary - -[Introduction](introduction.md) - -# 🛠️ Tutorials 🛠️ - -- [Use Glob Pattern Filter](tutorials/use_filter.md) -- [Use Handlebars Templates](tutorials/templates.md) - -# 🏗️ How-To Guides 🏗️ - -- [Installation Guide](how_to/install.md) -- [Usage Guide](how_to/filter_files.md) - -# 📖 Explanations 📖 - -- [How the Glob Pattern Filter Works](explanations/glob_pattern_filter.md) -- [Understanding Tokenizers](explanations/tokenizers.md) -- [What are Glob Patterns](explanations/glob_patterns.md) - - diff --git a/docs/src/assets/filter.png b/docs/src/assets/filter.png deleted file mode 100644 index ad0fc78d15695fed722098266c0225faf268671c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 51976 zcma&O1yqz@*Efs-N-EtUEnU)K(5XmwBi&spIiv%^(1?^sx3n;H!_eK`-F^rE&;6|X zexGl>&pV5S&Ro~E&px~N@9Y8cR#6HQjRXw|2?Y>0(tWkZDBzRV-_AY2 zKM$Q=%cwjCFYm`DA>ci+vxJ88dpk2{H$z8LBy(Fk8&g&%V@Fd{Tc;0p&U+6UMZryU zcQ?IpG&OX#u(PF7v9K{kl60iv;-eBb^`zqB;Nqd;PiYJKi{vl9_OtS+W+j! zrC969#1(?@X^vX%;5~<2DSjmV^^q#XN64>3Z80*YgNyOy?~`0lmIu8{`24a1`o!kG>crwse3c-6IHOi78e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)))X1ZAWPo`?{q zTqIJ*OK{WA%Kzg>f4z?G7kB~(cP#f#7ET+v%QyqP|2ppxhX2II|FufUf{Nm202Le@ zxr>^_lgFq15Bzhi{A)sHQaE&p`_q}ND!ws;oyz}{~`6i?b+w6@6dgK=!f?pl8|nn zzz+wv(;WmFDyJ@|F-Jau`|bSuzx@VxocZ5~`2X6rpI`5reV0KD%NUP7nD6DHc1kCeLX{fLkM_YFR-&}YSfqY(jH_Mbmq2Q6mTzveDgorGp JROr*!{|Axb_LKks diff --git a/docs/src/explanations/glob_pattern_filter.md b/docs/src/explanations/glob_pattern_filter.md deleted file mode 100644 index 902358a..0000000 --- a/docs/src/explanations/glob_pattern_filter.md +++ /dev/null @@ -1,50 +0,0 @@ -# How the Glob Pattern Filter Works - -The tool uses glob patterns to include or exclude files and directories, working similarly to tools like `tree` or `grep`. Here’s a detailed explanation: - -## Key Concepts - -- **Include List (A)**: A set containing the glob patterns for files and directories you want to include. -- **Exclude List (B)**: A set containing the glob patterns for files and directories you want to exclude. -- **Universe (Ω)**: The set of all files and directories. - -When you specify an `--exclude` list and/or an `--include` list, the following logic applies: - -### Cases and Logic - -1. **No include list, no exclude list** - Include everything: - $$ - \neg A \cap \neg B \implies \Omega - $$ - -2. **No include list, with exclude list** - Include everything except what matches the exclude list: - $$ - \neg A \cap B \implies \Omega \setminus B - $$ - -3. **With include list, no exclude list** - Include only what matches the include list: - $$ - A \cap \neg B \implies A - $$ - -4. **With include list and exclude list** - Include what matches the include list and exclude what matches the exclude list. Handle the intersection based on the `include_priority` parameter: - - - **Include priority == true**: - $$ - A \setminus (A \cap B) - $$ - - - **Include priority != true***: - $$ - B \setminus (A \cap B) - $$ - -### Visual Representation of Case 4 - -Let (A) and (B) overlap. Depending on the priority, the intersection $$( A \cap B )$$ is either included or excluded based on the `include_priority` parameter. - -![Visual Representation of Case 4](../../assets/filter.png) diff --git a/docs/src/explanations/glob_pattern_tool.md b/docs/src/explanations/glob_pattern_tool.md deleted file mode 100644 index d883e30..0000000 --- a/docs/src/explanations/glob_pattern_tool.md +++ /dev/null @@ -1 +0,0 @@ -# How the Glob Pattern Tool Works diff --git a/docs/src/explanations/glob_patterns.md b/docs/src/explanations/glob_patterns.md deleted file mode 100644 index 0ddf7b4..0000000 --- a/docs/src/explanations/glob_patterns.md +++ /dev/null @@ -1,67 +0,0 @@ -# Glob Patterns - -Glob patterns are a simple yet powerful way to match file names and paths using wildcard characters. They are commonly used in command-line interfaces and programming languages to specify sets of filenames or directories. Here's a breakdown of the most commonly used glob patterns: - -## Basic Wildcards - -- `*`: Matches any number of characters, including zero characters. - - Example: `*.txt` matches all files ending with `.txt`. - -- `?`: Matches exactly one character. - - Example: `file?.txt` matches `file1.txt`, `fileA.txt`, but not `file10.txt`. - -- `[]`: Matches any one of the enclosed characters. - - Example: `file[1-3].txt` matches `file1.txt`, `file2.txt`, `file3.txt`. - -- `[!]` or `[^]`: Matches any character not enclosed. - - Example: `file[!1-3].txt` matches `file4.txt`, `fileA.txt`, but not `file1.txt`. - -## Advanced Patterns - -- `**`: Matches any number of directories and subdirectories recursively. - - Example: `**/*.txt` matches all `.txt` files in the current directory and all subdirectories. - -- `{}`: Matches any of the comma-separated patterns enclosed. - - Example: `file{1,2,3}.txt` matches `file1.txt`, `file2.txt`, `file3.txt`. - -## Examples - -1. **Matching all text files in a directory:** - - ```sh - *.txt - ``` - -2. **Matching all files with a single digit before the extension:** - - ```sh - file?.txt - ``` - -3. **Matching files with extensions `.jpg` or `.png`:** - - ```sh - *.{jpg,png} - ``` - -4. **Matching all `.txt` files in any subdirectory:** - - ```sh - **/*.txt - ``` - -5. **Matching files that start with `a` or `b` and end with `.txt`:** - - ```sh - {a,b}*.txt - ``` - -## Use Cases - -- **Command-Line Tools:** Glob patterns are extensively used in command-line tools like `ls`, `cp`, `mv`, and `rm` to specify multiple files or directories. -- **Programming Languages:** Languages like Python, JavaScript, and Ruby support glob patterns for file matching through libraries like `glob` in Python. -- **Build Systems:** Tools like Makefile use glob patterns to specify source files and dependencies. - -## Conclusion - -Glob patterns provide a flexible and intuitive way to match filenames and paths, making them invaluable for scripting, automation, and file management tasks. Understanding and utilizing these patterns can significantly enhance your productivity and efficiency in handling files and directories. diff --git a/docs/src/explanations/tokenizers.md b/docs/src/explanations/tokenizers.md deleted file mode 100644 index 3968b20..0000000 --- a/docs/src/explanations/tokenizers.md +++ /dev/null @@ -1,18 +0,0 @@ -# Tokenizers for `code2prompt` - -When working with language models, text needs to be transformed into a format that the model can understand—**tokens**, which are sequences of numbers. This transformation is handled by a **tokenizer**. - ---- - -## What is a Tokenizer? - -A tokenizer converts raw text into tokens, which are the building blocks for how language models process input. These tokens can represent words, subwords, or even individual characters, depending on the tokenizer's design. - -For `code2prompt`, we use the **tiktoken** tokenizer. It’s efficient, robust, and optimized for OpenAI models. -You can explore its functionality in the official repository - -👉 [tiktoken GitHub Repository](https://github.com/openai/tiktoken) - -If you want to learn more about tokenizer in general, check out the - -👉 [Mistral Tokenization Guide](https://docs.mistral.ai/guides/tokenization/). diff --git a/docs/src/how_to/exclude_files_from_tree.md b/docs/src/how_to/exclude_files_from_tree.md deleted file mode 100644 index cced430..0000000 --- a/docs/src/how_to/exclude_files_from_tree.md +++ /dev/null @@ -1 +0,0 @@ -# Exclude Files from Tree diff --git a/docs/src/how_to/filter_files.md b/docs/src/how_to/filter_files.md deleted file mode 100644 index 004ae18..0000000 --- a/docs/src/how_to/filter_files.md +++ /dev/null @@ -1,103 +0,0 @@ - -## Usage - -Generate a prompt from a codebase directory: - -```sh -code2prompt path/to/codebase -``` - -Use a custom Handlebars template file: - -```sh -code2prompt path/to/codebase -t path/to/template.hbs -``` - -Filter files using glob patterns: - -```sh -code2prompt path/to/codebase --include="*.rs,*.toml" -``` - -Exclude files using glob patterns: - -```sh -code2prompt path/to/codebase --exclude="*.txt,*.md" -``` - -Exclude files/folders from the source tree based on exclude patterns: - -```sh -code2prompt path/to/codebase --exclude="*.npy,*.wav" --exclude-from-tree -``` - -Display the token count of the generated prompt: - -```sh -code2prompt path/to/codebase --tokens -``` - -Specify a tokenizer for token count: - -```sh -code2prompt path/to/codebase --tokens --encoding=p50k -``` - -Supported tokenizers: `cl100k`, `p50k`, `p50k_edit`, `r50k_bas`. -> [!NOTE] -> See [Tokenizers](#tokenizers) for more details. - -Save the generated prompt to an output file: - -```sh -code2prompt path/to/codebase --output=output.txt -``` - -Print output as JSON: - -```sh -code2prompt path/to/codebase --json -``` - -The JSON output will have the following structure: - -```json -{ - "prompt": "", - "directory_name": "codebase", - "token_count": 1234, - "model_info": "ChatGPT models, text-embedding-ada-002", - "files": [] -} -``` - -Generate a Git commit message (for staged files): - -```sh -code2prompt path/to/codebase --diff -t templates/write-git-commit.hbs -``` - -Generate a Pull Request with branch comparing (for staged files): - -```sh -code2prompt path/to/codebase --git-diff-branch 'main, development' --git-log-branch 'main, development' -t templates/write-github-pull-request.hbs -``` - -Add line numbers to source code blocks: - -```sh -code2prompt path/to/codebase --line-number -``` - -Disable wrapping code inside markdown code blocks: - -```sh -code2prompt path/to/codebase --no-codeblock -``` - -- Rewrite the code to another language. -- Find bugs/security vulnerabilities. -- Document the code. -- Implement new features. - -> I initially wrote this for personal use to utilize Claude 3.0's 200K context window and it has proven to be pretty useful so I decided to open-source it! diff --git a/docs/src/how_to/install.md b/docs/src/how_to/install.md deleted file mode 100644 index c41dcfb..0000000 --- a/docs/src/how_to/install.md +++ /dev/null @@ -1,51 +0,0 @@ - -# Installation - -## Binary releases - -Download the latest binary for your OS from [Releases](https://github.com/mufeedvh/code2prompt/releases). - -## Source build - -Requires: - -- [Git](https://git-scm.org/downloads), [Rust](https://rust-lang.org/tools/install) and Cargo. - -```sh -git clone https://github.com/mufeedvh/code2prompt.git -cd code2prompt/ -cargo build --release -``` - -# cargo - -installs from the [`crates.io`](https://crates.io) registry. - -```sh -cargo install code2prompt -``` - -For unpublished builds: - -```sh -cargo install --git https://github.com/mufeedvh/code2prompt -``` - -## AUR - -`code2prompt` is available in the [`AUR`](https://aur.archlinux.org/packages?O=0&K=code2prompt). Install it via any AUR helpers. - -```sh -paru/yay -S code2prompt -``` - -## Nix - -If you are on nix, You can use `nix-env` or `profile` to install. - -```sh -# without flakes: -nix-env -iA nixpkgs.code2prompt -# with flakes: -nix profile install nixpkgs#code2prompt -``` diff --git a/docs/src/how_to/save_generated_prompt.md b/docs/src/how_to/save_generated_prompt.md deleted file mode 100644 index 71a0424..0000000 --- a/docs/src/how_to/save_generated_prompt.md +++ /dev/null @@ -1 +0,0 @@ -# Save Generated Prompt diff --git a/docs/src/introduction.md b/docs/src/introduction.md deleted file mode 100644 index eded9ed..0000000 --- a/docs/src/introduction.md +++ /dev/null @@ -1,71 +0,0 @@ -# Introduction to `code2prompt` - -`code2prompt` is a powerful command-line tool designed to generate large language model (LLM) prompts directly from your codebase. It simplifies the process of combining and formatting code, making it easy to analyze, document, or refactor code using LLMs like GPT or Claude. - -This tool is built with scalability and customization in mind, allowing you to handle even the largest codebases effortlessly. Whether you are generating documentation, searching for bugs, or refactoring code, `code2prompt` provides the flexibility and precision needed for various development tasks. - ---- - -## Key Features - -- **Generate LLM Prompts**: Quickly convert entire codebases into structured LLM prompts. -- **Glob Pattern Filtering**: Include or exclude specific files and directories using glob patterns. -- **Customizable Templates**: Tailor prompt generation with Handlebars templates. -- **Token Counting**: Analyze token usage and optimize for LLMs with varying context windows. -- **Git Integration**: Include Git diffs and commit messages in prompts for code reviews. -- **Respects `.gitignore`**: Automatically ignores files listed in `.gitignore` to streamline prompt generation. - ---- - -## Getting Started - -### Installation - -Check out the 👉 [Installation Guide](../how_to/install.md) for detailed instructions on how to install `code2prompt`. - -### Usage - -Check out the 👉 [Filter Files Guide](../how_to/filter_files.md) to learn how to filter files using glob patterns. - -Check out the 👉 [Templates Guide](../tutorials/templates.md) to learn how to use custom Handlebars templates. - -With `code2prompt`, you can unlock the full potential of LLMs by creating well-structured and meaningful prompts from your codebase. Let's get started! - ---- - -## Why `code2prompt`? - -1. **Save Time**: - - Automates the process of traversing a codebase and formatting files for LLMs. - - Avoids repetitive copy-pasting of code. - -2. **Improve Productivity**: - - Provides a structured and consistent format for code analysis. - - Helps identify bugs, refactor code, and write documentation faster. - -3. **Handle Large Codebases**: - - Designed to work seamlessly with large codebases, respecting context limits of LLMs. - -4. **Customizable Workflows**: - - Flexible options for filtering files, using templates, and generating targeted prompts. - ---- - -## Example Use Cases - -- **Code Documentation**: - Automatically generate documentation for public functions, methods, and classes. - -- **Bug Detection**: - Find potential bugs and vulnerabilities by analyzing your codebase with LLMs. - -- **Refactoring**: - Simplify and optimize code by generating prompts for code quality improvements. - -- **Learning and Exploration**: - Understand new codebases by generating summaries and detailed breakdowns. - -- **Git Commit and PR Descriptions**: - Generate meaningful commit messages and pull request descriptions from Git diffs. - ---- diff --git a/docs/src/references/command_line_options.md b/docs/src/references/command_line_options.md deleted file mode 100644 index 158691d..0000000 --- a/docs/src/references/command_line_options.md +++ /dev/null @@ -1 +0,0 @@ -# Command-Line Options diff --git a/docs/src/references/default_template.md b/docs/src/references/default_template.md deleted file mode 100644 index 2e1ecbf..0000000 --- a/docs/src/references/default_template.md +++ /dev/null @@ -1 +0,0 @@ -# Default Template diff --git a/docs/src/tutorials/getting_started.md b/docs/src/tutorials/getting_started.md deleted file mode 100644 index bad5562..0000000 --- a/docs/src/tutorials/getting_started.md +++ /dev/null @@ -1 +0,0 @@ -# Getting Started diff --git a/docs/src/tutorials/templates.md b/docs/src/tutorials/templates.md deleted file mode 100644 index 3ed9ed6..0000000 --- a/docs/src/tutorials/templates.md +++ /dev/null @@ -1,52 +0,0 @@ - -## Templates - -`code2prompt` comes with a set of built-in templates for common use cases. You can find them in the [`templates`](templates) directory. - -### [`document-the-code.hbs`](https://github.com/mufeedvh/code2prompt/tree/main/templates/document-the-code.hbs) - -Use this template to generate prompts for documenting the code. It will add documentation comments to all public functions, methods, classes and modules in the codebase. - -### [`find-security-vulnerabilities.hbs`](https://github.com/mufeedvh/code2prompt/tree/main/templates/find-security-vulnerabilities.hbs) - -Use this template to generate prompts for finding potential security vulnerabilities in the codebase. It will look for common security issues and provide recommendations on how to fix or mitigate them. - -### [`clean-up-code.hbs`](https://github.com/mufeedvh/code2prompt/tree/main/templates/clean-up-code.hbs) - -Use this template to generate prompts for cleaning up and improving the code quality. It will look for opportunities to improve readability, adherence to best practices, efficiency, error handling, and more. - -### [`fix-bugs.hbs`](https://github.com/mufeedvh/code2prompt/tree/main/templates/fix-bugs.hbs) - -Use this template to generate prompts for fixing bugs in the codebase. It will help diagnose issues, provide fix suggestions, and update the code with proposed fixes. - -### [`write-github-pull-request.hbs`](https://github.com/mufeedvh/code2prompt/tree/main/templates/write-github-pull-request.hbs) - -Use this template to create GitHub pull request description in markdown by comparing the git diff and git log of two branches. - -### [`write-github-readme.hbs`](https://github.com/mufeedvh/code2prompt/tree/main/templates/write-github-readme.hbs) - -Use this template to generate a high-quality README file for the project, suitable for hosting on GitHub. It will analyze the codebase to understand its purpose and functionality, and generate the README content in Markdown format. - -### [`write-git-commit.hbs`](https://github.com/mufeedvh/code2prompt/tree/main/templates/write-git-commit.hbs) - -Use this template to generate git commits from the staged files in your git directory. It will analyze the codebase to understand its purpose and functionality, and generate the git commit message content in Markdown format. - -### [`improve-performance.hbs`](https://github.com/mufeedvh/code2prompt/tree/main/templates/improve-performance.hbs) - -Use this template to generate prompts for improving the performance of the codebase. It will look for optimization opportunities, provide specific suggestions, and update the code with the changes. - -You can use these templates by passing the `-t` flag followed by the path to the template file. For example: - -```sh -code2prompt path/to/codebase -t templates/document-the-code.hbs -``` - -## User Defined Variables - -`code2prompt` supports the use of user defined variables in the Handlebars templates. Any variables in the template that are not part of the default context (`absolute_code_path`, `source_tree`, `files`) will be treated as user defined variables. - -During prompt generation, `code2prompt` will prompt the user to enter values for these user defined variables. This allows for further customization of the generated prompts based on user input. - -For example, if your template includes `{{challenge_name}}` and `{{challenge_description}}`, you will be prompted to enter values for these variables when running `code2prompt`. - -This feature enables creating reusable templates that can be adapted to different scenarios based on user provided information. diff --git a/docs/src/tutorials/use_filter.md b/docs/src/tutorials/use_filter.md deleted file mode 100644 index 0b14081..0000000 --- a/docs/src/tutorials/use_filter.md +++ /dev/null @@ -1,155 +0,0 @@ -# Using the Glob Pattern Filter - -This tutorial demonstrates how to use the **glob pattern tool** in `code2prompt` to filter and manage files based on include and exclude patterns. Glob patterns work similarly to tools like `tree` or `grep`, providing powerful filtering capabilities. Check out the [detailed explanation](../explanations/glob_pattern_tool.md) for more information. - ---- - -## Prerequisites - -Ensure you have `code2prompt` installed. If you haven’t installed it yet, refer to the [Installation Guide](../how_to/install.md). - ---- - -## Understanding Include and Exclude Patterns - -Glob patterns allow you to specify rules for filtering files and directories. - -- **Include Patterns** (`--include`): Specify files and directories you want to include. -- **Exclude Patterns** (`--exclude`): Specify files and directories you want to exclude. -- **Priority** (`--include-priority`): Resolves conflicts between include and exclude patterns. - ---- - -## Setting Up the Environment - -To practice with glob patterns, let’s create a sample folder structure with some files. - -### Bash Script to Generate the Test Structure - -Run this script to set up a temporary directory structure: - -```bash -#!/bin/bash - -# Create base directory -mkdir -p test_dir/{lowercase,uppercase,.secret} - -# Create files in the structure -echo "content foo.py" > "test_dir/lowercase/foo.py" -echo "content bar.py" > "test_dir/lowercase/bar.py" -echo "content baz.py" > "test_dir/lowercase/baz.py" -echo "content qux.txt" > "test_dir/lowercase/qux.txt" -echo "content corge.txt" > "test_dir/lowercase/corge.txt" -echo "content grault.txt" > "test_dir/lowercase/grault.txt" - -echo "CONTENT FOO.py" > "test_dir/uppercase/FOO.PY" -echo "CONTENT BAR.py" > "test_dir/uppercase/BAR.PY" -echo "CONTENT BAZ.py" > "test_dir/uppercase/BAZ.PY" -echo "CONTENT QUX.txt" > "test_dir/uppercase/QUX.TXT" -echo "CONTENT CORGE.txt" > "test_dir/uppercase/CORGE.TXT" -echo "CONTENT GRAULT.txt" > "test_dir/uppercase/GRAULT.TXT" - -echo "top secret" > "test_dir/.secret/secret.txt" -``` - -To clean up the structure later, run: - -```bash -rm -rf test_dir -``` - ---- - -## Examples: Filtering Files with Include and Exclude Patterns - -### Case 1: No Include, No Exclude - -Command: - -```bash -code2prompt test_dir -``` - -#### Result - -All files are included: - -- `lowercase/foo.py` -- `lowercase/bar.py` -- `uppercase/FOO.py` -- `.secret/secret.txt` - ---- - -### Case 2: Exclude Specific File Types - -Exclude `.txt` files: - -```bash -code2prompt test_dir --exclude="*.txt" -``` - -#### Result - -Excluded: - -- All `.txt` files - -Included: - -- `lowercase/foo.py` -- `lowercase/bar.py` -- `uppercase/FOO.py` - ---- - -### Case 3: Include Specific File Types - -Include only Python files: - -```bash -code2prompt test_dir --include="*.py" -``` - -#### Result - -Included: - -- All `.py` files - -Excluded: - -- `.secret/secret.txt` - ---- - -### Case 4: Include and Exclude with Priority - -Include `.py` files but exclude files in the `uppercase` folder: - -```bash -code2prompt test_dir --include="*.py" --exclude="**/uppercase/*" --include-priority=true -``` - -#### Result - -Included: - -- All `lowercase/1` files having `.py` extension - -Excluded: - -- All `uppercase` files -- `.secret/secret.txt` - ---- - -## Summary - -The glob pattern tool in `code2prompt` allows you to filter files and directories effectively using: - -- `--include` for specifying files to include -- `--exclude` for files to exclude -- `--include-priority` for resolving conflicts between patterns - -To practice, set up the sample directory, try out the commands, and see how the tool filters files dynamically. diff --git a/docs/src/tutorials/using_glob_pattern_tool.md b/docs/src/tutorials/using_glob_pattern_tool.md deleted file mode 100644 index 55161bb..0000000 --- a/docs/src/tutorials/using_glob_pattern_tool.md +++ /dev/null @@ -1 +0,0 @@ -# Use Filter Tool diff --git a/docs/src/tutorials/using_templates.md b/docs/src/tutorials/using_templates.md deleted file mode 100644 index 06833ab..0000000 --- a/docs/src/tutorials/using_templates.md +++ /dev/null @@ -1 +0,0 @@ -# Using Templates From 1b6b0b856a5df1f8bc035eeb0c51b55fe1f6948f Mon Sep 17 00:00:00 2001 From: Olivier D'Ancona Date: Thu, 27 Feb 2025 21:35:09 -0800 Subject: [PATCH 02/13] Engine craft 8-) --- Cargo.lock | 2 +- Cargo.toml | 37 ++++++----- src/bindings/mod.rs | 1 + src/{ => bindings}/python.rs | 7 +- src/cli/args.rs | 104 +++++++++++++++++++++++++++++ src/{ => cli}/clipboard.rs | 0 src/{ => engine}/filter.rs | 0 src/{ => engine}/git.rs | 0 src/engine/mod.rs | 7 ++ src/{ => engine}/path.rs | 6 +- src/{ => engine}/sort.rs | 0 src/{ => engine}/template.rs | 0 src/{ => engine}/tokenizer.rs | 0 src/{ => engine}/util.rs | 0 src/lib.rs | 29 +++----- src/main.rs | 120 ++++------------------------------ tests/filter_test.rs | 2 +- tests/git_test.rs | 2 +- tests/sort_test.rs | 2 +- tests/template_test.rs | 4 +- tests/util_test.rs | 2 +- 21 files changed, 166 insertions(+), 159 deletions(-) create mode 100644 src/bindings/mod.rs rename src/{ => bindings}/python.rs (97%) create mode 100644 src/cli/args.rs rename src/{ => cli}/clipboard.rs (100%) rename src/{ => engine}/filter.rs (100%) rename src/{ => engine}/git.rs (100%) create mode 100644 src/engine/mod.rs rename src/{ => engine}/path.rs (98%) rename src/{ => engine}/sort.rs (100%) rename src/{ => engine}/template.rs (100%) rename src/{ => engine}/tokenizer.rs (100%) rename src/{ => engine}/util.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index c2ca38e..afa7969 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -315,7 +315,7 @@ dependencies = [ [[package]] name = "code2prompt" -version = "2.1.0" +version = "3.0.0" dependencies = [ "anyhow", "arboard", diff --git a/Cargo.toml b/Cargo.toml index 88c9702..dab5b20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "code2prompt" -version = "2.1.0" -authors = ["Mufeed VH ","Olivier D'Ancona "] +version = "3.0.0" +authors = ["Mufeed VH ", "Olivier D'Ancona "] description = "A command-line (CLI) tool to generate an LLM prompt from codebases of any size, fast." keywords = ["code", "prompt", "llm", "gpt", "ai", "agent", "glob"] categories = ["command-line-utilities", "development-tools"] @@ -14,18 +14,13 @@ exclude = [".github/*", ".assets/*"] edition = "2021" build = "build.rs" -[[bin]] -name = "code2prompt" -test = false -bench = false -path = "src/main.rs" - -[lib] -name = "code2prompt" -crate-type = ["cdylib", "rlib"] +[features] +default = ["cli"] +cli = ["dep:clap", "dep:env_logger", "dep:arboard"] +bindings = ["dep:pyo3"] [dependencies] -clap = { version = "4.0", features = ["derive"] } +log = "0.4" handlebars = "4.3" jwalk = "0.8" termtree = "0.4" @@ -37,16 +32,24 @@ ignore = "0.4.22" anyhow = "1.0.80" inquire = "0.7.1" regex = "1.10.3" -git2 = { version = "0.18.2", default-features = false, features = [ "https", "vendored-libgit2", "vendored-openssl" ] } +git2 = { version = "0.18.2", default-features = false, features = ["https", "vendored-libgit2", "vendored-openssl"] } glob = "0.3.1" once_cell = "1.19.0" -log = "0.4" -env_logger = "0.11.3" -arboard = "3.4.0" -pyo3 = { version = "0.23", features = ["extension-module", "abi3-py312", "generate-import-lib"] } globset = "0.4.15" num-format = { version = "0.4.4", features = ["with-system-locale"] } +# cli dependencies +clap = { version = "4.0", features = ["derive"], optional = true } +env_logger = { version = "0.11.3", optional = true } +arboard = { version = "3.4.0", optional = true } + +# bindings dependencies +pyo3 = { version = "0.23", features = ["extension-module", "abi3-py312", "generate-import-lib"], optional = true } + +[lib] +name = "code2prompt" +path = "src/lib.rs" +crate-type = ["cdylib", "rlib"] [profile.release] lto = "thin" diff --git a/src/bindings/mod.rs b/src/bindings/mod.rs new file mode 100644 index 0000000..c0a088c --- /dev/null +++ b/src/bindings/mod.rs @@ -0,0 +1 @@ +pub mod python; diff --git a/src/python.rs b/src/bindings/python.rs similarity index 97% rename from src/python.rs rename to src/bindings/python.rs index bed55ea..c241ec0 100644 --- a/src/python.rs +++ b/src/bindings/python.rs @@ -2,12 +2,11 @@ use pyo3::prelude::*; use pyo3::types::PyDict; use std::path::PathBuf; -use crate::{ - count_tokens, +use crate::engine::{ git::{get_git_diff, get_git_diff_between_branches, get_git_log}, path::traverse_directory, template::{handlebars_setup, render_template}, - TokenizerType, + tokenizer::{count_tokens, TokenizerType}, }; /// Python module for code2prompt @@ -121,7 +120,7 @@ impl CodePrompt { // Setup template let template_content = - template.unwrap_or_else(|| include_str!("default_template_md.hbs").to_string()); + template.unwrap_or_else(|| include_str!("../default_template_md.hbs").to_string()); let handlebars = handlebars_setup(&template_content, "template") .map_err(|e| PyErr::new::(e.to_string()))?; diff --git a/src/cli/args.rs b/src/cli/args.rs new file mode 100644 index 0000000..8b1474a --- /dev/null +++ b/src/cli/args.rs @@ -0,0 +1,104 @@ +use crate::engine::template::OutputFormat; +use crate::engine::tokenizer::TokenFormat; +use clap::Parser; +use std::path::PathBuf; + +// ~~~ CLI Arguments ~~~ +#[derive(Parser)] +#[clap( + name = env!("CARGO_PKG_NAME"), + version = env!("CARGO_PKG_VERSION"), + author = env!("CARGO_PKG_AUTHORS") +)] +#[command(arg_required_else_help = true)] +pub struct Cli { + /// Path to the codebase directory + #[arg()] + pub path: PathBuf, + + /// Patterns to include + #[clap(short = 'i', long)] + pub include: Option, + + /// Patterns to exclude + #[clap(short = 'e', long)] + pub exclude: Option, + + /// Include files in case of conflict between include and exclude patterns + #[clap(long)] + pub include_priority: bool, + + /// Optional output file path + #[clap(short = 'O', long = "output-file")] + pub output_file: Option, + + /// Output format: markdown, json, or xml + #[clap(short = 'F', long = "output-format", default_value = "markdown")] + pub output_format: OutputFormat, + + /// Optional Path to a custom Handlebars template + #[clap(short, long)] + pub template: Option, + + /// List the full directory tree + #[clap(long)] + pub full_directory_tree: bool, + + /// Optional tokenizer to use for token count + /// + /// Supported tokenizers: cl100k (default), p50k, p50k_edit, r50k, gpt2 + #[clap(short = 'c', long)] + pub encoding: Option, + + /// Display the token count of the generated prompt. + /// Accepts a format: "raw" (machine parsable) or "format" (human readable). + #[clap(long, value_name = "FORMAT", default_value = "format")] + pub tokens: TokenFormat, + + /// Include git diff + #[clap(short, long)] + pub diff: bool, + + /// Generate git diff between two branches + #[clap(long, value_name = "BRANCHES")] + pub git_diff_branch: Option, + + /// Retrieve git log between two branches + #[clap(long, value_name = "BRANCHES")] + pub git_log_branch: Option, + + /// Add line numbers to the source code + #[clap(short, long)] + pub line_number: bool, + + /// Use relative paths instead of absolute paths, including the parent directory + #[clap(long)] + pub relative_paths: bool, + + /// Follow symlinks + #[clap(short = 'L', long)] + pub follow_symlinks: bool, + + /// Include hidden directories and files + #[clap(long)] + pub hidden: bool, + + /// Disable wrapping code inside markdown code blocks + #[clap(long)] + pub no_codeblock: bool, + + /// Optional Disable copying to clipboard + #[clap(long)] + pub no_clipboard: bool, + + /// Skip .gitignore rules + #[clap(long)] + pub no_ignore: bool, + + /// Sort order for files: one of "name_asc", "name_desc", "date_asc", or "date_desc" + #[clap(long)] + pub sort: Option, + + #[arg(long, hide = true)] + pub clipboard_daemon: bool, +} diff --git a/src/clipboard.rs b/src/cli/clipboard.rs similarity index 100% rename from src/clipboard.rs rename to src/cli/clipboard.rs diff --git a/src/filter.rs b/src/engine/filter.rs similarity index 100% rename from src/filter.rs rename to src/engine/filter.rs diff --git a/src/git.rs b/src/engine/git.rs similarity index 100% rename from src/git.rs rename to src/engine/git.rs diff --git a/src/engine/mod.rs b/src/engine/mod.rs new file mode 100644 index 0000000..0137a4f --- /dev/null +++ b/src/engine/mod.rs @@ -0,0 +1,7 @@ +pub mod filter; +pub mod git; +pub mod path; +pub mod sort; +pub mod template; +pub mod tokenizer; +pub mod util; diff --git a/src/path.rs b/src/engine/path.rs similarity index 98% rename from src/path.rs rename to src/engine/path.rs index cffa082..16082a3 100644 --- a/src/path.rs +++ b/src/engine/path.rs @@ -1,8 +1,8 @@ //! This module contains the functions for traversing the directory and processing the files. -use crate::filter::should_include_file; -use crate::sort::{sort_files, sort_tree, FileSortMethod}; -use crate::util::strip_utf8_bom; +use crate::engine::filter::should_include_file; +use crate::engine::sort::{sort_files, sort_tree, FileSortMethod}; +use crate::engine::util::strip_utf8_bom; use anyhow::Result; use ignore::WalkBuilder; use log::debug; diff --git a/src/sort.rs b/src/engine/sort.rs similarity index 100% rename from src/sort.rs rename to src/engine/sort.rs diff --git a/src/template.rs b/src/engine/template.rs similarity index 100% rename from src/template.rs rename to src/engine/template.rs diff --git a/src/tokenizer.rs b/src/engine/tokenizer.rs similarity index 100% rename from src/tokenizer.rs rename to src/engine/tokenizer.rs diff --git a/src/util.rs b/src/engine/util.rs similarity index 100% rename from src/util.rs rename to src/engine/util.rs diff --git a/src/lib.rs b/src/lib.rs index 4c44d2c..79b7cfb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,23 +1,10 @@ -pub mod clipboard; -pub mod filter; -pub mod git; -pub mod path; -pub mod python; -pub mod sort; -pub mod template; -pub mod tokenizer; -pub mod util; +pub mod engine; -#[cfg(target_os = "linux")] -pub use clipboard::{serve_clipboard_daemon, spawn_clipboard_daemon}; +#[cfg(feature = "bindings")] +pub mod bindings; -pub use clipboard::copy_text_to_clipboard; -pub use filter::should_include_file; -pub use git::{get_git_diff, get_git_diff_between_branches, get_git_log}; -pub use path::{label, traverse_directory}; -pub use sort::{sort_files, sort_tree, FileSortMethod}; -pub use template::{ - handle_undefined_variables, handlebars_setup, render_template, write_to_file, OutputFormat, -}; -pub use tokenizer::{count_tokens, TokenFormat, TokenizerType}; -pub use util::strip_utf8_bom; +#[cfg(feature = "cli")] +pub mod cli { + pub mod args; + pub mod clipboard; +} diff --git a/src/main.rs b/src/main.rs index 228d54c..cbfa3ee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,117 +4,22 @@ use anyhow::{Context, Result}; use clap::Parser; -use code2prompt::{ - count_tokens, get_git_diff, get_git_diff_between_branches, get_git_log, - handle_undefined_variables, handlebars_setup, label, render_template, traverse_directory, - write_to_file, FileSortMethod, OutputFormat, TokenFormat, TokenizerType, +use code2prompt::cli::args::Cli; + +use code2prompt::engine::{ + git::{get_git_diff, get_git_diff_between_branches, get_git_log}, + path::{label, traverse_directory}, + sort::FileSortMethod, + template::{ + handle_undefined_variables, handlebars_setup, render_template, write_to_file, OutputFormat, + }, + tokenizer::{count_tokens, TokenFormat, TokenizerType}, }; use colored::*; use indicatif::{ProgressBar, ProgressStyle}; use log::{debug, error, info}; use num_format::{SystemLocale, ToFormattedString}; use serde_json::json; -use std::path::PathBuf; - -// ~~~ CLI Arguments ~~~ -#[derive(Parser)] -#[clap( - name = env!("CARGO_PKG_NAME"), - version = env!("CARGO_PKG_VERSION"), - author = env!("CARGO_PKG_AUTHORS") -)] -#[command(arg_required_else_help = true)] -struct Cli { - /// Path to the codebase directory - #[arg()] - path: PathBuf, - - /// Patterns to include - #[clap(short = 'i', long)] - include: Option, - - /// Patterns to exclude - #[clap(short = 'e', long)] - exclude: Option, - - /// Include files in case of conflict between include and exclude patterns - #[clap(long)] - include_priority: bool, - - /// Optional output file path - #[clap(short = 'O', long = "output-file")] - output_file: Option, - - /// Output format: markdown, json, or xml - #[clap(short = 'F', long = "output-format", default_value = "markdown")] - output_format: OutputFormat, - - /// Optional Path to a custom Handlebars template - #[clap(short, long)] - template: Option, - - /// List the full directory tree - #[clap(long)] - full_directory_tree: bool, - - /// Optional tokenizer to use for token count - /// - /// Supported tokenizers: cl100k (default), p50k, p50k_edit, r50k, gpt2 - #[clap(short = 'c', long)] - encoding: Option, - - /// Display the token count of the generated prompt. - /// Accepts a format: "raw" (machine parsable) or "format" (human readable). - #[clap(long, value_name = "FORMAT", default_value = "format")] - tokens: TokenFormat, - - /// Include git diff - #[clap(short, long)] - diff: bool, - - /// Generate git diff between two branches - #[clap(long, value_name = "BRANCHES")] - git_diff_branch: Option, - - /// Retrieve git log between two branches - #[clap(long, value_name = "BRANCHES")] - git_log_branch: Option, - - /// Add line numbers to the source code - #[clap(short, long)] - line_number: bool, - - /// Use relative paths instead of absolute paths, including the parent directory - #[clap(long)] - relative_paths: bool, - - /// Follow symlinks - #[clap(short = 'L', long)] - follow_symlinks: bool, - - /// Include hidden directories and files - #[clap(long)] - hidden: bool, - - /// Disable wrapping code inside markdown code blocks - #[clap(long)] - no_codeblock: bool, - - /// Optional Disable copying to clipboard - #[clap(long)] - no_clipboard: bool, - - /// Skip .gitignore rules - #[clap(long)] - no_ignore: bool, - - /// Sort order for files: one of "name_asc", "name_desc", "date_asc", or "date_desc" - #[clap(long)] - sort: Option, - - #[arg(long, hide = true)] - clipboard_daemon: bool, -} fn main() -> Result<()> { env_logger::init(); @@ -124,7 +29,7 @@ fn main() -> Result<()> { // ~~~ Clipboard Daemon ~~~ #[cfg(target_os = "linux")] { - use code2prompt::serve_clipboard_daemon; + use code2prompt::cli::clipboard::serve_clipboard_daemon; if args.clipboard_daemon { info! {"Serving clipboard daemon..."}; serve_clipboard_daemon()?; @@ -156,7 +61,6 @@ fn main() -> Result<()> { }; // ~~~ Traverse the directory ~~~ - let create_tree = traverse_directory( &args.path, &include_patterns, @@ -300,7 +204,7 @@ fn main() -> Result<()> { if !args.no_clipboard { #[cfg(target_os = "linux")] { - use code2prompt::spawn_clipboard_daemon; + use code2prompt::cli::clipboard::spawn_clipboard_daemon; spawn_clipboard_daemon(&rendered)?; } #[cfg(not(target_os = "linux"))] diff --git a/tests/filter_test.rs b/tests/filter_test.rs index 81cf71d..51632e9 100644 --- a/tests/filter_test.rs +++ b/tests/filter_test.rs @@ -1,7 +1,7 @@ /// This file tests the filter logic /// Code2prompt uses the file globbing and globpattern to match files /// Therefore you can match files: -use code2prompt::filter::should_include_file; +use code2prompt::engine::filter::should_include_file; use colored::*; use once_cell::sync::Lazy; use std::fs::{self, File}; diff --git a/tests/git_test.rs b/tests/git_test.rs index 6b5b3df..a8739fc 100644 --- a/tests/git_test.rs +++ b/tests/git_test.rs @@ -1,4 +1,4 @@ -use code2prompt::git::{get_git_diff, get_git_diff_between_branches, get_git_log}; +use code2prompt::engine::git::{get_git_diff, get_git_diff_between_branches, get_git_log}; #[cfg(test)] mod tests { diff --git a/tests/sort_test.rs b/tests/sort_test.rs index 639782d..5403c3b 100644 --- a/tests/sort_test.rs +++ b/tests/sort_test.rs @@ -1,4 +1,4 @@ -use code2prompt::{sort_files, sort_tree, FileSortMethod}; +use code2prompt::engine::sort::{sort_files, sort_tree, FileSortMethod}; #[cfg(test)] mod tests { diff --git a/tests/template_test.rs b/tests/template_test.rs index ecbef7a..9172ca0 100644 --- a/tests/template_test.rs +++ b/tests/template_test.rs @@ -1,4 +1,6 @@ -use code2prompt::template::{extract_undefined_variables, handlebars_setup, render_template}; +use code2prompt::engine::template::{ + extract_undefined_variables, handlebars_setup, render_template, +}; #[cfg(test)] mod tests { diff --git a/tests/util_test.rs b/tests/util_test.rs index bce3203..4ed7d90 100644 --- a/tests/util_test.rs +++ b/tests/util_test.rs @@ -1,4 +1,4 @@ -use code2prompt::util::strip_utf8_bom; +use code2prompt::engine::util::strip_utf8_bom; #[cfg(test)] mod tests { From a21319c6e53b5788d5b61387c9a93c0dc51f99e5 Mon Sep 17 00:00:00 2001 From: Olivier D'Ancona Date: Fri, 28 Feb 2025 11:15:08 -0800 Subject: [PATCH 03/13] Introducing Rye for SDK --- .python-version | 1 + Cargo.lock | 40 ++++++++-------- pyproject.toml | 48 ++++++++++++------- .../__init__.py | 0 .../code2prompt.py | 0 requirements-dev.lock | 22 +++++++++ requirements.lock | 22 +++++++++ 7 files changed, 96 insertions(+), 37 deletions(-) create mode 100644 .python-version rename python-sdk/{code2prompt => code2prompt_rs}/__init__.py (100%) rename python-sdk/{code2prompt => code2prompt_rs}/code2prompt.py (100%) create mode 100644 requirements-dev.lock create mode 100644 requirements.lock diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..c10780c --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.13.1 diff --git a/Cargo.lock b/Cargo.lock index afa7969..3dfb7ac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -229,9 +229,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "cc" -version = "1.2.15" +version = "1.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c736e259eea577f443d5c86c304f9f4ae0295c43f3ba05c21f1d66b5f06001af" +checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" dependencies = [ "jobserver", "libc", @@ -774,9 +774,9 @@ checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "globset" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" +checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5" dependencies = [ "aho-corasick", "bstr", @@ -1141,9 +1141,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "litemap" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" [[package]] name = "lock_api" @@ -1560,9 +1560,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fe09249128b3173d092de9523eaa75136bf7ba85e0d69eca241c7939c933cc" +checksum = "7778bffd85cf38175ac1f545509665d0b9b92a198ca7941f131f85f7a4f9a872" dependencies = [ "cfg-if", "indoc", @@ -1578,9 +1578,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd3927b5a78757a0d71aa9dff669f903b1eb64b54142a9bd9f757f8fde65fd7" +checksum = "94f6cbe86ef3bf18998d9df6e0f3fc1050a8c5efa409bf712e661a4366e010fb" dependencies = [ "once_cell", "python3-dll-a", @@ -1589,9 +1589,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dab6bb2102bd8f991e7749f130a70d05dd557613e39ed2deeee8e9ca0c4d548d" +checksum = "e9f1b4c431c0bb1c8fb0a338709859eed0d030ff6daa34368d3b152a63dfdd8d" dependencies = [ "libc", "pyo3-build-config", @@ -1599,9 +1599,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91871864b353fd5ffcb3f91f2f703a22a9797c91b9ab497b1acac7b07ae509c7" +checksum = "fbc2201328f63c4710f68abdf653c89d8dbc2858b88c5d88b0ff38a75288a9da" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1611,9 +1611,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.23.4" +version = "0.23.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43abc3b80bc20f3facd86cd3c60beed58c3e2aa26213f3cda368de39c60a27e4" +checksum = "fca6726ad0f3da9c9de093d6f116a93c1a38e417ed73bf138472cf4064f72028" dependencies = [ "heck", "proc-macro2", @@ -2435,18 +2435,18 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", diff --git a/pyproject.toml b/pyproject.toml index f446979..94e58c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,37 +1,51 @@ -[build-system] -requires = ["maturin>=1.4,<2.0"] -build-backend = "maturin" - [project] -name = "code2prompt" -version = "2.0.0" -description = "Python bindings for code2prompt - A tool to generate LLM prompts from codebases" +name = "code2prompt-rs" +version = "3.0.0" +description = "Python bindings for code2prompt" authors = [ - {name = "Mufeed VH", email = "mufeed@lyminal.space"}, + { name = "Mufeed VH", email = "contact@mufeedvh.com" }, + { name = "Olivier D'Ancona", email = "olivier.dancona@master.hes-so.ch" }, ] +dependencies = ["maturin>=1.8.2", "pytest>=8.3.4"] readme = "README.md" -requires-python = ">=3.12" +requires-python = ">= 3.11" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Rust", "Topic :: Software Development :: Libraries :: Python Modules", ] -[project.urls] -Homepage = "https://github.com/mufeedvh/code2prompt" -Documentation = "https://github.com/mufeedvh/code2prompt" -Repository = "https://github.com/mufeedvh/code2prompt" +[build-system] +requires = ["maturin>=1.8"] +build-backend = "maturin" [tool.maturin] +bindings = "pyo3" +manifest-path = "Cargo.toml" python-source = "python-sdk" +module-name = "code2prompt_rs" features = ["pyo3/extension-module"] -module-name = "code2prompt.code2prompt" \ No newline at end of file + +[tool.rye] +managed = true +dev-dependencies = ["maturin>=1.8.2"] + +[tool.rye.scripts] +build = "maturin develop" + +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.build.targets.wheel] +packages = ["src/python_sdk"] + +[project.urls] +Homepage = "https://code2prompt.dev" +Documentation = "https://code2prompt.dev/docs/welcome" +Repository = "https://github.com/mufeedvh/code2prompt" diff --git a/python-sdk/code2prompt/__init__.py b/python-sdk/code2prompt_rs/__init__.py similarity index 100% rename from python-sdk/code2prompt/__init__.py rename to python-sdk/code2prompt_rs/__init__.py diff --git a/python-sdk/code2prompt/code2prompt.py b/python-sdk/code2prompt_rs/code2prompt.py similarity index 100% rename from python-sdk/code2prompt/code2prompt.py rename to python-sdk/code2prompt_rs/code2prompt.py diff --git a/requirements-dev.lock b/requirements-dev.lock new file mode 100644 index 0000000..d022e1c --- /dev/null +++ b/requirements-dev.lock @@ -0,0 +1,22 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false +# with-sources: false +# generate-hashes: false +# universal: false + +-e file:. +iniconfig==2.0.0 + # via pytest +maturin==1.8.2 + # via code2prompt-rs +packaging==24.2 + # via pytest +pluggy==1.5.0 + # via pytest +pytest==8.3.4 + # via code2prompt-rs diff --git a/requirements.lock b/requirements.lock new file mode 100644 index 0000000..d022e1c --- /dev/null +++ b/requirements.lock @@ -0,0 +1,22 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false +# with-sources: false +# generate-hashes: false +# universal: false + +-e file:. +iniconfig==2.0.0 + # via pytest +maturin==1.8.2 + # via code2prompt-rs +packaging==24.2 + # via pytest +pluggy==1.5.0 + # via pytest +pytest==8.3.4 + # via code2prompt-rs From 8d6f892d667110a5014a4a4d94299875c5d9d631 Mon Sep 17 00:00:00 2001 From: Olivier D'Ancona Date: Fri, 28 Feb 2025 13:12:56 -0800 Subject: [PATCH 04/13] sdk step1 --- pyproject.toml | 6 +++--- requirements-dev.lock | 2 ++ requirements.lock | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 94e58c2..530b57a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,12 @@ [project] -name = "code2prompt-rs" +name = "code2prompt" version = "3.0.0" description = "Python bindings for code2prompt" authors = [ { name = "Mufeed VH", email = "contact@mufeedvh.com" }, { name = "Olivier D'Ancona", email = "olivier.dancona@master.hes-so.ch" }, ] -dependencies = ["maturin>=1.8.2", "pytest>=8.3.4"] +dependencies = ["maturin>=1.8.2", "pytest>=8.3.4", "pip>=25.0.1"] readme = "README.md" requires-python = ">= 3.11" classifiers = [ @@ -29,7 +29,7 @@ build-backend = "maturin" bindings = "pyo3" manifest-path = "Cargo.toml" python-source = "python-sdk" -module-name = "code2prompt_rs" +module-name = "code2prompt" features = ["pyo3/extension-module"] [tool.rye] diff --git a/requirements-dev.lock b/requirements-dev.lock index d022e1c..701eacb 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -16,6 +16,8 @@ maturin==1.8.2 # via code2prompt-rs packaging==24.2 # via pytest +pip==25.0.1 + # via code2prompt-rs pluggy==1.5.0 # via pytest pytest==8.3.4 diff --git a/requirements.lock b/requirements.lock index d022e1c..701eacb 100644 --- a/requirements.lock +++ b/requirements.lock @@ -16,6 +16,8 @@ maturin==1.8.2 # via code2prompt-rs packaging==24.2 # via pytest +pip==25.0.1 + # via code2prompt-rs pluggy==1.5.0 # via pytest pytest==8.3.4 From c63ab92a37f2b772f600a6c6b369401d56fd34a1 Mon Sep 17 00:00:00 2001 From: Olivier D'Ancona Date: Sat, 1 Mar 2025 10:58:45 -0800 Subject: [PATCH 05/13] Huge refactor -> --- crates/Cargo.toml | 3 ++ crates/code2prompt-cli/Cargo.toml | 16 ++++++++++ .../code2prompt-cli/src}/args.rs | 0 .../code2prompt-cli/src}/clipboard.rs | 0 {src => crates/code2prompt-cli/src}/main.rs | 6 ++-- .../code2prompt-python/.python-version | 0 crates/code2prompt-python/Cargo.toml | 12 ++++++++ .../code2prompt-python/build.rs | 0 .../code2prompt-python/pyproject.toml | 13 ++++++--- .../code2prompt-python/python-sdk}/.gitignore | 0 .../code2prompt-python/python-sdk}/README.md | 0 .../python-sdk}/__init__.py | 0 .../python-sdk/code2prompt}/__init__.py | 0 .../python-sdk/code2prompt/code2prompt.py.bak | 2 +- .../python-sdk}/examples/basic_usage.py | 2 +- .../code2prompt-python/requirements-dev.lock | 2 ++ .../code2prompt-python/requirements.lock | 2 ++ crates/code2prompt-python/src/lib.rs | 29 +++++++++++++++++++ .../code2prompt-python/src}/python.rs | 0 .gitignore => crates/code2prompt/.gitignore | 0 Cargo.lock => crates/code2prompt/Cargo.lock | 0 Cargo.toml => crates/code2prompt/Cargo.toml | 22 +++++++------- .../code2prompt/src}/default_template_md.hbs | 0 .../code2prompt/src}/default_template_xml.hbs | 0 .../code2prompt/src}/engine/filter.rs | 0 {src => crates/code2prompt/src}/engine/git.rs | 0 {src => crates/code2prompt/src}/engine/mod.rs | 0 .../code2prompt/src}/engine/path.rs | 0 .../code2prompt/src}/engine/sort.rs | 0 .../code2prompt/src}/engine/template.rs | 0 .../code2prompt/src}/engine/tokenizer.rs | 0 .../code2prompt/src}/engine/util.rs | 0 crates/code2prompt/src/lib.rs | 1 + .../binary-exploitation-ctf-solver.hbs | 0 .../code2prompt/templates}/claude-xml.hbs | 0 .../code2prompt/templates}/clean-up-code.hbs | 0 .../templates}/cryptography-ctf-solver.hbs | 0 .../templates}/document-the-code.hbs | 0 .../find-security-vulnerabilities.hbs | 0 .../code2prompt/templates}/fix-bugs.hbs | 0 .../templates}/improve-performance.hbs | 0 .../code2prompt/templates}/refactor.hbs | 0 .../reverse-engineering-ctf-solver.hbs | 0 .../code2prompt/templates}/web-ctf-solver.hbs | 0 .../templates}/write-git-commit.hbs | 0 .../templates}/write-github-pull-request.hbs | 0 .../templates}/write-github-readme.hbs | 0 .../code2prompt/tests}/clipboard_test.rs | 0 .../code2prompt/tests}/filter_test.rs | 0 .../code2prompt/tests}/git_test.rs | 0 .../code2prompt/tests}/integration_test.rs | 0 .../code2prompt/tests}/sort_test.rs | 0 .../code2prompt/tests}/template_test.rs | 0 .../code2prompt/tests}/util_test.rs | 0 python-sdk/setup.py | 20 ------------- src/bindings/mod.rs | 1 - src/lib.rs | 10 ------- 57 files changed, 91 insertions(+), 50 deletions(-) create mode 100644 crates/Cargo.toml create mode 100644 crates/code2prompt-cli/Cargo.toml rename {src/cli => crates/code2prompt-cli/src}/args.rs (100%) rename {src/cli => crates/code2prompt-cli/src}/clipboard.rs (100%) rename {src => crates/code2prompt-cli/src}/main.rs (98%) rename .python-version => crates/code2prompt-python/.python-version (100%) create mode 100644 crates/code2prompt-python/Cargo.toml rename build.rs => crates/code2prompt-python/build.rs (100%) rename pyproject.toml => crates/code2prompt-python/pyproject.toml (89%) rename {python-sdk => crates/code2prompt-python/python-sdk}/.gitignore (100%) rename {python-sdk => crates/code2prompt-python/python-sdk}/README.md (100%) rename {python-sdk => crates/code2prompt-python/python-sdk}/__init__.py (100%) rename {python-sdk/code2prompt_rs => crates/code2prompt-python/python-sdk/code2prompt}/__init__.py (100%) rename python-sdk/code2prompt_rs/code2prompt.py => crates/code2prompt-python/python-sdk/code2prompt/code2prompt.py.bak (94%) rename {python-sdk => crates/code2prompt-python/python-sdk}/examples/basic_usage.py (97%) rename requirements-dev.lock => crates/code2prompt-python/requirements-dev.lock (91%) rename requirements.lock => crates/code2prompt-python/requirements.lock (91%) create mode 100644 crates/code2prompt-python/src/lib.rs rename {src/bindings => crates/code2prompt-python/src}/python.rs (100%) rename .gitignore => crates/code2prompt/.gitignore (100%) rename Cargo.lock => crates/code2prompt/Cargo.lock (100%) rename Cargo.toml => crates/code2prompt/Cargo.toml (74%) rename {src => crates/code2prompt/src}/default_template_md.hbs (100%) rename {src => crates/code2prompt/src}/default_template_xml.hbs (100%) rename {src => crates/code2prompt/src}/engine/filter.rs (100%) rename {src => crates/code2prompt/src}/engine/git.rs (100%) rename {src => crates/code2prompt/src}/engine/mod.rs (100%) rename {src => crates/code2prompt/src}/engine/path.rs (100%) rename {src => crates/code2prompt/src}/engine/sort.rs (100%) rename {src => crates/code2prompt/src}/engine/template.rs (100%) rename {src => crates/code2prompt/src}/engine/tokenizer.rs (100%) rename {src => crates/code2prompt/src}/engine/util.rs (100%) create mode 100644 crates/code2prompt/src/lib.rs rename {templates => crates/code2prompt/templates}/binary-exploitation-ctf-solver.hbs (100%) rename {templates => crates/code2prompt/templates}/claude-xml.hbs (100%) rename {templates => crates/code2prompt/templates}/clean-up-code.hbs (100%) rename {templates => crates/code2prompt/templates}/cryptography-ctf-solver.hbs (100%) rename {templates => crates/code2prompt/templates}/document-the-code.hbs (100%) rename {templates => crates/code2prompt/templates}/find-security-vulnerabilities.hbs (100%) rename {templates => crates/code2prompt/templates}/fix-bugs.hbs (100%) rename {templates => crates/code2prompt/templates}/improve-performance.hbs (100%) rename {templates => crates/code2prompt/templates}/refactor.hbs (100%) rename {templates => crates/code2prompt/templates}/reverse-engineering-ctf-solver.hbs (100%) rename {templates => crates/code2prompt/templates}/web-ctf-solver.hbs (100%) rename {templates => crates/code2prompt/templates}/write-git-commit.hbs (100%) rename {templates => crates/code2prompt/templates}/write-github-pull-request.hbs (100%) rename {templates => crates/code2prompt/templates}/write-github-readme.hbs (100%) rename {tests => crates/code2prompt/tests}/clipboard_test.rs (100%) rename {tests => crates/code2prompt/tests}/filter_test.rs (100%) rename {tests => crates/code2prompt/tests}/git_test.rs (100%) rename {tests => crates/code2prompt/tests}/integration_test.rs (100%) rename {tests => crates/code2prompt/tests}/sort_test.rs (100%) rename {tests => crates/code2prompt/tests}/template_test.rs (100%) rename {tests => crates/code2prompt/tests}/util_test.rs (100%) delete mode 100644 python-sdk/setup.py delete mode 100644 src/bindings/mod.rs delete mode 100644 src/lib.rs diff --git a/crates/Cargo.toml b/crates/Cargo.toml new file mode 100644 index 0000000..4153952 --- /dev/null +++ b/crates/Cargo.toml @@ -0,0 +1,3 @@ +[workspace] +members = ["code2prompt", "code2prompt-cli", "code2prompt-python"] +resolver = "2" diff --git a/crates/code2prompt-cli/Cargo.toml b/crates/code2prompt-cli/Cargo.toml new file mode 100644 index 0000000..efe72ee --- /dev/null +++ b/crates/code2prompt-cli/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "code2prompt-cli" +version = "3.0.0" +edition = "2021" +description = "Command-line interface for code2prompt" +license = "MIT" +repository = "https://github.com/mufeedvh/code2prompt" + +[dependencies] +code2prompt = { path = "../code2prompt" } +clap = { version = "4.0", features = ["derive"] } +env_logger = "0.11" + +[[bin]] +name = "code2prompt" +path = "src/main.rs" diff --git a/src/cli/args.rs b/crates/code2prompt-cli/src/args.rs similarity index 100% rename from src/cli/args.rs rename to crates/code2prompt-cli/src/args.rs diff --git a/src/cli/clipboard.rs b/crates/code2prompt-cli/src/clipboard.rs similarity index 100% rename from src/cli/clipboard.rs rename to crates/code2prompt-cli/src/clipboard.rs diff --git a/src/main.rs b/crates/code2prompt-cli/src/main.rs similarity index 98% rename from src/main.rs rename to crates/code2prompt-cli/src/main.rs index cbfa3ee..0f38bd7 100644 --- a/src/main.rs +++ b/crates/code2prompt-cli/src/main.rs @@ -4,7 +4,7 @@ use anyhow::{Context, Result}; use clap::Parser; -use code2prompt::cli::args::Cli; +use code2prompt-cli::args::Cli; use code2prompt::engine::{ git::{get_git_diff, get_git_diff_between_branches, get_git_log}, @@ -29,7 +29,7 @@ fn main() -> Result<()> { // ~~~ Clipboard Daemon ~~~ #[cfg(target_os = "linux")] { - use code2prompt::cli::clipboard::serve_clipboard_daemon; + use code2prompt-cli::clipboard::serve_clipboard_daemon; if args.clipboard_daemon { info! {"Serving clipboard daemon..."}; serve_clipboard_daemon()?; @@ -204,7 +204,7 @@ fn main() -> Result<()> { if !args.no_clipboard { #[cfg(target_os = "linux")] { - use code2prompt::cli::clipboard::spawn_clipboard_daemon; + use code2prompt-cli::clipboard::spawn_clipboard_daemon; spawn_clipboard_daemon(&rendered)?; } #[cfg(not(target_os = "linux"))] diff --git a/.python-version b/crates/code2prompt-python/.python-version similarity index 100% rename from .python-version rename to crates/code2prompt-python/.python-version diff --git a/crates/code2prompt-python/Cargo.toml b/crates/code2prompt-python/Cargo.toml new file mode 100644 index 0000000..35563cc --- /dev/null +++ b/crates/code2prompt-python/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "code2prompt-python" +version = "3.0.0" +edition = "2021" + +[lib] +name = "code2prompt_python" +crate-type = ["cdylib"] + +[dependencies] +pyo3 = { version = "0.23", features = ["extension-module", "abi3-py312"] } +code2prompt-core = { path = "../code2prompt-core" } diff --git a/build.rs b/crates/code2prompt-python/build.rs similarity index 100% rename from build.rs rename to crates/code2prompt-python/build.rs diff --git a/pyproject.toml b/crates/code2prompt-python/pyproject.toml similarity index 89% rename from pyproject.toml rename to crates/code2prompt-python/pyproject.toml index 530b57a..b7aeaa5 100644 --- a/pyproject.toml +++ b/crates/code2prompt-python/pyproject.toml @@ -1,12 +1,17 @@ [project] -name = "code2prompt" +name = "code2prompt_rs" version = "3.0.0" description = "Python bindings for code2prompt" authors = [ { name = "Mufeed VH", email = "contact@mufeedvh.com" }, { name = "Olivier D'Ancona", email = "olivier.dancona@master.hes-so.ch" }, ] -dependencies = ["maturin>=1.8.2", "pytest>=8.3.4", "pip>=25.0.1"] +dependencies = [ + "maturin>=1.8.2", + "pytest>=8.3.4", + "pip>=25.0.1", + "patchelf>=0.17.2.1", +] readme = "README.md" requires-python = ">= 3.11" classifiers = [ @@ -22,14 +27,14 @@ classifiers = [ ] [build-system] -requires = ["maturin>=1.8"] +requires = ["maturin"] build-backend = "maturin" [tool.maturin] bindings = "pyo3" +module-name = "code2prompt" manifest-path = "Cargo.toml" python-source = "python-sdk" -module-name = "code2prompt" features = ["pyo3/extension-module"] [tool.rye] diff --git a/python-sdk/.gitignore b/crates/code2prompt-python/python-sdk/.gitignore similarity index 100% rename from python-sdk/.gitignore rename to crates/code2prompt-python/python-sdk/.gitignore diff --git a/python-sdk/README.md b/crates/code2prompt-python/python-sdk/README.md similarity index 100% rename from python-sdk/README.md rename to crates/code2prompt-python/python-sdk/README.md diff --git a/python-sdk/__init__.py b/crates/code2prompt-python/python-sdk/__init__.py similarity index 100% rename from python-sdk/__init__.py rename to crates/code2prompt-python/python-sdk/__init__.py diff --git a/python-sdk/code2prompt_rs/__init__.py b/crates/code2prompt-python/python-sdk/code2prompt/__init__.py similarity index 100% rename from python-sdk/code2prompt_rs/__init__.py rename to crates/code2prompt-python/python-sdk/code2prompt/__init__.py diff --git a/python-sdk/code2prompt_rs/code2prompt.py b/crates/code2prompt-python/python-sdk/code2prompt/code2prompt.py.bak similarity index 94% rename from python-sdk/code2prompt_rs/code2prompt.py rename to crates/code2prompt-python/python-sdk/code2prompt/code2prompt.py.bak index f172821..1d49235 100644 --- a/python-sdk/code2prompt_rs/code2prompt.py +++ b/crates/code2prompt-python/python-sdk/code2prompt/code2prompt.py.bak @@ -1,5 +1,5 @@ # Import the Rust module -from code2prompt import CodePrompt as RustCodePrompt +from code2prompt_rs import CodePrompt as RustCodePrompt class CodePrompt: def __init__(self, path, include_patterns=None, exclude_patterns=None, diff --git a/python-sdk/examples/basic_usage.py b/crates/code2prompt-python/python-sdk/examples/basic_usage.py similarity index 97% rename from python-sdk/examples/basic_usage.py rename to crates/code2prompt-python/python-sdk/examples/basic_usage.py index aaf36ed..425633d 100644 --- a/python-sdk/examples/basic_usage.py +++ b/crates/code2prompt-python/python-sdk/examples/basic_usage.py @@ -1,6 +1,6 @@ """Example usage of the code2prompt Python SDK.""" -from code2prompt import CodePrompt +from code2prompt_rs import CodePrompt def main(): # Create a CodePrompt instance for the current directory diff --git a/requirements-dev.lock b/crates/code2prompt-python/requirements-dev.lock similarity index 91% rename from requirements-dev.lock rename to crates/code2prompt-python/requirements-dev.lock index 701eacb..d45fbe1 100644 --- a/requirements-dev.lock +++ b/crates/code2prompt-python/requirements-dev.lock @@ -16,6 +16,8 @@ maturin==1.8.2 # via code2prompt-rs packaging==24.2 # via pytest +patchelf==0.17.2.1 + # via code2prompt-rs pip==25.0.1 # via code2prompt-rs pluggy==1.5.0 diff --git a/requirements.lock b/crates/code2prompt-python/requirements.lock similarity index 91% rename from requirements.lock rename to crates/code2prompt-python/requirements.lock index 701eacb..d45fbe1 100644 --- a/requirements.lock +++ b/crates/code2prompt-python/requirements.lock @@ -16,6 +16,8 @@ maturin==1.8.2 # via code2prompt-rs packaging==24.2 # via pytest +patchelf==0.17.2.1 + # via code2prompt-rs pip==25.0.1 # via code2prompt-rs pluggy==1.5.0 diff --git a/crates/code2prompt-python/src/lib.rs b/crates/code2prompt-python/src/lib.rs new file mode 100644 index 0000000..455c2f2 --- /dev/null +++ b/crates/code2prompt-python/src/lib.rs @@ -0,0 +1,29 @@ +use code2prompt::engine::path::traverse_directory; +use code2prompt::engine::template::render_template; +use pyo3::prelude::*; + +/// A Python module implemented in Rust. +#[pymodule(name = "code2prompt_rs")] +fn code2prompt(_py: Python, m: &PyModule) -> PyResult<()> { + m.add_class::()?; + Ok(()) +} + +#[pyclass] +struct CodePrompt { + path: String, +} + +#[pymethods] +impl CodePrompt { + #[new] + fn new(path: String) -> Self { + Self { path } + } + + fn generate(&self) -> PyResult { + let (tree, _files) = traverse_directory(&self.path); + let rendered = render_template(tree); + Ok(rendered) + } +} diff --git a/src/bindings/python.rs b/crates/code2prompt-python/src/python.rs similarity index 100% rename from src/bindings/python.rs rename to crates/code2prompt-python/src/python.rs diff --git a/.gitignore b/crates/code2prompt/.gitignore similarity index 100% rename from .gitignore rename to crates/code2prompt/.gitignore diff --git a/Cargo.lock b/crates/code2prompt/Cargo.lock similarity index 100% rename from Cargo.lock rename to crates/code2prompt/Cargo.lock diff --git a/Cargo.toml b/crates/code2prompt/Cargo.toml similarity index 74% rename from Cargo.toml rename to crates/code2prompt/Cargo.toml index dab5b20..5cfe4df 100644 --- a/Cargo.toml +++ b/crates/code2prompt/Cargo.toml @@ -1,12 +1,15 @@ [package] name = "code2prompt" version = "3.0.0" -authors = ["Mufeed VH ", "Olivier D'Ancona "] +authors = [ + "Mufeed VH ", + "Olivier D'Ancona ", +] description = "A command-line (CLI) tool to generate an LLM prompt from codebases of any size, fast." keywords = ["code", "prompt", "llm", "gpt", "ai", "agent", "glob"] categories = ["command-line-utilities", "development-tools"] -homepage = "https://github.com/mufeedvh/code2prompt" -documentation = "https://github.com/mufeedvh/code2prompt" +homepage = "https://code2prompt.dev" +documentation = "https://code2prompt.dev/docs/welcome" repository = "https://github.com/mufeedvh/code2prompt" license = "MIT" readme = "README.md" @@ -17,7 +20,6 @@ build = "build.rs" [features] default = ["cli"] cli = ["dep:clap", "dep:env_logger", "dep:arboard"] -bindings = ["dep:pyo3"] [dependencies] log = "0.4" @@ -32,7 +34,11 @@ ignore = "0.4.22" anyhow = "1.0.80" inquire = "0.7.1" regex = "1.10.3" -git2 = { version = "0.18.2", default-features = false, features = ["https", "vendored-libgit2", "vendored-openssl"] } +git2 = { version = "0.18.2", default-features = false, features = [ + "https", + "vendored-libgit2", + "vendored-openssl", +] } glob = "0.3.1" once_cell = "1.19.0" globset = "0.4.15" @@ -43,8 +49,6 @@ clap = { version = "4.0", features = ["derive"], optional = true } env_logger = { version = "0.11.3", optional = true } arboard = { version = "3.4.0", optional = true } -# bindings dependencies -pyo3 = { version = "0.23", features = ["extension-module", "abi3-py312", "generate-import-lib"], optional = true } [lib] name = "code2prompt" @@ -58,9 +62,7 @@ codegen-units = 1 [package.metadata.deb] section = "utility" -assets = [ - ["target/release/code2prompt", "/usr/bin/", "755"], -] +assets = [["target/release/code2prompt", "/usr/bin/", "755"]] [dev-dependencies] tempfile = "3.3" diff --git a/src/default_template_md.hbs b/crates/code2prompt/src/default_template_md.hbs similarity index 100% rename from src/default_template_md.hbs rename to crates/code2prompt/src/default_template_md.hbs diff --git a/src/default_template_xml.hbs b/crates/code2prompt/src/default_template_xml.hbs similarity index 100% rename from src/default_template_xml.hbs rename to crates/code2prompt/src/default_template_xml.hbs diff --git a/src/engine/filter.rs b/crates/code2prompt/src/engine/filter.rs similarity index 100% rename from src/engine/filter.rs rename to crates/code2prompt/src/engine/filter.rs diff --git a/src/engine/git.rs b/crates/code2prompt/src/engine/git.rs similarity index 100% rename from src/engine/git.rs rename to crates/code2prompt/src/engine/git.rs diff --git a/src/engine/mod.rs b/crates/code2prompt/src/engine/mod.rs similarity index 100% rename from src/engine/mod.rs rename to crates/code2prompt/src/engine/mod.rs diff --git a/src/engine/path.rs b/crates/code2prompt/src/engine/path.rs similarity index 100% rename from src/engine/path.rs rename to crates/code2prompt/src/engine/path.rs diff --git a/src/engine/sort.rs b/crates/code2prompt/src/engine/sort.rs similarity index 100% rename from src/engine/sort.rs rename to crates/code2prompt/src/engine/sort.rs diff --git a/src/engine/template.rs b/crates/code2prompt/src/engine/template.rs similarity index 100% rename from src/engine/template.rs rename to crates/code2prompt/src/engine/template.rs diff --git a/src/engine/tokenizer.rs b/crates/code2prompt/src/engine/tokenizer.rs similarity index 100% rename from src/engine/tokenizer.rs rename to crates/code2prompt/src/engine/tokenizer.rs diff --git a/src/engine/util.rs b/crates/code2prompt/src/engine/util.rs similarity index 100% rename from src/engine/util.rs rename to crates/code2prompt/src/engine/util.rs diff --git a/crates/code2prompt/src/lib.rs b/crates/code2prompt/src/lib.rs new file mode 100644 index 0000000..702e611 --- /dev/null +++ b/crates/code2prompt/src/lib.rs @@ -0,0 +1 @@ +pub mod engine; diff --git a/templates/binary-exploitation-ctf-solver.hbs b/crates/code2prompt/templates/binary-exploitation-ctf-solver.hbs similarity index 100% rename from templates/binary-exploitation-ctf-solver.hbs rename to crates/code2prompt/templates/binary-exploitation-ctf-solver.hbs diff --git a/templates/claude-xml.hbs b/crates/code2prompt/templates/claude-xml.hbs similarity index 100% rename from templates/claude-xml.hbs rename to crates/code2prompt/templates/claude-xml.hbs diff --git a/templates/clean-up-code.hbs b/crates/code2prompt/templates/clean-up-code.hbs similarity index 100% rename from templates/clean-up-code.hbs rename to crates/code2prompt/templates/clean-up-code.hbs diff --git a/templates/cryptography-ctf-solver.hbs b/crates/code2prompt/templates/cryptography-ctf-solver.hbs similarity index 100% rename from templates/cryptography-ctf-solver.hbs rename to crates/code2prompt/templates/cryptography-ctf-solver.hbs diff --git a/templates/document-the-code.hbs b/crates/code2prompt/templates/document-the-code.hbs similarity index 100% rename from templates/document-the-code.hbs rename to crates/code2prompt/templates/document-the-code.hbs diff --git a/templates/find-security-vulnerabilities.hbs b/crates/code2prompt/templates/find-security-vulnerabilities.hbs similarity index 100% rename from templates/find-security-vulnerabilities.hbs rename to crates/code2prompt/templates/find-security-vulnerabilities.hbs diff --git a/templates/fix-bugs.hbs b/crates/code2prompt/templates/fix-bugs.hbs similarity index 100% rename from templates/fix-bugs.hbs rename to crates/code2prompt/templates/fix-bugs.hbs diff --git a/templates/improve-performance.hbs b/crates/code2prompt/templates/improve-performance.hbs similarity index 100% rename from templates/improve-performance.hbs rename to crates/code2prompt/templates/improve-performance.hbs diff --git a/templates/refactor.hbs b/crates/code2prompt/templates/refactor.hbs similarity index 100% rename from templates/refactor.hbs rename to crates/code2prompt/templates/refactor.hbs diff --git a/templates/reverse-engineering-ctf-solver.hbs b/crates/code2prompt/templates/reverse-engineering-ctf-solver.hbs similarity index 100% rename from templates/reverse-engineering-ctf-solver.hbs rename to crates/code2prompt/templates/reverse-engineering-ctf-solver.hbs diff --git a/templates/web-ctf-solver.hbs b/crates/code2prompt/templates/web-ctf-solver.hbs similarity index 100% rename from templates/web-ctf-solver.hbs rename to crates/code2prompt/templates/web-ctf-solver.hbs diff --git a/templates/write-git-commit.hbs b/crates/code2prompt/templates/write-git-commit.hbs similarity index 100% rename from templates/write-git-commit.hbs rename to crates/code2prompt/templates/write-git-commit.hbs diff --git a/templates/write-github-pull-request.hbs b/crates/code2prompt/templates/write-github-pull-request.hbs similarity index 100% rename from templates/write-github-pull-request.hbs rename to crates/code2prompt/templates/write-github-pull-request.hbs diff --git a/templates/write-github-readme.hbs b/crates/code2prompt/templates/write-github-readme.hbs similarity index 100% rename from templates/write-github-readme.hbs rename to crates/code2prompt/templates/write-github-readme.hbs diff --git a/tests/clipboard_test.rs b/crates/code2prompt/tests/clipboard_test.rs similarity index 100% rename from tests/clipboard_test.rs rename to crates/code2prompt/tests/clipboard_test.rs diff --git a/tests/filter_test.rs b/crates/code2prompt/tests/filter_test.rs similarity index 100% rename from tests/filter_test.rs rename to crates/code2prompt/tests/filter_test.rs diff --git a/tests/git_test.rs b/crates/code2prompt/tests/git_test.rs similarity index 100% rename from tests/git_test.rs rename to crates/code2prompt/tests/git_test.rs diff --git a/tests/integration_test.rs b/crates/code2prompt/tests/integration_test.rs similarity index 100% rename from tests/integration_test.rs rename to crates/code2prompt/tests/integration_test.rs diff --git a/tests/sort_test.rs b/crates/code2prompt/tests/sort_test.rs similarity index 100% rename from tests/sort_test.rs rename to crates/code2prompt/tests/sort_test.rs diff --git a/tests/template_test.rs b/crates/code2prompt/tests/template_test.rs similarity index 100% rename from tests/template_test.rs rename to crates/code2prompt/tests/template_test.rs diff --git a/tests/util_test.rs b/crates/code2prompt/tests/util_test.rs similarity index 100% rename from tests/util_test.rs rename to crates/code2prompt/tests/util_test.rs diff --git a/python-sdk/setup.py b/python-sdk/setup.py deleted file mode 100644 index 46a0595..0000000 --- a/python-sdk/setup.py +++ /dev/null @@ -1,20 +0,0 @@ -from setuptools import setup, find_packages - -setup( - name="code2prompt", - version="2.0.0", - packages=find_packages(), - install_requires=[], - author="Mufeed VH", - author_email="contact@mufeedvh.com", - description="Python bindings for code2prompt", - long_description=open("README.md").read(), - long_description_content_type="text/markdown", - url="https://github.com/mufeedvh/code2prompt", - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - ], - python_requires=">=3.7", -) \ No newline at end of file diff --git a/src/bindings/mod.rs b/src/bindings/mod.rs deleted file mode 100644 index c0a088c..0000000 --- a/src/bindings/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod python; diff --git a/src/lib.rs b/src/lib.rs deleted file mode 100644 index 79b7cfb..0000000 --- a/src/lib.rs +++ /dev/null @@ -1,10 +0,0 @@ -pub mod engine; - -#[cfg(feature = "bindings")] -pub mod bindings; - -#[cfg(feature = "cli")] -pub mod cli { - pub mod args; - pub mod clipboard; -} From 0dcfcb7e95a96af83f543f7ee49da3dc7be7d755 Mon Sep 17 00:00:00 2001 From: Olivier D'Ancona Date: Sat, 1 Mar 2025 13:05:10 -0800 Subject: [PATCH 06/13] core + cli compile --- crates/{code2prompt => }/.gitignore | 0 crates/Cargo.lock | 2389 +++++++++++++++++ crates/Cargo.toml | 30 +- crates/code2prompt-cli/Cargo.toml | 9 +- crates/code2prompt-cli/src/args.rs | 3 +- crates/code2prompt-cli/src/clipboard.rs | 6 +- crates/code2prompt-cli/src/main.rs | 12 +- crates/code2prompt-python/Cargo.toml | 2 +- crates/code2prompt-python/src/python.rs | 4 +- crates/code2prompt/Cargo.toml | 54 +- .../build.rs | 0 crates/code2prompt/src/engine/path.rs | 1 - .../src => }/default_template_md.hbs | 0 .../src => }/default_template_xml.hbs | 0 14 files changed, 2460 insertions(+), 50 deletions(-) rename crates/{code2prompt => }/.gitignore (100%) create mode 100644 crates/Cargo.lock rename crates/{code2prompt-python => code2prompt}/build.rs (100%) rename crates/{code2prompt/src => }/default_template_md.hbs (100%) rename crates/{code2prompt/src => }/default_template_xml.hbs (100%) diff --git a/crates/code2prompt/.gitignore b/crates/.gitignore similarity index 100% rename from crates/code2prompt/.gitignore rename to crates/.gitignore diff --git a/crates/Cargo.lock b/crates/Cargo.lock new file mode 100644 index 0000000..09dc25f --- /dev/null +++ b/crates/Cargo.lock @@ -0,0 +1,2389 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +dependencies = [ + "anstyle", + "once_cell", + "windows-sys 0.59.0", +] + +[[package]] +name = "anyhow" +version = "1.0.96" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4" + +[[package]] +name = "arboard" +version = "3.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df099ccb16cd014ff054ac1bf392c67feeef57164b05c42f037cd40f5d4357f4" +dependencies = [ + "clipboard-win", + "core-graphics", + "image", + "log", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "parking_lot", + "windows-sys 0.48.0", + "x11rb", +] + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "assert_cmd" +version = "2.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1835b7f27878de8525dc71410b5a31cdcc5f230aed5ba5df968e09c201b23d" +dependencies = [ + "anstyle", + "bstr", + "doc-comment", + "libc", + "predicates 3.1.3", + "predicates-core", + "predicates-tree", + "wait-timeout", +] + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "bindgen" +version = "0.63.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36d860121800b2a9a94f9b5604b332d5cffb234ce17609ea479d723dbc9d3885" +dependencies = [ + "bitflags 1.3.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 1.0.109", + "which", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2", +] + +[[package]] +name = "bstr" +version = "1.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0" +dependencies = [ + "memchr", + "regex-automata", + "serde", +] + +[[package]] +name = "bumpalo" +version = "3.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" + +[[package]] +name = "bytemuck" +version = "1.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "cc" +version = "1.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" +dependencies = [ + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.5.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "clap_lex" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" + +[[package]] +name = "clipboard-win" +version = "5.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15efe7a882b08f34e38556b14f2fb3daa98769d06c7f0c1b076dfd0d983bc892" +dependencies = [ + "error-code", +] + +[[package]] +name = "code2prompt" +version = "3.0.0" +dependencies = [ + "anyhow", + "assert_cmd", + "colored", + "env_logger", + "git2", + "globset", + "handlebars", + "ignore", + "indicatif", + "inquire", + "jwalk", + "log", + "num-format", + "once_cell", + "predicates 2.1.5", + "regex", + "serde_json", + "tempfile", + "termtree 0.4.1", + "tiktoken-rs", +] + +[[package]] +name = "code2prompt-cli" +version = "3.0.0" +dependencies = [ + "anyhow", + "arboard", + "clap", + "code2prompt", + "colored", + "env_logger", + "indicatif", + "log", + "num-format", + "serde_json", +] + +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + +[[package]] +name = "colored" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" +dependencies = [ + "lazy_static", + "windows-sys 0.59.0", +] + +[[package]] +name = "console" +version = "0.15.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width 0.2.0", + "windows-sys 0.59.0", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-epoch", + "crossbeam-queue", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crossterm" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" +dependencies = [ + "bitflags 1.3.2", + "crossterm_winapi", + "libc", + "mio", + "parking_lot", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "doc-comment" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" + +[[package]] +name = "dyn-clone" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feeef44e73baff3a26d371801df019877a9866a8c493d315ab00177843314f35" + +[[package]] +name = "either" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d" + +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "env_filter" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "humantime", + "log", +] + +[[package]] +name = "errno" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "error-code" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d9305ccc6942a704f4335694ecd3de2ea531b114ac2d51f5f843750787a92f" + +[[package]] +name = "fancy-regex" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2" +dependencies = [ + "bit-set", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "flate2" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +dependencies = [ + "num-traits", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fuzzy-matcher" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" +dependencies = [ + "thread_local", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +dependencies = [ + "libc", + "windows-targets 0.48.5", +] + +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", +] + +[[package]] +name = "git2" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" +dependencies = [ + "bitflags 2.9.0", + "libc", + "libgit2-sys", + "log", + "openssl-probe", + "openssl-sys", + "url", +] + +[[package]] +name = "glob" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + +[[package]] +name = "globset" +version = "0.4.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5" +dependencies = [ + "aho-corasick", + "bstr", + "log", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "handlebars" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faa67bab9ff362228eb3d00bd024a4965d8231bbb7921167f0cfa66c6626b225" +dependencies = [ + "log", + "pest", + "pest_derive", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "home" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "ignore" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" +dependencies = [ + "crossbeam-deque", + "globset", + "log", + "memchr", + "regex-automata", + "same-file", + "walkdir", + "winapi-util", +] + +[[package]] +name = "image" +version = "0.25.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" +dependencies = [ + "bytemuck", + "byteorder-lite", + "num-traits", + "png", + "tiff", +] + +[[package]] +name = "indicatif" +version = "0.17.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" +dependencies = [ + "console", + "number_prefix", + "portable-atomic", + "unicode-width 0.2.0", + "web-time", +] + +[[package]] +name = "inquire" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fddf93031af70e75410a2511ec04d49e758ed2f26dad3404a934e0fb45cc12a" +dependencies = [ + "bitflags 2.9.0", + "crossterm", + "dyn-clone", + "fuzzy-matcher", + "fxhash", + "newline-converter", + "once_cell", + "unicode-segmentation", + "unicode-width 0.1.14", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[package]] +name = "jpeg-decoder" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "jwalk" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2735847566356cd2179a2a38264839308f7079fa96e6bd5a42d740460e003c56" +dependencies = [ + "crossbeam", + "rayon", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.170" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828" + +[[package]] +name = "libgit2-sys" +version = "0.16.2+1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", +] + +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] + +[[package]] +name = "libz-sys" +version = "1.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9b68e50e6e0b26f672573834882eb57759f6db9b3be2ea3c35c91188bb4eaa" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", +] + +[[package]] +name = "newline-converter" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b6b097ecb1cbfed438542d16e84fd7ad9b0c76c8a65b7f9039212a3d14dc7f" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "normalize-line-endings" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" + +[[package]] +name = "num-format" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" +dependencies = [ + "arrayvec", + "cfg-if", + "encoding_rs", + "itoa", + "lazy_static", + "libc", + "num-format-windows", + "widestring", + "winapi", +] + +[[package]] +name = "num-format-windows" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b1e07f67225c1eb911d16c2f72492669c1fb08212dbfaa1f6cfbeb119152cfa" +dependencies = [ + "bindgen", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.9.0", + "block2", + "libc", + "objc2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.9.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.9.0", + "block2", + "libc", + "objc2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.9.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.9.0", + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "once_cell" +version = "1.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-src" +version = "300.4.2+3.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168ce4e058f975fe43e89d9ccf78ca668601887ae736090aacc23ae353c298e2" +dependencies = [ + "cc", +] + +[[package]] +name = "openssl-sys" +version = "0.9.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" +dependencies = [ + "cc", + "libc", + "openssl-src", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" +dependencies = [ + "memchr", + "thiserror 2.0.11", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816518421cfc6887a0d62bf441b6ffb4536fcc926395a69e1a85852d4363f57e" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d1396fd3a870fc7838768d171b4616d5c91f6cc25e377b673d714567d99377b" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "pest_meta" +version = "2.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea" +dependencies = [ + "once_cell", + "pest", + "sha2", +] + +[[package]] +name = "pkg-config" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "png" +version = "0.17.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "portable-atomic" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" + +[[package]] +name = "predicates" +version = "2.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" +dependencies = [ + "difflib", + "float-cmp", + "itertools", + "normalize-line-endings", + "predicates-core", + "regex", +] + +[[package]] +name = "predicates" +version = "3.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" +dependencies = [ + "anstyle", + "difflib", + "predicates-core", +] + +[[package]] +name = "predicates-core" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" + +[[package]] +name = "predicates-tree" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" +dependencies = [ + "predicates-core", + "termtree 0.5.1", +] + +[[package]] +name = "proc-macro2" +version = "1.0.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b568323e98e49e2a0899dcee453dd679fae22d69adf9b11dd508d1549b7e2f" +dependencies = [ + "bitflags 2.9.0", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.9.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "ryu" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.218" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.218" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "serde_json" +version = "1.0.139" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" +dependencies = [ + "libc", + "mio", + "signal-hook", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "smallvec" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "tempfile" +version = "3.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" +dependencies = [ + "cfg-if", + "fastrand", + "getrandom", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "termtree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" + +[[package]] +name = "termtree" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" +dependencies = [ + "thiserror-impl 2.0.11", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tiff" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" +dependencies = [ + "flate2", + "jpeg-decoder", + "weezl", +] + +[[package]] +name = "tiktoken-rs" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44075987ee2486402f0808505dd65692163d243a337fc54363d49afac41087f6" +dependencies = [ + "anyhow", + "base64", + "bstr", + "fancy-regex", + "lazy_static", + "parking_lot", + "regex", + "rustc-hash", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "typenum" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "unicode-ident" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wait-timeout" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" +dependencies = [ + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +dependencies = [ + "cfg-if", + "once_cell", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn 2.0.98", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "weezl" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "widestring" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.9.0", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "x11rb" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" +dependencies = [ + "gethostname", + "rustix", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", + "synstructure", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] diff --git a/crates/Cargo.toml b/crates/Cargo.toml index 4153952..4e4cf00 100644 --- a/crates/Cargo.toml +++ b/crates/Cargo.toml @@ -1,3 +1,31 @@ [workspace] -members = ["code2prompt", "code2prompt-cli", "code2prompt-python"] resolver = "2" +members = ["code2prompt", "code2prompt-cli"] + +[profile.release] +lto = "thin" +panic = 'abort' +codegen-units = 1 + + +[workspace.dependencies] +anyhow = "1.0.80" +colored = "2.1.0" +indicatif = "0.17.8" +log = "0.4" +num-format = { version = "0.4.4", features = ["with-system-locale"] } +serde_json = "1.0.114" +handlebars = "4.3" +jwalk = "0.8" +termtree = "0.4" +tiktoken-rs = "0.6.0" +ignore = "0.4.22" +inquire = "0.7.1" +regex = "1.10.3" +git2 = { version = "0.18.2", default-features = false, features = [ + "https", + "vendored-libgit2", + "vendored-openssl", +] } +once_cell = "1.19.0" +globset = "0.4.15" diff --git a/crates/code2prompt-cli/Cargo.toml b/crates/code2prompt-cli/Cargo.toml index efe72ee..48901e5 100644 --- a/crates/code2prompt-cli/Cargo.toml +++ b/crates/code2prompt-cli/Cargo.toml @@ -9,7 +9,14 @@ repository = "https://github.com/mufeedvh/code2prompt" [dependencies] code2prompt = { path = "../code2prompt" } clap = { version = "4.0", features = ["derive"] } -env_logger = "0.11" +env_logger = { version = "0.11.3" } +arboard = { version = "3.4.0" } +anyhow = { workspace = true } +colored = { workspace = true } +indicatif = { workspace = true } +log = { workspace = true } +num-format = { workspace = true } +serde_json = { workspace = true } [[bin]] name = "code2prompt" diff --git a/crates/code2prompt-cli/src/args.rs b/crates/code2prompt-cli/src/args.rs index 8b1474a..b240b64 100644 --- a/crates/code2prompt-cli/src/args.rs +++ b/crates/code2prompt-cli/src/args.rs @@ -1,6 +1,5 @@ -use crate::engine::template::OutputFormat; -use crate::engine::tokenizer::TokenFormat; use clap::Parser; +use code2prompt::engine::{template::OutputFormat, tokenizer::TokenFormat}; use std::path::PathBuf; // ~~~ CLI Arguments ~~~ diff --git a/crates/code2prompt-cli/src/clipboard.rs b/crates/code2prompt-cli/src/clipboard.rs index cb3d90c..e1e5517 100644 --- a/crates/code2prompt-cli/src/clipboard.rs +++ b/crates/code2prompt-cli/src/clipboard.rs @@ -1,6 +1,6 @@ -use anyhow::{Context, Result}; -use arboard::Clipboard; +use anyhow::Context; +#[cfg(not(target_os = "linux"))] /// Copies the provided text to the system clipboard. /// /// This is a simple, one-shot copy operation suitable for non-Linux platforms @@ -14,6 +14,8 @@ use arboard::Clipboard; /// /// * `Result<()>` - Returns Ok on success, or an error if the clipboard could not be accessed. pub fn copy_text_to_clipboard(rendered: &str) -> Result<()> { + use anyhow::Result; + use arboard::Clipboard; match Clipboard::new() { Ok(mut clipboard) => { clipboard diff --git a/crates/code2prompt-cli/src/main.rs b/crates/code2prompt-cli/src/main.rs index 0f38bd7..1c0b749 100644 --- a/crates/code2prompt-cli/src/main.rs +++ b/crates/code2prompt-cli/src/main.rs @@ -1,10 +1,12 @@ //! code2prompt is a command-line tool to generate an LLM prompt from a codebase directory. //! //! Authors: Mufeed VH (@mufeedvh), Olivier D'Ancona (@ODAncona) +mod args; +mod clipboard; use anyhow::{Context, Result}; +use args::Cli; use clap::Parser; -use code2prompt-cli::args::Cli; use code2prompt::engine::{ git::{get_git_diff, get_git_diff_between_branches, get_git_log}, @@ -29,7 +31,7 @@ fn main() -> Result<()> { // ~~~ Clipboard Daemon ~~~ #[cfg(target_os = "linux")] { - use code2prompt-cli::clipboard::serve_clipboard_daemon; + use clipboard::serve_clipboard_daemon; if args.clipboard_daemon { info! {"Serving clipboard daemon..."}; serve_clipboard_daemon()?; @@ -204,7 +206,7 @@ fn main() -> Result<()> { if !args.no_clipboard { #[cfg(target_os = "linux")] { - use code2prompt-cli::clipboard::spawn_clipboard_daemon; + use clipboard::spawn_clipboard_daemon; spawn_clipboard_daemon(&rendered)?; } #[cfg(not(target_os = "linux"))] @@ -300,11 +302,11 @@ fn get_template(args: &Cli) -> Result<(String, String)> { } else { match format { OutputFormat::Markdown | OutputFormat::Json => Ok(( - include_str!("default_template_md.hbs").to_string(), + include_str!("../../default_template_md.hbs").to_string(), "markdown".to_string(), )), OutputFormat::Xml => Ok(( - include_str!("default_template_xml.hbs").to_string(), + include_str!("../../default_template_xml.hbs").to_string(), "xml".to_string(), )), } diff --git a/crates/code2prompt-python/Cargo.toml b/crates/code2prompt-python/Cargo.toml index 35563cc..354da5b 100644 --- a/crates/code2prompt-python/Cargo.toml +++ b/crates/code2prompt-python/Cargo.toml @@ -9,4 +9,4 @@ crate-type = ["cdylib"] [dependencies] pyo3 = { version = "0.23", features = ["extension-module", "abi3-py312"] } -code2prompt-core = { path = "../code2prompt-core" } +code2prompt = { path = "../code2prompt" } diff --git a/crates/code2prompt-python/src/python.rs b/crates/code2prompt-python/src/python.rs index c241ec0..af2c4a8 100644 --- a/crates/code2prompt-python/src/python.rs +++ b/crates/code2prompt-python/src/python.rs @@ -119,8 +119,8 @@ impl CodePrompt { .map_err(|e| PyErr::new::(e.to_string()))?; // Setup template - let template_content = - template.unwrap_or_else(|| include_str!("../default_template_md.hbs").to_string()); + let template_content = template + .unwrap_or_else(|| include_str!("../../default_template_md.hbs").to_string()); let handlebars = handlebars_setup(&template_content, "template") .map_err(|e| PyErr::new::(e.to_string()))?; diff --git a/crates/code2prompt/Cargo.toml b/crates/code2prompt/Cargo.toml index 5cfe4df..c774f06 100644 --- a/crates/code2prompt/Cargo.toml +++ b/crates/code2prompt/Cargo.toml @@ -18,47 +18,31 @@ edition = "2021" build = "build.rs" [features] -default = ["cli"] -cli = ["dep:clap", "dep:env_logger", "dep:arboard"] +default = [] [dependencies] -log = "0.4" -handlebars = "4.3" -jwalk = "0.8" -termtree = "0.4" -serde_json = "1.0.114" -indicatif = "0.17.8" -colored = "2.1.0" -tiktoken-rs = "0.6.0" -ignore = "0.4.22" -anyhow = "1.0.80" -inquire = "0.7.1" -regex = "1.10.3" -git2 = { version = "0.18.2", default-features = false, features = [ - "https", - "vendored-libgit2", - "vendored-openssl", -] } -glob = "0.3.1" -once_cell = "1.19.0" -globset = "0.4.15" -num-format = { version = "0.4.4", features = ["with-system-locale"] } - -# cli dependencies -clap = { version = "4.0", features = ["derive"], optional = true } -env_logger = { version = "0.11.3", optional = true } -arboard = { version = "3.4.0", optional = true } - +anyhow = { workspace = true } +colored = { workspace = true } +indicatif = { workspace = true } +log = { workspace = true } +num-format = { workspace = true } +serde_json = { workspace = true } +handlebars = { workspace = true } +jwalk = { workspace = true } +termtree = { workspace = true } +tiktoken-rs = { workspace = true } +ignore = { workspace = true } +inquire = { workspace = true } +regex = { workspace = true } +git2 = { workspace = true } +once_cell = { workspace = true } +globset = { workspace = true } [lib] name = "code2prompt" path = "src/lib.rs" -crate-type = ["cdylib", "rlib"] - -[profile.release] -lto = "thin" -panic = 'abort' -codegen-units = 1 +# crate-type = ["cdylib", "rlib"] +crate-type = ["rlib"] [package.metadata.deb] section = "utility" diff --git a/crates/code2prompt-python/build.rs b/crates/code2prompt/build.rs similarity index 100% rename from crates/code2prompt-python/build.rs rename to crates/code2prompt/build.rs diff --git a/crates/code2prompt/src/engine/path.rs b/crates/code2prompt/src/engine/path.rs index 16082a3..cec8ae5 100644 --- a/crates/code2prompt/src/engine/path.rs +++ b/crates/code2prompt/src/engine/path.rs @@ -1,5 +1,4 @@ //! This module contains the functions for traversing the directory and processing the files. - use crate::engine::filter::should_include_file; use crate::engine::sort::{sort_files, sort_tree, FileSortMethod}; use crate::engine::util::strip_utf8_bom; diff --git a/crates/code2prompt/src/default_template_md.hbs b/crates/default_template_md.hbs similarity index 100% rename from crates/code2prompt/src/default_template_md.hbs rename to crates/default_template_md.hbs diff --git a/crates/code2prompt/src/default_template_xml.hbs b/crates/default_template_xml.hbs similarity index 100% rename from crates/code2prompt/src/default_template_xml.hbs rename to crates/default_template_xml.hbs From 551df6cfaac6660e5466c36888682489422e92a4 Mon Sep 17 00:00:00 2001 From: Olivier D'Ancona Date: Sat, 1 Mar 2025 13:28:18 -0800 Subject: [PATCH 07/13] cli -> code2prompt, engine -> code2prompt-core, sdk -> code2prompt-python --- crates/Cargo.lock | 32 +++++------ crates/Cargo.toml | 2 +- crates/code2prompt-cli/Cargo.toml | 23 -------- .../Cargo.lock | 0 crates/code2prompt-core/Cargo.toml | 55 +++++++++++++++++++ .../build.rs | 0 .../engine => code2prompt-core/src}/filter.rs | 0 .../engine => code2prompt-core/src}/git.rs | 0 .../mod.rs => code2prompt-core/src/lib.rs} | 0 crates/code2prompt-core/src/mod.rs | 7 +++ .../engine => code2prompt-core/src}/path.rs | 6 +- .../engine => code2prompt-core/src}/sort.rs | 0 .../src}/template.rs | 0 .../src}/tokenizer.rs | 0 .../engine => code2prompt-core/src}/util.rs | 0 .../binary-exploitation-ctf-solver.hbs | 0 .../templates/claude-xml.hbs | 0 .../templates/clean-up-code.hbs | 0 .../templates/cryptography-ctf-solver.hbs | 0 .../templates/document-the-code.hbs | 0 .../find-security-vulnerabilities.hbs | 0 .../templates/fix-bugs.hbs | 0 .../templates/improve-performance.hbs | 0 .../templates/refactor.hbs | 0 .../reverse-engineering-ctf-solver.hbs | 0 .../templates/web-ctf-solver.hbs | 0 .../templates/write-git-commit.hbs | 0 .../templates/write-github-pull-request.hbs | 0 .../templates/write-github-readme.hbs | 0 .../tests/clipboard_test.rs | 0 .../tests/filter_test.rs | 2 +- .../tests/git_test.rs | 2 +- .../tests/integration_test.rs | 0 .../tests/sort_test.rs | 2 +- .../tests/template_test.rs | 4 +- .../tests/util_test.rs | 2 +- crates/code2prompt-python/src/lib.rs | 4 +- crates/code2prompt-python/src/python.rs | 2 +- crates/code2prompt/Cargo.toml | 52 ++++-------------- .../src/args.rs | 2 +- .../src/clipboard.rs | 0 crates/code2prompt/src/lib.rs | 1 - .../src/main.rs | 2 +- 43 files changed, 102 insertions(+), 98 deletions(-) delete mode 100644 crates/code2prompt-cli/Cargo.toml rename crates/{code2prompt => code2prompt-core}/Cargo.lock (100%) create mode 100644 crates/code2prompt-core/Cargo.toml rename crates/{code2prompt => code2prompt-core}/build.rs (100%) rename crates/{code2prompt/src/engine => code2prompt-core/src}/filter.rs (100%) rename crates/{code2prompt/src/engine => code2prompt-core/src}/git.rs (100%) rename crates/{code2prompt/src/engine/mod.rs => code2prompt-core/src/lib.rs} (100%) create mode 100644 crates/code2prompt-core/src/mod.rs rename crates/{code2prompt/src/engine => code2prompt-core/src}/path.rs (98%) rename crates/{code2prompt/src/engine => code2prompt-core/src}/sort.rs (100%) rename crates/{code2prompt/src/engine => code2prompt-core/src}/template.rs (100%) rename crates/{code2prompt/src/engine => code2prompt-core/src}/tokenizer.rs (100%) rename crates/{code2prompt/src/engine => code2prompt-core/src}/util.rs (100%) rename crates/{code2prompt => code2prompt-core}/templates/binary-exploitation-ctf-solver.hbs (100%) rename crates/{code2prompt => code2prompt-core}/templates/claude-xml.hbs (100%) rename crates/{code2prompt => code2prompt-core}/templates/clean-up-code.hbs (100%) rename crates/{code2prompt => code2prompt-core}/templates/cryptography-ctf-solver.hbs (100%) rename crates/{code2prompt => code2prompt-core}/templates/document-the-code.hbs (100%) rename crates/{code2prompt => code2prompt-core}/templates/find-security-vulnerabilities.hbs (100%) rename crates/{code2prompt => code2prompt-core}/templates/fix-bugs.hbs (100%) rename crates/{code2prompt => code2prompt-core}/templates/improve-performance.hbs (100%) rename crates/{code2prompt => code2prompt-core}/templates/refactor.hbs (100%) rename crates/{code2prompt => code2prompt-core}/templates/reverse-engineering-ctf-solver.hbs (100%) rename crates/{code2prompt => code2prompt-core}/templates/web-ctf-solver.hbs (100%) rename crates/{code2prompt => code2prompt-core}/templates/write-git-commit.hbs (100%) rename crates/{code2prompt => code2prompt-core}/templates/write-github-pull-request.hbs (100%) rename crates/{code2prompt => code2prompt-core}/templates/write-github-readme.hbs (100%) rename crates/{code2prompt => code2prompt-core}/tests/clipboard_test.rs (100%) rename crates/{code2prompt => code2prompt-core}/tests/filter_test.rs (99%) rename crates/{code2prompt => code2prompt-core}/tests/git_test.rs (99%) rename crates/{code2prompt => code2prompt-core}/tests/integration_test.rs (100%) rename crates/{code2prompt => code2prompt-core}/tests/sort_test.rs (98%) rename crates/{code2prompt => code2prompt-core}/tests/template_test.rs (93%) rename crates/{code2prompt => code2prompt-core}/tests/util_test.rs (96%) rename crates/{code2prompt-cli => code2prompt}/src/args.rs (97%) rename crates/{code2prompt-cli => code2prompt}/src/clipboard.rs (100%) delete mode 100644 crates/code2prompt/src/lib.rs rename crates/{code2prompt-cli => code2prompt}/src/main.rs (99%) diff --git a/crates/Cargo.lock b/crates/Cargo.lock index 09dc25f..dccb8ee 100644 --- a/crates/Cargo.lock +++ b/crates/Cargo.lock @@ -316,6 +316,22 @@ dependencies = [ [[package]] name = "code2prompt" version = "3.0.0" +dependencies = [ + "anyhow", + "arboard", + "clap", + "code2prompt_core", + "colored", + "env_logger", + "indicatif", + "log", + "num-format", + "serde_json", +] + +[[package]] +name = "code2prompt_core" +version = "3.0.0" dependencies = [ "anyhow", "assert_cmd", @@ -339,22 +355,6 @@ dependencies = [ "tiktoken-rs", ] -[[package]] -name = "code2prompt-cli" -version = "3.0.0" -dependencies = [ - "anyhow", - "arboard", - "clap", - "code2prompt", - "colored", - "env_logger", - "indicatif", - "log", - "num-format", - "serde_json", -] - [[package]] name = "colorchoice" version = "1.0.3" diff --git a/crates/Cargo.toml b/crates/Cargo.toml index 4e4cf00..9c0247c 100644 --- a/crates/Cargo.toml +++ b/crates/Cargo.toml @@ -1,6 +1,6 @@ [workspace] resolver = "2" -members = ["code2prompt", "code2prompt-cli"] +members = ["code2prompt-core", "code2prompt"] [profile.release] lto = "thin" diff --git a/crates/code2prompt-cli/Cargo.toml b/crates/code2prompt-cli/Cargo.toml deleted file mode 100644 index 48901e5..0000000 --- a/crates/code2prompt-cli/Cargo.toml +++ /dev/null @@ -1,23 +0,0 @@ -[package] -name = "code2prompt-cli" -version = "3.0.0" -edition = "2021" -description = "Command-line interface for code2prompt" -license = "MIT" -repository = "https://github.com/mufeedvh/code2prompt" - -[dependencies] -code2prompt = { path = "../code2prompt" } -clap = { version = "4.0", features = ["derive"] } -env_logger = { version = "0.11.3" } -arboard = { version = "3.4.0" } -anyhow = { workspace = true } -colored = { workspace = true } -indicatif = { workspace = true } -log = { workspace = true } -num-format = { workspace = true } -serde_json = { workspace = true } - -[[bin]] -name = "code2prompt" -path = "src/main.rs" diff --git a/crates/code2prompt/Cargo.lock b/crates/code2prompt-core/Cargo.lock similarity index 100% rename from crates/code2prompt/Cargo.lock rename to crates/code2prompt-core/Cargo.lock diff --git a/crates/code2prompt-core/Cargo.toml b/crates/code2prompt-core/Cargo.toml new file mode 100644 index 0000000..f27a934 --- /dev/null +++ b/crates/code2prompt-core/Cargo.toml @@ -0,0 +1,55 @@ +[package] +name = "code2prompt_core" +version = "3.0.0" +authors = [ + "Mufeed VH ", + "Olivier D'Ancona ", +] +description = "A command-line (CLI) tool to generate an LLM prompt from codebases of any size, fast." +keywords = ["code", "prompt", "llm", "gpt", "ai", "agent", "glob"] +categories = ["command-line-utilities", "development-tools"] +homepage = "https://code2prompt.dev" +documentation = "https://code2prompt.dev/docs/welcome" +repository = "https://github.com/mufeedvh/code2prompt" +license = "MIT" +readme = "README.md" +exclude = [".github/*", ".assets/*"] +edition = "2021" +build = "build.rs" + +[features] +default = [] + +[dependencies] +anyhow = { workspace = true } +colored = { workspace = true } +indicatif = { workspace = true } +log = { workspace = true } +num-format = { workspace = true } +serde_json = { workspace = true } +handlebars = { workspace = true } +jwalk = { workspace = true } +termtree = { workspace = true } +tiktoken-rs = { workspace = true } +ignore = { workspace = true } +inquire = { workspace = true } +regex = { workspace = true } +git2 = { workspace = true } +once_cell = { workspace = true } +globset = { workspace = true } + +[lib] +name = "code2prompt_core" +path = "src/lib.rs" +# crate-type = ["cdylib", "rlib"] +crate-type = ["rlib"] + +[package.metadata.deb] +section = "utility" +assets = [["target/release/code2prompt_core", "/usr/bin/", "755"]] + +[dev-dependencies] +tempfile = "3.3" +assert_cmd = "2.0" +predicates = "2.0" +env_logger = "0.11.3" diff --git a/crates/code2prompt/build.rs b/crates/code2prompt-core/build.rs similarity index 100% rename from crates/code2prompt/build.rs rename to crates/code2prompt-core/build.rs diff --git a/crates/code2prompt/src/engine/filter.rs b/crates/code2prompt-core/src/filter.rs similarity index 100% rename from crates/code2prompt/src/engine/filter.rs rename to crates/code2prompt-core/src/filter.rs diff --git a/crates/code2prompt/src/engine/git.rs b/crates/code2prompt-core/src/git.rs similarity index 100% rename from crates/code2prompt/src/engine/git.rs rename to crates/code2prompt-core/src/git.rs diff --git a/crates/code2prompt/src/engine/mod.rs b/crates/code2prompt-core/src/lib.rs similarity index 100% rename from crates/code2prompt/src/engine/mod.rs rename to crates/code2prompt-core/src/lib.rs diff --git a/crates/code2prompt-core/src/mod.rs b/crates/code2prompt-core/src/mod.rs new file mode 100644 index 0000000..0137a4f --- /dev/null +++ b/crates/code2prompt-core/src/mod.rs @@ -0,0 +1,7 @@ +pub mod filter; +pub mod git; +pub mod path; +pub mod sort; +pub mod template; +pub mod tokenizer; +pub mod util; diff --git a/crates/code2prompt/src/engine/path.rs b/crates/code2prompt-core/src/path.rs similarity index 98% rename from crates/code2prompt/src/engine/path.rs rename to crates/code2prompt-core/src/path.rs index cec8ae5..de20f29 100644 --- a/crates/code2prompt/src/engine/path.rs +++ b/crates/code2prompt-core/src/path.rs @@ -1,7 +1,7 @@ //! This module contains the functions for traversing the directory and processing the files. -use crate::engine::filter::should_include_file; -use crate::engine::sort::{sort_files, sort_tree, FileSortMethod}; -use crate::engine::util::strip_utf8_bom; +use crate::filter::should_include_file; +use crate::sort::{sort_files, sort_tree, FileSortMethod}; +use crate::util::strip_utf8_bom; use anyhow::Result; use ignore::WalkBuilder; use log::debug; diff --git a/crates/code2prompt/src/engine/sort.rs b/crates/code2prompt-core/src/sort.rs similarity index 100% rename from crates/code2prompt/src/engine/sort.rs rename to crates/code2prompt-core/src/sort.rs diff --git a/crates/code2prompt/src/engine/template.rs b/crates/code2prompt-core/src/template.rs similarity index 100% rename from crates/code2prompt/src/engine/template.rs rename to crates/code2prompt-core/src/template.rs diff --git a/crates/code2prompt/src/engine/tokenizer.rs b/crates/code2prompt-core/src/tokenizer.rs similarity index 100% rename from crates/code2prompt/src/engine/tokenizer.rs rename to crates/code2prompt-core/src/tokenizer.rs diff --git a/crates/code2prompt/src/engine/util.rs b/crates/code2prompt-core/src/util.rs similarity index 100% rename from crates/code2prompt/src/engine/util.rs rename to crates/code2prompt-core/src/util.rs diff --git a/crates/code2prompt/templates/binary-exploitation-ctf-solver.hbs b/crates/code2prompt-core/templates/binary-exploitation-ctf-solver.hbs similarity index 100% rename from crates/code2prompt/templates/binary-exploitation-ctf-solver.hbs rename to crates/code2prompt-core/templates/binary-exploitation-ctf-solver.hbs diff --git a/crates/code2prompt/templates/claude-xml.hbs b/crates/code2prompt-core/templates/claude-xml.hbs similarity index 100% rename from crates/code2prompt/templates/claude-xml.hbs rename to crates/code2prompt-core/templates/claude-xml.hbs diff --git a/crates/code2prompt/templates/clean-up-code.hbs b/crates/code2prompt-core/templates/clean-up-code.hbs similarity index 100% rename from crates/code2prompt/templates/clean-up-code.hbs rename to crates/code2prompt-core/templates/clean-up-code.hbs diff --git a/crates/code2prompt/templates/cryptography-ctf-solver.hbs b/crates/code2prompt-core/templates/cryptography-ctf-solver.hbs similarity index 100% rename from crates/code2prompt/templates/cryptography-ctf-solver.hbs rename to crates/code2prompt-core/templates/cryptography-ctf-solver.hbs diff --git a/crates/code2prompt/templates/document-the-code.hbs b/crates/code2prompt-core/templates/document-the-code.hbs similarity index 100% rename from crates/code2prompt/templates/document-the-code.hbs rename to crates/code2prompt-core/templates/document-the-code.hbs diff --git a/crates/code2prompt/templates/find-security-vulnerabilities.hbs b/crates/code2prompt-core/templates/find-security-vulnerabilities.hbs similarity index 100% rename from crates/code2prompt/templates/find-security-vulnerabilities.hbs rename to crates/code2prompt-core/templates/find-security-vulnerabilities.hbs diff --git a/crates/code2prompt/templates/fix-bugs.hbs b/crates/code2prompt-core/templates/fix-bugs.hbs similarity index 100% rename from crates/code2prompt/templates/fix-bugs.hbs rename to crates/code2prompt-core/templates/fix-bugs.hbs diff --git a/crates/code2prompt/templates/improve-performance.hbs b/crates/code2prompt-core/templates/improve-performance.hbs similarity index 100% rename from crates/code2prompt/templates/improve-performance.hbs rename to crates/code2prompt-core/templates/improve-performance.hbs diff --git a/crates/code2prompt/templates/refactor.hbs b/crates/code2prompt-core/templates/refactor.hbs similarity index 100% rename from crates/code2prompt/templates/refactor.hbs rename to crates/code2prompt-core/templates/refactor.hbs diff --git a/crates/code2prompt/templates/reverse-engineering-ctf-solver.hbs b/crates/code2prompt-core/templates/reverse-engineering-ctf-solver.hbs similarity index 100% rename from crates/code2prompt/templates/reverse-engineering-ctf-solver.hbs rename to crates/code2prompt-core/templates/reverse-engineering-ctf-solver.hbs diff --git a/crates/code2prompt/templates/web-ctf-solver.hbs b/crates/code2prompt-core/templates/web-ctf-solver.hbs similarity index 100% rename from crates/code2prompt/templates/web-ctf-solver.hbs rename to crates/code2prompt-core/templates/web-ctf-solver.hbs diff --git a/crates/code2prompt/templates/write-git-commit.hbs b/crates/code2prompt-core/templates/write-git-commit.hbs similarity index 100% rename from crates/code2prompt/templates/write-git-commit.hbs rename to crates/code2prompt-core/templates/write-git-commit.hbs diff --git a/crates/code2prompt/templates/write-github-pull-request.hbs b/crates/code2prompt-core/templates/write-github-pull-request.hbs similarity index 100% rename from crates/code2prompt/templates/write-github-pull-request.hbs rename to crates/code2prompt-core/templates/write-github-pull-request.hbs diff --git a/crates/code2prompt/templates/write-github-readme.hbs b/crates/code2prompt-core/templates/write-github-readme.hbs similarity index 100% rename from crates/code2prompt/templates/write-github-readme.hbs rename to crates/code2prompt-core/templates/write-github-readme.hbs diff --git a/crates/code2prompt/tests/clipboard_test.rs b/crates/code2prompt-core/tests/clipboard_test.rs similarity index 100% rename from crates/code2prompt/tests/clipboard_test.rs rename to crates/code2prompt-core/tests/clipboard_test.rs diff --git a/crates/code2prompt/tests/filter_test.rs b/crates/code2prompt-core/tests/filter_test.rs similarity index 99% rename from crates/code2prompt/tests/filter_test.rs rename to crates/code2prompt-core/tests/filter_test.rs index 51632e9..81cf71d 100644 --- a/crates/code2prompt/tests/filter_test.rs +++ b/crates/code2prompt-core/tests/filter_test.rs @@ -1,7 +1,7 @@ /// This file tests the filter logic /// Code2prompt uses the file globbing and globpattern to match files /// Therefore you can match files: -use code2prompt::engine::filter::should_include_file; +use code2prompt::filter::should_include_file; use colored::*; use once_cell::sync::Lazy; use std::fs::{self, File}; diff --git a/crates/code2prompt/tests/git_test.rs b/crates/code2prompt-core/tests/git_test.rs similarity index 99% rename from crates/code2prompt/tests/git_test.rs rename to crates/code2prompt-core/tests/git_test.rs index a8739fc..6b5b3df 100644 --- a/crates/code2prompt/tests/git_test.rs +++ b/crates/code2prompt-core/tests/git_test.rs @@ -1,4 +1,4 @@ -use code2prompt::engine::git::{get_git_diff, get_git_diff_between_branches, get_git_log}; +use code2prompt::git::{get_git_diff, get_git_diff_between_branches, get_git_log}; #[cfg(test)] mod tests { diff --git a/crates/code2prompt/tests/integration_test.rs b/crates/code2prompt-core/tests/integration_test.rs similarity index 100% rename from crates/code2prompt/tests/integration_test.rs rename to crates/code2prompt-core/tests/integration_test.rs diff --git a/crates/code2prompt/tests/sort_test.rs b/crates/code2prompt-core/tests/sort_test.rs similarity index 98% rename from crates/code2prompt/tests/sort_test.rs rename to crates/code2prompt-core/tests/sort_test.rs index 5403c3b..86c9fd1 100644 --- a/crates/code2prompt/tests/sort_test.rs +++ b/crates/code2prompt-core/tests/sort_test.rs @@ -1,4 +1,4 @@ -use code2prompt::engine::sort::{sort_files, sort_tree, FileSortMethod}; +use code2prompt::sort::{sort_files, sort_tree, FileSortMethod}; #[cfg(test)] mod tests { diff --git a/crates/code2prompt/tests/template_test.rs b/crates/code2prompt-core/tests/template_test.rs similarity index 93% rename from crates/code2prompt/tests/template_test.rs rename to crates/code2prompt-core/tests/template_test.rs index 9172ca0..4b0b84a 100644 --- a/crates/code2prompt/tests/template_test.rs +++ b/crates/code2prompt-core/tests/template_test.rs @@ -1,6 +1,4 @@ -use code2prompt::engine::template::{ - extract_undefined_variables, handlebars_setup, render_template, -}; +use code2prompts::template::{extract_undefined_variables, handlebars_setup, render_template}; #[cfg(test)] mod tests { diff --git a/crates/code2prompt/tests/util_test.rs b/crates/code2prompt-core/tests/util_test.rs similarity index 96% rename from crates/code2prompt/tests/util_test.rs rename to crates/code2prompt-core/tests/util_test.rs index 4ed7d90..bce3203 100644 --- a/crates/code2prompt/tests/util_test.rs +++ b/crates/code2prompt-core/tests/util_test.rs @@ -1,4 +1,4 @@ -use code2prompt::engine::util::strip_utf8_bom; +use code2prompt::util::strip_utf8_bom; #[cfg(test)] mod tests { diff --git a/crates/code2prompt-python/src/lib.rs b/crates/code2prompt-python/src/lib.rs index 455c2f2..2d3587b 100644 --- a/crates/code2prompt-python/src/lib.rs +++ b/crates/code2prompt-python/src/lib.rs @@ -1,5 +1,5 @@ -use code2prompt::engine::path::traverse_directory; -use code2prompt::engine::template::render_template; +use code2prompt::path::traverse_directory; +use code2prompt::template::render_template; use pyo3::prelude::*; /// A Python module implemented in Rust. diff --git a/crates/code2prompt-python/src/python.rs b/crates/code2prompt-python/src/python.rs index af2c4a8..119e302 100644 --- a/crates/code2prompt-python/src/python.rs +++ b/crates/code2prompt-python/src/python.rs @@ -2,7 +2,7 @@ use pyo3::prelude::*; use pyo3::types::PyDict; use std::path::PathBuf; -use crate::engine::{ +use crate::{ git::{get_git_diff, get_git_diff_between_branches, get_git_log}, path::traverse_directory, template::{handlebars_setup, render_template}, diff --git a/crates/code2prompt/Cargo.toml b/crates/code2prompt/Cargo.toml index c774f06..a7f07d4 100644 --- a/crates/code2prompt/Cargo.toml +++ b/crates/code2prompt/Cargo.toml @@ -1,55 +1,23 @@ [package] name = "code2prompt" version = "3.0.0" -authors = [ - "Mufeed VH ", - "Olivier D'Ancona ", -] -description = "A command-line (CLI) tool to generate an LLM prompt from codebases of any size, fast." -keywords = ["code", "prompt", "llm", "gpt", "ai", "agent", "glob"] -categories = ["command-line-utilities", "development-tools"] -homepage = "https://code2prompt.dev" -documentation = "https://code2prompt.dev/docs/welcome" -repository = "https://github.com/mufeedvh/code2prompt" -license = "MIT" -readme = "README.md" -exclude = [".github/*", ".assets/*"] edition = "2021" -build = "build.rs" - -[features] -default = [] +description = "Command-line interface for code2prompt" +license = "MIT" +repository = "https://github.com/mufeedvh/code2prompt" [dependencies] +code2prompt_core = { path = "../code2prompt-core" } +clap = { version = "4.0", features = ["derive"] } +env_logger = { version = "0.11.3" } +arboard = { version = "3.4.0" } anyhow = { workspace = true } colored = { workspace = true } indicatif = { workspace = true } log = { workspace = true } num-format = { workspace = true } serde_json = { workspace = true } -handlebars = { workspace = true } -jwalk = { workspace = true } -termtree = { workspace = true } -tiktoken-rs = { workspace = true } -ignore = { workspace = true } -inquire = { workspace = true } -regex = { workspace = true } -git2 = { workspace = true } -once_cell = { workspace = true } -globset = { workspace = true } - -[lib] -name = "code2prompt" -path = "src/lib.rs" -# crate-type = ["cdylib", "rlib"] -crate-type = ["rlib"] - -[package.metadata.deb] -section = "utility" -assets = [["target/release/code2prompt", "/usr/bin/", "755"]] -[dev-dependencies] -tempfile = "3.3" -assert_cmd = "2.0" -predicates = "2.0" -env_logger = "0.11.3" +[[bin]] +name = "code2prompt_core" +path = "src/main.rs" diff --git a/crates/code2prompt-cli/src/args.rs b/crates/code2prompt/src/args.rs similarity index 97% rename from crates/code2prompt-cli/src/args.rs rename to crates/code2prompt/src/args.rs index b240b64..ca2e60d 100644 --- a/crates/code2prompt-cli/src/args.rs +++ b/crates/code2prompt/src/args.rs @@ -1,5 +1,5 @@ use clap::Parser; -use code2prompt::engine::{template::OutputFormat, tokenizer::TokenFormat}; +use code2prompt_core::{template::OutputFormat, tokenizer::TokenFormat}; use std::path::PathBuf; // ~~~ CLI Arguments ~~~ diff --git a/crates/code2prompt-cli/src/clipboard.rs b/crates/code2prompt/src/clipboard.rs similarity index 100% rename from crates/code2prompt-cli/src/clipboard.rs rename to crates/code2prompt/src/clipboard.rs diff --git a/crates/code2prompt/src/lib.rs b/crates/code2prompt/src/lib.rs deleted file mode 100644 index 702e611..0000000 --- a/crates/code2prompt/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod engine; diff --git a/crates/code2prompt-cli/src/main.rs b/crates/code2prompt/src/main.rs similarity index 99% rename from crates/code2prompt-cli/src/main.rs rename to crates/code2prompt/src/main.rs index 1c0b749..c8a1999 100644 --- a/crates/code2prompt-cli/src/main.rs +++ b/crates/code2prompt/src/main.rs @@ -8,7 +8,7 @@ use anyhow::{Context, Result}; use args::Cli; use clap::Parser; -use code2prompt::engine::{ +use code2prompt_core::{ git::{get_git_diff, get_git_diff_between_branches, get_git_log}, path::{label, traverse_directory}, sort::FileSortMethod, From fb5461af2107fdc67009a7d1577eaf6a9ba01de9 Mon Sep 17 00:00:00 2001 From: Olivier D'Ancona Date: Sat, 1 Mar 2025 13:57:23 -0800 Subject: [PATCH 08/13] code2prompt-python compiles --- crates/.gitignore => .gitignore | 0 crates/Cargo.lock => Cargo.lock | 99 +++++++++++++++++++++++++ crates/Cargo.toml => Cargo.toml | 5 +- crates/code2prompt-python/Cargo.toml | 5 +- crates/code2prompt-python/src/lib.rs | 30 +------- crates/code2prompt-python/src/python.rs | 4 +- 6 files changed, 108 insertions(+), 35 deletions(-) rename crates/.gitignore => .gitignore (100%) rename crates/Cargo.lock => Cargo.lock (96%) rename crates/Cargo.toml => Cargo.toml (77%) diff --git a/crates/.gitignore b/.gitignore similarity index 100% rename from crates/.gitignore rename to .gitignore diff --git a/crates/Cargo.lock b/Cargo.lock similarity index 96% rename from crates/Cargo.lock rename to Cargo.lock index dccb8ee..4be9814 100644 --- a/crates/Cargo.lock +++ b/Cargo.lock @@ -329,6 +329,15 @@ dependencies = [ "serde_json", ] +[[package]] +name = "code2prompt-python" +version = "3.0.0" +dependencies = [ + "code2prompt_core", + "pyo3", + "serde_json", +] + [[package]] name = "code2prompt_core" version = "3.0.0" @@ -1013,6 +1022,12 @@ dependencies = [ "web-time", ] +[[package]] +name = "indoc" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" + [[package]] name = "inquire" version = "0.7.5" @@ -1173,6 +1188,15 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -1555,6 +1579,69 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "pyo3" +version = "0.23.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7778bffd85cf38175ac1f545509665d0b9b92a198ca7941f131f85f7a4f9a872" +dependencies = [ + "cfg-if", + "indoc", + "libc", + "memoffset", + "once_cell", + "portable-atomic", + "pyo3-build-config", + "pyo3-ffi", + "pyo3-macros", + "unindent", +] + +[[package]] +name = "pyo3-build-config" +version = "0.23.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94f6cbe86ef3bf18998d9df6e0f3fc1050a8c5efa409bf712e661a4366e010fb" +dependencies = [ + "once_cell", + "target-lexicon", +] + +[[package]] +name = "pyo3-ffi" +version = "0.23.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f1b4c431c0bb1c8fb0a338709859eed0d030ff6daa34368d3b152a63dfdd8d" +dependencies = [ + "libc", + "pyo3-build-config", +] + +[[package]] +name = "pyo3-macros" +version = "0.23.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc2201328f63c4710f68abdf653c89d8dbc2858b88c5d88b0ff38a75288a9da" +dependencies = [ + "proc-macro2", + "pyo3-macros-backend", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "pyo3-macros-backend" +version = "0.23.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fca6726ad0f3da9c9de093d6f116a93c1a38e417ed73bf138472cf4064f72028" +dependencies = [ + "heck", + "proc-macro2", + "pyo3-build-config", + "quote", + "syn 2.0.98", +] + [[package]] name = "quote" version = "1.0.38" @@ -1798,6 +1885,12 @@ dependencies = [ "syn 2.0.98", ] +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + [[package]] name = "tempfile" version = "3.17.1" @@ -1947,6 +2040,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +[[package]] +name = "unindent" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" + [[package]] name = "url" version = "2.5.4" diff --git a/crates/Cargo.toml b/Cargo.toml similarity index 77% rename from crates/Cargo.toml rename to Cargo.toml index 9c0247c..22b9cd7 100644 --- a/crates/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,13 @@ [workspace] resolver = "2" -members = ["code2prompt-core", "code2prompt"] +members = ["crates/*"] +default-members = ["crates/code2prompt-core", "crates/code2prompt"] [profile.release] lto = "thin" panic = 'abort' codegen-units = 1 - [workspace.dependencies] anyhow = "1.0.80" colored = "2.1.0" @@ -29,3 +29,4 @@ git2 = { version = "0.18.2", default-features = false, features = [ ] } once_cell = "1.19.0" globset = "0.4.15" +pyo3 = { version = "0.23", features = ["extension-module", "abi3-py312"] } diff --git a/crates/code2prompt-python/Cargo.toml b/crates/code2prompt-python/Cargo.toml index 354da5b..030d33c 100644 --- a/crates/code2prompt-python/Cargo.toml +++ b/crates/code2prompt-python/Cargo.toml @@ -8,5 +8,6 @@ name = "code2prompt_python" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.23", features = ["extension-module", "abi3-py312"] } -code2prompt = { path = "../code2prompt" } +serde_json = { workspace = true } +code2prompt_core = { path = "../code2prompt-core" } +pyo3 = { workspace = true } diff --git a/crates/code2prompt-python/src/lib.rs b/crates/code2prompt-python/src/lib.rs index 2d3587b..e83684b 100644 --- a/crates/code2prompt-python/src/lib.rs +++ b/crates/code2prompt-python/src/lib.rs @@ -1,29 +1 @@ -use code2prompt::path::traverse_directory; -use code2prompt::template::render_template; -use pyo3::prelude::*; - -/// A Python module implemented in Rust. -#[pymodule(name = "code2prompt_rs")] -fn code2prompt(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; - Ok(()) -} - -#[pyclass] -struct CodePrompt { - path: String, -} - -#[pymethods] -impl CodePrompt { - #[new] - fn new(path: String) -> Self { - Self { path } - } - - fn generate(&self) -> PyResult { - let (tree, _files) = traverse_directory(&self.path); - let rendered = render_template(tree); - Ok(rendered) - } -} +mod python; diff --git a/crates/code2prompt-python/src/python.rs b/crates/code2prompt-python/src/python.rs index 119e302..0b25132 100644 --- a/crates/code2prompt-python/src/python.rs +++ b/crates/code2prompt-python/src/python.rs @@ -2,7 +2,7 @@ use pyo3::prelude::*; use pyo3::types::PyDict; use std::path::PathBuf; -use crate::{ +use code2prompt_core::{ git::{get_git_diff, get_git_diff_between_branches, get_git_log}, path::traverse_directory, template::{handlebars_setup, render_template}, @@ -10,7 +10,7 @@ use crate::{ }; /// Python module for code2prompt -#[pymodule] +#[pymodule(name = "code2prompt_rs")] fn code2prompt(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_class::()?; Ok(()) From 7c1d673aee6812365bd99e7b9b0e0613f5a19ffe Mon Sep 17 00:00:00 2001 From: Olivier D'Ancona Date: Sat, 1 Mar 2025 15:21:24 -0800 Subject: [PATCH 09/13] python-sdk working --- crates/code2prompt-python/Cargo.toml | 2 +- crates/code2prompt-python/pyproject.toml | 6 +++--- .../{code2prompt => code2prompt_rs}/__init__.py | 4 ++-- .../code2promp_rs.py} | 2 +- .../python-sdk/examples/basic_usage.py | 6 +++--- crates/code2prompt-python/src/python.rs | 10 +++++----- 6 files changed, 15 insertions(+), 15 deletions(-) rename crates/code2prompt-python/python-sdk/{code2prompt => code2prompt_rs}/__init__.py (82%) rename crates/code2prompt-python/python-sdk/{code2prompt/code2prompt.py.bak => code2prompt_rs/code2promp_rs.py} (98%) diff --git a/crates/code2prompt-python/Cargo.toml b/crates/code2prompt-python/Cargo.toml index 030d33c..b219dcd 100644 --- a/crates/code2prompt-python/Cargo.toml +++ b/crates/code2prompt-python/Cargo.toml @@ -4,7 +4,7 @@ version = "3.0.0" edition = "2021" [lib] -name = "code2prompt_python" +name = "code2prompt_rs" crate-type = ["cdylib"] [dependencies] diff --git a/crates/code2prompt-python/pyproject.toml b/crates/code2prompt-python/pyproject.toml index b7aeaa5..80ed736 100644 --- a/crates/code2prompt-python/pyproject.toml +++ b/crates/code2prompt-python/pyproject.toml @@ -12,7 +12,7 @@ dependencies = [ "pip>=25.0.1", "patchelf>=0.17.2.1", ] -readme = "README.md" +readme = "../../README.md" requires-python = ">= 3.11" classifiers = [ "Development Status :: 5 - Production/Stable", @@ -27,12 +27,12 @@ classifiers = [ ] [build-system] -requires = ["maturin"] +requires = ["maturin>=1.0,<2.0"] build-backend = "maturin" [tool.maturin] bindings = "pyo3" -module-name = "code2prompt" +module-name = "code2prompt_rs" manifest-path = "Cargo.toml" python-source = "python-sdk" features = ["pyo3/extension-module"] diff --git a/crates/code2prompt-python/python-sdk/code2prompt/__init__.py b/crates/code2prompt-python/python-sdk/code2prompt_rs/__init__.py similarity index 82% rename from crates/code2prompt-python/python-sdk/code2prompt/__init__.py rename to crates/code2prompt-python/python-sdk/code2prompt_rs/__init__.py index c163b0a..02acb00 100644 --- a/crates/code2prompt-python/python-sdk/code2prompt/__init__.py +++ b/crates/code2prompt-python/python-sdk/code2prompt_rs/__init__.py @@ -8,6 +8,6 @@ - Count tokens for different models """ -from .code2prompt import CodePrompt +from .code2prompt_rs import Code2Prompt -__all__ = ['CodePrompt'] \ No newline at end of file +__all__ = ['Code2Prompt'] diff --git a/crates/code2prompt-python/python-sdk/code2prompt/code2prompt.py.bak b/crates/code2prompt-python/python-sdk/code2prompt_rs/code2promp_rs.py similarity index 98% rename from crates/code2prompt-python/python-sdk/code2prompt/code2prompt.py.bak rename to crates/code2prompt-python/python-sdk/code2prompt_rs/code2promp_rs.py index 1d49235..e022528 100644 --- a/crates/code2prompt-python/python-sdk/code2prompt/code2prompt.py.bak +++ b/crates/code2prompt-python/python-sdk/code2prompt_rs/code2promp_rs.py @@ -1,7 +1,7 @@ # Import the Rust module from code2prompt_rs import CodePrompt as RustCodePrompt -class CodePrompt: +class Code2Prompt: def __init__(self, path, include_patterns=None, exclude_patterns=None, include_priority=False, line_numbers=False, relative_paths=False, exclude_from_tree=False, no_codeblock=False, follow_symlinks=False): diff --git a/crates/code2prompt-python/python-sdk/examples/basic_usage.py b/crates/code2prompt-python/python-sdk/examples/basic_usage.py index 425633d..d502c60 100644 --- a/crates/code2prompt-python/python-sdk/examples/basic_usage.py +++ b/crates/code2prompt-python/python-sdk/examples/basic_usage.py @@ -1,10 +1,10 @@ """Example usage of the code2prompt Python SDK.""" -from code2prompt_rs import CodePrompt +from code2prompt_rs import Code2Prompt def main(): - # Create a CodePrompt instance for the current directory - prompt = CodePrompt( + # Create a Code2Prompt instance for the current directory + prompt = Code2Prompt( path=".", include_patterns=["*.py", "*.rs"], # Only include Python and Rust files exclude_patterns=["**/tests/*"], # Exclude test files diff --git a/crates/code2prompt-python/src/python.rs b/crates/code2prompt-python/src/python.rs index 0b25132..e6954b6 100644 --- a/crates/code2prompt-python/src/python.rs +++ b/crates/code2prompt-python/src/python.rs @@ -11,14 +11,14 @@ use code2prompt_core::{ /// Python module for code2prompt #[pymodule(name = "code2prompt_rs")] -fn code2prompt(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { - m.add_class::()?; +fn code2prompt_rs(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { + m.add_class::()?; Ok(()) } /// Main class for generating prompts from code #[pyclass] -struct CodePrompt { +struct Code2Prompt { path: PathBuf, include_patterns: Vec, exclude_patterns: Vec, @@ -33,8 +33,8 @@ struct CodePrompt { } #[pymethods] -impl CodePrompt { - /// Create a new CodePrompt instance +impl Code2Prompt { + /// Create a new Code2Prompt instance /// /// Args: /// path (str): Path to the codebase directory From 15dd0f4dd8e4e4470b98e4244d6fc83033cce07e Mon Sep 17 00:00:00 2001 From: Olivier D'Ancona Date: Sat, 1 Mar 2025 17:03:13 -0800 Subject: [PATCH 10/13] code2prompt on pypi --- crates/code2prompt-python/pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/code2prompt-python/pyproject.toml b/crates/code2prompt-python/pyproject.toml index 80ed736..13c988c 100644 --- a/crates/code2prompt-python/pyproject.toml +++ b/crates/code2prompt-python/pyproject.toml @@ -12,7 +12,6 @@ dependencies = [ "pip>=25.0.1", "patchelf>=0.17.2.1", ] -readme = "../../README.md" requires-python = ">= 3.11" classifiers = [ "Development Status :: 5 - Production/Stable", From b3761660d93ba256b8ef9111578431ffb319b03f Mon Sep 17 00:00:00 2001 From: Olivier D'Ancona Date: Sat, 1 Mar 2025 17:53:36 -0800 Subject: [PATCH 11/13] small fix --- crates/code2prompt-core/Cargo.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/code2prompt-core/Cargo.toml b/crates/code2prompt-core/Cargo.toml index f27a934..bded63a 100644 --- a/crates/code2prompt-core/Cargo.toml +++ b/crates/code2prompt-core/Cargo.toml @@ -6,16 +6,17 @@ authors = [ "Olivier D'Ancona ", ] description = "A command-line (CLI) tool to generate an LLM prompt from codebases of any size, fast." -keywords = ["code", "prompt", "llm", "gpt", "ai", "agent", "glob"] +keywords = ["code", "ingestion", "prompt", "llm", "agent"] categories = ["command-line-utilities", "development-tools"] homepage = "https://code2prompt.dev" documentation = "https://code2prompt.dev/docs/welcome" repository = "https://github.com/mufeedvh/code2prompt" license = "MIT" -readme = "README.md" exclude = [".github/*", ".assets/*"] edition = "2021" build = "build.rs" +readme = "../../README.md" + [features] default = [] From 2e465d7a4215e0c4f75617461a26a77e130ecbae Mon Sep 17 00:00:00 2001 From: Olivier D'Ancona Date: Sat, 1 Mar 2025 18:22:09 -0800 Subject: [PATCH 12/13] tests pass --- crates/code2prompt-core/tests/filter_test.rs | 2 +- crates/code2prompt-core/tests/git_test.rs | 2 +- crates/code2prompt-core/tests/sort_test.rs | 2 +- crates/code2prompt-core/tests/template_test.rs | 2 +- crates/code2prompt-core/tests/util_test.rs | 2 +- crates/code2prompt/Cargo.toml | 14 ++++++++++---- .../tests/integration_test.rs | 0 7 files changed, 15 insertions(+), 9 deletions(-) rename crates/{code2prompt-core => code2prompt}/tests/integration_test.rs (100%) diff --git a/crates/code2prompt-core/tests/filter_test.rs b/crates/code2prompt-core/tests/filter_test.rs index 81cf71d..94884bd 100644 --- a/crates/code2prompt-core/tests/filter_test.rs +++ b/crates/code2prompt-core/tests/filter_test.rs @@ -1,7 +1,7 @@ /// This file tests the filter logic /// Code2prompt uses the file globbing and globpattern to match files /// Therefore you can match files: -use code2prompt::filter::should_include_file; +use code2prompt_core::filter::should_include_file; use colored::*; use once_cell::sync::Lazy; use std::fs::{self, File}; diff --git a/crates/code2prompt-core/tests/git_test.rs b/crates/code2prompt-core/tests/git_test.rs index 6b5b3df..353c4ad 100644 --- a/crates/code2prompt-core/tests/git_test.rs +++ b/crates/code2prompt-core/tests/git_test.rs @@ -1,4 +1,4 @@ -use code2prompt::git::{get_git_diff, get_git_diff_between_branches, get_git_log}; +use code2prompt_core::git::{get_git_diff, get_git_diff_between_branches, get_git_log}; #[cfg(test)] mod tests { diff --git a/crates/code2prompt-core/tests/sort_test.rs b/crates/code2prompt-core/tests/sort_test.rs index 86c9fd1..c5d41f2 100644 --- a/crates/code2prompt-core/tests/sort_test.rs +++ b/crates/code2prompt-core/tests/sort_test.rs @@ -1,4 +1,4 @@ -use code2prompt::sort::{sort_files, sort_tree, FileSortMethod}; +use code2prompt_core::sort::{sort_files, sort_tree, FileSortMethod}; #[cfg(test)] mod tests { diff --git a/crates/code2prompt-core/tests/template_test.rs b/crates/code2prompt-core/tests/template_test.rs index 4b0b84a..c83296c 100644 --- a/crates/code2prompt-core/tests/template_test.rs +++ b/crates/code2prompt-core/tests/template_test.rs @@ -1,4 +1,4 @@ -use code2prompts::template::{extract_undefined_variables, handlebars_setup, render_template}; +use code2prompt_core::template::{extract_undefined_variables, handlebars_setup, render_template}; #[cfg(test)] mod tests { diff --git a/crates/code2prompt-core/tests/util_test.rs b/crates/code2prompt-core/tests/util_test.rs index bce3203..7ed94b4 100644 --- a/crates/code2prompt-core/tests/util_test.rs +++ b/crates/code2prompt-core/tests/util_test.rs @@ -1,4 +1,4 @@ -use code2prompt::util::strip_utf8_bom; +use code2prompt_core::util::strip_utf8_bom; #[cfg(test)] mod tests { diff --git a/crates/code2prompt/Cargo.toml b/crates/code2prompt/Cargo.toml index a7f07d4..5869e7b 100644 --- a/crates/code2prompt/Cargo.toml +++ b/crates/code2prompt/Cargo.toml @@ -8,9 +8,9 @@ repository = "https://github.com/mufeedvh/code2prompt" [dependencies] code2prompt_core = { path = "../code2prompt-core" } -clap = { version = "4.0", features = ["derive"] } -env_logger = { version = "0.11.3" } -arboard = { version = "3.4.0" } +clap = { workspace = true } +env_logger = { workspace = true } +arboard = { workspace = true } anyhow = { workspace = true } colored = { workspace = true } indicatif = { workspace = true } @@ -19,5 +19,11 @@ num-format = { workspace = true } serde_json = { workspace = true } [[bin]] -name = "code2prompt_core" +name = "code2prompt" path = "src/main.rs" + +[dev-dependencies] +tempfile = "3.3" +assert_cmd = "2.0" +predicates = "2.0" +env_logger = "0.11.3" diff --git a/crates/code2prompt-core/tests/integration_test.rs b/crates/code2prompt/tests/integration_test.rs similarity index 100% rename from crates/code2prompt-core/tests/integration_test.rs rename to crates/code2prompt/tests/integration_test.rs From f5ec940932f8eeaf5b6fe4610c318bd0e82a3bc3 Mon Sep 17 00:00:00 2001 From: Olivier D'Ancona Date: Sat, 1 Mar 2025 19:08:57 -0800 Subject: [PATCH 13/13] removed unused file --- Cargo.lock | 7 +++++-- Cargo.toml | 3 +++ crates/code2prompt-core/src/mod.rs | 7 ------- 3 files changed, 8 insertions(+), 9 deletions(-) delete mode 100644 crates/code2prompt-core/src/mod.rs diff --git a/Cargo.lock b/Cargo.lock index 4be9814..42de483 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -319,6 +319,7 @@ version = "3.0.0" dependencies = [ "anyhow", "arboard", + "assert_cmd", "clap", "code2prompt_core", "colored", @@ -326,7 +327,9 @@ dependencies = [ "indicatif", "log", "num-format", + "predicates 2.1.5", "serde_json", + "tempfile", ] [[package]] @@ -382,9 +385,9 @@ dependencies = [ [[package]] name = "console" -version = "0.15.10" +version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" dependencies = [ "encode_unicode", "libc", diff --git a/Cargo.toml b/Cargo.toml index 22b9cd7..596f17e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,3 +30,6 @@ git2 = { version = "0.18.2", default-features = false, features = [ once_cell = "1.19.0" globset = "0.4.15" pyo3 = { version = "0.23", features = ["extension-module", "abi3-py312"] } +clap = { version = "4.0", features = ["derive"] } +env_logger = { version = "0.11.3" } +arboard = { version = "3.4.0" } diff --git a/crates/code2prompt-core/src/mod.rs b/crates/code2prompt-core/src/mod.rs deleted file mode 100644 index 0137a4f..0000000 --- a/crates/code2prompt-core/src/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -pub mod filter; -pub mod git; -pub mod path; -pub mod sort; -pub mod template; -pub mod tokenizer; -pub mod util;