Skip to content

Instantly share code, notes, and snippets.

@iTrauco
Created September 16, 2025 22:39
Show Gist options
  • Select an option

  • Save iTrauco/cc523b26e0e0cc85f98f137190a675b5 to your computer and use it in GitHub Desktop.

Select an option

Save iTrauco/cc523b26e0e0cc85f98f137190a675b5 to your computer and use it in GitHub Desktop.
#!/bin/zsh
#################################################################
# πŸ› οΈ DEVELOPMENT ALIASES & UTILITIES
# Project structure visualization and development workflow helpers
# Author: @trauco
# Date Added: 2025-07-24
# Dependencies: tree
#################################################################
#################################################################
# βœ… DEPENDENCY CHECK
#################################################################
if ! command -v tree &> /dev/null; then
echo "⚠️ Warning: tree not found. Install with: brew install tree"
fi
#################################################################
# πŸ“ PROJECT STRUCTURE VISUALIZATION
#################################################################
# 🌳 structure - Clean tree view excluding ALL development artifacts
# Usage: structure (shows clean project structure)
# Excludes: Python, Node.js, Conda, Data Science, Docker, IDE artifacts
alias structure="tree -I 'venv*|env*|ENV*|.venv|.env|__pycache__|*.pyc|*.pyo|.pytest_cache|.mypy_cache|.coverage|htmlcov|.git|.gitignore|.github|*.egg-info|dist|build|.build|node_modules|npm-debug.log*|yarn-debug.log*|yarn-error.log*|.npm|.yarn|.next|.nuxt|out|.cache|.parcel-cache|.DS_Store|Thumbs.db|desktop.ini|.vscode|.idea|*.swp|*.swo|*~|.ipynb_checkpoints|.jupyter|conda-meta|pkgs|logs|trackers|dev-tools|temp|tmp|.docker|.dockerignore|Dockerfile*|coverage|.nyc_output|.tox|.nox|target|Cargo.lock|bin|obj|packages|*.log|*.tmp|*.temp' ."
# πŸ“‹ structurelog - Save timestamped project structure to logs directory
# Usage: structurelog (creates logs/structure_YYYY-MM-DD_HHMM_EST.md)
alias structurelog='function _structurelog() {
mkdir -p logs
local timestamp=$(date +"%Y-%m-%d_%H%M_EST")
local filepath="logs/structure_${timestamp}.md"
if [ -e "$filepath" ]; then
filepath="logs/structure_${timestamp}_$RANDOM.md"
fi
tree -I "venv*|env*|ENV*|.venv|.env|__pycache__|*.pyc|*.pyo|.pytest_cache|.mypy_cache|.coverage|htmlcov|.git|.gitignore|.github|*.egg-info|dist|build|.build|node_modules|npm-debug.log*|yarn-debug.log*|yarn-error.log*|.npm|.yarn|.next|.nuxt|out|.cache|.parcel-cache|.DS_Store|Thumbs.db|desktop.ini|.vscode|.idea|*.swp|*.swo|*~|.ipynb_checkpoints|.jupyter|conda-meta|pkgs|logs|trackers|dev-tools|temp|tmp|.docker|.dockerignore|Dockerfile*|coverage|.nyc_output|.tox|.nox|target|Cargo.lock|bin|obj|packages|*.log|*.tmp|*.temp" . > "$filepath"
echo "βœ… Project structure saved to: $filepath"
echo "πŸ“ View with: cat $filepath"
}; _structurelog'
#################################################################
# πŸ“š QUICK REFERENCE
# - structure: Clean tree view (excludes all dev artifacts)
# - structurelog: Save timestamped structure to logs/
#################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment