youmd 0.8.0 → 0.8.5
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/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +20 -2
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/env.d.ts +21 -4
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +250 -24
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/login.d.ts +1 -0
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +20 -4
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/machine.d.ts +28 -1
- package/dist/commands/machine.d.ts.map +1 -1
- package/dist/commands/machine.js +529 -4
- package/dist/commands/machine.js.map +1 -1
- package/dist/commands/project.d.ts.map +1 -1
- package/dist/commands/project.js +862 -17
- package/dist/commands/project.js.map +1 -1
- package/dist/commands/prompts.d.ts +19 -0
- package/dist/commands/prompts.d.ts.map +1 -1
- package/dist/commands/prompts.js +304 -1
- package/dist/commands/prompts.js.map +1 -1
- package/dist/commands/pull.d.ts.map +1 -1
- package/dist/commands/pull.js +28 -8
- package/dist/commands/pull.js.map +1 -1
- package/dist/commands/push.d.ts +3 -1
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +26 -12
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/skill.d.ts.map +1 -1
- package/dist/commands/skill.js +19 -15
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/stack.d.ts.map +1 -1
- package/dist/commands/stack.js +20 -17
- package/dist/commands/stack.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +38 -0
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.d.ts +2 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +235 -2
- package/dist/commands/sync.js.map +1 -1
- package/dist/index.js +157 -31
- package/dist/index.js.map +1 -1
- package/dist/lib/api.d.ts +398 -0
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +104 -0
- package/dist/lib/api.js.map +1 -1
- package/dist/lib/daemon.d.ts +26 -0
- package/dist/lib/daemon.d.ts.map +1 -0
- package/dist/lib/daemon.js +187 -0
- package/dist/lib/daemon.js.map +1 -0
- package/dist/lib/first-run.d.ts +1 -1
- package/dist/lib/first-run.d.ts.map +1 -1
- package/dist/lib/first-run.js +8 -0
- package/dist/lib/first-run.js.map +1 -1
- package/dist/lib/machine-bootstrap-prompt.d.ts +17 -0
- package/dist/lib/machine-bootstrap-prompt.d.ts.map +1 -0
- package/dist/lib/machine-bootstrap-prompt.js +426 -0
- package/dist/lib/machine-bootstrap-prompt.js.map +1 -0
- package/dist/lib/machine-projects.d.ts +71 -0
- package/dist/lib/machine-projects.d.ts.map +1 -0
- package/dist/lib/machine-projects.js +510 -0
- package/dist/lib/machine-projects.js.map +1 -0
- package/dist/lib/machine-verify.d.ts +175 -0
- package/dist/lib/machine-verify.d.ts.map +1 -0
- package/dist/lib/machine-verify.js +684 -0
- package/dist/lib/machine-verify.js.map +1 -0
- package/dist/lib/portfolio-audit.d.ts +34 -0
- package/dist/lib/portfolio-audit.d.ts.map +1 -0
- package/dist/lib/portfolio-audit.js +254 -0
- package/dist/lib/portfolio-audit.js.map +1 -0
- package/dist/lib/portfolio-graph.d.ts +104 -0
- package/dist/lib/portfolio-graph.d.ts.map +1 -0
- package/dist/lib/portfolio-graph.js +281 -0
- package/dist/lib/portfolio-graph.js.map +1 -0
- package/dist/lib/project-strategy.d.ts +45 -0
- package/dist/lib/project-strategy.d.ts.map +1 -0
- package/dist/lib/project-strategy.js +234 -0
- package/dist/lib/project-strategy.js.map +1 -0
- package/dist/lib/realtime-sync.d.ts +128 -0
- package/dist/lib/realtime-sync.d.ts.map +1 -0
- package/dist/lib/realtime-sync.js +215 -0
- package/dist/lib/realtime-sync.js.map +1 -0
- package/dist/lib/reusable-patterns.d.ts +30 -0
- package/dist/lib/reusable-patterns.d.ts.map +1 -0
- package/dist/lib/reusable-patterns.js +375 -0
- package/dist/lib/reusable-patterns.js.map +1 -0
- package/dist/lib/skill-catalog.d.ts.map +1 -1
- package/dist/lib/skill-catalog.js +20 -0
- package/dist/lib/skill-catalog.js.map +1 -1
- package/dist/lib/skills.d.ts +1 -0
- package/dist/lib/skills.d.ts.map +1 -1
- package/dist/lib/skills.js +43 -13
- package/dist/lib/skills.js.map +1 -1
- package/dist/lib/version.d.ts +2 -0
- package/dist/lib/version.d.ts.map +1 -0
- package/dist/lib/version.js +63 -0
- package/dist/lib/version.js.map +1 -0
- package/dist/mcp/registry.d.ts +5 -1
- package/dist/mcp/registry.d.ts.map +1 -1
- package/dist/mcp/registry.js +426 -2
- package/dist/mcp/registry.js.map +1 -1
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +50 -5
- package/dist/mcp/server.js.map +1 -1
- package/package.json +2 -1
- package/scripts/env-vault/README.md +21 -2
- package/scripts/env-vault/backup.sh +24 -1
- package/scripts/env-vault/restore.sh +123 -8
- package/scripts/skillstack-sync/README.md +35 -10
- package/scripts/skillstack-sync/bootstrap-new-mac.sh +31 -0
- package/scripts/skillstack-sync/capture-agent-config.sh +1 -0
- package/scripts/skillstack-sync/com.youmd.context-sync.plist +38 -0
- package/scripts/skillstack-sync/com.youmd.identity-sync.plist +3 -1
- package/scripts/skillstack-sync/com.youmd.realtime-sync.plist +35 -0
- package/scripts/skillstack-sync/com.youmd.skillstack-sync.plist +1 -1
- package/scripts/skillstack-sync/context-sync.sh +69 -1
- package/scripts/skillstack-sync/install-daemons.sh +10 -3
- package/skills/machine-bootstrap.md +312 -0
|
@@ -146,6 +146,49 @@ existing_context_paths() {
|
|
|
146
146
|
echo "${found}"
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
path_is_context() {
|
|
150
|
+
local changed="$1"
|
|
151
|
+
local p
|
|
152
|
+
for p in ${CONTEXT_PATHSPECS}; do
|
|
153
|
+
if [ "${changed}" = "${p}" ]; then
|
|
154
|
+
return 0
|
|
155
|
+
fi
|
|
156
|
+
case "${changed}" in
|
|
157
|
+
"${p}/"*) return 0 ;;
|
|
158
|
+
esac
|
|
159
|
+
done
|
|
160
|
+
return 1
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
remote_has_non_context_changes() {
|
|
164
|
+
local repo="$1" repo_name="$2" upstream="$3"
|
|
165
|
+
local changed non_context line
|
|
166
|
+
changed="$(git -C "${repo}" diff --name-only "HEAD..${upstream}" 2>/dev/null || true)"
|
|
167
|
+
if [ -z "${changed}" ]; then
|
|
168
|
+
return 1
|
|
169
|
+
fi
|
|
170
|
+
|
|
171
|
+
non_context=""
|
|
172
|
+
while IFS= read -r line; do
|
|
173
|
+
[ -z "${line}" ] && continue
|
|
174
|
+
if ! path_is_context "${line}"; then
|
|
175
|
+
if [ -z "${non_context}" ]; then
|
|
176
|
+
non_context="${line}"
|
|
177
|
+
else
|
|
178
|
+
non_context="${non_context}, ${line}"
|
|
179
|
+
fi
|
|
180
|
+
fi
|
|
181
|
+
done <<EOF
|
|
182
|
+
${changed}
|
|
183
|
+
EOF
|
|
184
|
+
|
|
185
|
+
if [ -n "${non_context}" ]; then
|
|
186
|
+
log_warn "${repo_name}: upstream has non-context changes (${non_context}). Skipping pull/push so context-sync never merges application code."
|
|
187
|
+
return 0
|
|
188
|
+
fi
|
|
189
|
+
return 1
|
|
190
|
+
}
|
|
191
|
+
|
|
149
192
|
# ---------------------------------------------------------------------------
|
|
150
193
|
# SYNC ONE REPO
|
|
151
194
|
# Returns 0 on success, 1 on non-fatal failure.
|
|
@@ -263,8 +306,33 @@ sync_context_repo() {
|
|
|
263
306
|
|
|
264
307
|
# ---- Pull (merge, no rebase) ---------------------------------------------
|
|
265
308
|
if is_dry; then
|
|
266
|
-
log_dry "Would
|
|
309
|
+
log_dry "Would fetch upstream and pull only if remote changes are limited to context paths in ${repo_name}"
|
|
267
310
|
else
|
|
311
|
+
local upstream
|
|
312
|
+
upstream="$(git -C "${repo}" rev-parse --abbrev-ref --symbolic-full-name '@{u}' 2>/dev/null || true)"
|
|
313
|
+
if [ -z "${upstream}" ]; then
|
|
314
|
+
log_warn "Skipping pull/push for ${repo_name}: no upstream branch configured."
|
|
315
|
+
return 0
|
|
316
|
+
fi
|
|
317
|
+
|
|
318
|
+
local fetch_log
|
|
319
|
+
fetch_log="$(mktemp -t context_sync_fetch)"
|
|
320
|
+
local fetch_ok=0
|
|
321
|
+
git -C "${repo}" fetch --quiet >"${fetch_log}" 2>&1 || fetch_ok=$?
|
|
322
|
+
if [ "${fetch_ok}" -ne 0 ]; then
|
|
323
|
+
while IFS= read -r line; do
|
|
324
|
+
log "fetch|${repo_name}: ${line}"
|
|
325
|
+
done < "${fetch_log}"
|
|
326
|
+
rm -f "${fetch_log}"
|
|
327
|
+
log_error "Fetch FAILED for ${repo_name}. Skipping pull/push."
|
|
328
|
+
return 1
|
|
329
|
+
fi
|
|
330
|
+
rm -f "${fetch_log}"
|
|
331
|
+
|
|
332
|
+
if remote_has_non_context_changes "${repo}" "${repo_name}" "${upstream}"; then
|
|
333
|
+
return 0
|
|
334
|
+
fi
|
|
335
|
+
|
|
268
336
|
local pull_log
|
|
269
337
|
# BSD mktemp: no -p, use /tmp explicitly
|
|
270
338
|
pull_log="$(mktemp -t context_sync_pull)"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# install-daemons.sh — install
|
|
2
|
+
# install-daemons.sh — install resident You.md sync LaunchAgents
|
|
3
3
|
#
|
|
4
4
|
# Idempotent: safe to re-run. Unloads before reloading.
|
|
5
5
|
# Does NOT need sudo — LaunchAgents run as the current user.
|
|
@@ -12,7 +12,7 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
12
12
|
LAUNCH_AGENTS_DIR="${HOME}/Library/LaunchAgents"
|
|
13
13
|
LOG_DIR="${HOME}/.youmd/logs"
|
|
14
14
|
|
|
15
|
-
PLISTS="com.youmd.skillstack-sync com.youmd.identity-sync"
|
|
15
|
+
PLISTS="com.youmd.realtime-sync com.youmd.skillstack-sync com.youmd.identity-sync com.youmd.context-sync"
|
|
16
16
|
|
|
17
17
|
echo "==> Creating log directory: ${LOG_DIR}"
|
|
18
18
|
mkdir -p "${LOG_DIR}"
|
|
@@ -55,18 +55,25 @@ done
|
|
|
55
55
|
|
|
56
56
|
echo ""
|
|
57
57
|
echo "================================================================"
|
|
58
|
-
echo "
|
|
58
|
+
echo "Resident You.md daemons installed and running."
|
|
59
59
|
echo ""
|
|
60
60
|
echo "Log files:"
|
|
61
|
+
echo " ${LOG_DIR}/realtime-sync.out.log (Convex websocket sync stdout)"
|
|
62
|
+
echo " ${LOG_DIR}/realtime-sync.err.log (Convex websocket sync stderr)"
|
|
61
63
|
echo " ${LOG_DIR}/skillstack-sync.log (combined sync log)"
|
|
62
64
|
echo " ${LOG_DIR}/skillstack-sync.out.log (daemon stdout)"
|
|
63
65
|
echo " ${LOG_DIR}/skillstack-sync.err.log (daemon stderr)"
|
|
64
66
|
echo " ${LOG_DIR}/identity-sync.out.log (youmd sync stdout)"
|
|
65
67
|
echo " ${LOG_DIR}/identity-sync.err.log (youmd sync stderr)"
|
|
68
|
+
echo " ${LOG_DIR}/context-sync.log (combined project-context sync log)"
|
|
69
|
+
echo " ${LOG_DIR}/context-sync.out.log (daemon stdout)"
|
|
70
|
+
echo " ${LOG_DIR}/context-sync.err.log (daemon stderr)"
|
|
66
71
|
echo ""
|
|
67
72
|
echo "Check daemon status:"
|
|
73
|
+
echo " launchctl list com.youmd.realtime-sync"
|
|
68
74
|
echo " launchctl list com.youmd.skillstack-sync"
|
|
69
75
|
echo " launchctl list com.youmd.identity-sync"
|
|
76
|
+
echo " launchctl list com.youmd.context-sync"
|
|
70
77
|
echo ""
|
|
71
78
|
echo "To uninstall:"
|
|
72
79
|
for label in ${PLISTS}; do
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: machine-bootstrap
|
|
3
|
+
description: Set up a fresh computer with You.md identity, agent skills, stack sync, and active project repositories.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
scope: shared
|
|
6
|
+
identity_fields:
|
|
7
|
+
- profile.about
|
|
8
|
+
- profile.projects
|
|
9
|
+
- preferences.agent
|
|
10
|
+
- directives.agent
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# machine-bootstrap
|
|
14
|
+
|
|
15
|
+
Use this skill when the user is on a new Mac, Mac mini, laptop, virtual computer, cloud workstation, or agent host and wants their You.md identity, projects, skills, stacks, and local code workspace restored.
|
|
16
|
+
|
|
17
|
+
You.md is the brain. The new machine should become a runnable local agent workstation, not just a copied folder.
|
|
18
|
+
|
|
19
|
+
## Identity Context
|
|
20
|
+
|
|
21
|
+
- **About:** {{profile.about}}
|
|
22
|
+
- **Projects:** {{profile.projects}}
|
|
23
|
+
- **Agent preferences:** {{preferences.agent}}
|
|
24
|
+
- **Directives:** {{directives.agent}}
|
|
25
|
+
|
|
26
|
+
## Default Flow
|
|
27
|
+
|
|
28
|
+
1. Confirm whether this looks like a fresh machine:
|
|
29
|
+
- `youmd status`
|
|
30
|
+
- `test -d ~/Desktop/CODE_YOU && find ~/Desktop/CODE_YOU -maxdepth 1 -type d | wc -l`
|
|
31
|
+
- `git config user.name && git config user.email`
|
|
32
|
+
- `gh auth status`
|
|
33
|
+
2. If the user is still on the old/source machine and wants a copy/paste handoff
|
|
34
|
+
for Claude Code or Codex on the new machine, generate it first:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
youmd machine prompt --root ~/Desktop/CODE_YOU --days 30 --limit 80 --require-env-vault
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
If the web dashboard minted a scoped bootstrap key, the generated prompt may
|
|
41
|
+
include `YOUMD_API_KEY`. Treat that prompt as secret-bearing local setup
|
|
42
|
+
material and do not paste it into public chats, tickets, or docs.
|
|
43
|
+
Fresh-machine bootstrap keys must include the `vault` scope so the trusted
|
|
44
|
+
device can pull encrypted Secret Vault snapshots after login.
|
|
45
|
+
For bounded proof runs on a clean local root, add
|
|
46
|
+
`--max-clone-projects 2` or set `YOUMD_MAX_CLONE_PROJECTS=2`; omit that cap
|
|
47
|
+
on the real new machine.
|
|
48
|
+
|
|
49
|
+
3. If You.md is not installed on the new machine, install it:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
curl -fsSL https://you.md/install.sh | bash
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
4. Authenticate and hydrate the local brain:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
youmd login --key "$YOUMD_API_KEY" # or: youmd login
|
|
59
|
+
youmd pull
|
|
60
|
+
youmd sync
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
5. Restore shared agent skills, stack config, and host adapters:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
youmd machine setup
|
|
67
|
+
youmd skill install all
|
|
68
|
+
youmd skill sync
|
|
69
|
+
youmd skill link codex
|
|
70
|
+
youmd skill link claude
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
6. Hydrate the portfolio graph from You.md/GitHub records before cloning, then
|
|
74
|
+
preview the graph-backed setup plan before creating the desktop code workspace
|
|
75
|
+
and syncing truly active 30-day projects first:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
youmd project portfolio-hydrate --root ~/Desktop/CODE_YOU --days 30 --limit 80
|
|
79
|
+
youmd machine projects --root ~/Desktop/CODE_YOU --days 30 --recent-only --dry-run
|
|
80
|
+
youmd machine projects --root ~/Desktop/CODE_YOU --days 30 --recent-only
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
7. Ask whether Houston wants to expand the workspace to all active projects
|
|
84
|
+
from the last 90 days before calling the full project clone set complete:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
youmd project portfolio-hydrate --root ~/Desktop/CODE_YOU --days 90 --limit 80
|
|
88
|
+
youmd machine projects --root ~/Desktop/CODE_YOU --days 90 --recent-only --dry-run
|
|
89
|
+
youmd machine projects --root ~/Desktop/CODE_YOU --days 90 --recent-only
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
8. If GitHub auth is missing, help the user log in and rerun only the project
|
|
93
|
+
clone step:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
gh auth login
|
|
97
|
+
youmd machine projects --root ~/Desktop/CODE_YOU --days 30 --recent-only
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
9. After projects are cloned and any encrypted env vault is restored, hydrate the
|
|
101
|
+
portfolio graph again so local README, project-context, git, PR, and env-key
|
|
102
|
+
evidence becomes visible to future agents:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
youmd project portfolio-hydrate --root ~/Desktop/CODE_YOU --days 30 --limit 80
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
10. Run the secret-safe readiness audit and sync the proof summary:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
youmd machine verify --root ~/Desktop/CODE_YOU --max-projects 80 --write-report --sync-report
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
This checks cloned directories, git remotes, package managers, standard
|
|
115
|
+
scripts, `.env.local` presence, `.env.example` presence, root agent docs, and
|
|
116
|
+
`project-context/` presence. It writes a secret-safe JSON proof artifact to
|
|
117
|
+
`~/.youmd/machine-reports/latest.json` and syncs only the compact proof
|
|
118
|
+
summary to the You.md machine dashboard. It does not read secret values,
|
|
119
|
+
upload raw logs, or launch every dev server.
|
|
120
|
+
|
|
121
|
+
11. Only when Houston explicitly wants deeper local proof or the clean host has
|
|
122
|
+
enough time/CPU, run bounded package checks and dev-server probes:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
youmd machine verify --root ~/Desktop/CODE_YOU --max-projects 80 --install-deps --run-checks --probe-servers --write-report --sync-report
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The default check scripts are `typecheck`, `lint`, `test`, and `build`.
|
|
129
|
+
Override with `--check-scripts lint,build` when needed. Dependency installs
|
|
130
|
+
and dev-server probes are capped by default; tune with
|
|
131
|
+
`--max-install-projects`, `--max-server-projects`, and timeout flags.
|
|
132
|
+
|
|
133
|
+
## Behind-the-Scenes Agent Operation
|
|
134
|
+
|
|
135
|
+
- Use the You.md CLI and You Agent yourself before asking Houston to do manual
|
|
136
|
+
work. Prefer deterministic commands for setup and proof:
|
|
137
|
+
`youmd status`, `youmd whoami`, `youmd pull`, `youmd sync`,
|
|
138
|
+
`youmd machine prompt`, `youmd machine setup`,
|
|
139
|
+
`youmd skill install all`, `youmd skill sync`,
|
|
140
|
+
`youmd env vault list`, `youmd env vault pull`,
|
|
141
|
+
`youmd project portfolio-hydrate`, and `youmd machine verify`.
|
|
142
|
+
- Use `you` / `youmd chat` when you need the You Agent to synthesize context,
|
|
143
|
+
route a natural-language request, or produce the setup artifact, then turn the
|
|
144
|
+
result into concrete shell actions.
|
|
145
|
+
- Do not stop to ask "what next?" after each setup phase. Continue through the
|
|
146
|
+
command, verify the result, and report concise proof.
|
|
147
|
+
- Interrupt Houston only for true human-gated steps: GitHub browser auth,
|
|
148
|
+
macOS Keychain/passphrase entry, npm OTP, OS permissions, or the explicit
|
|
149
|
+
90-day project expansion choice.
|
|
150
|
+
- If the installed CLI is stale, run the curl installer/update path first, then
|
|
151
|
+
retry the You.md command. Tell Houston when npm publish is needed for
|
|
152
|
+
`npx youmd@latest` or npm fallback installs.
|
|
153
|
+
|
|
154
|
+
## Project Bootstrap Rules
|
|
155
|
+
|
|
156
|
+
- Use repo directory names from GitHub URLs. `https://github.com/houstongolden/foldermd` becomes `foldermd`.
|
|
157
|
+
- Default to projects active in the last 30 days and marked active plus Top
|
|
158
|
+
Priority/Focusing in You.md. Ask before expanding to the 90-day active set.
|
|
159
|
+
- Ask before including older, archived, paused, inactive, on-ice, abandoned,
|
|
160
|
+
killed, dormant, or unsorted projects.
|
|
161
|
+
- Create the workspace root on the Desktop if it is missing. `CODE_YOU` is the default fresh-machine root.
|
|
162
|
+
- Use the You.md Portfolio Graph as the strategic source of truth, then merge
|
|
163
|
+
authenticated GitHub recent-repo data and local bundle project records so repo
|
|
164
|
+
names and URLs stay cloneable.
|
|
165
|
+
- `youmd machine projects` should fetch the persisted owner graph through the
|
|
166
|
+
You.md API when authenticated. If that graph is unavailable, fall back to the
|
|
167
|
+
local bundle plus authenticated GitHub scan and say so.
|
|
168
|
+
- Clone with `gh repo clone owner/repo <target>` when `gh` is authenticated; otherwise fall back to `git clone`.
|
|
169
|
+
- Skip non-empty directories instead of overwriting them.
|
|
170
|
+
- Never print secrets. If `.env.local` files are needed, use You.md Secret Vault
|
|
171
|
+
or the shared encrypted env backup/restore path. Never paste raw env values
|
|
172
|
+
into chat.
|
|
173
|
+
- After cloning, initialize missing per-repo agent context with `youmd skill init-project` from inside that repo.
|
|
174
|
+
|
|
175
|
+
## Secret-Safe Env Transfer
|
|
176
|
+
|
|
177
|
+
Audit local project env coverage before backup:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
~/.agent-shared/bin/env-key-audit.py --root ~/Desktop/CODE_2025
|
|
181
|
+
~/.agent-shared/bin/env-secure-backup.sh --preflight
|
|
182
|
+
youmd env backup --root ~/Desktop/CODE_2025 --preflight
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Primary path: from the old/source machine, create an encrypted archive and push
|
|
186
|
+
only the ciphertext plus safe manifest metadata to You.md Secret Vault:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
youmd env vault push --root ~/Desktop/CODE_2025 --out ~/Desktop/youmd-env-vault
|
|
190
|
+
youmd env vault list
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
The passphrase is still local/trusted-device material. If the new machine needs
|
|
194
|
+
headless restore, store the passphrase in macOS Keychain once from a normal
|
|
195
|
+
trusted Terminal. Input is silent and the value is not printed:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
read -rs "PW?You.md vault passphrase: " && \
|
|
199
|
+
security add-generic-password -a "$USER" -s youmd-env-vault -w "$PW" -U && \
|
|
200
|
+
unset PW && echo "stored in Keychain"
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
On the new machine, pull the latest encrypted account snapshot and restore into
|
|
204
|
+
already-cloned project directories without clobbering local agent auth:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
youmd env vault pull --out ~/.youmd/secret-vault
|
|
208
|
+
youmd env vault pull --restore --root ~/Desktop/CODE_YOU --map-existing --existing-only --skip-agent-auth
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Fallback path: create an encrypted archive from the old machine in an
|
|
212
|
+
interactive macOS terminal and transfer the encrypted file by iCloud, AirDrop,
|
|
213
|
+
USB, or private password-manager attachment:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
open ~/.agent-shared/bin/env-backup-interactive.command
|
|
217
|
+
youmd env backup --root ~/Desktop/CODE_2025 --out ~/Desktop/youmd-env-vault
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
On the new machine, list the encrypted archive by path only before restore:
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
~/.agent-shared/bin/env-secure-restore.sh --archive ~/Desktop/env-local-backup.tar.gz.gpg --list
|
|
224
|
+
youmd env restore ~/Desktop/env-local-backup.tar.gz.gpg --root ~/Desktop/CODE_YOU --list --map-existing --existing-only --skip-agent-auth
|
|
225
|
+
youmd env restore ~/Desktop/env-local-backup.tar.gz.gpg --root ~/Desktop/CODE_YOU --map-existing --existing-only --skip-agent-auth
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
If a headless agent reports that Keychain service `youmd-env-vault` is missing,
|
|
229
|
+
do not make it guess. Print the Keychain command above, have Houston run it once
|
|
230
|
+
on the trusted device, then rerun only the restore/setup command.
|
|
231
|
+
|
|
232
|
+
## Useful Variants
|
|
233
|
+
|
|
234
|
+
Dry-run the project layout:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
youmd machine projects --root ~/Desktop/CODE_YOU --days 30 --recent-only --dry-run
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Create directories only, without cloning:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
youmd machine projects --root ~/Desktop/CODE_YOU --no-clone
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Audit cloned readiness:
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
youmd machine verify --root ~/Desktop/CODE_YOU --max-projects 80 --write-report --sync-report
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Run bounded package checks:
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
youmd machine verify --root ~/Desktop/CODE_YOU --run-checks --max-check-projects 8 --check-timeout-ms 120000
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Run clean-host dependency installs and localhost dev-server probes:
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
youmd machine verify --root ~/Desktop/CODE_YOU --install-deps --probe-servers --write-report --sync-report
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Include older projects without prompts:
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
youmd machine projects --root ~/Desktop/CODE_YOU --yes
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Generate the copy/paste prompt for a new Claude Code or Codex terminal:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
youmd machine prompt --root ~/Desktop/CODE_YOU --days 30 --limit 80 --require-env-vault
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Generate the same prompt but cap clones for a clean-host proof run:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
youmd machine prompt --root /tmp/youmd-clean-host-CODE_YOU --days 30 --limit 80 --max-clone-projects 2 --require-env-vault
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Fetch the secret-safe project graph directly:
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
curl -H "Authorization: Bearer $YOUMD_API_KEY" https://you.md/api/v1/me/portfolio/graph
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## Done Means
|
|
289
|
+
|
|
290
|
+
- You.md CLI is installed and authenticated.
|
|
291
|
+
- The local bundle is pulled/synced.
|
|
292
|
+
- Shared skills/stacks/agent config are restored.
|
|
293
|
+
- A Desktop code root exists.
|
|
294
|
+
- Active GitHub-backed project repos are cloned into matching repo-name directories.
|
|
295
|
+
- The clone plan visibly used the persisted portfolio graph, authenticated
|
|
296
|
+
GitHub recent repos, and local bundle records with source counts.
|
|
297
|
+
- `youmd machine verify` reports git/package/env/agent-doc/project-context
|
|
298
|
+
readiness for the cloned workspace without reading `.env.local` values and
|
|
299
|
+
writes `~/.youmd/machine-reports/latest.json`.
|
|
300
|
+
- `--sync-report` creates or updates an owner-gated You.md machine proof row
|
|
301
|
+
that the dashboard can show across computers.
|
|
302
|
+
- If `--run-checks` was requested, bounded package checks ran with project and
|
|
303
|
+
timeout caps, and failures/timeouts were reported per project.
|
|
304
|
+
- If `--install-deps` or `--probe-servers` was requested, dependency installs
|
|
305
|
+
and localhost server probes ran with project and timeout caps, and the proof
|
|
306
|
+
report shows install/check/server pass counts.
|
|
307
|
+
- The portfolio graph is hydrated from both remote project records and local
|
|
308
|
+
code/project-context/env-key evidence.
|
|
309
|
+
- `.env.local` files, if restored, came from encrypted vault tooling without
|
|
310
|
+
printing raw values.
|
|
311
|
+
- Older projects are either explicitly included or intentionally skipped.
|
|
312
|
+
- The user can launch Claude Code or Codex inside the workspace and run `you`.
|