@lyralabs/gitignore-cli
v0.1.2
Published
Tiny CLI to add and remove entries in .gitignore
Downloads
43
Readme
@lyralabs/gitignore-cli
Tiny CLI to add and remove entries in .gitignore. Zero dependencies.
Install
npm i -g @lyralabs/gitignore-cliOr run without installing:
npx @lyralabs/gitignore-cli -vUsage
gitignore [options] add <pattern>... Add one or more patterns (idempotent)
gitignore [options] rm <pattern>... Remove one or more patterns (exact match)
gitignore -h, --help Show help
gitignore -v, --version Show version
Options:
-f, --file <path> Path to gitignore file (default: ./.gitignore)Examples
gitignore add ./venv
gitignore add 'data/*.png' .env dist node_modules
gitignore rm .env.example old.txt
# target a different file
gitignore -f ./src/.gitignore add node_modulesBehavior
addis idempotent — re-adding an existing pattern is a no-op.rmmatches lines exactly (after trimming whitespace) and exits non-zero if not found.- Default target is
.gitignorein the current working directory. - Parent directories are created automatically when writing.
License
MIT
