@adithya-naik/cmd-tracker 1.0.0 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ * @adithya-naik
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **Screenshots**
24
+ If applicable, add screenshots to help explain your problem.
25
+
26
+ **Desktop (please complete the following information):**
27
+ - OS: [e.g. iOS]
28
+ - Browser [e.g. chrome, safari]
29
+ - Version [e.g. 22]
30
+
31
+ **Smartphone (please complete the following information):**
32
+ - Device: [e.g. iPhone6]
33
+ - OS: [e.g. iOS8.1]
34
+ - Browser [e.g. stock browser, safari]
35
+ - Version [e.g. 22]
36
+
37
+ **Additional context**
38
+ Add any other context about the problem here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,26 @@
1
+ ## Summary
2
+
3
+ Describe the changes made in this pull request.
4
+
5
+ ## Related Issue
6
+
7
+ Closes #
8
+
9
+ ## Type of Change
10
+
11
+ - [ ] Bug fix
12
+ - [ ] New feature
13
+ - [ ] Documentation update
14
+ - [ ] Refactoring
15
+ - [ ] CI/CD
16
+
17
+ ## Testing
18
+
19
+ - [ ] Tested locally
20
+ - [ ] Existing functionality still works
21
+
22
+ ## Checklist
23
+
24
+ - [ ] Code follows project conventions
25
+ - [ ] Documentation updated if needed
26
+ - [ ] Linked to an issue
@@ -0,0 +1,95 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - develop
7
+ - main
8
+
9
+ # Least privilege permissions
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ lint:
15
+ name: Lint Code
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - name: Checkout code
19
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
20
+ with:
21
+ persist-credentials: false
22
+ - name: Setup Node.js
23
+ uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
24
+ with:
25
+ node-version: "20"
26
+ cache: "npm"
27
+ - name: Install dependencies
28
+ run: npm ci
29
+ - name: Run ESLint
30
+ run: npm run lint
31
+
32
+ validate:
33
+ name: Validate Code
34
+ runs-on: ubuntu-latest
35
+
36
+ steps:
37
+ - name: Checkout code
38
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
39
+ with:
40
+ persist-credentials: false
41
+
42
+ - name: Setup Node.js
43
+ uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
44
+ with:
45
+ node-version: "20"
46
+ cache: "npm"
47
+
48
+ - name: Install dependencies
49
+ run: npm ci
50
+
51
+ - name: Validate package.json
52
+ run: node -e "require('./package.json')"
53
+
54
+ - name: Validate project structure
55
+ run: |
56
+ echo "Checking required files exist..."
57
+ test -f bin/tracker.js && echo "✅ bin/tracker.js exists"
58
+ test -f src/utils/storage.js && echo "✅ storage.js exists"
59
+ test -f src/utils/categorizer.js && echo "✅ categorizer.js exists"
60
+ test -f src/utils/validator.js && echo "✅ validator.js exists"
61
+ test -f src/utils/hook.js && echo "✅ hook.js exists"
62
+ test -f src/commands/init.js && echo "✅ init.js exists"
63
+ test -f src/commands/save.js && echo "✅ save.js exists"
64
+ test -f src/commands/list.js && echo "✅ list.js exists"
65
+ test -f src/commands/search.js && echo "✅ search.js exists"
66
+ test -f src/commands/stats.js && echo "✅ stats.js exists"
67
+ test -f src/commands/clear.js && echo "✅ clear.js exists"
68
+ test -f src/commands/export.js && echo "✅ export.js exists"
69
+ test -f src/commands/favorite.js && echo "✅ favorite.js exists"
70
+ test -f src/commands/hook.js && echo "✅ hook command exists"
71
+ echo "✅ All required files present!"
72
+
73
+ - name: Test core functionality
74
+ run: |
75
+ echo "Testing categorizer..."
76
+ node -e "
77
+ const {categorize} = require('./src/utils/categorizer');
78
+ function assert(condition, message) {
79
+ if (!condition) throw new Error('FAILED: ' + message);
80
+ }
81
+ assert(categorize('git status') === 'git', 'git failed');
82
+ assert(categorize('npm install') === 'npm', 'npm failed');
83
+ assert(categorize('docker ps') === 'docker', 'docker failed');
84
+ assert(categorize('ls -la') === 'linux', 'linux failed');
85
+ assert(categorize('ng serve') === 'angular', 'angular failed');
86
+ assert(categorize('go run main.go') === 'go', 'go failed');
87
+ assert(categorize('aws s3 ls') === 'cloud', 'cloud failed');
88
+ assert(categorize('jest') === 'testing', 'testing failed');
89
+ console.log('✅ All categorizer tests passed!');
90
+ "
91
+
92
+ - name: Test CLI loads
93
+ run: |
94
+ node bin/tracker.js --version
95
+ echo "✅ CLI loads successfully!"
@@ -0,0 +1,77 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ jobs:
12
+ publish:
13
+ name: Bump Version and Publish
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
19
+ with:
20
+ fetch-depth: 0
21
+ token: ${{ secrets.GITHUB_TOKEN }}
22
+ persist-credentials: true
23
+
24
+ - name: Setup Node.js
25
+ uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
26
+ with:
27
+ node-version: "20"
28
+ registry-url: "https://registry.npmjs.org"
29
+ cache: "npm"
30
+
31
+ - name: Install dependencies
32
+ run: npm ci
33
+
34
+ - name: Configure git
35
+ run: |
36
+ git config user.name "github-actions[bot]"
37
+ git config user.email "github-actions[bot]@users.noreply.github.com"
38
+
39
+ - name: Bump patch version
40
+ run: |
41
+ npm version patch --no-git-tag-version
42
+ NEW_VERSION=$(node -e "console.log(require('./package.json').version)")
43
+ git add package.json package-lock.json
44
+ git commit -m "chore: bump version to $NEW_VERSION [skip ci]"
45
+ git tag "v$NEW_VERSION"
46
+
47
+ - name: Push version bump
48
+ run: git push origin main --follow-tags
49
+
50
+ - name: Get new version
51
+ id: get_version
52
+ run: |
53
+ NEW_VERSION=$(node -e "console.log(require('./package.json').version)")
54
+ echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
55
+
56
+ - name: Create GitHub Release
57
+ uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631
58
+ with:
59
+ tag_name: v${{ steps.get_version.outputs.version }}
60
+ name: v${{ steps.get_version.outputs.version }}
61
+ body: |
62
+ ## v${{ steps.get_version.outputs.version }}
63
+
64
+ ### Installation
65
+ npm install @adithya-naik/cmd-tracker
66
+
67
+ ### Quick Start
68
+ npx tracker init
69
+ npx tracker hook
70
+ source ~/.bashrc
71
+ env:
72
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73
+
74
+ - name: Publish to npm
75
+ run: npm publish --access public
76
+ env:
77
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1 @@
1
+ npx lint-staged
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ jatothadithyanaik@gmail.com.
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
package/README.md CHANGED
@@ -5,6 +5,10 @@
5
5
  ### A developer tool that auto-captures, categorizes and saves terminal commands per project for easy revision
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/@adithya-naik/cmd-tracker.svg)](https://www.npmjs.com/package/@adithya-naik/cmd-tracker)
8
+ [![npm downloads](https://img.shields.io/npm/dm/@adithya-naik/cmd-tracker.svg)](https://www.npmjs.com/package/@adithya-naik/cmd-tracker)
9
+ [![npm total downloads](https://img.shields.io/npm/dt/@adithya-naik/cmd-tracker.svg)](https://www.npmjs.com/package/@adithya-naik/cmd-tracker)
10
+ [![GitHub stars](https://img.shields.io/github/stars/adithya-naik/cmd-tracker.svg)](https://github.com/adithya-naik/cmd-tracker/stargazers)
11
+ [![GitHub issues](https://img.shields.io/github/issues/adithya-naik/cmd-tracker.svg)](https://github.com/adithya-naik/cmd-tracker/issues)
8
12
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
13
  [![Node.js](https://img.shields.io/badge/Node.js-v14%2B-green.svg)](https://nodejs.org)
10
14
 
@@ -55,7 +59,9 @@ npx tracker init
55
59
  **Step 2 — Enable automatic capture:**
56
60
  ```bash
57
61
  npx tracker hook
58
- source ~/.bashrc # or source ~/.zshrc on Mac
62
+ source ~/.bashrc # bash
63
+ source ~/.zshrc # zsh (Mac)
64
+ source ~/.config/fish/config.fish # fish
59
65
  ```
60
66
 
61
67
  **Step 3 — Work normally! Then revise:**
@@ -100,6 +106,16 @@ Commands are automatically categorized into:
100
106
  | 🟢 `node` | node, nodemon... |
101
107
  | 🔴 `angular` | ng new, ng serve, ng generate... |
102
108
  | 🐍 `python` | python, pip install... |
109
+ | 🔷 `go` | go build, go run, go get... |
110
+ | ☕ `java` | java, javac, mvn, gradle... |
111
+ | 🦀 `rust` | cargo build, cargo run, rustc... |
112
+ | 🔷 `dotnet` | dotnet run, dotnet build... |
113
+ | ☸️ `kubernetes` | kubectl get pods, helm install... |
114
+ | 🗄️ `database` | mysql, psql, mongosh, redis-cli... |
115
+ | ☁️ `cloud` | aws s3 ls, gcloud, az login... |
116
+ | 📥 `packageManagers` | yarn, pnpm, brew, snap... |
117
+ | 🧪 `testing` | jest, vitest, playwright, cypress... |
118
+ | 🤖 `ai` | claude, gemini, opencode, aider... |
103
119
  | 📌 `others` | everything else |
104
120
 
105
121
  ---
@@ -158,12 +174,49 @@ your-project/
158
174
  | Linux (bash) | ✅ Full support |
159
175
  | Windows (Git Bash) | ✅ Supported |
160
176
  | Windows (PowerShell) | ⚠️ Manual save only |
177
+ | Fish | ✅ Full support |
161
178
 
162
179
  > Windows CMD/PowerShell users: use `tracker save "command"` manually
163
180
  > or use Git Bash / WSL for automatic capture
164
181
 
165
182
  ---
166
183
 
184
+ ## 🐟 Fish Shell Support
185
+
186
+ ### Install Fish Shell
187
+
188
+ **Mac:**
189
+ ```bash
190
+ brew install fish
191
+ ```
192
+
193
+ **Ubuntu/Debian:**
194
+ ```bash
195
+ sudo apt install fish
196
+ ```
197
+
198
+ **Fedora:**
199
+ ```bash
200
+ sudo dnf install fish
201
+ ```
202
+
203
+ **Windows (WSL):**
204
+ ```bash
205
+ sudo apt install fish
206
+ ```
207
+
208
+ ### Setup tracker in Fish
209
+
210
+ ```bash
211
+ npx tracker init
212
+ npx tracker hook
213
+ source ~/.config/fish/config.fish
214
+ ```
215
+
216
+ That's it! Every command you type in fish will now be saved automatically! 🎉
217
+
218
+ ---
219
+
167
220
  ## 🤝 Contributing
168
221
 
169
222
  Contributions are welcome! Feel free to: