diff --git a/.dockerignore b/.dockerignore index 7d366ee..0be5757 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,12 +1,12 @@ -node_modules -npm-debug.log -.git -.gitignore -.env -.env.* -*.md -.vscode -coverage -.nyc_output -dist -build \ No newline at end of file +node_modules +npm-debug.log +.git +.gitignore +.env +.env.* +*.md +.vscode +coverage +.nyc_output +dist +build diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 423c6ce..1230149 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,6 @@ -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" \ No newline at end of file +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a27a944..ee31d02 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,69 +1,69 @@ -name: Docker - -on: - push: - branches: - - "main" - paths-ignore: - - "**.md" - - LICENSE - pull_request: - branches: - - "*" - paths: - - "Dockerfile" - - ".dockerignore" - - ".github/workflows/docker.yml" - workflow_dispatch: - release: - types: [published, edited] - -permissions: - contents: read - packages: write - -jobs: - build-and-publish-image: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Docker metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: | - ghcr.io/yamadashy/repomix - tags: | - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}} - type=semver,pattern={{major}}.{{minor}} - type=raw,value=latest,enable=${{ github.event_name == 'release' }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to GitHub Container Registry - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and Publish Docker Image - uses: docker/build-push-action@v6 - with: - context: . - push: ${{ github.event_name != 'pull_request' }} - cache-from: type=gha - cache-to: type=gha,mode=max - platforms: linux/amd64,linux/arm64,linux/arm/v7 - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} +name: Docker + +on: + push: + branches: + - "main" + paths-ignore: + - "**.md" + - LICENSE + pull_request: + branches: + - "*" + paths: + - "Dockerfile" + - ".dockerignore" + - ".github/workflows/docker.yml" + workflow_dispatch: + release: + types: [published, edited] + +permissions: + contents: read + packages: write + +jobs: + build-and-publish-image: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: | + ghcr.io/yamadashy/repomix + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}} + type=semver,pattern={{major}}.{{minor}} + type=raw,value=latest,enable=${{ github.event_name == 'release' }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub Container Registry + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and Publish Docker Image + uses: docker/build-push-action@v6 + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + cache-from: type=gha + cache-to: type=gha,mode=max + platforms: linux/amd64,linux/arm64,linux/arm/v7 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/CLAUDE.md b/CLAUDE.md index 77b0697..00f787a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -27,4 +27,4 @@ ## Git Workflow - Write detailed commit messages focusing on the "why" rather than the "what" -- Run `npm run lint && npm test` before committing changes \ No newline at end of file +- Run `npm run lint && npm test` before committing changes diff --git a/Dockerfile b/Dockerfile index 0a59176..b561d8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,26 +1,26 @@ -FROM node:22-slim - -RUN apt-get update && apt-get install -y --no-install-recommends \ - git \ - ca-certificates \ - && rm -rf /var/lib/apt/lists/* - -RUN mkdir /repomix -WORKDIR /repomix - -# Install dependencies and build repomix, then link the package to the global scope -# To reduce the size of the layer, npm ci and npm link are executed in the same RUN command -COPY . . -RUN npm ci \ - && npm run build \ - && npm link \ - && npm ci --omit=dev \ - && npm cache clean --force - -WORKDIR /app - -# Check the operation of repomix -RUN repomix --version -RUN repomix --help - -ENTRYPOINT ["repomix"] +FROM node:22-slim + +RUN apt-get update && apt-get install -y --no-install-recommends \ + git \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir /repomix +WORKDIR /repomix + +# Install dependencies and build repomix, then link the package to the global scope +# To reduce the size of the layer, npm ci and npm link are executed in the same RUN command +COPY . . +RUN npm ci \ + && npm run build \ + && npm link \ + && npm ci --omit=dev \ + && npm cache clean --force + +WORKDIR /app + +# Check the operation of repomix +RUN repomix --version +RUN repomix --help + +ENTRYPOINT ["repomix"] diff --git a/LICENSE b/LICENSE index ad43d6d..cc6cde3 100644 --- a/LICENSE +++ b/LICENSE @@ -4,4 +4,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 8a20fe4..17df923 100644 --- a/README.md +++ b/README.md @@ -602,19 +602,19 @@ You can install the Repomix MCP server in VS Code using one of these methods: 1. **Using the Install Badge:** - [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=repomix&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22repomix%22%2C%22--mcp%22%5D%7D) - [![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install_Server-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=repomix&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22repomix%22%2C%22--mcp%22%5D%7D&quality=insiders) + [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=repomix&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22repomix%22%2C%22--mcp%22%5D%7D) + [![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install_Server-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=repomix&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22repomix%22%2C%22--mcp%22%5D%7D&quality=insiders) 2. **Using the Command Line:** - ```bash - code --add-mcp '{"name":"repomix","command":"npx","args":["-y","repomix","--mcp"]}' - ``` + ```bash + code --add-mcp '{"name":"repomix","command":"npx","args":["-y","repomix","--mcp"]}' + ``` - For VS Code Insiders: - ```bash - code-insiders --add-mcp '{"name":"repomix","command":"npx","args":["-y","repomix","--mcp"]}' - ``` + For VS Code Insiders: + ```bash + code-insiders --add-mcp '{"name":"repomix","command":"npx","args":["-y","repomix","--mcp"]}' + ``` **For Cline (VS Code extension):** @@ -686,8 +686,6 @@ When running as an MCP server, Repomix provides the following tools: - Provides safe directory traversal with proper error handling - Validates paths and ensures they are absolute - - ## ⚙️ Configuration Create a `repomix.config.json` file in your project root for custom configurations. @@ -1012,11 +1010,10 @@ We welcome contributions from the community! To get started, please refer to our contributors - - ## 🔒 Privacy Policy ### Repomix CLI Tool + - **Data Collection**: The Repomix CLI tool does **not** collect, transmit, or store any user data, telemetry, or repository information. - **Network Usage**: Repomix CLI operates fully offline after installation. The only cases where an internet connection is needed are: - Installation via npm/yarn. @@ -1025,13 +1022,14 @@ We welcome contributions from the community! To get started, please refer to our - **Security Considerations**: Since all processing is local, Repomix CLI is safe to use with private and internal repositories. ### Repomix Website ([repomix.com](https://repomix.com/)) + - **Data Collection**: The Repomix website uses **Google Analytics** to collect usage data, such as page views and user interactions. This helps us understand how the website is used and improve the user experience. ### Liability Disclaimer + Repomix (both the CLI tool and the website) is provided "as is" without any warranties or guarantees. We do not take responsibility for how the generated output is used, including but not limited to its accuracy, legality, or any potential consequences arising from its use. - ## 📜 License This project is licensed under the [MIT License](LICENSE). @@ -1041,5 +1039,4 @@ This project is licensed under the [MIT License](LICENSE). Back To Top -

diff --git a/llms-install.md b/llms-install.md index ca2f4fa..167f6ec 100644 --- a/llms-install.md +++ b/llms-install.md @@ -154,13 +154,13 @@ To verify the installation is working: 1. Restart your LLM application (Cline, Claude Desktop, etc.) 2. Test the connection by running a simple command like: - ``` - Please package the local directory /path/to/project for AI analysis using Repomix. - ``` - or - ``` - Please fetch and package the GitHub repository yamadashy/repomix for AI analysis. - ``` + ``` + Please package the local directory /path/to/project for AI analysis using Repomix. + ``` + or + ``` + Please fetch and package the GitHub repository yamadashy/repomix for AI analysis. + ``` ## Usage Examples @@ -189,20 +189,20 @@ Please package my project at /path/to/project, but only include TypeScript files ### Common Issues and Solutions 1. **MCP server connection issues** - - Verify the syntax in your MCP settings file is correct - - Ensure you have an active internet connection (needed for npx to fetch the package) - - Check if any other MCP servers are causing conflicts + - Verify the syntax in your MCP settings file is correct + - Ensure you have an active internet connection (needed for npx to fetch the package) + - Check if any other MCP servers are causing conflicts 2. **Packaging failures** - - Verify the specified directory or repository exists - - Check if you have sufficient disk space - - For remote repositories, ensure you have internet connectivity - - Try with simpler parameters first, then add complexity + - Verify the specified directory or repository exists + - Check if you have sufficient disk space + - For remote repositories, ensure you have internet connectivity + - Try with simpler parameters first, then add complexity 3. **JSON parsing errors in configuration** - - Make sure your MCP settings file is properly formatted - - Verify all paths use forward slashes, even on Windows - - Check for any missing commas or brackets in the configuration + - Make sure your MCP settings file is properly formatted + - Verify all paths use forward slashes, even on Windows + - Check for any missing commas or brackets in the configuration ## Additional Information diff --git a/src/core/treeSitter/queries/queryCSharp.ts b/src/core/treeSitter/queries/queryCSharp.ts index b42e3d7..303cac2 100644 --- a/src/core/treeSitter/queries/queryCSharp.ts +++ b/src/core/treeSitter/queries/queryCSharp.ts @@ -2,49 +2,49 @@ export const queryCSharp = ` (comment) @comment (class_declaration - name: (identifier) @name.definition.class - ) @definition.class + name: (identifier) @name.definition.class +) @definition.class (class_declaration - bases: (base_list (_) @name.reference.class) - ) @reference.class + bases: (base_list (_) @name.reference.class) +) @reference.class (interface_declaration - name: (identifier) @name.definition.interface - ) @definition.interface + name: (identifier) @name.definition.interface +) @definition.interface (interface_declaration - bases: (base_list (_) @name.reference.interface) - ) @reference.interface + bases: (base_list (_) @name.reference.interface) +) @reference.interface (method_declaration - name: (identifier) @name.definition.method - ) @definition.method + name: (identifier) @name.definition.method +) @definition.method (object_creation_expression - type: (identifier) @name.reference.class - ) @reference.class + type: (identifier) @name.reference.class +) @reference.class (type_parameter_constraints_clause - target: (identifier) @name.reference.class - ) @reference.class + target: (identifier) @name.reference.class +) @reference.class (type_constraint - type: (identifier) @name.reference.class - ) @reference.class + type: (identifier) @name.reference.class +) @reference.class (variable_declaration - type: (identifier) @name.reference.class - ) @reference.class + type: (identifier) @name.reference.class +) @reference.class (invocation_expression - function: - (member_access_expression - name: (identifier) @name.reference.send - ) + function: + (member_access_expression + name: (identifier) @name.reference.send + ) ) @reference.send (namespace_declaration - name: (identifier) @name.definition.module + name: (identifier) @name.definition.module ) @definition.module `; diff --git a/src/core/treeSitter/queries/queryTypescript.ts b/src/core/treeSitter/queries/queryTypescript.ts index 6f0325c..16ed14f 100644 --- a/src/core/treeSitter/queries/queryTypescript.ts +++ b/src/core/treeSitter/queries/queryTypescript.ts @@ -3,9 +3,9 @@ export const queryTypescript = ` (import_clause (identifier) @name.reference.module)) @definition.import (import_statement - (import_clause + (import_clause (named_imports - (import_specifier + (import_specifier name: (identifier) @name.reference.module))) @definition.import) (comment) @comment diff --git a/tests/core/tokenCount/tokenCount.test.ts b/tests/core/tokenCount/tokenCount.test.ts index 6b41d15..bc8736e 100644 --- a/tests/core/tokenCount/tokenCount.test.ts +++ b/tests/core/tokenCount/tokenCount.test.ts @@ -113,7 +113,7 @@ describe('TokenCounter', () => { ## Subheading * List item 1 * List item 2 - + **Bold text** and _italic text_ `; const mockTokens = Array(15).fill(1); // 15 tokens diff --git a/website/client/components/Home/PackButton.vue b/website/client/components/Home/PackButton.vue index 7102526..ab4690c 100644 --- a/website/client/components/Home/PackButton.vue +++ b/website/client/components/Home/PackButton.vue @@ -6,11 +6,12 @@ type="submit" > {{ loading ? 'Processing...' : 'Pack' }} -
-
{