Skip to content

feat(cli): rename localnet clean to remove, keep clean as alias - #227

Merged
zheli merged 2 commits into
mainfrom
add-clean-alias-remove
Jul 7, 2026
Merged

feat(cli): rename localnet clean to remove, keep clean as alias#227
zheli merged 2 commits into
mainfrom
add-clean-alias-remove

Conversation

@zheli

@zheli zheli commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What

Makes remove the canonical name for the destructive LocalNet teardown command, with clean retained as a backward-compatible alias. dpm localnet remove and dpm localnet clean are equivalent; flags are unchanged (--name, --all, --force, --dry-run).

Why

remove names the action plainly and reads unambiguously next to the other lifecycle verbs (down, stop, remove), where "clean" could be mistaken for a non-destructive tidy-up. Keeping clean as an alias means existing scripts, CI pipelines, and muscle memory keep working with no breaking change.

Changes

  • internal/cli/localnet/clean.go: Use: "remove", Aliases: ["clean"]; flag/help wording updated.
  • internal/cli/help.go (+ help_test.go): --help advertises remove.
  • internal/telemetry/allowlist.go: add remove to commandVerbs (telemetry records the canonical CommandPath() verb); clean kept so historical counters stay valid.
  • internal/cli/cli_test.go: asserts both remove and the clean alias require a target.
  • Skills docs (internal/skills/docs/{ci-localnet,localnet-lifecycle}.md): use remove — the skills-lint test resolves the canonical Name(), not aliases, so executable examples must use remove.
  • Docs (localnet-lifecycle, observability, dashboard-customization), CI examples, down.go hint, Web UI copy, and design mockups: use remove (noting the clean alias where user-facing).
  • docs/changes-from-proposal.md: records the cleanremove rename + the new alias (required by AGENTS.md proposal-deviation tracking).

Notes

  • docs/tests/* left unchanged — historical test records, out of grant-facing scope and not linted.
  • website/ guide pages are auto-generated from docs/ at build time (sync-docs), so no manual website edits are needed.

Verification

  • make lint — 0 issues
  • make test — all packages pass
  • Manual: localnet --help lists remove; localnet remove --help shows Aliases: clean; localnet clean still dispatches.

`remove` names the destructive teardown action plainly and reads
unambiguously next to the other lifecycle verbs (down, stop, remove),
where "clean" could be mistaken for a non-destructive tidy-up. The
`clean` alias is retained so existing scripts, CI pipelines, and muscle
memory keep working without a breaking change.

- clean.go: Use "remove", Aliases ["clean"]; flag/help wording updated
- help.go + help_test.go: advertise "remove" in --help
- telemetry allowlist: add "remove" verb (canonical CommandPath), keep
  "clean" so historical counters stay valid
- cli_test.go: assert both remove and the clean alias require a target
- skills docs: ci-localnet / lifecycle use "remove" (skills-lint resolves
  canonical Name(), not aliases)
- docs, CI examples, down.go hint, Web UI copy, mockups: use "remove"
- changes-from-proposal.md: record the clean -> remove rename + alias
@zheli
zheli force-pushed the add-clean-alias-remove branch from 3094bf4 to afa2029 Compare July 7, 2026 19:00
The command was renamed clean -> remove; align the source filenames
(internal/cli/localnet and internal/localnet, plus its test) so the
file names match the canonical command. Pure file rename — symbols and
behaviour are unchanged.
@zheli
zheli merged commit 7ab614b into main Jul 7, 2026
6 checks passed
@zheli
zheli deleted the add-clean-alias-remove branch July 7, 2026 19:26
zheli added a commit that referenced this pull request Jul 11, 2026
M1-INST-003 still grepped for clean in --help after #227/#229 renamed
the visible command to remove. Check remove in help and keep clean as
an alias smoke test.
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