Skip to content

Add --map and --from flags for scoped repo serialization#3

Merged
MedUnes merged 1 commit intomasterfrom
feature/add-map-from-options
Apr 10, 2026
Merged

Add --map and --from flags for scoped repo serialization#3
MedUnes merged 1 commit intomasterfrom
feature/add-map-from-options

Conversation

@MedUnes
Copy link
Copy Markdown
Owner

@MedUnes MedUnes commented Apr 10, 2026

Summary

  • Add --map flag that produces a lightweight structural overview (hierarchical tree with token estimates, git last-modified annotations, and regex-based signature extraction for 10+ languages) instead of full file contents
  • Add --from flag that scopes output to specific files or directories (comma-separated), with warnings for missing/ignored paths
  • Both flags can be combined: --map --from produces a scoped structural map
  • Default dewdrops . behavior is unchanged

Details

  • The map mode enables a two-step workflow: paste the map into an LLM chat to get architectural awareness (~2-5% of full dump tokens), then use --from to provide only the files the LLM asks for.

  • Signature extraction covers Go, Python, JS/TS, Rust, Java/Kotlin, Ruby, PHP, C/C++, SQL, and Shell via regex patterns, with a fallback (first 3 non-empty lines) for unknown file types. Token estimation uses len(bytes) / 4.

  • Refactored Run() to accept a RunOptions struct. Extracted gitignore loading and path filtering into helpers. No new external dependencies.

@MedUnes MedUnes merged commit 369a3dc into master Apr 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant