Skip to content

Add built-in about console command with --only and --json - #630

Open
dev2k6 wants to merge 1 commit into
laravel:0.xfrom
dev2k6:feat/about-command
Open

dev2k6 wants to merge 1 commit into
laravel:0.xfrom
dev2k6:feat/about-command

Conversation

@dev2k6

@dev2k6 dev2k6 commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Adds the built-in about console command (src/foundation/about.rs, registered in src/foundation/commands.rs) with zero new dependencies and zero breaking changes.

Summary of Changes

  • Sections & styling: Displays Environment, Drivers, and Features using crates/console's Tone palette (Accent headers, Muted dot leaders, ENABLED/OFF badges, ANSI-sanitized values, plain output when captured/piped/NO_COLOR).
  • Flags: Supports --only=<sections> (comma-separated or repeated, case-insensitive, deduplicated, canonical order, exit code 2 via console.usage_error on unknown/empty sections) and --json (compact single-line JSON keyed by lowercase section names with typed bool/string values).
  • Feature-gated & secret-safe: Compiles cleanly under --no-default-features, --features database-sqlite, and --all-features. Never reads or prints APP_KEY, APP_PREVIOUS_KEYS, DB/Redis URLs or credentials, or third-party API tokens/endpoints.
  • Docs & Tests: Updates docs/console.md, docs/configuration.md, and tests/console.rs; adds unit tests in src/foundation/about.rs and 6 integration tests in tests/about.rs (including secret redaction coverage across 19 secret classes).

Verification

  • cargo fmt --check: pass
  • cargo clippy --workspace --all-features --all-targets -- -D warnings: pass (0 warnings)
  • cargo test --features database-sqlite --lib about: 4 passed, 0 failed
  • cargo test --features database-sqlite --test core: 614 passed, 0 failed
  • cargo test --no-default-features --test core about: 7 passed, 0 failed (0 warnings in about.rs/tests/about.rs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants