@walruswebdev/daily-devhabit-cli 1.0.5 → 1.0.6

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.
Files changed (3) hide show
  1. package/README.md +79 -2
  2. package/dist/index.js +18 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,2 +1,79 @@
1
- # daily-devhabit-cli
2
- Package for Daily Dev Habit CLI Tool
1
+ # Daily Dev Habit CLI šŸš€
2
+
3
+ **Engineering Intelligence for the Busy Developer.**
4
+
5
+ The **Daily Dev Habit CLI** (`ddh`) is a frictionless command-line tool designed to help software engineers capture decisions, blockers, and progress without leaving the terminal. It serves as the primary data entry point for the Daily Dev Habit ecosystem, syncing your logs to the cloud or saving them locally when offline.
6
+
7
+ ## šŸ“¦ Installation
8
+
9
+ Install the tool globally via NPM:
10
+
11
+ ```bash
12
+ npm install -g @walruswebdev/daily-devhabit-cli
13
+ ```
14
+
15
+ ## ⚔ Quick Start
16
+ Register a new account:
17
+
18
+ ```bash
19
+ ddh register
20
+ ```
21
+
22
+ Log in to sync with the cloud:
23
+ ```bash
24
+ ddh login
25
+ ```
26
+
27
+ Create your first log entry:
28
+
29
+ ```bash
30
+ ddh log
31
+ ```
32
+
33
+ (Or use the alias ddh l for speed)
34
+
35
+ ## šŸ›  Commands
36
+ `ddh log` (alias: `l`)
37
+ The core command. Launches an interactive survey to capture your current work state.
38
+
39
+ - Scope: API, Database, Refactor, Feature, etc.
40
+
41
+ - Summary: What did you just do?
42
+
43
+ - Key Decisions: Did you choose a specific library or pattern? Why?
44
+
45
+ - Friction: What slowed you down?
46
+
47
+ - Tags: Comma-separated tags for categorization.
48
+
49
+ ### `ddh token`
50
+ Displays your current Cloud API Token.
51
+
52
+ - Use Case: Copy this token to connect your Daily Dev Habit WordPress Plugin to your cloud account.
53
+
54
+ ### `ddh login`
55
+ Authenticates your session and saves your credentials locally to `~/.config/daily-devhabit-cli-nodejs/`.
56
+
57
+ ### `ddh register`
58
+ Creates a new user account on the Daily Dev Habit platform.
59
+
60
+ ## šŸ”Œ WordPress Integration
61
+ This CLI works hand-in-hand with the Daily Dev Habit WordPress Plugin.
62
+
63
+ 1. Run `ddh token` in your terminal.
64
+
65
+ 2. Copy the output string.
66
+
67
+ 3. Paste it into your WordPress Admin > Daily Dev Habit > Settings.
68
+
69
+ 4. Result: Your WordPress site will now pull in your engineering metrics and logs automatically.
70
+
71
+ ## šŸ›”ļø Offline Support
72
+ Bad internet? No problem. If the CLI cannot connect to the server (or if you are not logged in), it automatically falls back to Local Mode.
73
+
74
+ - Logs are saved to a file named OFFLINE_LOGS.md in your current working directory.
75
+
76
+ - Markdown formatted for easy reading.
77
+
78
+ ## šŸ“ License
79
+ ISC Ā© Lauren Bridges
package/dist/index.js CHANGED
@@ -157,4 +157,22 @@ program
157
157
  }
158
158
  }
159
159
  });
160
+ // --- COMMAND: TOKEN (New!) ---
161
+ program
162
+ .command('token')
163
+ .description('Show your current API token')
164
+ .action(() => {
165
+ const token = config.get('auth.token');
166
+ if (token) {
167
+ console.log('\nšŸ”‘ Your Cloud Token:');
168
+ console.log('---------------------------------------------------');
169
+ console.log(token);
170
+ console.log('---------------------------------------------------');
171
+ console.log('Copy/paste this into your WordPress Settings.\n');
172
+ }
173
+ else {
174
+ console.log('āŒ You are not logged in.');
175
+ console.log('Run "ddh login" first to generate a token.');
176
+ }
177
+ });
160
178
  program.parse(process.argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@walruswebdev/daily-devhabit-cli",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Package for Daily Dev Habit CLI Tool",
5
5
  "main": "dist/index.js",
6
6
  "bin": {