@kundan100/pater
v1.4.2
Published
personal assistant in terminal for devs, for recurring workflows.
Readme
pater
personal assistant in terminal for devs, for recurring workflows.
|
|
| -------------------------------------------- |
how to use
- for installation, run command
npm install -g @kundan100/pater - for usage, run command
pater. - few features run out of box without any configuration e.g.
- feature: kill port
- feature: System > Performance > Clear temp files
- few features need some configuration (e.g.your project-local-path)
- feature: Copy Local Changes
- done.
feature list:
- kill port
- when propmted, enter port-number and hit ENTER key.
- System > Performance > Clear temp files
- will clean temp files.
- Copy Local Changes
- use case: keep local changes in a local companion file and apply these changes in actual source file when needed.
- In your repo, make a copy of any source file and rename that by adding a prefix
cykLocal__. - You can gitignore/exclude this file from showing up in git-changes section.
- update
.\config.jsand.\src\features\copy-local-changes\local-changes-manifest.jsonas explained in sectionProject setup for local dev
- Show status
- shows information (machine, processes, task-manager info etc...)
- Start service
- Stop service
command options
- Help:
pater --help- Basic:
pater
# prints: Welcome cyk-pa!- Version:
pater --version- Config:
pater --config
# prints: info regarding this tool's config- Echo (test arg forwarding):
pater --echo "hello"
# prints: hello- Verbose (prints debug info to stderr):
pater --verbose --echo hi
# prints debug info to stderr then 'hi' to stdoutProject setup for local dev
- clone the repo.
- create a file (.env for local use only) in project root.
- add this line
NPM_TOKEN=your-npm-token-for-publishing
- add this line
- Configuration before running (follow sample)
- app level configuration
- update
.\config.js - OPEN_CONFIG_FILE_WHILE_CHECKING_CONFIG
- update
- feature level configuration
- update
.\src\features\copy-local-changes\local-changes-manifest.json - provide
repoRoot - provide
files(list of files) which needs to have local changes.
- update
- app level configuration
- for local testing of changes (without publishing or install):
- run caommand
node index.js, from project root.
- run caommand
- done.
Publish to npm
- after clone on your local, make sure that your file (./.env) has npm-token.
- for publishing:
- increase version number in package.json.
- run command (
npm run publish:env)
How to add new feature in this utility
- Add a menu-option in file (
src\menu\menu.json). - Create a utility (e.g.
src\features\system\clearTempFiles.js) - Consume this newly created utility in file (
src\menu\index.js)
