vipcare 0.1.0 → 0.3.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/CLAUDE.md ADDED
@@ -0,0 +1,58 @@
1
+ # VIPCare
2
+
3
+ ## What is this?
4
+ CLI tool that auto-builds VIP person profiles from Twitter, LinkedIn, and web search data, synthesized by AI into structured Markdown files.
5
+
6
+ ## Tech Stack
7
+ - Node.js ESM, commander CLI
8
+ - No build step, no bundler
9
+ - Single dependency: commander
10
+
11
+ ## Project Structure
12
+ ```
13
+ bin/vip.js — CLI entry point, all command definitions
14
+ lib/
15
+ config.js — Config loading (~/.vip-crm/config.json), tool checks
16
+ profile.js — CRUD for profile Markdown files in profiles/
17
+ resolver.js — Parse input (name vs URL) into person object
18
+ fetchers/
19
+ twitter.js — Twitter data via bird CLI
20
+ search.js — Web search for person info
21
+ youtube.js — YouTube transcript via yt-dlp + whisper
22
+ synthesizer.js — AI synthesis (Claude CLI / Anthropic API / GitHub Copilot)
23
+ monitor.js — Change detection and changelog
24
+ scheduler.js — macOS launchd for auto-refresh
25
+ card.js — H5 baseball card generator
26
+ templates.js — Profile templates
27
+ tests/ — One test file per module
28
+ profiles/ — Generated profile Markdown files
29
+ web/ — Card HTML output
30
+ skill/ — Claude Code slash command
31
+ ```
32
+
33
+ ## Dev Commands
34
+ - `npm test` — run all tests (uses node:test with --experimental-test-module-mocks)
35
+ - `npm publish` — publish to npm (requires npm auth token)
36
+ - `node bin/vip.js <command>` — run CLI locally without installing
37
+
38
+ ## Architecture
39
+ Input flows through a pipeline: **resolver** parses the input (name or URL) into a person object, **fetchers** (twitter, search, youtube) gather raw data from external sources, **synthesizer** sends the raw data to an AI backend to produce structured fields, **profile** saves the result as a Markdown file, and **card** can render profiles into an H5 baseball card page.
40
+
41
+ ## Conventions
42
+ - All shell commands use `execFileSync` with arg arrays (never `execSync` with string interpolation) for security
43
+ - ESM modules (`"type": "module"` in package.json)
44
+ - Tests use node:test built-in runner with assert
45
+ - Profile data stored as Markdown files in profiles/
46
+ - Config at ~/.vip-crm/config.json
47
+ - AI backends: Claude CLI, Anthropic API, GitHub Copilot (auto-detected in that order)
48
+
49
+ ## Adding a New Command
50
+ 1. Add command definition in bin/vip.js using commander
51
+ 2. Use existing helpers from lib/profile.js, lib/config.js
52
+ 3. Add --json flag for scripting support
53
+ 4. Add tests in tests/
54
+
55
+ ## Common Pitfalls
56
+ - Must use --experimental-test-module-mocks flag for tests that mock modules
57
+ - YouTube transcription requires Python + yt-dlp + whisper (optional dependency)
58
+ - The `slugify` function returns 'unnamed' for empty/special-char-only inputs
package/README.md CHANGED
@@ -42,6 +42,27 @@ vip rm sam-altman -y
42
42
  vip update sam-altman
43
43
  ```
44
44
 
45
+ ## Commands
46
+
47
+ | Command | Description |
48
+ |---------|-------------|
49
+ | `vip add <name-or-url>` | Add a new profile (`-c` company, `-f` force, `--no-ai`, `--dry-run`, `-y` YouTube URLs) |
50
+ | `vip list` | List all profiles |
51
+ | `vip show <name>` | Display a profile |
52
+ | `vip search <keyword>` | Search across all profiles |
53
+ | `vip edit <name>` | Edit profile fields (`--title`, `--company`, `--twitter`, `--linkedin`, `--note`) |
54
+ | `vip rm <name>` | Delete a profile (`-y` to confirm) |
55
+ | `vip update <name>` | Refresh a profile with latest data |
56
+ | `vip open <name>` | Open a profile in your editor |
57
+ | `vip youtube <name> <url>` | Add YouTube video transcript to a profile |
58
+ | `vip youtube-search <name>` | Search YouTube for a person's talks (`-n` max results) |
59
+ | `vip card` | Generate H5 baseball card page (`-o` output path) |
60
+ | `vip export` | Export all profiles for backup |
61
+ | `vip import` | Restore profiles from backup |
62
+ | `vip digest` | Show recent profile changes |
63
+ | `vip monitor start\|stop\|status\|run` | Manage automatic profile refresh |
64
+ | `vip config` | View settings |
65
+
45
66
  ## Features
46
67
 
47
68
  - **Auto profile building** — Give a name or URL, get a structured profile