{"_id":"@chengyixu/cmtx","name":"@chengyixu/cmtx","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@chengyixu/cmtx","version":"1.0.0","description":"Comment eXtractor — extract comments from source code files with line numbers. Supports JS, TS, Python, Go, Rust, C/C++, Java, Ruby, Shell, and more.","main":"cmtx.js","bin":{"cmtx":"cmtx.js"},"scripts":{"test":"node cmtx.js --version"},"keywords":["comments","extract","source-code","cli","code-review","todo","fixme","lint","documentation","devtools"],"author":{"name":"Chengyi Xu","email":"Chengyi_xu@outlook.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/chengyixu/cmtx.git"},"bugs":{"url":"https://github.com/chengyixu/cmtx/issues"},"homepage":"https://github.com/chengyixu/cmtx#readme","engines":{"node":">=14"},"_id":"@chengyixu/cmtx@1.0.0","_nodeVersion":"25.8.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-1I74eProssHq1kePomAI28X3Md+kZ72sxZt8ZNz5GYLXEQLpON91ZUa60y4Ekj5ScO8GyBzFvtUdyx+9bEL1sg==","shasum":"adc07b588fe07f839de13715819a8ab9a1273dd4","tarball":"https://registry.npmjs.org/@chengyixu/cmtx/-/cmtx-1.0.0.tgz","fileCount":3,"unpackedSize":21190,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDqPgYP78PrR/Pxb2WYfyv6b+fIeIZKB/IrkdVEu7aBIAIhAK/1L4Hc66akezAXOw51oT644YbA0/4P2i/hKPaXD5mZ"}]},"_npmUser":{"name":"chengyixu","email":"Chengyi_xu@outlook.com"},"directories":{},"maintainers":[{"name":"chengyixu","email":"Chengyi_xu@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cmtx_1.0.0_1778065838644_0.47577785381038984"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-06T11:10:38.537Z","1.0.0":"2026-05-06T11:10:38.777Z","modified":"2026-05-06T11:10:38.962Z"},"maintainers":[{"name":"chengyixu","email":"Chengyi_xu@outlook.com"}],"description":"Comment eXtractor — extract comments from source code files with line numbers. Supports JS, TS, Python, Go, Rust, C/C++, Java, Ruby, Shell, and more.","homepage":"https://github.com/chengyixu/cmtx#readme","keywords":["comments","extract","source-code","cli","code-review","todo","fixme","lint","documentation","devtools"],"repository":{"type":"git","url":"git+https://github.com/chengyixu/cmtx.git"},"author":{"name":"Chengyi Xu","email":"Chengyi_xu@outlook.com"},"bugs":{"url":"https://github.com/chengyixu/cmtx/issues"},"license":"MIT","readme":"# cmtx — Comment eXtractor\n\nExtract comments from source code files with line numbers. Zero dependencies.\n\n## Install\n\n```bash\nnpm install -g @chengyixu/cmtx\n```\n\n## Usage\n\n```bash\n# Extract all comments from a file\ncmtx src/app.ts\n\n# Find TODO/FIXME/HACK/NOTE/BUG comments\ncmtx --todo src/\n\n# Extract only Python comments\ncmtx --lang py script.py\n\n# Pipe code from stdin\ncat file.c | cmtx -l c\n\n# JSON output for scripting\ncmtx --json lib/ | jq '.[] | select(.type == \"multi\")'\n```\n\n## Supported Languages\n\n| Language | Extensions |\n|----------|-----------|\n| JavaScript/TypeScript | .js, .ts, .jsx, .tsx, .mjs, .cjs |\n| Python | .py, .py3 |\n| Go | .go |\n| Rust | .rs |\n| C | .c, .h |\n| C++ | .cpp, .hpp, .cc, .hh, .cxx, .hxx |\n| Java | .java |\n| Ruby | .rb |\n| Shell | .sh, .bash, .zsh |\n| Swift | .swift |\n| Kotlin | .kt, .kts |\n| SQL | .sql |\n| Lua | .lua |\n| Haskell | .hs |\n| Elm | .elm |\n| Elixir | .ex, .exs |\n\n## Flags\n\n| Flag | Description |\n|------|-------------|\n| `--help`, `-h` | Show help |\n| `--version`, `-V` | Show version |\n| `--todo`, `-t` | Only comments with TODO/FIXME/HACK/XXX/NOTE/BUG |\n| `--single`, `-s` | Only single-line comments |\n| `--multi`, `-m` | Only multi-line/block comments |\n| `--no-color` | Disable colored output |\n| `--json`, `-j` | Output as JSON array |\n| `--lang`, `-l` | Force language (e.g., `js`, `py`, `go`) |\n\n## Examples\n\n```bash\n# Find all TODO comments in a TypeScript project\n$ cmtx --todo src/\nsrc/utils/helpers.ts:42 [single]  // TODO: optimize this loop\nsrc/api/client.ts:128 [single]    // FIXME: handle timeout edge case\n\n# Extract docstrings from Python\n$ cmtx --multi lib.py\nlib.py:5-10 [multi]  Parse the configuration file and return settings dict\n\n# JSON output for CI/CD integration\n$ cmtx --json --todo src/ > todos.json\n```\n","readmeFilename":"README.md","_rev":"1-1b843d3a12bca31619da322f21119f3a"}