@dujavi/ai-md 0.3.0 → 0.5.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/README.md CHANGED
@@ -1,49 +1,133 @@
1
- # ai-md
1
+ # @dujavi/ai-md
2
2
 
3
3
  Public **AXI-shaped** CLI for a **private** personal AI config directory (`~/.ai-md`).
4
4
 
5
+ The npm package ships tooling only — no personal skills, rules, or secrets. Your content lives in a private git repo you point at with `--remote` (or machine config). Default reads are TOON + `help[]`; use `--json` when you need JSON.
6
+
7
+ ![Architecture](docs/architecture.png)
8
+
9
+ ## What it manages
10
+
5
11
  | Layer | Path | Purpose |
6
12
  |-------|------|---------|
7
- | **System** | `skills/`, `rules/` | Global base — linked to `~/.cursor/{skills,rules}` |
13
+ | **System** | `skills/`, `rules/` | Global base — linked into agent harnesses |
8
14
  | **Templates** | `templates/<type>/` | Project-type starters (`base`, later `forms`, …) |
9
15
  | **Projects** | `projects/<name>/` | Per-app overlays (repo `.cursor` → here) |
16
+ | **Scripts** | `scripts/<name>` | Private machine scripts via `ai-md script` / `setup --script` |
10
17
 
11
- No personal content ships in this package. Reads default to TOON + `help[]` (`--json` available).
18
+ ## Supported harnesses
12
19
 
13
- ## Install
20
+ Skill (and for Cursor, rules) link targets via `--agents` (comma-separated):
21
+
22
+ | Harness | Skills link | Notes |
23
+ |---------|-------------|--------|
24
+ | `cursor` | `~/.cursor/skills` | **Default.** Install also links `~/.cursor/rules` → `~/.ai-md/rules` |
25
+ | `claude` | `~/.claude/skills` | Optional second harness |
26
+ | `agents` | `~/.agents/skills` | Optional agents-skills layout |
14
27
 
15
28
  ```bash
16
- npm i -g @dujavi/ai-md
29
+ ai-md doctor --fix --agents cursor,claude
30
+ ai-md install --agents cursor,claude,agents
17
31
  ```
18
32
 
19
- ## Layout idea
33
+ ## Architecture
20
34
 
21
- ```text
22
- ~/.ai-md/
23
- skills/ # system — all agents see these
24
- rules/
25
- templates/
26
- base/ # default project starter (customizable stubs only)
27
- # forms/ … # other use cases
28
- projects/
29
- presenter/
30
- sendfolio/
35
+ ```mermaid
36
+ flowchart TB
37
+ subgraph publicPkg ["@dujavi/ai-md"]
38
+ cli["ai-md CLI"]
39
+ runner["lib/scripts.js"]
40
+ end
41
+ subgraph privateDir ["~/.ai-md"]
42
+ system["skills + rules"]
43
+ templates["templates/"]
44
+ projects["projects/"]
45
+ scripts["scripts/"]
46
+ end
47
+ subgraph harnesses ["Supported harnesses"]
48
+ cursor["cursor ~/.cursor"]
49
+ claude["claude ~/.claude"]
50
+ agents["agents ~/.agents"]
51
+ end
52
+ cli --> system
53
+ cli --> templates
54
+ cli --> projects
55
+ cli --> runner
56
+ runner --> scripts
57
+ system --> cursor
58
+ system --> claude
59
+ system --> agents
60
+ ```
61
+
62
+ Personal installers (Grok, quota-axi, etc.) are **not** baked into this package. Put them in `~/.ai-md/scripts/` and run with `--script` / `ai-md script`.
63
+
64
+ ## Quick start
65
+
66
+ ```bash
67
+ npm i -g @dujavi/ai-md
68
+
69
+ # First machine: persist config, clone, link, run a private script
70
+ ai-md setup --remote https://github.com/<you>/.ai-md.git --script ensure-tools
71
+
72
+ # Or step by step
73
+ ai-md config set --remote https://github.com/<you>/.ai-md.git --dir ~/.ai-md
74
+ ai-md install
75
+ ai-md script ensure-tools
31
76
  ```
32
77
 
33
- Put shared agentic skills/rules in **system** folders. Put only type-specific or per-project starters under **templates/**.
78
+ Precedence: `--remote` / `--dir` flags > `AI_MD_*` env > `~/.config/ai-md/config.json` > defaults (`~/.ai-md`, package default remote).
34
79
 
35
80
  ## Commands
36
81
 
37
82
  ```bash
38
- ai-md # status
83
+ ai-md # status (AXI)
84
+ ai-md setup --remote <url> --script <name>
85
+ ai-md config | config set --remote <url> --dir ~/.ai-md
86
+ ai-md install [--agents cursor,claude]
87
+ ai-md doctor --fix
88
+ ai-md pull | push -m "why"
89
+ ai-md script <name> [--] [args...] # private ~/.ai-md/scripts/
39
90
  ai-md init-project --repo ~/app --from base
40
91
  ai-md apply-template --project app --from base
41
- ai-md doctor --fix --agents cursor,claude
42
- ai-md pull | push -m "why"
43
- ai-md ensure-tools
92
+ ai-md link-project --repo ~/app --name app
93
+ ```
94
+
95
+ ### Private scripts
96
+
97
+ ```bash
98
+ ai-md script ensure-tools
99
+ ai-md script ensure-tools -- --dry-run
100
+ ai-md setup --remote <url> --script ensure-tools -- --dry-run
101
+ ```
102
+
103
+ - Resolves `$AI_MD_DIR/scripts/<name>` or `<name>.sh` (basename only; no `..` / paths).
104
+ - Args after the script name (or after `--` on `setup` / `install`) are forwarded unchanged.
105
+ - Repeat `--script` on setup/install; the same trailing args apply to each.
106
+
107
+ ## Machine config
108
+
109
+ Persisted at `~/.config/ai-md/config.json` (override path with `AI_MD_CONFIG`):
110
+
111
+ ```json
112
+ { "dir": "/home/you/.ai-md", "remote": "https://github.com/you/.ai-md.git" }
113
+ ```
114
+
115
+ Env one-shots: `AI_MD_DIR`, `AI_MD_REMOTE`.
116
+
117
+ ## Layout example
118
+
119
+ ```text
120
+ ~/.ai-md/
121
+ skills/ # system — harnesses see these
122
+ rules/
123
+ scripts/
124
+ ensure-tools.sh # your private tooling
125
+ templates/
126
+ base/
127
+ projects/
128
+ my-app/
44
129
  ```
45
130
 
46
- ## Environment
131
+ ## License
47
132
 
48
- - `AI_MD_DIR` → `~/.ai-md`
49
- - `AI_MD_REMOTE` → private content git URL
133
+ MIT