Skip to content

feat: add site disk size to sites list - #5

Merged
jpollock merged 1 commit into
mainfrom
feature/site-sizing
Feb 2, 2026
Merged

jpollock merged 1 commit into
mainfrom
feature/site-sizing

Conversation

@jpollock

@jpollock jpollock commented Feb 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add --size / -s flag to lwp sites list command to show disk usage for each site
  • Size includes both site directory (~/Local Sites/<name>/) and MySQL runtime data (~/Library/Application Support/Local/run/<id>/)
  • Uses native OS commands for efficient, cross-platform calculation:
    • macOS/Linux: du -sk
    • Windows: PowerShell Get-ChildItem | Measure-Object
  • Shows total size at bottom when using --size flag
  • JSON output includes size (formatted) and sizeBytes (raw bytes) fields

Closes #4

Test plan

  • lwp sites list works unchanged (no size column)
  • lwp sites list --size shows Size column with formatted sizes
  • lwp sites list -s shorthand works
  • lwp --json sites list --size includes size and sizeBytes fields
  • Total size shown at bottom (e.g., "Total: 50 site(s), 28.96 GB")
  • Unit tests for formatBytes() function (15 tests)
  • All 121 tests pass

🤖 Generated with Claude Code

Add optional --size/-s flag to show disk usage for each site.
Size includes both site directory and MySQL runtime data.

Uses native OS commands for efficient size calculation:
- macOS/Linux: du -sk
- Windows: PowerShell Get-ChildItem

Closes #4

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jpollock
jpollock merged commit 94febaa into main Feb 2, 2026
0 of 4 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.

Add site sizing data in sites list

1 participant