{"id":31230860,"url":"https://github.com/cleman25/forge-tree","last_synced_at":"2026-01-20T16:53:16.294Z","repository":{"id":309654913,"uuid":"1037078763","full_name":"Cleman25/forge-tree","owner":"Cleman25","description":"A powerful tool to scaffold project structures from ASCII tree diagrams. Supports smart detection of project types, custom templates, and extensive configuration options.","archived":false,"fork":false,"pushed_at":"2025-08-14T22:18:53.000Z","size":302,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-19T03:24:02.898Z","etag":null,"topics":["generation","javascript","nodejs","npm-package","open-source","path-validation","project-analysis","project-scanner","project-structure","treemap","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cleman25.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":".github/SECURITY.md","support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"Cleman25","custom":["https://paypal.me/clxmxnt25"]}},"created_at":"2025-08-13T03:21:10.000Z","updated_at":"2025-08-14T23:08:49.000Z","dependencies_parsed_at":"2025-08-14T23:21:20.144Z","dependency_job_id":null,"html_url":"https://github.com/Cleman25/forge-tree","commit_stats":null,"previous_names":["cleman25/tree-forge","cleman25/forge-tree"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/Cleman25/forge-tree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleman25%2Fforge-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleman25%2Fforge-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleman25%2Fforge-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleman25%2Fforge-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cleman25","download_url":"https://codeload.github.com/Cleman25/forge-tree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleman25%2Fforge-tree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276383596,"owners_count":25632690,"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","status":"online","status_checked_at":"2025-09-22T02:00:08.972Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["generation","javascript","nodejs","npm-package","open-source","path-validation","project-analysis","project-scanner","project-structure","treemap","typescript"],"created_at":"2025-09-22T10:14:11.529Z","updated_at":"2025-09-22T10:14:12.606Z","avatar_url":"https://github.com/Cleman25.png","language":"TypeScript","funding_links":["https://github.com/sponsors/Cleman25","https://paypal.me/clxmxnt25"],"categories":[],"sub_categories":[],"readme":"# Forge Tree\r\n\r\n[![npm version](https://badge.fury.io/js/forge-tree.svg)](https://badge.fury.io/js/forge-tree)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n[![Node.js Version](https://img.shields.io/node/v/forge-tree.svg)](https://nodejs.org)\r\n\r\nA powerful tool to scaffold project structures from ASCII tree diagrams. Supports smart detection of project types, custom templates, and extensive configuration options.\r\n\r\n## Documentation\r\n\r\n### Getting Started\r\n- [Installation and Basic Usage](#installation)\r\n- [Quick Start Guide](#quick-start)\r\n- [Command Line Options](#command-line-options)\r\n\r\n### Core Concepts\r\n- [Tree File Format](#tree-file-format)\r\n- [Path Handling Guide](docs/path-handling.md)\r\n- [Validation Rules](docs/path-handling.md#validation-rules)\r\n- [Conflict Resolution](docs/path-handling.md#conflict-resolution)\r\n\r\n### Logging and Analysis\r\n- [Log Viewer Guide](docs/log-viewer.md)\r\n  - [Quick Start](docs/log-viewer.md#quick-start)\r\n  - [Features](docs/log-viewer.md#features)\r\n  - [File Formats](docs/log-viewer.md#file-formats)\r\n  - [Cache Management](docs/log-viewer.md#cache-management)\r\n  - [Keyboard Shortcuts](docs/log-viewer.md#keyboard-shortcuts)\r\n  - [Customization](docs/log-viewer.md#customization)\r\n  - [Troubleshooting](docs/log-viewer.md#troubleshooting)\r\n- [Browser Configuration](docs/browser-config.md)\r\n\r\n### Example Configurations\r\n- [Monorepo Setup](docs/examples/monorepo.md)\r\n- [Next.js Application](docs/examples/next-app.md)\r\n- [Microservices Architecture](docs/examples/microservices.md)\r\n\r\n### Advanced Topics\r\n- [Custom Initializers](#custom-initializers)\r\n- [Smart Detectors](#smart-detectors)\r\n- [Statistics and Analysis](#statistics-output)\r\n- [Generated Structure](#generated-structure-display)\r\n\r\n### Guides and References\r\n- [Troubleshooting Guide](docs/troubleshooting.md)\r\n- [Path Handling Guide](docs/path-handling.md)\r\n- [Error Messages](#error-handling)\r\n- [Best Practices](docs/troubleshooting.md#best-practices)\r\n\r\n### Development\r\n- [Architecture Overview](#architecture)\r\n- [Adding Features](#adding-features)\r\n- [Testing Guide](#testing)\r\n- [Scripts and Commands](#scripts)\r\n\r\n## Features\r\n\r\n- 🌳 Parse ASCII tree diagrams into real directory structures\r\n- 🔍 Smart project type detection (Next.js, Firebase, etc.)\r\n- 🎨 Support for multiple tree styles and formats\r\n- 📝 Extensive commenting capabilities\r\n- 🛠️ Custom initializers and templates\r\n- 📊 Detailed project statistics\r\n- 📋 Progress tracking and validation\r\n- 🔄 Git integration\r\n\r\n## Requirements\r\n\r\n- Node.js \u003e= 18.0.0\r\n\r\n## Installation\r\n\r\n```bash\r\n# Global installation (recommended)\r\nnpm install -g forge-tree\r\n\r\n# Local installation\r\nnpm install forge-tree\r\n\r\n# Development setup\r\ngit clone https://github.com/Cleman25/forge-tree.git\r\ncd forge-tree\r\nnpm ci\r\nnpm run build\r\nnpm link  # Makes the CLI available globally\r\n```\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# Create a new project\r\nforge-tree my-project --tree \"my-project/\\n  src/\\n  package.json\"\r\n\r\n# Use a tree file\r\nforge-tree --tree-file project.tree\r\n\r\n# Enable all features\r\nforge-tree --detectors --dotfiles --git\r\n\r\n# Create GitHub repo\r\nforge-tree my-project --github --private\r\n```\r\n\r\n## Basic Usage\r\n\r\n```bash\r\nforge-tree [targetDir] --tree-file path/to/tree.txt\r\n# or\r\nforge-tree [targetDir] --tree \"root/\\n  child/\"\r\n```\r\n\r\n## Tree File Format\r\n\r\n### Basic Structure\r\n\r\n```\r\nproject/\r\n├─ src/\r\n│  ├─ index.ts\r\n│  └─ types.ts\r\n├─ test/\r\n│  └─ index.test.ts\r\n└─ package.json\r\n```\r\n\r\n### Alternative Styles\r\n\r\nSimple style:\r\n```\r\nproject/\r\n- src/\r\n  - index.ts\r\n  - types.ts\r\n- test/\r\n  - index.test.ts\r\n- package.json\r\n```\r\n\r\nCustom characters:\r\n```\r\nproject/\r\n+-- src/\r\n|   +-- index.ts\r\n|   `-- types.ts\r\n+-- test/\r\n|   `-- index.test.ts\r\n`-- package.json\r\n```\r\n\r\n### Comments\r\n\r\nMultiline comments at start/end:\r\n```\r\n\"\"\"\r\nProject description\r\nMultiple lines allowed\r\n\"\"\"\r\nproject/\r\n├─ src/\r\n│  ├─ index.ts  # Main entry\r\n│  └─ types.ts  // Type definitions\r\n├─ test/        /* Test directory */\r\n└─ package.json\r\n\r\n/*\r\nAdditional notes\r\nCan go here\r\n*/\r\n```\r\n\r\nAlternative comment styles:\r\n```\r\n#\r\nProject description\r\nUsing hash style\r\n#\r\nproject/\r\n...\r\n\r\n/**\r\n * Project description\r\n * Using JSDoc style\r\n */\r\nproject/\r\n...\r\n```\r\n\r\n## Smart Detectors\r\n\r\nBuilt-in detectors automatically set up:\r\n\r\n### Web Applications\r\n- Next.js apps (`web`, `app`, `frontend` directories)\r\n- Firebase projects (`firebase`, `functions` directories)\r\n\r\n### Services\r\n- Backend services (`service`, `api`, `server` directories)\r\n- Real-time services (`realtime`, `socket` directories)\r\n\r\n### Libraries\r\n- TypeScript libraries (`lib`, `package`, `sdk` directories)\r\n- UI components (`ui`, `components`, `design-system` directories)\r\n\r\n### Infrastructure\r\n- Database setup (`db`, `database`, `sql`, `mongo` directories)\r\n- Docker/K8s (`infra`, `deploy`, `ops` directories)\r\n\r\n### Configuration\r\n- TypeScript config (`config`, `tsconfig` directories)\r\n- ESLint/Prettier (`eslint`, `prettier` directories)\r\n\r\n## Custom Initializers\r\n\r\n### Adding Initializers via CLI\r\n\r\n```bash\r\n# Add a new initializer\r\nforge-tree --add-init \\\r\n  --init-id \"redis-init\" \\\r\n  --init-name \"Redis Setup\" \\\r\n  --init-desc \"Initialize Redis with default config\" \\\r\n  --init-cmd \"redis-cli\" \\\r\n  --init-args \"ping\" \\\r\n  --init-match-dirs \"redis,cache\" \\\r\n  --init-match-files \"redis.conf\" \\\r\n  --init-env \"REDIS_PORT=6379\" \\\r\n  --init-workdir \"target\"\r\n\r\n# Add target directories for an initializer\r\nforge-tree --add-init-target \\\r\n  --init-id \"redis-init\" \\\r\n  --target-dirs \"services/cache,infra/redis\"\r\n\r\n# List all initializers\r\nforge-tree --list-init\r\n\r\n# Remove an initializer\r\nforge-tree --remove-init \"redis-init\"\r\n```\r\n\r\n### Configuration File\r\n\r\nYou can also define initializers in your config:\r\n\r\n```json\r\n{\r\n  \"customInitializers\": [\r\n    {\r\n      \"id\": \"redis-init\",\r\n      \"name\": \"Redis Setup\",\r\n      \"description\": \"Initialize Redis with default config\",\r\n      \"command\": \"redis-cli\",\r\n      \"args\": [\"ping\"],\r\n      \"matchDirs\": [\"redis\", \"cache\"],\r\n      \"matchFiles\": [\"redis.conf\"],\r\n      \"env\": {\r\n        \"REDIS_PORT\": \"6379\"\r\n      },\r\n      \"workingDir\": \"target\"\r\n    }\r\n  ],\r\n  \"initTargets\": [\r\n    {\r\n      \"initId\": \"redis-init\",\r\n      \"targetDirs\": [\"services/cache\", \"infra/redis\"]\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n### Using Custom Initializers\r\n\r\n```bash\r\n# Use specific initializers\r\nforge-tree --tree-file project.tree --use-init \"redis-init,mongo-init\"\r\n\r\n# Skip specific initializers\r\nforge-tree --tree-file project.tree --skip-init \"firebase-init\"\r\n\r\n# Run only custom initializers\r\nforge-tree --tree-file project.tree --only-custom-init\r\n```\r\n\r\n## Configuration Options\r\n\r\n### Command Line Options\r\n\r\n```bash\r\nOptions:\r\n  --tree-file             Path to ASCII tree file\r\n  --tree                  ASCII tree string (quoted)\r\n  --targetDir            Where to scaffold (default: \".\")\r\n  --tabIndentationSize   Spaces per depth level (default: 2)\r\n  --detectAsciiGuides    Skip │ ├ └ guides (default: true)\r\n  --dry-run             Print actions only\r\n  --yes, -y             Assume yes for prompts\r\n  --pm                  Preferred package manager (pnpm|yarn|npm)\r\n  --detectors           Enable smart detectors (default: true)\r\n  --dotfiles           Generate ignores/formatters (default: true)\r\n  --git                Initialize git repo\r\n  --github             Create GitHub repo\r\n  --private            Create private GitHub repo\r\n  --no-push            Don't push after creating remote\r\n  --branch             Initial branch name (default: \"main\")\r\n  --log                Enable logging (default: true)\r\n  --log-file           Log file path\r\n  --log-level          Log level (silent|error|warn|info|debug|verbose)\r\n  --log-format         Log format (text|json)\r\n  --quiet              Suppress console output\r\n  --show-tree         Show input tree structure (default: true)\r\n  --show-result       Show generated structure (default: true)\r\n  --allowNestedInit   Allow initialization in nested directories\r\n\r\nInitializer Management:\r\n  --add-init          Add a new custom initializer\r\n  --init-id           ID for the new initializer\r\n  --init-name         Display name for the initializer\r\n  --init-desc         Description of what the initializer does\r\n  --init-cmd          Command to run\r\n  --init-args         Command arguments (comma-separated)\r\n  --init-match-dirs   Directories to match (comma-separated)\r\n  --init-match-files  Files to check for (comma-separated)\r\n  --init-env          Environment variables (KEY=VALUE,...)\r\n  --init-workdir      Working directory (root|target)\r\n  --add-init-target   Add target directories for an initializer\r\n  --target-dirs       Directories to target (comma-separated)\r\n  --list-init         List all available initializers\r\n  --remove-init       Remove a custom initializer\r\n  --use-init          Use specific initializers (comma-separated)\r\n  --skip-init         Skip specific initializers (comma-separated)\r\n  --only-custom-init  Run only custom initializers\r\n```\r\n\r\n### Tree Style Configuration\r\n\r\n```json\r\n{\r\n  \"treeStyle\": {\r\n    \"indent\": \"  \",\r\n    \"vertical\": \"│\",\r\n    \"horizontal\": \"─\",\r\n    \"corner\": \"└\",\r\n    \"branch\": \"├\"\r\n  }\r\n}\r\n```\r\n\r\n### Logging Configuration\r\n\r\n```json\r\n{\r\n  \"logging\": {\r\n    \"enabled\": true,\r\n    \"level\": \"info\",\r\n    \"file\": \"forge-tree.log\",\r\n    \"console\": true,\r\n    \"format\": \"text\",\r\n    \"includeTimestamps\": true,\r\n    \"includeDuration\": true,\r\n    \"includeMetadata\": true\r\n  }\r\n}\r\n```\r\n\r\n## Example Structures\r\n\r\n### Monorepo Setup\r\n```\r\nmonorepo/\r\n├─ apps/\r\n│  ├─ web/\r\n│  │  ├─ src/\r\n│  │  └─ package.json\r\n│  └─ api/\r\n│     ├─ src/\r\n│     └─ package.json\r\n├─ packages/\r\n│  ├─ ui/\r\n│  │  ├─ src/\r\n│  │  └─ package.json\r\n│  └─ utils/\r\n│     ├─ src/\r\n│     └─ package.json\r\n├─ config/\r\n│  ├─ tsconfig/\r\n│  └─ eslint/\r\n└─ package.json\r\n```\r\n\r\n### Next.js Project\r\n```\r\nweb-app/\r\n├─ app/\r\n│  ├─ layout.tsx\r\n│  ├─ page.tsx\r\n│  └─ blog/\r\n│     └─ [slug]/\r\n│        └─ page.tsx\r\n├─ components/\r\n│  └─ Button.tsx\r\n├─ lib/\r\n│  └─ utils.ts\r\n└─ package.json\r\n```\r\n\r\n### Backend Service\r\n```\r\nservice/\r\n├─ src/\r\n│  ├─ index.ts\r\n│  ├─ routes/\r\n│  ├─ models/\r\n│  └─ utils/\r\n├─ test/\r\n│  └─ api.test.ts\r\n├─ prisma/\r\n│  └─ schema.prisma\r\n└─ package.json\r\n```\r\n\r\n## Statistics and Analysis\r\n\r\nThe tool provides comprehensive logging and analysis capabilities through its built-in log viewer:\r\n\r\n### Log Viewer\r\n- **Real-time Monitoring**:\r\n  - Live log tailing with automatic updates\r\n  - In-memory and browser cache storage\r\n  - Automatic visualization switching\r\n  - Status indicators and progress tracking\r\n\r\n- **Interactive Visualizations**:\r\n  - Timeline charts with operation durations\r\n  - Treemap views of operation distribution\r\n  - Gantt diagrams for process flow\r\n  - Network graphs for dependencies\r\n  - Auto-updating during tailing\r\n  - Collapsible sections and entries\r\n\r\n- **Data Management**:\r\n  - Text and JSON format support\r\n  - Browser localStorage caching\r\n  - No server dependency\r\n  - Automatic data parsing\r\n  - Memory-efficient storage\r\n\r\n- **User Interface**:\r\n  - Dark/light theme support\r\n  - Collapsible sections\r\n  - Custom scrollbars\r\n  - Path highlighting\r\n  - Duration formatting\r\n  - Pretty-printed JSON\r\n  - Responsive design\r\n\r\n- **Analysis Tools**:\r\n  - Full-text search\r\n  - Log level filtering\r\n  - Performance metrics\r\n  - Success rate tracking\r\n  - Operation statistics\r\n  - Export options (PDF, CSV, JSON)\r\n\r\n- **File System Stats**:\r\n  - Directory operations tracking\r\n  - File operation monitoring\r\n  - Initializer success rates\r\n  - Real-time updates\r\n  - Visual progress indicators\r\n\r\n### Project Statistics\r\nThe tool generates detailed statistics about your project structure:\r\n\r\n- Total directories and files\r\n- Maximum directory depth\r\n- Empty directories count\r\n- Average files per directory\r\n- Largest directory\r\n- Root level structure\r\n- Language breakdown\r\n- File categories (source, config, test, etc.)\r\n- File extensions\r\n\r\nStatistics are saved to `forge-tree.stats.json` and can be viewed through:\r\n- Console output with progress bars\r\n- Interactive web viewer\r\n- JSON export for further analysis\r\n\r\n### Viewing Logs and Stats\r\n```bash\r\n# View both logs and stats\r\nforge-tree view --log --with-stats\r\n\r\n# View only logs\r\nforge-tree view --log forge-tree.log\r\n\r\n# View only stats\r\nforge-tree view --stats forge-tree.stats.json\r\n\r\n# List recent files\r\nforge-tree view --list\r\n\r\n# Browser preferences\r\nforge-tree view --browser chrome --incognito\r\n```\r\n\r\nSee the [Log Viewer Guide](docs/log-viewer.md) for more details.\r\n\r\n## Generated Structure Display\r\n\r\nAfter generation, the tool shows:\r\n- The actual generated structure\r\n- Comparison with expected structure\r\n- Missing and additional items\r\n- Completion percentage\r\n- Placeholders for large directories (e.g., `node_modules/`)\r\n\r\n## Error Handling\r\n\r\nThe tool validates:\r\n- Tree structure syntax\r\n- Comment formatting\r\n- Node name validity\r\n- Directory depth consistency\r\n- Path uniqueness\r\n- Comment block closure\r\n\r\n## Command Line Help\r\n\r\n| Category | Command | Description | Example |\r\n|----------|---------|-------------|---------|\r\n| **Basic Usage** |\r\n| | `--tree` | Direct tree string input | `--tree \"root/\\n  child/\"` |\r\n| | `--tree-file` | Read tree from file | `--tree-file project.tree` |\r\n| | `--targetDir` | Output directory | `--targetDir ./output` |\r\n| **Tree Formatting** |\r\n| | `--tabIndentationSize` | Spaces per level | `--tabIndentationSize 4` |\r\n| | `--detectAsciiGuides` | Parse tree characters | `--detectAsciiGuides false` |\r\n| | `--treeStyle` | Custom tree characters | See Tree Style Configuration |\r\n| **Project Setup** |\r\n| | `--pm` | Package manager | `--pm pnpm` |\r\n| | `--detectors` | Enable smart detection | `--detectors true` |\r\n| | `--dotfiles` | Generate config files | `--dotfiles true` |\r\n| **Git Integration** |\r\n| | `--git` | Initialize repository | `--git` |\r\n| | `--github` | Create GitHub repo | `--github \"repo-name\"` |\r\n| | `--private` | Private repository | `--private` |\r\n| | `--branch` | Initial branch name | `--branch main` |\r\n| | `--no-push` | Skip initial push | `--no-push` |\r\n| **Logging** |\r\n| | `--log` | Enable logging | `--log true` |\r\n| | `--log-file` | Log file path | `--log-file \"forge.log\"` |\r\n| | `--log-level` | Log verbosity | `--log-level debug` |\r\n| | `--log-format` | Log output format | `--log-format json` |\r\n| | `--quiet` | Suppress console | `--quiet` |\r\n| **Log Viewer** |\r\n| | `view --log` | View log file | `view --log forge-tree.log` |\r\n| | `view --stats` | View stats file | `view --stats forge-tree.stats.json` |\r\n| | `view --with-log` | Include logs | `view --stats --with-log` |\r\n| | `view --with-stats` | Include stats | `view --log --with-stats` |\r\n| | `view --list` | List recent files | `view --list` |\r\n| | `view --cleanup` | Clean cache | `view --cleanup` |\r\n| | `view --browser` | Browser preference | `view --browser chrome` |\r\n| | `view --incognito` | Private mode | `view --incognito` |\r\n| **Display** |\r\n| | `--show-tree` | Show input structure | `--show-tree` |\r\n| | `--show-result` | Show output structure | `--show-result` |\r\n| **Initialization** |\r\n| | `--allowNestedInit` | Allow nested inits | `--allowNestedInit` |\r\n| | `--add-init` | Add custom initializer | See Custom Initializers |\r\n| | `--use-init` | Use specific inits | `--use-init \"redis,mongo\"` |\r\n| | `--skip-init` | Skip specific inits | `--skip-init \"firebase\"` |\r\n| | `--only-custom-init` | Custom inits only | `--only-custom-init` |\r\n| **Other** |\r\n| | `--dry-run` | Preview actions | `--dry-run` |\r\n| | `--yes` | Auto-confirm prompts | `--yes` |\r\n| | `--help` | Show help | `--help` |\r\n\r\n## Architecture\r\n\r\n```mermaid\r\ngraph TD\r\n    A[CLI Input] --\u003e B[Parser]\r\n    B --\u003e C[Validator]\r\n    C --\u003e D[Detector Manager]\r\n    D --\u003e E[Generator]\r\n    E --\u003e F[Action Executor]\r\n    F --\u003e G[Post Processor]\r\n```\r\n\r\n## Development Guide\r\n\r\n### Adding Features\r\n\r\n1. **New Detector**\r\n   ```ts\r\n   export const MyDetector: Detector = {\r\n     id: \"my-detector\",\r\n     match: (node, cfg) =\u003e boolean,\r\n     prompt: async (node) =\u003e boolean,\r\n     generate: async (node, cfg) =\u003e GeneratorResult\r\n   };\r\n   ```\r\n\r\n2. **New Generator**\r\n   ```ts\r\n   export const MyGenerator = {\r\n     createActions: (node: TreeNode): PlanAction[] =\u003e {\r\n       return [\r\n         { type: \"mkdir\", path: \"...\" },\r\n         { type: \"write\", path: \"...\", content: \"...\" }\r\n       ];\r\n     }\r\n   };\r\n   ```\r\n\r\n3. **New Command**\r\n   ```ts\r\n   yargs\r\n     .command('my-command', 'Description', {\r\n       // options\r\n     }, async (argv) =\u003e {\r\n       // handler\r\n     });\r\n   ```\r\n\r\n### Testing\r\n\r\n1. **Unit Tests**\r\n   ```bash\r\n   # Run specific test\r\n   npm test -- src/__tests__/my.test.ts\r\n   \r\n   # Watch mode\r\n   npm run test:watch\r\n   ```\r\n\r\n2. **Integration Tests**\r\n   ```bash\r\n   # E2E tests\r\n   npm test -- src/__tests__/e2e.test.ts\r\n   ```\r\n\r\n3. **Coverage**\r\n   ```bash\r\n   npm run ci:test\r\n   ```\r\n\r\n## Scripts\r\n\r\n```bash\r\n# Build the project\r\nnpm run build\r\n\r\n# Watch mode during development\r\nnpm run dev\r\n\r\n# Run tests\r\nnpm test\r\nnpm run test:watch\r\n\r\n# Release commands\r\nnpm run release:patch  # Bump patch version\r\nnpm run release:minor  # Bump minor version\r\nnpm run release:major  # Bump major version\r\n\r\n# CI/CD commands\r\nnpm run ci             # Full CI pipeline\r\nnpm run ci:verify     # Run all checks\r\nnpm run ci:lint       # Run linting\r\nnpm run ci:test       # Run tests with coverage\r\nnpm run ci:build      # Production build\r\nnpm run ci:clean      # Clean build artifacts\r\nnpm run ci:audit      # Security audit\r\n\r\n# Local development\r\nnpm run local         # Install, build, and link locally\r\n```\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please read our contributing guidelines and submit pull requests to our GitHub repository.\r\n\r\n## Support\r\n\r\n- Report bugs on our [issue tracker](https://github.com/Cleman25/forge-tree/issues)\r\n- Ask questions using [GitHub Discussions](https://github.com/Cleman25/forge-tree/discussions)\r\n\r\n## License\r\n\r\n[MIT](LICENSE) © Clement Abel","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleman25%2Fforge-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleman25%2Fforge-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleman25%2Fforge-tree/lists"}