khromov / ai-digest

A CLI tool to aggregate your codebase into a single Markdown file for use with Claude Projects or custom ChatGPTs.
https://www.npmjs.com/package/ai-digest
276 stars 25 forks source link

outputs folders/files (markdown) in reverse order #12

Open oneezy opened 2 weeks ago

oneezy commented 2 weeks ago

when running npx ai-digest in a codebase it will create the codebase.md file in reverse order.

for example, this folder/file structure:

svelte-5-docs
├── 01-api
│   ├── 01-introduction.md
│   ├── 02-runes.md
│   ├── 03-snippets.md
│   ├── 04-event-handlers.md
│   └── 05-imports.md
├── 02-examples
│   ├── 01-universal-reactivity.md
│   ├── 02-fine-grained-reactivity.md
│   ├── 04-old-vs-new.md
│   └── 06-more-examples.md
└── 03-appendix
    ├── 01-faq.md
    ├── 02-breaking-changes.md
    └── 03-deprecations.md

produces the codebase.md file:

# 03-appendix\03-deprecations.md

Aside from the... (omitted)

It would be ideal if the markdown would be aligned with the code structure

khromov commented 2 weeks ago

Thanks for the report, let me see if we can order the files in natural alphabetical order.