{"id":19418973,"url":"https://github.com/playform/npmsummary","last_synced_at":"2025-02-25T03:43:35.786Z","repository":{"id":250962957,"uuid":"835989519","full_name":"PlayForm/NPMSummary","owner":"PlayForm","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-24T01:15:40.000Z","size":62,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"Current","last_synced_at":"2024-10-24T16:28:00.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PlayForm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"playform-cloud-collective"}},"created_at":"2024-07-31T00:00:23.000Z","updated_at":"2024-10-24T01:15:42.000Z","dependencies_parsed_at":"2024-08-08T10:43:40.351Z","dependency_job_id":"f726509a-c998-438a-9efb-f4d7a5e40624","html_url":"https://github.com/PlayForm/NPMSummary","commit_stats":null,"previous_names":["playform/npmsummary"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlayForm%2FNPMSummary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlayForm%2FNPMSummary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlayForm%2FNPMSummary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlayForm%2FNPMSummary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PlayForm","download_url":"https://codeload.github.com/PlayForm/NPMSummary/tar.gz/refs/heads/Current","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240599180,"owners_count":19826959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T13:15:46.072Z","updated_at":"2025-02-25T03:43:35.778Z","avatar_url":"https://github.com/PlayForm.png","language":"TypeScript","readme":"# 🗣️ [Summary]\n\n[Summary] is a powerful TypeScript library designed for efficient Git repository\nanalysis and summarization. It offers both sequential and parallel processing\ncapabilities, along with flexible file filtering options, all while leveraging\nthe [@pieces.app/pieces-os-client] SDK for enhanced functionality. Additionally,\n[Summary] communicates with a Rust SDK via WebSockets for improved performance\nand extended capabilities.\n\n[Summary] will generate a comprehensive summary of all commits and tags between\nthe first and the last commit in your Git repository.\n\n```typescript\nimport { Summary } from \"@playform/summary\";\n\nnew Summary().generateSummary({ Parallel: true }).then((Output) =\u003e {\n\tconsole.log(Output);\n});\n```\n\n## Feature\n\n-   Customizable file pattern matching\n-   Diff generation between Git tags\n-   Directory traversal and file filtering\n-   Exclusion of specified files or directories\n-   Git repository analysis\n-   Integration with [Pieces OS] via [@pieces.app/pieces-os-client] SDK\n-   Parallel and sequential processing modes\n-   WebSocket communication with Rust SDK for enhanced performance\n-   Support for multiple programming languages and file types\n-   Configurable logging levels\n-   Efficient handling of large repositories\n-   Asynchronous processing using Tokio runtime\n-   Flexible command-line interface using Clap\n-   Concurrent hash map implementation for improved performance\n-   Advanced regex-based file filtering and omission\n-   Customizable diff options for fine-grained control\n-   Integration with external AI services for code analysis (via Pieces OS)\n\n## [Pieces OS] Integration and Rust SDK Communication\n\nThe [Summary] library integrates with [Pieces OS] through the [@pieces.app/pieces-os-client]\nSDK, allowing it to:\n\n-   Generate comprehensive diff logs and release notes automatically\n-   Provide AI-driven code analysis and insights\n-   Offer improved context-aware processing of repository changes\n-   Seamlessly interact with other [Pieces OS]-compatible development tools\n\nFurthermore, [Summary] establishes a WebSocket connection with the Summary Rust\nSDK, enabling:\n\n-   Real-time, high-performance data processing\n-   Efficient handling of large repositories and complex operations\n-   Access to Rust's powerful concurrency and memory safety features\n-   Seamless integration of Rust-based algorithms and utilities\n\nBy leveraging both [Pieces OS] and the Rust SDK, [Summary] can tap into a broader\necosystem of development tools and services, significantly expanding its capabilities\nbeyond basic file processing while ensuring optimal performance.\n\n## Installation 🚀\n\n```sh\nnpm install @playform/summary @pieces.app/pieces-os-client\n```\n\n## 🛠️ Usage\n\nHere's a basic example of how to use the Summary library:\n\n```typescript\nimport { Summary, SummaryOptions } from \"@playform/summary\";\nimport { PiecesApi } from \"@pieces.app/pieces-os-client\";\n\nconst summary = new Summary(new PiecesApi());\n\nsummary\n\t.generateSummary({\n\t\tParallel: true,\n\t\tRoot: \".\",\n\t\tExclude: [\"node_modules\"],\n\t\tPattern: \".git\",\n\t\tOmit: [\"Documentation\"],\n\t})\n\t.then((Output) =\u003e {\n\t\tconsole.log(Output);\n\t});\n```\n\n## Options\n\nThe [Summary] library can be used with various options:\n\n### Exclude\n\nExclude certain files or directories.\n\n```typescript\n{\n    Exclude: [\"node_modules\"],\n}\n```\n\n### Omit\n\nSpecify regex Patterns to Omit files from processing.\n\n```typescript\n{\n    Omit: [\n        /(?i)documentation/,\n        /(?i)target/,\n        /(?i)changelog\\.md$/,\n        /(?i)summary\\.md$/,\n    ],\n}\n```\n\n### Parallel\n\nRun processing in Parallel.\n\n```typescript\n{\n    Parallel: true,\n}\n```\n\n### Pattern\n\nSpecify a custom Pattern for matching.\n\n```typescript\n{\n    Pattern: \".git\",\n}\n```\n\n### Root\n\nSet the current working directory to a different folder.\n\n```typescript\n{\n    Root: \"/path/to/repository\",\n}\n```\n\nFor [Pieces OS] integration, refer to the [@pieces.app/pieces-os-client] documentation\nfor specific configuration options.\n\n## Examples\n\nAnalyze the current directory:\n\n```typescript\nnew Summary(new PiecesApi()).generateSummary().then((Output) =\u003e {\n\tconsole.log(Output);\n});\n```\n\nAnalyze a specific directory in Parallel:\n\n```typescript\nnew Summary(new PiecesApi())\n\t.generateSummary({\n\t\tParallel: true,\n\t\tRoot: \"D:\\\\Developer\",\n\t})\n\t.then((Output) =\u003e {\n\t\tconsole.log(Output);\n\t});\n```\n\nExclude additional directories:\n\n```typescript\nnew Summary(new PiecesApi())\n\t.generateSummary({\n\t\tParallel: true,\n\t\tExclude: [\"node_modules\", \"target\", \"dist\", \"vendor\"],\n\t})\n\t.then((Output) =\u003e {\n\t\tconsole.log(Output);\n\t});\n```\n\nOmit specific file Patterns:\n\n```typescript\nnew Summary(new PiecesApi())\n\t.generateSummary({\n\t\tParallel: true,\n\t\tOmit: [/\\.md$/, /\\.txt$/],\n\t})\n\t.then((Output) =\u003e {\n\t\tconsole.log(Output);\n\t});\n```\n\n## Dependencies\n\n[Summary] relies on several npm packages to provide its functionality:\n\n-   @pieces.app/pieces-os-client - For integration with Pieces OS\n-   simple-git - For Git repository operations\n-   glob - For file Pattern matching\n-   diff - For generating diffs between files\n-   worker-threads - For Parallel processing\n\n## Changelog\n\nSee [`CHANGELOG.md`](CHANGELOG.md) for a history of changes to this library.\n\n[Summary]: HTTPS://www.npmjs.com/package/@playform/summary\n[Pieces OS]: HTTPS://pieces.app\n[@pieces.app/pieces-os-client]:\n\tHTTPS://www.npmjs.com/package/@pieces.app/pieces-os-client\n","funding_links":["https://opencollective.com/playform-cloud-collective"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplayform%2Fnpmsummary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplayform%2Fnpmsummary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplayform%2Fnpmsummary/lists"}