Structurize is an interactive Bash tool for project structure and dependency analysis. It exports the layout and relationships of your codebase in formats like JSON, NDJSON, Markdown, or Text, making it ideal for AI preprocessing, documentation, DevOps audits, and code reviews.
- ✨ Export in four formats:
json,ndjson,markdown,text - 🧩 Dependency analysis: Detect imports and module relationships
- 📊 Graph visualization: Generate dependency graphs in DOT or Mermaid format
- 🔍 Cycle detection: Identify circular dependencies
- ⏳ Live progress bar (clean, readable display)
- ⚡ Lightweight – only requires
bash,find,sed,stat - 🤖 AI-ready: NDJSON and Markdown are token-efficient with included prompt templates
- ⚙️ Advanced filtering: file types, subdirectories, exclusions
- 📅 Optional: Metadata export (file size, timestamps)
- 🪄 Optional
--debugmode for transparent file tracking
chmod +x structurize.sh
./structurize.sh --helpsudo mv structurize.sh /usr/local/bin/structurize
structurize --helpNow you can call the tool from anywhere via structurize.
| Short | Long | Description |
|---|---|---|
-d |
--directory |
Base directory (default: current directory) |
-o |
--output |
Output file path (default: project_structure.json) |
-f |
--format |
Output format: text, markdown, json, ndjson |
-n |
--ndjson |
Shortcut for -f ndjson |
-m |
--meta |
Include file size and modification timestamp |
-e |
--exclude |
Comma-separated paths or glob patterns to exclude |
-s |
--select |
Comma-separated subdirectories to include |
-t |
--types |
Comma-separated file extensions (e.g. js,ts,json) |
-a |
--analyze |
Analyze dependencies: none (default), deps, imports |
--graph |
Output dependency graph in: dot | |
--debug |
Show current file inline during export | |
-h |
--help |
Display help message |
structurize -n --debug -m \
-e node_modules,.git,public \
-t js,jsx,ts,tsx,json \
-s src \
-o frontend.ndjsonstructurize -n --debug -m \
-e node_modules,.git,tests \
-t js,jsx,ts,tsx \
-s src \
-a deps \
-o project_deps.ndjsonstructurize -f json -a deps \
-e node_modules,.git \
-t js,ts \
--graph mermaid \
-o project_deps.jsonstructurize -n --debug -m \
-e node_modules,.git,tests \
-t js,ts,json,yml,yaml,conf,dockerignore,env \
-o project.ndjsonOptional: Markdown format for documentation:
structurize -f markdown -m -o structure.mdThe dependency analysis feature helps you:
- Track imports/requires between files
- Visualize module relationships with graph output
- Detect circular dependencies that could cause issues
- Generate AI-ready prompts for architecture improvements
Currently supported languages for dependency analysis:
- JavaScript (ES6 imports, CommonJS require)
- TypeScript (imports)
- Python (import, from...import)
More languages will be added in future versions.
Generate visual representations of your project's dependencies:
- DOT format: Compatible with Graphviz for high-quality graphs
- Mermaid format: Embed in Markdown and GitHub
Example:
structurize -a deps --graph mermaid -t js,ts -o deps.jsonThis creates:
deps.jsonwith detailed dependency datadeps_graph.mermaidwith Mermaid-formatted graphdeps_ai_prompt.txtwith an AI prompt template
When running in dependency analysis mode, Structurize automatically generates an AI prompt template to help you:
- Improve your architecture
- Resolve circular dependencies
- Optimize module structure
Simply attach the output file to the generated prompt and send to your preferred AI assistant.
- 🤖 Preprocessing for AI (ChatGPT, LLMs, Copilots)
- 📄 Auto-documentation of codebases
- 📊 DevOps audits & compliance exports
- 📚 Developer onboarding & code reviews
- 🧩 Architecture analysis and improvements
- 🔍 Dependency management and optimization
MIT License. Free to use and modify.
Run with --debug first to see what gets included:
structurize -n --debug -o check.ndjsonIf nothing is exported: double-check your filters (-t, -s, -e) or remove them for testing.