Skip to content

[codex] Add clean command for managed tools#24

Merged
halkn merged 1 commit into
mainfrom
feat-clean-managed-tools
Apr 29, 2026
Merged

[codex] Add clean command for managed tools#24
halkn merged 1 commit into
mainfrom
feat-clean-managed-tools

Conversation

@halkn

@halkn halkn commented Apr 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add ptm clean [--apply] for removing ptm-managed release tools that are no longer configured.
  • Move release installs under ${XDG_DATA_HOME:-~/.local/share}/ptm/tools/<bin>/current and publish $XDG_BIN_HOME entries as symlinks.
  • Remove opt_dir support; full archive extraction is now driven by bin_path_in_archive / extra_bins.
  • Add per-tool .ptm.json metadata for managed release installs.

Breaking Changes / Migration Notes

  • opt_dir is no longer a supported config field and is ignored by config loading.
  • Release tools are no longer installed directly into $XDG_BIN_HOME; they are stored under the ptm managed root and exposed through symlinks.
  • Existing release tools installed before this layout are not automatically adopted. They become managed after reinstall/update.
  • ptm clean --apply removes only directories under the ptm managed root and symlinks that point into those directories.

npm / Bun Follow-up

ptm clean currently manages release-tool directories only. The CLI shape should support npm/bun later, but the internal clean plan will need to grow beyond tool_dir deletion to model package-manager uninstall actions.

Validation

  • uv run pytest passed: 164 tests
  • uv run ruff check src tests passed
  • uv run ruff format --check src tests passed
  • uv run ty check src tests passed

@halkn halkn marked this pull request as ready for review April 29, 2026 12:32
@halkn halkn merged commit 66e5ef6 into main Apr 29, 2026
1 check passed
@halkn halkn deleted the feat-clean-managed-tools branch April 29, 2026 12:32
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