Skip to content
commit-aiPublic

About

A script for doing a full (yet safe) reset of APM dependencies

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

reset-apm

reset-apm removes APM-managed files in the current project, runs apm install, restores local Claude/Copilot configuration that must survive the reset, and validates the result.

Prerequisites

  • macOS with Bash
  • The apm command on PATH
  • Run from the root of an APM-enabled project

Install

From this repository:

bash install.sh

The installer copies reset-apm to ~/.local/bin/reset-apm. It creates that directory if needed and does not edit shell configuration. If ~/.local/bin is missing from PATH, it prints the export command to add yourself.

Re-run bash install.sh after updating this repository to replace the installed command.

Usage

From the project you want to reset:

reset-apm

The command always operates on the directory where it is invoked, not on the directory containing the installed executable.

What it preserves

Before deleting APM-managed targets, the command preserves and restores:

  • .claude/settings.local.json
  • .claude/plans
  • .claude/rules
  • .github/plans

It also snapshots an existing .apm directory and fails if apm install changes its contents.

Safety

This is intentionally destructive for APM-managed artifacts in the current directory:

  • .agents
  • .claude
  • .github
  • apm_modules
  • apm.lock.yaml

Only run it from the intended project root. An empty .github directory is reported as a warning because it is valid when no Copilot-targeted skills, agents, hooks, or MCP configuration are installed.

Tests

Install the test dependency and run the isolated Bats integration tests:

npm ci
npm test

The tests create and clean up their own temporary project fixtures. They do not use or modify the installed ~/.local/bin/reset-apm. Run a single suite with npx bats tests/reset-apm.bats or npx bats tests/install.bats.


Copyrighy © 2026 Commit AI. All rights reserved.

About

A script for doing a full (yet safe) reset of APM dependencies

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages