Maintaining code around the CLI tool
The code is in src/cli/. The CLI commands are built using steps set in package.json - see the cli command and bin section.
$ npx ts-node src/cli/diffIndexGenerate.tsTo send to someone so they can use it without having Node installed or running a build step on their machine.
$ npx --yes pkg out/cli/diffIndexGenerateCommit.js -t node18-macosOn macOS, installed here as a symlink pointing to the .js file in the repo:
/opt/homebrew/bin/acm
If you get permissions issues, it is because the .js file was rebuilt and with standard permissions and needs to be linked again.
$ npm run cliCheck:
ls -l $(realpath /opt/homebrew/bin/acm)See package.json. Supposedly you should be able to leave out the project name when running npm link via an npm run ... command but I found this causes issues, so decided to always use the full name in the configuration. And to always unlink then link in one go because of permissions issues.