@benchcubed/today-cli 1.0.0 → 1.0.2
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/README.md +193 -104
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,68 +1,178 @@
|
|
|
1
1
|
# Today CLI - AI-Powered Developer Knowledge Platform
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Today is an intelligent knowledge management system that transforms how developers capture, share, and discover technical knowledge. Built with AWS and powered by AI, it eliminates knowledge silos and reduces onboarding time by making expertise searchable and accessible right from your terminal.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 🎯 What is Today?
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Today is a CLI-first knowledge platform that:
|
|
8
8
|
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
9
|
+
- **Captures knowledge effortlessly**: Log what you learn with simple commands or automatic git commit analysis
|
|
10
|
+
- **Searches intelligently**: Ask questions in natural language and get relevant answers from your team's collective knowledge
|
|
11
|
+
- **Connects you with experts**: Automatically identifies team members with specific expertise
|
|
12
|
+
- **Learns from your workflow**: Integrates with git to capture learnings from code changes
|
|
13
|
+
- **Provides insights**: AI-powered analytics show productivity impact and knowledge gaps
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
### Key Benefits
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
- 70% reduction in developer onboarding time
|
|
18
|
+
- Eliminate repeated questions across teams
|
|
19
|
+
- Build searchable knowledge bases automatically
|
|
20
|
+
- Find experts and answers without interrupting your workflow
|
|
21
|
+
- Works entirely from your terminal
|
|
22
|
+
|
|
23
|
+
## 🚀 Installation
|
|
24
|
+
|
|
25
|
+
### For Users
|
|
26
|
+
|
|
27
|
+
Install globally from npm:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install -g @benchcubed/today-cli
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
That's it! The `today` command is now available system-wide.
|
|
34
|
+
|
|
35
|
+
### For Developers
|
|
36
|
+
|
|
37
|
+
Clone and build from source:
|
|
18
38
|
|
|
19
39
|
```bash
|
|
40
|
+
# Clone the repository
|
|
41
|
+
git clone https://github.com/benchcubed/Today.git
|
|
42
|
+
cd Today
|
|
43
|
+
|
|
20
44
|
# Install dependencies
|
|
21
45
|
npm install
|
|
22
46
|
|
|
23
47
|
# Build the project
|
|
24
48
|
npm run build
|
|
25
49
|
|
|
26
|
-
#
|
|
50
|
+
# Link CLI locally for development
|
|
27
51
|
npm link
|
|
28
52
|
```
|
|
29
53
|
|
|
30
|
-
|
|
54
|
+
## ⚙️ Setup
|
|
55
|
+
|
|
56
|
+
### 1. Configure Your Profile
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Set up your team and user information
|
|
60
|
+
today config --team my-team --user my-username
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 2. Authenticate (if using cloud backend)
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Authenticate with AWS Cognito
|
|
67
|
+
today auth --username your-username --password your-password
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 3. Enable Automatic Learning Capture (Optional)
|
|
31
71
|
|
|
32
72
|
```bash
|
|
33
|
-
#
|
|
73
|
+
# Enable git hook to capture learnings from commits
|
|
74
|
+
today git-hook --enable
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 📖 Quick Start Guide
|
|
78
|
+
|
|
79
|
+
### Capture What You Learn
|
|
80
|
+
|
|
81
|
+
The simplest way to build your knowledge base:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Log a single learning
|
|
34
85
|
today learned "React useCallback should be used sparingly - only for optimized child components"
|
|
35
86
|
|
|
36
|
-
#
|
|
87
|
+
# Add tags for better organization
|
|
88
|
+
today learned "Always use connection pooling for databases" --tags database,performance
|
|
89
|
+
|
|
90
|
+
# The git hook captures learnings automatically from commits (if enabled)
|
|
91
|
+
git commit -m "feat(auth): implement JWT refresh tokens"
|
|
92
|
+
git push # Learning entry created automatically!
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Search Your Knowledge Base
|
|
96
|
+
|
|
97
|
+
Ask questions in natural language:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Simple search
|
|
37
101
|
today ask "How should I optimize React performance?"
|
|
38
|
-
today ask "What's the best way to handle database connections?"
|
|
39
|
-
today ask "React hooks" --author john --tags react,hooks
|
|
40
102
|
|
|
41
|
-
#
|
|
42
|
-
today ask "
|
|
43
|
-
today ask "database" --author jane # Filter by author
|
|
44
|
-
today ask "testing" --tags unit-tests,integration # Filter by tags
|
|
45
|
-
today ask "performance" --no-vector # Use keyword search only
|
|
103
|
+
# Filter by author
|
|
104
|
+
today ask "database connections" --author jane
|
|
46
105
|
|
|
47
|
-
#
|
|
48
|
-
today
|
|
106
|
+
# Filter by tags
|
|
107
|
+
today ask "authentication" --tags security,jwt
|
|
49
108
|
|
|
50
|
-
#
|
|
51
|
-
today
|
|
109
|
+
# Get more results
|
|
110
|
+
today ask "testing strategies" --limit 20
|
|
52
111
|
|
|
53
|
-
#
|
|
54
|
-
today
|
|
112
|
+
# Use keyword-only search (faster)
|
|
113
|
+
today ask "error handling" --no-vector
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Find Team Experts
|
|
55
117
|
|
|
56
|
-
|
|
118
|
+
Discover who knows what on your team:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Find TypeScript experts
|
|
57
122
|
today experts "TypeScript"
|
|
58
123
|
|
|
59
|
-
#
|
|
124
|
+
# Find experts in any domain
|
|
125
|
+
today experts "AWS Lambda" --limit 10
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### View Your Impact
|
|
129
|
+
|
|
130
|
+
See productivity metrics and insights:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# View your learning statistics
|
|
134
|
+
today stats
|
|
135
|
+
|
|
136
|
+
# Get AI-powered insights about your knowledge base
|
|
60
137
|
today insights
|
|
138
|
+
|
|
139
|
+
# See recent learning entries
|
|
140
|
+
today recent
|
|
141
|
+
|
|
142
|
+
# Analyze your learning patterns
|
|
143
|
+
today audit
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Onboarding New Team Members
|
|
147
|
+
|
|
148
|
+
Help new developers get up to speed quickly:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Interactive onboarding flow
|
|
152
|
+
today onboard
|
|
153
|
+
|
|
154
|
+
# Generate onboarding reports
|
|
155
|
+
today onboard --report
|
|
61
156
|
```
|
|
62
157
|
|
|
63
|
-
###
|
|
158
|
+
### Advanced Features
|
|
64
159
|
|
|
65
|
-
|
|
160
|
+
```bash
|
|
161
|
+
# Manage secrets securely
|
|
162
|
+
today secrets --scan # Scan for exposed secrets
|
|
163
|
+
today secrets --list # List detected secrets
|
|
164
|
+
|
|
165
|
+
# Export/import knowledge bases
|
|
166
|
+
today export --format json --output backup.json
|
|
167
|
+
today import --file backup.json
|
|
168
|
+
|
|
169
|
+
# View productivity impact
|
|
170
|
+
today impact # See time saved and efficiency gains
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### 🔄 Automatic Learning Capture from Git
|
|
174
|
+
|
|
175
|
+
Today can automatically capture learning entries from your git commits, turning your development workflow into a knowledge-building machine.
|
|
66
176
|
|
|
67
177
|
#### Enable the Git Hook
|
|
68
178
|
|
|
@@ -79,66 +189,63 @@ today git-hook --disable
|
|
|
79
189
|
|
|
80
190
|
#### How It Works
|
|
81
191
|
|
|
82
|
-
1. **Commit Analysis**:
|
|
83
|
-
2. **Smart Detection**:
|
|
84
|
-
3. **Context Extraction**:
|
|
85
|
-
4. **AI Enhancement**: Uses Amazon Bedrock AI to generate comprehensive learning entries
|
|
86
|
-
|
|
87
|
-
- Why the change was made
|
|
88
|
-
- Technical patterns and best practices
|
|
89
|
-
- Important considerations and gotchas
|
|
90
|
-
- Future applications of this knowledge
|
|
91
|
-
5. **Automatic Submission**: Learning entries are automatically submitted to your team's knowledge base
|
|
192
|
+
1. **Commit Analysis**: Analyzes each commit's structure and quality during push
|
|
193
|
+
2. **Smart Detection**: Identifies well-structured commits (especially conventional commits)
|
|
194
|
+
3. **Context Extraction**: Extracts commit message, diff, and file changes
|
|
195
|
+
4. **AI Enhancement**: Uses Amazon Bedrock AI to generate comprehensive learning entries
|
|
196
|
+
5. **Automatic Submission**: Learning entries are automatically submitted to your knowledge base
|
|
92
197
|
|
|
93
198
|
#### Best Practices
|
|
94
199
|
|
|
95
|
-
|
|
200
|
+
Use **conventional commit** format for best results:
|
|
96
201
|
|
|
97
202
|
```bash
|
|
98
|
-
# Examples of commits that generate great learning entries:
|
|
99
203
|
git commit -m "feat(auth): implement JWT token refresh mechanism"
|
|
100
204
|
git commit -m "fix(api): resolve race condition in database connection pool"
|
|
101
205
|
git commit -m "refactor(utils): extract validation logic into reusable functions"
|
|
102
206
|
git commit -m "docs(readme): add section on error handling patterns"
|
|
103
207
|
```
|
|
104
208
|
|
|
105
|
-
The git hook won't block your push if learning capture fails - your
|
|
209
|
+
The git hook won't block your push if learning capture fails - your workflow stays uninterrupted!
|
|
106
210
|
|
|
107
211
|
|
|
108
212
|
## 🏗️ Architecture
|
|
109
213
|
|
|
110
|
-
###
|
|
214
|
+
### AWS Technology Stack
|
|
111
215
|
|
|
112
|
-
- **AWS Lambda**
|
|
113
|
-
- **Amazon API Gateway**
|
|
114
|
-
- **Amazon RDS PostgreSQL**
|
|
115
|
-
- **Amazon DynamoDB**
|
|
116
|
-
- **Amazon S3**
|
|
117
|
-
- **Amazon CloudFront** - Global CDN for fast
|
|
118
|
-
- **AWS Cognito**
|
|
216
|
+
- **AWS Lambda** - AI processing and backend logic
|
|
217
|
+
- **Amazon API Gateway** - RESTful API for CLI and web interface
|
|
218
|
+
- **Amazon RDS PostgreSQL** - Structured knowledge storage
|
|
219
|
+
- **Amazon DynamoDB** - Real-time knowledge graph caching
|
|
220
|
+
- **Amazon S3** - Web interface hosting and file storage
|
|
221
|
+
- **Amazon CloudFront** - Global CDN for fast content delivery
|
|
222
|
+
- **AWS Cognito** - User authentication and team management
|
|
223
|
+
- **Amazon Bedrock** - AI-powered knowledge enhancement and semantic search
|
|
119
224
|
|
|
120
225
|
### Technology Stack
|
|
121
226
|
|
|
122
227
|
- **TypeScript** - Type-safe development with modern tooling
|
|
123
228
|
- **Commander.js** - Robust CLI framework
|
|
124
|
-
- **Amazon Bedrock** - AI-powered knowledge
|
|
229
|
+
- **Amazon Bedrock** - AI-powered knowledge processing
|
|
230
|
+
- **PostgreSQL** - Reliable relational database for knowledge storage
|
|
231
|
+
- **Vector Embeddings** - Semantic search with 1024-dimension Titan embeddings
|
|
125
232
|
|
|
126
|
-
## 🧪 Testing
|
|
233
|
+
## 🧪 Testing
|
|
127
234
|
|
|
128
|
-
###
|
|
235
|
+
### Run Tests
|
|
129
236
|
|
|
130
237
|
```bash
|
|
131
238
|
# Run all tests
|
|
132
239
|
npm test
|
|
133
240
|
|
|
134
|
-
# Run property-based tests
|
|
241
|
+
# Run property-based tests
|
|
135
242
|
npm run test:property
|
|
136
243
|
|
|
137
244
|
# Watch mode for development
|
|
138
245
|
npm run test:watch
|
|
139
246
|
```
|
|
140
247
|
|
|
141
|
-
###
|
|
248
|
+
### Test Coverage
|
|
142
249
|
|
|
143
250
|
The system validates 22 correctness properties including:
|
|
144
251
|
- Learning entry creation integrity
|
|
@@ -147,7 +254,7 @@ The system validates 22 correctness properties including:
|
|
|
147
254
|
- Knowledge graph structure integrity
|
|
148
255
|
- Productivity impact measurement
|
|
149
256
|
|
|
150
|
-
## 🚀
|
|
257
|
+
## 🚀 Deploying Your Own Instance
|
|
151
258
|
|
|
152
259
|
### Prerequisites
|
|
153
260
|
|
|
@@ -160,7 +267,7 @@ brew install terraform # macOS
|
|
|
160
267
|
aws configure
|
|
161
268
|
```
|
|
162
269
|
|
|
163
|
-
###
|
|
270
|
+
### One-Command Deployment
|
|
164
271
|
|
|
165
272
|
```bash
|
|
166
273
|
# Bundle Lambda functions and deploy infrastructure
|
|
@@ -177,14 +284,14 @@ That's it! The deploy command will:
|
|
|
177
284
|
If you prefer to run steps individually:
|
|
178
285
|
|
|
179
286
|
```bash
|
|
180
|
-
# 1. Bundle Lambda functions
|
|
287
|
+
# 1. Bundle Lambda functions
|
|
181
288
|
npm run bundle
|
|
182
289
|
|
|
183
290
|
# 2. Deploy with Terraform
|
|
184
291
|
cd infrastructure && terraform apply
|
|
185
292
|
```
|
|
186
293
|
|
|
187
|
-
### Environment
|
|
294
|
+
### Environment Configuration
|
|
188
295
|
|
|
189
296
|
The Lambda functions automatically receive environment variables from Terraform including:
|
|
190
297
|
- DynamoDB table names
|
|
@@ -194,14 +301,16 @@ The Lambda functions automatically receive environment variables from Terraform
|
|
|
194
301
|
|
|
195
302
|
No manual environment variable setup needed!
|
|
196
303
|
|
|
197
|
-
## 📊
|
|
304
|
+
## 📊 Impact Metrics
|
|
198
305
|
|
|
199
|
-
|
|
200
|
-
- **Onboarding acceleration**: 71% average improvement
|
|
201
|
-
- **ROI**: 230% return on investment
|
|
202
|
-
- **Knowledge reuse rate**: 78-85% across teams
|
|
306
|
+
Today delivers measurable productivity improvements:
|
|
203
307
|
|
|
204
|
-
|
|
308
|
+
- **70% reduction** in developer onboarding time
|
|
309
|
+
- **67% reduction** in daily search time
|
|
310
|
+
- **70% fewer** repeated questions
|
|
311
|
+
- **458% increase** in knowledge sharing
|
|
312
|
+
|
|
313
|
+
### Real-World Results
|
|
205
314
|
|
|
206
315
|
| Metric | Before Today | After Today | Improvement |
|
|
207
316
|
|--------|-------------|-------------|-------------|
|
|
@@ -210,27 +319,6 @@ No manual environment variable setup needed!
|
|
|
210
319
|
| Repeated Questions | 23/week | 7/week | 70% reduction |
|
|
211
320
|
| Knowledge Sharing | 12/month | 67/month | 458% increase |
|
|
212
321
|
|
|
213
|
-
## 🎯 Competition Timeline
|
|
214
|
-
|
|
215
|
-
- **Week 1-2**: Core CLI and knowledge capture ✅
|
|
216
|
-
- **Week 3-4**: AI-powered expert discovery and insights
|
|
217
|
-
- **Week 5-6**: Interactive knowledge graph and analytics dashboard
|
|
218
|
-
- **Week 7**: Competition polish, metrics collection, and submission
|
|
219
|
-
|
|
220
|
-
## 🏆 Competition Success Metrics
|
|
221
|
-
|
|
222
|
-
### Technical Innovation
|
|
223
|
-
- Serverless architecture showcasing 6+ AWS services
|
|
224
|
-
- AI-powered expert discovery and knowledge insights
|
|
225
|
-
- Real-time knowledge graph visualization
|
|
226
|
-
- Cloud-based CLI with secure authentication
|
|
227
|
-
|
|
228
|
-
### Workplace Efficiency Impact
|
|
229
|
-
- Measurable ROI tracking with before/after comparisons
|
|
230
|
-
- Onboarding time reduction metrics
|
|
231
|
-
- Question anxiety elimination through private knowledge search
|
|
232
|
-
- Expert connection facilitation and success tracking
|
|
233
|
-
|
|
234
322
|
## 📚 Development
|
|
235
323
|
|
|
236
324
|
### Project Structure
|
|
@@ -239,7 +327,9 @@ No manual environment variable setup needed!
|
|
|
239
327
|
today-cli/
|
|
240
328
|
├── src/
|
|
241
329
|
│ ├── cli.ts # Main CLI entry point
|
|
242
|
-
│ ├──
|
|
330
|
+
│ ├── commands/ # CLI command implementations
|
|
331
|
+
│ ├── services/ # Core business logic
|
|
332
|
+
│ ├── lambda/ # AWS Lambda function handlers
|
|
243
333
|
│ ├── config/ # Configuration management
|
|
244
334
|
│ ├── database/ # PostgreSQL schema and migrations
|
|
245
335
|
│ └── types/ # TypeScript type definitions
|
|
@@ -257,13 +347,13 @@ today-cli/
|
|
|
257
347
|
### Available Scripts
|
|
258
348
|
|
|
259
349
|
#### Core Commands
|
|
260
|
-
- `npm run bundle` - Bundle Lambda functions with esbuild
|
|
261
|
-
- `npm run deploy` - Bundle and deploy
|
|
262
|
-
- `npm run deploy:backend` -
|
|
350
|
+
- `npm run bundle` - Bundle Lambda functions with esbuild
|
|
351
|
+
- `npm run deploy` - Bundle and deploy full infrastructure
|
|
352
|
+
- `npm run deploy:backend` - Deploy backend infrastructure only
|
|
263
353
|
- `npm run deploy:web` - Deploy web frontend to S3/CloudFront
|
|
264
354
|
|
|
265
355
|
#### Development
|
|
266
|
-
- `npm run build` - Build TypeScript to JavaScript
|
|
356
|
+
- `npm run build` - Build TypeScript to JavaScript
|
|
267
357
|
- `npm run dev` - Run CLI in development mode
|
|
268
358
|
- `npm test` - Run test suite
|
|
269
359
|
- `npm run lint` - Lint TypeScript code
|
|
@@ -272,25 +362,24 @@ today-cli/
|
|
|
272
362
|
The build process uses **esbuild** for optimal Lambda bundling:
|
|
273
363
|
- **Tree Shaking**: Removes unused code (~90% size reduction)
|
|
274
364
|
- **Minification**: Reduces bundle size for faster cold starts
|
|
275
|
-
- **Parallel Builds**: All
|
|
365
|
+
- **Parallel Builds**: All Lambda functions build simultaneously
|
|
276
366
|
- **External Dependencies**: AWS SDK excluded (provided by Lambda runtime)
|
|
277
367
|
|
|
278
368
|
## 🤝 Contributing
|
|
279
369
|
|
|
280
|
-
|
|
370
|
+
Contributions are welcome! This project showcases:
|
|
281
371
|
|
|
282
|
-
1. **
|
|
283
|
-
2. **AWS Integration**:
|
|
284
|
-
3. **
|
|
285
|
-
4. **
|
|
372
|
+
1. **AI-Powered Knowledge Management**: Intelligent capture and retrieval of technical knowledge
|
|
373
|
+
2. **Comprehensive AWS Integration**: Serverless architecture using modern AWS services
|
|
374
|
+
3. **Developer Experience**: CLI-first design that fits naturally into developer workflows
|
|
375
|
+
4. **Measurable Impact**: Productivity improvements backed by real metrics
|
|
286
376
|
|
|
287
377
|
## 📄 License
|
|
288
378
|
|
|
289
|
-
MIT License
|
|
379
|
+
MIT License
|
|
290
380
|
|
|
291
381
|
---
|
|
292
382
|
|
|
293
|
-
**
|
|
294
|
-
**
|
|
295
|
-
**
|
|
296
|
-
**AI Integration**: Amazon Bedrock with Claude/Llama models for natural language processing and expert matching
|
|
383
|
+
**GitHub**: [benchcubed/Today](https://github.com/benchcubed/Today)
|
|
384
|
+
**npm**: [@benchcubed/today-cli](https://www.npmjs.com/package/@benchcubed/today-cli)
|
|
385
|
+
**Built with**: AWS Lambda, API Gateway, RDS, DynamoDB, S3, CloudFront, Cognito, Amazon Bedrock
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@benchcubed/today-cli",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "AI-powered developer knowledge platform
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "AI-powered developer knowledge platform",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"today": "./dist/cli.js"
|