Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Ctx – CLI to print your codebase structure (folders, files, exports) (npmjs.com)
2 points by eloq98 5 days ago | hide | past | favorite | 1 comment




I was working on a project and needed to keep track of what was where which files existed, what they exported, and what could be refactored. I use LLMs as labor for this kind of cleanup, but feeding them useful context meant a lot of copy/paste.

So I wrote a single-file node script that just printed out the structure. Folders, files, and exported symbols. Nothing fancy. It solved my problem.

Then I thought maybe this helps someone else too. Packaged it, published to npm, and moved on.

Didn't promote it anywhere. Saw 1k downloads in a week. Figured I'd post it here.

What it does:

Scans a directory

Prints folders, files, and trivially detectable exports

No analysis, no inference just what exists

Try it:

npx @eloquence98/ctx ./your-project

It's intentionally shallow. If something can't be reliably read from source text, it's excluded.

Happy to answer questions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: