devark-cli 0.1.0

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 DevArk
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,388 @@
1
+
2
+ <div align="center">
3
+
4
+ ![devark-icon-white](https://github.com/user-attachments/assets/5cfa24f2-b2d5-4839-a6ba-5f3d0996f430)<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <!-- DevArk Icon (White variant for dark backgrounds) -->
6
+
7
+ <!-- Top chevron - Blue left, White right -->
8
+ <path d="M32 6 L8 26 L12 30 L32 14 Z" fill="#3528E0"/>
9
+ <path d="M32 6 L56 26 L52 30 L32 14 Z" fill="#FFFFFF"/>
10
+
11
+ <!-- Middle chevron - Blue left, White right -->
12
+ <path d="M32 18 L12 34 L16 38 L32 26 Z" fill="#3528E0"/>
13
+ <path d="M32 18 L52 34 L48 38 L32 26 Z" fill="#FFFFFF"/>
14
+
15
+ <!-- Bottom chevron - Blue left, White right -->
16
+ <path d="M32 30 L16 42 L20 46 L32 38 Z" fill="#3528E0"/>
17
+ <path d="M32 30 L48 42 L44 46 L32 38 Z" fill="#FFFFFF"/>
18
+ </svg>
19
+
20
+
21
+
22
+
23
+ <p></p>
24
+ <h3>Open-source CLI for analyzing Claude Code sessions locally and generating productivity reports</h3>
25
+ <p></p>
26
+
27
+ <a href="https://devark.ai"><img src="https://img.shields.io/badge/by-devark.ai-16A34A" alt="by devark.ai"></a>
28
+ <a href="https://www.npmjs.com/package/devark-cli"><img src="https://img.shields.io/npm/v/devark-cli.svg" alt="npm version"></a>
29
+ <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
30
+ <a href="https://nodejs.org"><img src="https://img.shields.io/node/v/devark-cli.svg" alt="Node.js Version"></a>
31
+
32
+ <a href="https://github.com/devark/devark-cli/actions/workflows/tests.yml"><img src="https://github.com/devark/devark-cli/actions/workflows/tests.yml/badge.svg" alt="Tests"></a>
33
+ <a href="https://github.com/devark/devark-cli/actions/workflows/npm-publish.yml"><img src="https://github.com/devark/devark-cli/actions/workflows/npm-publish.yml/badge.svg" alt="NPM Publish"></a>
34
+ <a href="https://github.com/devark/devark-cli/actions/workflows/build-verification.yml"><img src="https://github.com/devark/devark-cli/actions/workflows/build-verification.yml/badge.svg" alt="Build Verification"></a>
35
+ <img src="./coverage/badges.svg" alt="Coverage">
36
+
37
+ <a href="SECURITY.md"><img src="https://img.shields.io/badge/Security-Policy-blue.svg" alt="Security Policy"></a>
38
+ <a href="https://github.com/devark/devark-cli?tab=readme-ov-file#-privacy--security"><img src="https://img.shields.io/badge/build-transparent-blue" alt="Transparent Build"></a>
39
+
40
+ <a href="CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a>
41
+
42
+ <a href="https://github.com/devark/devark-cli"><img src="https://img.shields.io/badge/⭐_Star-this_repo-22C55E?labelColor=000000" alt="Star this repo"></a>
43
+
44
+ </p>
45
+ </p>
46
+
47
+ [Website](https://devark.ai) • [Report Bug](https://github.com/devark/devark-cli/issues) • [Request Feature](https://github.com/devark/devark-cli/issues)
48
+ </div>
49
+
50
+
51
+ ## What is DevArk?
52
+
53
+ DevArk-cli is an open-source command-line tool that analyzes your Claude Code sessions to extract productivity insights and generate reports. All analyses can run completely locally on your machine using Claude Code's capabilities. It also encompasses a statusline that help you get more from your sessions.
54
+
55
+ ## Getting Started fast
56
+ Just run:
57
+ ```bash
58
+ npx devark-cli@latest
59
+ ```
60
+
61
+
62
+ ## Main features
63
+ ### 1. 📋 Today's standup
64
+ New: Be prepared in 2-3 minutes for your daily standup meeting!
65
+ <img width="1270" height="512" alt="Screenshot 2025-10-02 163102" src="https://github.com/user-attachments/assets/b0e2bd55-618e-4b9e-b1c0-f2d7069e76aa" />
66
+
67
+
68
+ ### 2. 📊 Claude Code Productivity Report Generation (Local)
69
+ Generate comprehensive productivity reports using Claude Code's sub-agents to analyze your sessions in parallel. No data leaves your machine.
70
+ See example of locally generated report here: https://devark.ai/example-daily-report
71
+
72
+
73
+ ### 3. 🧠 Claude Code Co-pilot Statusline
74
+ Strategic product advisor in Claude Code. Your prompts are analyzed locally (via CC) to provide actionable guidance that pushes you to ship faster. Feedback appears in your Claude Code status line with concrete next steps.
75
+ <img width="612" height="227" alt="image" src="https://github.com/user-attachments/assets/b2f7f10b-8a29-429b-921a-d0fc0bc45183" />
76
+
77
+ ## Updates
78
+
79
+ ### What's New in v0.7.x
80
+ #### Today's Standup ✨
81
+ Get a personalized standup summary of your recent claude coding activity right from your terminal. Runs 100% locally using your own Claude Code installation
82
+ The standup feature analyzes your recent sessions and generates a concise summary of:
83
+ * What you worked on
84
+ * Key accomplishments
85
+ * Next steps
86
+
87
+ #### Improved Onboarding Experience 🚀
88
+ Getting started with devark is now smoother than ever:
89
+ Better first-run setup flow
90
+ Helpful prompts to guide you through configuration
91
+ Improved error messages when things go wrong
92
+
93
+ #### Improved Time Calculation ⏱️
94
+ More accurate session duration tracking with better handling of:
95
+ Massive sessions: Sessions with 10,000+ messages no longer cause performance issues
96
+ Smart truncation: Large sessions are intelligently truncated while preserving time data
97
+ Consistent timestamps: Better parsing and validation of session timing information
98
+ Edge case handling: Fixed issues with sessions that had missing or invalid timestamps
99
+
100
+
101
+
102
+ ## 💬 More about Claude Status Line - Strategic Co-pilot / Advisor (Local)
103
+
104
+ **🔒 Installation Safety**: Automatically backs up your existing status line configuration. Uninstalling instantly restores your original setup - zero risk to your Claude Code configuration.
105
+
106
+
107
+ ### Why Use Status Line?
108
+
109
+ - **🚀 Ship Faster**: Get pushed to deliver
110
+ - **🎯 Stay Focused**: Remembers your original mission and keeps you on track and forward ⏩︎
111
+ - **⚡ Concrete Actions**: Specific next steps like:
112
+ - **📈 Strategic Thinking**: Considers edge cases, user experience, and scaling at the right time
113
+ - **📊 Token Usage Display**: Integrates with ccusage to show real-time token metrics
114
+ - **↩️ Easy Restore**: Your original status line is backed up and can be restored anytime
115
+ ## Architecture
116
+ ### How Status Line Works
117
+ 1. Intercepts prompts submitted in Claude Code
118
+ 1. Analyzes via the local Claude Code latest prompt with relevant session context.
119
+ 4. Provides strategic guidance and pushes you to ship
120
+ 5. Displays actionable feedback in the Claude Code status line
121
+
122
+ In more details:
123
+ ```mermaid
124
+ flowchart LR
125
+ subgraph Input ["✳️ In Claude Code"]
126
+ User([👤 You type a<br/>prompt]) --> Submit[Press Enter to<br/>submit prompt]
127
+ Submit --> Hook[🪝 UserPromptSubmit<br/>hook triggers]
128
+ end
129
+
130
+ subgraph Analysis ["🧠 Local Prompt Analysis via Claude Code SDK"]
131
+ Hook --> CLI[DevArk CLI<br/>receives prompt]
132
+ CLI --> Check{Is new chat?}
133
+ Check -->|No| Context[📝 Include previous<br/>conversation]
134
+ Check -->|Yes| Direct[💭 Analyze prompt<br/>standalone]
135
+
136
+ subgraph Personality ["🎭 Infuse Coach Personality"]
137
+ Gordon[🧑‍🍳 Gordon<br/>Tough love]
138
+ Vibe[💜 DevArk<br/>Encouraging]
139
+ Custom[✨ Custom<br/>Your style]
140
+ end
141
+
142
+ Context --> SDK[Claude SDK<br/>analyzes prompt quality]
143
+ Direct --> SDK
144
+ Personality -.-> SDK
145
+ SDK --> Score[📊 Generate score<br/>& suggestion]
146
+ end
147
+
148
+ subgraph Display ["💬 Status Line Feedback"]
149
+ Score --> Save[💾 Save to<br/>~/.devark/analysis]
150
+ Save --> Status[Status bar<br/>reads result]
151
+ Status --> Show[🟢 85/100<br/>✨ Gordon says:<br/>Add more context chef!]
152
+ end
153
+
154
+ Show --> Improve([📈 Better prompts<br/>Better results])
155
+ ```
156
+
157
+ ### Coach Personalities
158
+ - **Gordon** - Sharp, pushy, business-focused. Creates urgency: "Ship by FRIDAY or you're fired!"
159
+ - **DevArk** - Supportive but pushy senior dev. Helps you ship: "MVP checklist: Auth works ✓ | Ship it!"
160
+ - **Custom** - User-defined personality with strategic focus
161
+
162
+ ### Example Output
163
+
164
+
165
+ ### Setup
166
+ 1. Run `npx devark-cli`
167
+ 2. Select "Configure prompt coach status line"
168
+ 3. Choose coach personality
169
+ 4. (Optional) Enable ccusage token metrics display
170
+ 5. Prompts will be analyzed locally in Claude Code
171
+
172
+ **Note**: Installation automatically backs up your current status line (if any). When you uninstall devark, your original configuration is instantly restored.
173
+
174
+ ## Local Report Generation Works
175
+
176
+ Generate comprehensive productivity reports using Claude Code's sub-agents to analyze your sessions in parallel. No data leaves your machine.
177
+ - Select timefrema
178
+ - Select projects
179
+
180
+ ```mermaid
181
+ flowchart TD
182
+ Start([📝 Claude Code Sessions]) --> Select[devark-cli select time frame and projects]
183
+ Select --> Extract[Extracts & prepares session data]
184
+ Extract --> Launch[Launches Claude with instructions]
185
+ Launch --> Parallel{Parallel sub-agents<br/> session analysis}
186
+ Parallel --> Gather[Gathers results &<br/>Generates report]
187
+ Gather --> Output[📊 HTML Report in current folder]
188
+ style Start fill:#e1f5fe
189
+ style Output fill:#d4edda
190
+ ```
191
+ ## Example of Local Report Output
192
+ <img width="1920" height="4048" alt="screencapture-file-C-devark-devark-cli-devark-report-2025-09-05-2-html-2025-09-05-15_54_16" src="https://github.com/user-attachments/assets/545c0515-7649-4561-9e19-86b69a2e7103" />
193
+
194
+ ## ☁️ Cloud Sync (Optional)
195
+
196
+ Optionally sync your sanitized session data to the devark dashboard for advanced analytics and tracking over time.
197
+
198
+ ### Features
199
+ - **🎁 Free Forever**: Up to 1,000 session analyses per month
200
+ - **📈 Track Over Time**: Monitor your prompt quality and productivity trends
201
+ - **🔄 Auto-sync**: Configure hooks for automatic background sync
202
+ - **🔒 Privacy First**: All code removed before upload, only patterns synced
203
+ - **📊 Web Dashboard**: Learn and improve your AI coding sessions.
204
+
205
+ ### How It Works
206
+
207
+ ```mermaid
208
+ flowchart TD
209
+ subgraph Local ["🏠 Your Machine"]
210
+ Sessions[Claude Code Sessions] --> Select[Select sessions]
211
+ Select --> Privacy[🔒 Privacy Layer<br/>Removes code & secrets<br/>Keeps only patterns]
212
+ end
213
+
214
+ subgraph Cloud ["☁️ DevArk Cloud"]
215
+ Privacy --> Upload[Upload patterns]
216
+ Upload --> Verify[Server verification]
217
+ Verify --> Analysis[AI analysis]
218
+ Analysis --> Dashboard[📊 Web Dashboard]
219
+ end
220
+
221
+ subgraph Features ["Dashboard Features"]
222
+ Dashboard --> Track[📈 Track prompt improvement over time]
223
+ Dashboard --> Metrics[⚡ Deeper productivity insights]
224
+ Dashboard --> Streaks[🔥 Peak times/Low times]
225
+ Dashboard --> Prompt[💬 User Prompt Analysis]
226
+ end
227
+
228
+ style Local fill:#e1f5fe
229
+ style Cloud fill:#f3e5f5
230
+ style Features fill:#d4edda
231
+ ```
232
+ ## Auto-Sync
233
+ ### What is Auto-Sync
234
+ Claude Code Hooks allow DevArk to automatically sync your Claude Code sessions.
235
+
236
+ What are Claude Code Hooks?
237
+
238
+ • Small commands that run at specific moments in Claude Code
239
+
240
+ • They work silently in the background (you won't notice them)
241
+
242
+
243
+ Which hooks do we use?
244
+
245
+ 📍 SessionStart - Syncs previous sessions when you start/resume work
246
+ (Triggers: startup, resume, clear commands)
247
+
248
+ 📦 PreCompact - Syncs full session before context compression
249
+ (Triggers: manual or automatic context cleanup)
250
+
251
+
252
+ Why we recommend both:
253
+
254
+ ✓ SessionStart ensures nothing is lost between sessions
255
+
256
+ ✓ PreCompact syncs everything before Claude compresses context
257
+
258
+ ### Setup Auto-sync
259
+ 1. Run `npx devark-cli`
260
+ 2. Authenticate with your Github account
261
+ 3. Enable auto-sync via CLI menu
262
+
263
+ ## Supported Coding Engines
264
+
265
+ Currently supported:
266
+ - ✅ Claude Code
267
+
268
+ Future:
269
+ - 🔜 Cursor
270
+ - 🔜 VS Code
271
+
272
+ 🌍 Cross-Platform - Runs on macOS, Windows, Linux, and any environment with Node.js
273
+
274
+
275
+ ## 🔒 Privacy & Security
276
+
277
+ <div align="center">
278
+ <a href="https://github.com/devark/devark-cli/actions/workflows/npm-publish.yml"><img src="https://img.shields.io/badge/Automated-Releases-success?logo=githubactions" alt="Automated Releases"></a>
279
+ <a href="https://www.npmjs.com/package/devark-cli"><img src="https://img.shields.io/badge/NPM-Provenance-green?logo=npm" alt="NPM Provenance"></a>
280
+ <a href="#verify-our-package"><img src="https://img.shields.io/badge/SHA256-Checksums-blue?logo=shield" alt="SHA256 Checksums"></a>
281
+ <a href="https://github.com/devark/devark-cli"><img src="https://img.shields.io/badge/Open-Source-orange?logo=github" alt="Open Source"></a>
282
+ </div>
283
+
284
+ <br>
285
+
286
+ **This package is built with complete transparency:**
287
+
288
+ - ✅ **Source Code**: Fully open source at [github.com/devark/devark-cli](https://github.com/devark/devark-cli)
289
+ - ✅ **Not Minified**: Published code is readable and verifiable
290
+ - ✅ **Source Maps**: Included for debugging and verification
291
+ - ✅ **Automated Builds**: All releases via GitHub Actions (no manual publishing)
292
+ - ✅ **npm Provenance**: Every package includes build attestation
293
+ - ✅ **Checksums**: SHA256 hashes for integrity verification
294
+
295
+ ### Verify Our Package
296
+
297
+ ```bash
298
+ # Download and inspect the package
299
+ npm pack devark-cli@latest
300
+ tar -xzf devark-cli-*.tgz
301
+ head -100 package/dist/index.js # Verify it's readable
302
+
303
+ # Check checksums
304
+ cd package/dist && sha256sum -c checksums.sha256
305
+ ```
306
+
307
+ ### Privacy
308
+ - **Context-Preserving Sanitization**: Messages are sanitized to remove sensitive data while preserving context
309
+ - **What gets redacted/removed**:
310
+ - Code blocks → `[CODE_BLOCK_1: javascript]`
311
+ - API keys/tokens → `[CREDENTIAL_1]`
312
+ - File paths → `[PATH_1]`
313
+ - URLs → `[DATABASE_URL]`, `[API_URL]`
314
+ - Emails → `[EMAIL_1]`
315
+ - Environment variables → `[ENV_VAR_1]`
316
+ - Also Removed: Images/Binary files
317
+ - **What's preserved**: Conversation flow, questions, explanations
318
+ - **Transparent**: Preview sanitized data with the interactive prompt
319
+ - **Open source**: Review our sanitization at [src/lib/message-sanitizer-v2.ts](src/lib/message-sanitizer-v2.ts)
320
+
321
+ ## Troubleshooting
322
+
323
+ ### Authentication Issues
324
+ Try the following:
325
+ - Log out from the CLI
326
+ - Clear cookies
327
+ - Re-authenticate via the CLI
328
+
329
+ ### No Sessions Found
330
+ - Make sure Claude Code is installed
331
+ - Check that you've used Claude Code recently
332
+
333
+ ### Sessions Stuck in Analyzing
334
+ - Please open a Github issue.
335
+
336
+
337
+ ### Debug Mode
338
+ ```bash
339
+ # Enable debug logging
340
+ DEVARK_DEBUG=1 npx devark-cli send
341
+ ```
342
+
343
+ ## Contributing
344
+
345
+ We love your input! We want to make contributing to DevArk CLI as easy and transparent as possible. Please see our [Contributing Guide](CONTRIBUTING.md) for details.
346
+
347
+ ```bash
348
+ # Clone the repository
349
+ git clone https://github.com/devark/devark-cli.git
350
+ cd devark-cli
351
+
352
+ # Install dependencies
353
+ npm install
354
+
355
+ # Run tests
356
+ npm test
357
+
358
+ # Build the project
359
+ npm run build
360
+ ```
361
+
362
+ Check out our [open issues](https://github.com/devark/devark-cli/issues) for a list of proposed features and known issues.
363
+
364
+ ## Community
365
+
366
+ - **GitHub**: Star us on [GitHub](https://github.com/devark/devark-cli)
367
+ - **Issues**: Report bugs and request features in [GitHub Issues](https://github.com/devark/devark-cli/issues)
368
+ - **Website**: Visit [devark.ai](https://devark.ai)
369
+
370
+ ## Support
371
+
372
+ Need help? Here are some ways to get support:
373
+ - 🐛 Report bugs in [GitHub Issues](https://github.com/devark/devark-cli/issues)
374
+ - 📧 Email us at support@devark.ai
375
+
376
+ ## License
377
+
378
+ MIT © DevArk - see the [LICENSE](LICENSE) file for details.
379
+
380
+ ## Acknowledgments
381
+
382
+ Built with love by the DevArk team [@mickmicksh](https://github.com/mickmicksh), [@dannyshmueli](https://github.com/dannyshmueli)
383
+
384
+ Special thanks to [ccusage](https://www.npmjs.com/package/ccusage) for providing token usage metrics integration for Claude Code sessions.
385
+
386
+ ## Star History
387
+
388
+ [![Star History Chart](https://api.star-history.com/svg?repos=devark/devark-cli&type=Date)](https://www.star-history.com/#devark/devark-cli&Date)
package/bin/devark.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('../dist/index.js');
@@ -0,0 +1,3 @@
1
+ 52a46eee13d20a05fc798ac3e30f00685cf9475e3a56a48ede86461cd5d56ee1 index.js
2
+ 6e948721c1e5bb7dd3e746c0e1e7a972cbd491b6f0135718178b22563ca56de9 index.js.map
3
+ 137b0f6da8ab3a82dd96e536c9de1c0162f51d5450895af16e935906975671a8 report-template.html