gtree
— print project directory tree (respects.gitignore
, hides.git
andnode_modules
).gcode
— generate a CODEDUMP.txt file containing all source code (respects.gitignore
and.dumpignore
, excludes binaries,node_modules
,.git
, and the dump file itself).- Clean, minimal CLI design with industry-standard help messages.
- Works out-of-the-box with pnpm, npm, or yarn.
$ lovcli gtree kazago --depth 1
kazago
├── .gitignore
├── assets
├── background.js
├── content.js
├── icons
├── LICENSE
├── manifest.json
├── popup.css
├── popup.html
├── popup.js
├── README.md
└── utils.js
$ lovcli gcode .
Cleaning old code dumps in /path/to/project...
Generating CODEDUMP.txt in /path/to/project...
Done! Generated 8 files.
The CODEDUMP.txt
output:
╔══════════════════════════╗
║ src/index.js ║
╚══════════════════════════╝
import fs from "fs/promises";
import path from "path";
console.log("Hello lovcli!");
-
Clone this repo and install dependencies:
git clone https://github.com/hiiiroko/lovcli.git cd lovcli pnpm install
-
Link the CLI globally:
pnpm link --global
-
Verify installation:
lovcli --help
lovcli/
├── bin/
│ └── lovcli.js # CLI entry point
├── commands/
│ ├── gcode.js # gcode command implementation
│ └── gtree.js # gtree command implementation
├── utils/
│ └── ignore.js # shared ignore logic
└── package.json
lovcli is inspired by or built upon:
- commander.js – robust command-line interface library
- ignore –
.gitignore
and ignore rule parser - tree – classic directory listing tool
MIT License – see LICENSE for details.
Issues, feature requests, and PRs are welcome!
Feel free to fork the repo and open a pull request.