{"_id":"@belov.ai/source-to-llm","name":"@belov.ai/source-to-llm","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@belov.ai/source-to-llm","version":"0.0.1","description":"Extract source code from files and format it for LLM context/prompt","type":"module","main":"source-to-llm.js","bin":{"source-to-llm":"source-to-llm.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["llm","prompt","code","context","extractor","source-code","ai","cli"],"author":{"name":"belov.ai"},"license":"MIT","dependencies":{"commander":"^13.0.0","glob":"^11.0.0"},"repository":{"type":"git","url":"git+https://github.com/ai-belov/source-to-llm.git"},"bugs":{"url":"https://github.com/ai-belov/source-to-llm/issues"},"homepage":"https://github.com/ai-belov/source-to-llm#readme","engines":{"node":">=18.0.0"},"_id":"@belov.ai/source-to-llm@0.0.1","gitHead":"780bc19b4e6605a9144122ca9826533778f169c1","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-KRmAajslVQ4IttZmi2nUMMnQvtSbdBWJU46RUq/MdzIcO2kJytdFN5uZUDehnGc70xuANz6mO7d/hXmqsDG1Iw==","shasum":"3aa86a48f4fbe685738841d454406bf94d528c7f","tarball":"https://registry.npmjs.org/@belov.ai/source-to-llm/-/source-to-llm-0.0.1.tgz","fileCount":4,"unpackedSize":6301,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICxEolPjHMiJX7cuKE8477ZI0zLxBVIMdKTnSlrhKdjKAiB6GzFT5oEfv4niqNhj1OPOVX1EMXveMWNVp+38hB+9sg=="}]},"_npmUser":{"name":"belov.ai","email":"belov.penrose@gmail.com"},"directories":{},"maintainers":[{"name":"belov.ai","email":"belov.penrose@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/source-to-llm_0.0.1_1736462533825_0.36529882501869504"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-09T22:42:13.744Z","0.0.1":"2025-01-09T22:42:13.990Z","modified":"2025-01-09T22:42:14.260Z"},"maintainers":[{"name":"belov.ai","email":"belov.penrose@gmail.com"}],"description":"Extract source code from files and format it for LLM context/prompt","homepage":"https://github.com/ai-belov/source-to-llm#readme","keywords":["llm","prompt","code","context","extractor","source-code","ai","cli"],"repository":{"type":"git","url":"git+https://github.com/ai-belov/source-to-llm.git"},"author":{"name":"belov.ai"},"bugs":{"url":"https://github.com/ai-belov/source-to-llm/issues"},"license":"MIT","readme":"# source-to-llm\n\nA lightweight CLI tool that extracts source code from your project files and formats it for use in LLM prompts. Perfect for preparing your codebase for AI analysis, code review, or documentation tasks.\n\n## Usage\n\nThe easiest way to use this tool is with `npx`:\n\n```bash\n# Basic usage - will process .ts, .js, .tsx, .jsx files in current directory\nnpx @belov.ai/source-to-llm\n\n# Process specific file types\nnpx @belov.ai/source-to-llm -p \"**/*.py\" \"**/*.java\"\n\n# Process specific directory\nnpx @belov.ai/source-to-llm -d /path/to/your/project\n\n# Exclude specific patterns\nnpx @belov.ai/source-to-llm -i \"**/tests/**\" \"**/vendor/**\"\n\n# Use custom separator between files\nnpx @belov.ai/source-to-llm -s \"====\"\n```\n\n### Options\n\n- `-p, --pattern <patterns...>` - File patterns to match (default: `[\"**/*.ts\", \"**/*.js\", \"**/*.tsx\", \"**/*.jsx\"]`)\n- `-i, --ignore <patterns...>` - Patterns to ignore (default: `[\"**/node_modules/**\", \"**/dist/**\", \"**/build/**\"]`)\n- `-s, --separator <string>` - Separator between files (default: 80 dashes)\n- `-d, --dir <path>` - Target directory path (default: current working directory)\n\n## Example Output\n\n```\nFile: src/components/Button.tsx\n--------------------------------------------------------------------------------\nimport React from 'react';\n\nexport const Button = ({ children }) => {\n  return <button>{children}</button>;\n};\n--------------------------------------------------------------------------------\n\nFile: src/utils/format.ts\n--------------------------------------------------------------------------------\nexport const formatDate = (date: Date): string => {\n  return date.toISOString();\n};\n--------------------------------------------------------------------------------\n```\n\n## Common Use Cases\n\n1. **AI Code Review**\n   ```bash\n   npx @belov.ai/source-to-llm -p \"src/**/*.ts\" > code-for-review.txt\n   ```\n\n2. **Documentation Generation**\n   ```bash\n   # Extract all component files\n   npx @belov.ai/source-to-llm -p \"src/components/**/*.[tj]sx\" > components.txt\n   ```\n\n3. **Focused Analysis**\n   ```bash\n   # Extract specific features or modules\n   npx @belov.ai/source-to-llm -p \"src/features/auth/**/*.ts\" -i \"**/*.test.ts\"\n   ```\n\n4. **Multi-Language Projects**\n   ```bash\n   # Process multiple file types\n   npx @belov.ai/source-to-llm -p \"**/*.py\" \"**/*.ts\" \"**/*.go\"\n   ```\n\n## Requirements\n\n- Node.js >= 18.0.0\n\n## License\n\nMIT\n\n## Author\n\nbelov.ai\n","readmeFilename":"README.md"}