Skip to content

feat!: restructure CLI from dd-search to ddog with domain-first commands - #2

Merged
tmcinerney merged 5 commits into
mainfrom
tmcinerney/restructure-cli-to-ddog
Dec 17, 2025
Merged

feat!: restructure CLI from dd-search to ddog with domain-first commands#2
tmcinerney merged 5 commits into
mainfrom
tmcinerney/restructure-cli-to-ddog

Conversation

@tmcinerney

Copy link
Copy Markdown
Owner

Summary

Restructures the CLI from a flat command structure to a strict domain-first pattern (GitHub-style) and renames the binary from dd-search to ddog. This provides better organization and scalability for future features.

Changes

Breaking Changes

  • Command structure: Changed from flat commands to domain/action hierarchy
    • dd-search logsddog logs search
    • dd-search spansddog spans search
    • dd-search metricsddog metrics query
    • dd-search list-metricsddog metrics list
  • Binary name: Renamed from dd-search to ddog

Features

  • Created shared CLI components (TimeRange, Pagination) for DRY code reuse
  • Organized CLI into modular domain-based structure:
    • src/cli/args.rs - Main CLI and domain enum
    • src/cli/shared.rs - Reusable argument structures
    • src/cli/logs.rs, spans.rs, metrics.rs - Domain-specific actions
  • Reorganized command implementations into domain subdirectories
  • Updated all documentation, GitHub workflows, and release artifacts

Impact

  • 23 files changed: 307 insertions(+), 361 deletions(-)
  • Affected areas: CLI interface, command routing, documentation, CI/CD
  • Future extensibility: Easy to add new domains (monitors, dashboards) and actions

Testing

  • ✅ All unit tests pass (26 library + 18 binary tests)
  • ✅ Build succeeds for new binary name
  • ✅ Pre-commit hooks pass (formatting, clippy, tests)

tmcinerney and others added 5 commits December 16, 2025 16:07
- Rename binary from dd-search to ddog
- Restructure commands to use domain/action pattern (GitHub-style)
  - dd-search logs → ddog logs search
  - dd-search spans → ddog spans search
  - dd-search metrics → ddog metrics query
  - dd-search list-metrics → ddog metrics list
- Create shared CLI components (TimeRange, Pagination) for DRY code
- Organize commands into domain subdirectories
- Update all documentation, workflows, and imports

BREAKING CHANGE: Command structure has changed to domain-first pattern.
All commands now require both a domain and action verb.
Update all commit reference URLs in CHANGELOG.md to reflect the repository rename from dd-search to ddog.
@tmcinerney
tmcinerney merged commit 8cff75d into main Dec 17, 2025
3 checks passed
@tmcinerney
tmcinerney deleted the tmcinerney/restructure-cli-to-ddog branch December 17, 2025 06:25
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