{"_id":"@avinashchby/readmecraft","name":"@avinashchby/readmecraft","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@avinashchby/readmecraft","version":"0.1.0","description":"Auto-generate beautiful, comprehensive README.md files by analyzing any codebase. Zero API calls — pure static analysis.","main":"dist/index.js","bin":{"readmecraft":"dist/cli.js"},"scripts":{"build":"tsc","dev":"ts-node src/cli.ts","test":"jest --passWithNoTests","lint":"tsc --noEmit","prepublishOnly":"npm run build"},"keywords":["readme","generator","documentation","cli","static-analysis","markdown"],"author":"","license":"MIT","dependencies":{"commander":"^12.1.0","fast-glob":"^3.3.2"},"devDependencies":{"@types/jest":"^29.5.12","@types/node":"^20.14.0","jest":"^29.7.0","ts-jest":"^29.1.4","ts-node":"^10.9.2","typescript":"^5.4.5"},"engines":{"node":">=18.0.0"},"gitHead":"a5662599bd2dc90d338e320e2a292f508b1552c7","types":"./dist/index.d.ts","_id":"@avinashchby/readmecraft@0.1.0","_nodeVersion":"25.5.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-Z9moamMubsCeiYvjsE/EWdviAS1sd9ZYsmZo0hhofMsvlyFVFHt2Mtqh/lZPkZPgsVZbmEu4Cm7E5Ed+ulaVow==","shasum":"4ac644ae57a89e3e894483174aa83ec890aec7e6","tarball":"https://registry.npmjs.org/@avinashchby/readmecraft/-/readmecraft-0.1.0.tgz","fileCount":75,"unpackedSize":201583,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDzlA9bYIOI++KeZPLGXobBb9yx7uzdGSgBwgY4fOGMuAiBW/jyF0p9z2Jgpmw1MP+Qlf2pbL9uTQel/IHtHfkO06A=="}]},"_npmUser":{"name":"avinashchby","email":"avinashchby@gmail.com"},"directories":{},"maintainers":[{"name":"avinashchby","email":"avinashchby@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/readmecraft_0.1.0_1773912859864_0.18436811397964048"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-19T09:34:19.784Z","0.1.0":"2026-03-19T09:34:20.022Z","modified":"2026-03-19T09:34:20.173Z"},"maintainers":[{"name":"avinashchby","email":"avinashchby@gmail.com"}],"description":"Auto-generate beautiful, comprehensive README.md files by analyzing any codebase. Zero API calls — pure static analysis.","keywords":["readme","generator","documentation","cli","static-analysis","markdown"],"license":"MIT","readme":"<!-- readmecraft:section:title -->\n# readmecraft\n\n[![language](https://img.shields.io/badge/language-JavaScript%2FTypeScript-yellow)](https://img.shields.io/badge/language-JavaScript%2FTypeScript-yellow) [![license](https://img.shields.io/badge/license-MIT-blue)](https://img.shields.io/badge/license-MIT-blue) [![version](https://img.shields.io/badge/version-0.1.0-green)](https://img.shields.io/badge/version-0.1.0-green) [![npm](https://img.shields.io/npm/v/readmecraft)](https://img.shields.io/npm/v/readmecraft)\n\n<!-- readmecraft:end:title -->\n\n<!-- readmecraft:section:description -->\n## Description\n\nAuto-generate beautiful, comprehensive README.md files by analyzing any codebase. Zero API calls — pure static analysis.\n\n<!-- readmecraft:end:description -->\n\n<!-- readmecraft:section:toc -->\n## Table of Contents\n\n- [Description](#description)\n- [Tech Stack](#tech-stack)\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Documentation](#api-documentation)\n- [Scripts](#scripts)\n- [Project Structure](#project-structure)\n- [Contributing](#contributing)\n- [License](#license)\n\n<!-- readmecraft:end:toc -->\n\n<!-- readmecraft:section:tech-stack -->\n## Tech Stack\n\n| Category | Technology | Version |\n|----------|-----------|---------|\n| Language | TypeScript | 5.4.5 |\n| Testing | jest | 29.7.0 |\n\n<!-- readmecraft:end:tech-stack -->\n\n<!-- readmecraft:section:installation -->\n## Installation\n\n```bash\nnpm install -g readmecraft\n```\n\n**Or clone and build from source:**\n\n```bash\ngit clone https://github.com/user/readmecraft\ncd readmecraft\nnpm install -g readmecraft\n```\n\n<!-- readmecraft:end:installation -->\n\n<!-- readmecraft:section:usage -->\n## Usage\n\n### CLI Usage\n\n```bash\nreadmecraft [options]\n```\n\n### Library Usage\n\n```js\n// CommonJS\nconst readmecraft = require('readmecraft');\n\n// ES Module\nimport readmecraft from 'readmecraft';\n```\n\n<!-- readmecraft:end:usage -->\n\n<!-- readmecraft:section:api-documentation -->\n## API Documentation\n\n### `analyzeProject`\n\n```\nfunction analyzeProject(rootDir: string): Promise<AnalysisResult> \n```\n\n> Run all detectors against a project root and return aggregated results. */\n\n### `detectEnvVars`\n\n```\nfunction detectEnvVars(rootDir: string): Promise<EnvVar[]> \n```\n\n> Scans source files for environment variable usage and parses .env.example. Returns a deduplicated list of EnvVar entries.\n\n### `detectInstallation`\n\n```\nfunction detectInstallation(rootDir: string, info: ProjectInfo): Promise<string> \n```\n\n> Detects installation method for the project and generates markdown instructions. @param rootDir - Absolute path to the project root. @param info    - Aggregated project metadata. @returns Markdown string for the Installation section.\n\n### `detectProjectInfo`\n\n```\nfunction detectProjectInfo(rootDir: string): Promise<ProjectInfo> \n```\n\n> Detect project metadata by reading manifest files found in rootDir. Checks package.json, Cargo.toml, pyproject.toml, and go.mod in order, stopping at the first hit. Lock files are then checked to determine the package manager.\n\n### `detectProjectTree`\n\n```\nfunction detectProjectTree(rootDir: string): Promise<string> \n```\n\n> Generates an ASCII tree of the project directory up to 3 levels deep. Excludes common non-source directories like node_modules and .git.\n\n### `detectScripts`\n\n```\nfunction detectScripts(rootDir: string): Promise<ScriptEntry[]> \n```\n\n> Detects project scripts from package.json, pyproject.toml, Cargo.toml, and Makefile. Returns a merged, deduplicated list of ScriptEntry values.\n\n### `detectUsage`\n\n```\nfunction detectUsage(rootDir: string, info: ProjectInfo): Promise<string> \n```\n\n> Detects usage patterns for the project and generates markdown documentation. @param rootDir - Absolute path to the project root. @param info    - Aggregated project metadata. @returns Markdown string for the Usage section.\n\n### `generateBadges`\n\n```\nfunction generateBadges(info: ProjectInfo): Badge[] \n```\n\n> Generates an array of shields.io badges for the given project. Badges are produced in a stable order:   language → license → version → npm → GitHub CI\n\n### `generateContributing`\n\n```\nfunction generateContributing(info: ProjectInfo): string \n```\n\n> Generates a Contributing section for the README. Covers the standard fork → branch → commit → PR workflow and includes the project-specific install command.\n\n### `generateLicense`\n\n```\nfunction generateLicense(info: ProjectInfo): string \n```\n\n> Generates a License section for the README. References the LICENSE file in the repository and includes the license type when known.\n\n### `renderApiDocs`\n\n```\nfunction renderApiDocs(entries: ApiEntry[]): string \n```\n\n> Render an array of ApiEntry values as a Markdown string. Entries are sorted alphabetically by name and capped at 20. Each entry is formatted as: ### `name` ``` signature ``` > description\n\n### `renderBadges`\n\n```\nfunction renderBadges(badges: Badge[]): string \n```\n\n> Renders a list of badges as a single line of Markdown image links. Each badge becomes `[![{label}]({url})]({url})` and they are joined with spaces.\n\n### `renderEnvVars`\n\n```\nfunction renderEnvVars(vars: EnvVar[]): string \n```\n\n> Renders a list of EnvVar entries as a Markdown table. Columns: Variable | Default | Source\n\n### `renderReadme`\n\n```\nfunction renderReadme(analysis: AnalysisResult, style: ReadmeStyle): string \n```\n\n> Assemble a complete README.md string from an AnalysisResult. 'detailed' produces all sections; 'minimal' produces only the core set.\n\n### `renderScripts`\n\n```\nfunction renderScripts(scripts: ScriptEntry[]): string \n```\n\n> Renders a list of ScriptEntry values as a Markdown table. Columns: Command | Description\n\n### `renderTechStack`\n\n```\nfunction renderTechStack(entries: TechStackEntry[]): string \n```\n\n> Render a list of tech stack entries as a Markdown table. | Category | Technology | Version | |----------|-----------|---------|\n\n### `updateReadme`\n\n```\nfunction updateReadme(existingContent: string, newContent: string): string \n```\n\n> Merge an existing README with freshly generated content. Rules: - If the existing file has no readmecraft markers, append a warning comment   and return the new content unchanged. - For each section in the new content, preserve the existing version when   the existing section contains `<!-- custom -->`, otherwise use the new   auto-generated version. - Content before the first marker (preamble) and after the last marker   (postamble) from the existing file is preserved.\n\n<!-- readmecraft:end:api-documentation -->\n\n<!-- readmecraft:section:scripts -->\n## Scripts\n\n| Command | Description |\n|---------|-------------|\n| `npm run build` | Compile / bundle for production |\n| `npm run dev` | Start development server with watch mode |\n| `npm run test` | Run test suite |\n| `npm run lint` | Lint source files |\n| `npm run prepublishOnly` | Build before publishing to npm |\n\n<!-- readmecraft:end:scripts -->\n\n<!-- readmecraft:section:project-structure -->\n## Project Structure\n\n```\nreadmecraft/\n├── src/\n│   ├── detectors/\n│   │   ├── api-docs.test.ts\n│   │   ├── api-docs.ts\n│   │   ├── ci-cd.test.ts\n│   │   ├── ci-cd.ts\n│   │   ├── docker.test.ts\n│   │   ├── docker.ts\n│   │   ├── env-vars.test.ts\n│   │   ├── env-vars.ts\n│   │   ├── installation.test.ts\n│   │   ├── installation.ts\n│   │   └── ... and 10 more\n│   ├── generators/\n│   │   ├── badges.test.ts\n│   │   ├── badges.ts\n│   │   ├── renderer.test.ts\n│   │   ├── renderer.ts\n│   │   ├── sections.ts\n│   │   ├── updater.test.ts\n│   │   └── updater.ts\n│   ├── analyzer.ts\n│   ├── cli.ts\n│   ├── index.ts\n│   └── types.ts\n├── .gitignore\n├── jest.config.js\n├── LICENSE\n├── package-lock.json\n├── package.json\n└── tsconfig.json\n```\n\n<!-- readmecraft:end:project-structure -->\n\n<!-- readmecraft:section:contributing -->\n## Contributing\n\nContributions to readmecraft are welcome!\n\n**Workflow:**\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feat/my-feature`\n3. Install dependencies:\n\n   ```bash\n   npm install\n   ```\n\n4. Make your changes and add tests where applicable\n5. Commit using conventional commits: `git commit -m \"feat: add my feature\"`\n6. Push to your fork: `git push origin feat/my-feature`\n7. Open a Pull Request against the `main` branch\n\nPlease ensure your code passes linting and all tests before submitting.\n\n<!-- readmecraft:end:contributing -->\n\n<!-- readmecraft:section:license -->\n## License\n\nThis project is licensed under the **MIT** license.\n\nSee the [LICENSE](LICENSE) file for the full license text.\n\n<!-- readmecraft:end:license -->\n\n---\n\n<p align=\"center\">Generated with ❤️ by <a href=\"https://github.com/readmecraft\">readmecraft</a></p>\n","readmeFilename":"README.md","_rev":"1-71c375475a8cf596b06a4d3aec0cd45f"}