@phren/cli 0.1.53 → 0.2.1
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/cli/config.js +28 -0
- package/dist/cli/govern.d.ts +5 -0
- package/dist/cli/govern.js +66 -1
- package/dist/cli/hooks.js +26 -2
- package/dist/cli-registry.js +2 -0
- package/dist/content/summarize.d.ts +83 -0
- package/dist/content/summarize.js +298 -0
- package/dist/governance/policy.js +6 -2
- package/dist/index.js +19 -35
- package/dist/init/preferences.d.ts +6 -0
- package/dist/link/doctor.js +26 -0
- package/dist/mcp/profile.d.ts +80 -0
- package/dist/mcp/profile.js +282 -0
- package/dist/phren-paths.d.ts +2 -0
- package/dist/phren-paths.js +5 -0
- package/dist/shared/index.js +17 -14
- package/dist/shared/retrieval.d.ts +6 -0
- package/dist/shared/retrieval.js +9 -0
- package/dist/shared.d.ts +1 -1
- package/dist/shared.js +1 -1
- package/dist/status.js +9 -0
- package/dist/store-weight.d.ts +28 -0
- package/dist/store-weight.js +80 -0
- package/package.json +1 -1
- package/starter/global/CLAUDE.md +22 -86
- package/starter/global/skills/phren-profiles/SKILL.md +15 -107
- package/starter/global/skills/phren-sync/SKILL.md +17 -240
- package/skills/README.md +0 -7
- package/skills/consolidate/SKILL.md +0 -152
- package/skills/discover/SKILL.md +0 -175
- package/skills/docs.md +0 -170
- package/skills/init/SKILL.md +0 -216
- package/skills/profiles/SKILL.md +0 -121
- package/skills/sync/SKILL.md +0 -261
package/skills/docs.md
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: docs
|
|
3
|
-
description: Update and verify all phren documentation surfaces after code changes.
|
|
4
|
-
dependencies:
|
|
5
|
-
- git
|
|
6
|
-
---
|
|
7
|
-
# phren-docs - Documentation accuracy check and update
|
|
8
|
-
|
|
9
|
-
> Keep all phren documentation surfaces in sync with the code after any change.
|
|
10
|
-
|
|
11
|
-
Invoke this after adding tools, changing CLI commands, bumping versions, or editing hooks. It walks every documentation surface, checks what's stale, and updates `docs/documentation.html` (the canonical public-facing reference).
|
|
12
|
-
|
|
13
|
-
## When to run
|
|
14
|
-
|
|
15
|
-
- After adding, removing, or renaming MCP tools
|
|
16
|
-
- After changing CLI commands or their flags
|
|
17
|
-
- After bumping the version number
|
|
18
|
-
- After changing hook names, events, or behavior
|
|
19
|
-
- Before publishing to npm
|
|
20
|
-
- When the user says "update the docs" or "check the docs"
|
|
21
|
-
|
|
22
|
-
## Documentation surfaces
|
|
23
|
-
|
|
24
|
-
| File | What it contains | What to check |
|
|
25
|
-
|------|-----------------|---------------|
|
|
26
|
-
| `README.md` | Project overview, install steps, quick-start | Tool count, version badge, CLI examples |
|
|
27
|
-
| `CLAUDE.md` | In-repo instructions for Claude | Tool count (heading says "MCP Tools (N)"), CLI command list, key file list |
|
|
28
|
-
| `AGENTS.md` | Agent-facing instructions | Tool count, hook table, CLI commands |
|
|
29
|
-
| `CONTRIBUTING.md` | Dev setup, build/test commands | `npm run build`, `npm test`, publish steps |
|
|
30
|
-
| `CHANGELOG.md` | Release history | Latest version matches `package.json` version |
|
|
31
|
-
| `docs/index.html` | GitHub Pages landing page | Install commands, version references, feature list |
|
|
32
|
-
| `docs/documentation.html` | Full reference doc (primary surface) | Tool count, CLI commands, hook table, env vars table |
|
|
33
|
-
| `docs/api-reference.md` | API / tool reference | Tool signatures, return shapes |
|
|
34
|
-
| `docs/architecture.md` | Data-flow diagrams and architecture | File paths, hook names, flow descriptions |
|
|
35
|
-
| `docs/faq.md` | Common questions and answers | References to commands, file paths |
|
|
36
|
-
| `docs/llms.txt` | Short LLM-friendly summary | Tool count, version, install command |
|
|
37
|
-
| `docs/llms-full.txt` | Full LLM-readable reference | Complete tool list, CLI commands, env vars |
|
|
38
|
-
| `mcp/README.md` | MCP server README | Tool count, server entry point |
|
|
39
|
-
| `vscode-extension/README.md` | VS Code extension README | Feature list, commands |
|
|
40
|
-
|
|
41
|
-
## Step-by-step
|
|
42
|
-
|
|
43
|
-
### 1. Read the source of truth
|
|
44
|
-
|
|
45
|
-
The source of truth for counts and signatures lives in the code, not the docs:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
# Count exported MCP tools in index.ts
|
|
49
|
-
grep -c 'server\.tool(' mcp/src/index.ts
|
|
50
|
-
|
|
51
|
-
# Current version
|
|
52
|
-
node -p "require('./package.json').version"
|
|
53
|
-
|
|
54
|
-
# CLI commands (scan cli.ts / index.ts for subcommand registrations)
|
|
55
|
-
grep 'program\.' mcp/src/cli.ts | head -40
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Record: **tool count**, **version**, and the list of top-level CLI subcommands.
|
|
59
|
-
|
|
60
|
-
### 2. Check each documentation surface
|
|
61
|
-
|
|
62
|
-
For each surface in the table above:
|
|
63
|
-
|
|
64
|
-
1. Read the file
|
|
65
|
-
2. Find every place it mentions a tool count (e.g. "65 tools", "MCP Tools (65)")
|
|
66
|
-
3. Find every place it mentions the version number
|
|
67
|
-
4. Find every CLI command listing
|
|
68
|
-
5. Find the hook table (event names, what each hook does)
|
|
69
|
-
6. Note any stale references (old file paths, renamed tools, removed commands)
|
|
70
|
-
|
|
71
|
-
### 3. Spot-check critical numbers
|
|
72
|
-
|
|
73
|
-
These numbers appear in multiple files and must all agree:
|
|
74
|
-
|
|
75
|
-
| Item | Where to verify |
|
|
76
|
-
|------|----------------|
|
|
77
|
-
| MCP tool count | `mcp/src/index.ts`: count `server.tool(` calls |
|
|
78
|
-
| CLI subcommand count | `mcp/src/cli.ts`: count `program.command(` calls |
|
|
79
|
-
| Version | `package.json` → `version` field |
|
|
80
|
-
| Hook events | `mcp/src/init.ts`: look for hook registration |
|
|
81
|
-
|
|
82
|
-
Run `/parity` if it is installed to automate numeric cross-checking across surfaces.
|
|
83
|
-
|
|
84
|
-
### 4. Update `docs/documentation.html`
|
|
85
|
-
|
|
86
|
-
This is the primary public reference. It must reflect the current state of the code.
|
|
87
|
-
|
|
88
|
-
Sections to verify and update:
|
|
89
|
-
|
|
90
|
-
- **Tool reference table**: every tool name, description, and parameter signature
|
|
91
|
-
- **CLI commands block**: every `phren <subcommand>` with flags and description
|
|
92
|
-
- **Hooks table**: event name, what it runs, what it does
|
|
93
|
-
- **Environment variables table**: variable name, default, description
|
|
94
|
-
- **Version number** in the page title, install command snippets, and any badges
|
|
95
|
-
- **Tool count** in any summary sentence (e.g. "65 MCP tools")
|
|
96
|
-
|
|
97
|
-
When updating the HTML:
|
|
98
|
-
- Keep existing structure and CSS classes. Do not restructure the page
|
|
99
|
-
- Update text content only; do not rewrite layout
|
|
100
|
-
- Preserve the `<details>` blocks for env var categories if they exist
|
|
101
|
-
|
|
102
|
-
### 5. Update `docs/llms.txt` and `docs/llms-full.txt`
|
|
103
|
-
|
|
104
|
-
These files are consumed by LLMs directly. Keep them plain text with no HTML.
|
|
105
|
-
|
|
106
|
-
`llms.txt`, short summary (under 60 lines):
|
|
107
|
-
- Tool count
|
|
108
|
-
- Install command
|
|
109
|
-
- One-line description of what phren does
|
|
110
|
-
|
|
111
|
-
`llms-full.txt`, comprehensive reference:
|
|
112
|
-
- All MCP tool signatures with descriptions
|
|
113
|
-
- All CLI commands
|
|
114
|
-
- All environment variables
|
|
115
|
-
- Directory structure
|
|
116
|
-
|
|
117
|
-
### 6. Update `CLAUDE.md` (in-repo)
|
|
118
|
-
|
|
119
|
-
The heading `## MCP Tools (N)` must match the actual tool count. Update N if it changed.
|
|
120
|
-
|
|
121
|
-
The CLI commands block must list every top-level command. Add or remove lines to match.
|
|
122
|
-
|
|
123
|
-
### 7. Sync version references
|
|
124
|
-
|
|
125
|
-
`CHANGELOG.md`: the top entry's version must match `package.json`. If a new version was bumped but the changelog has no entry yet, note it. Do not fabricate one.
|
|
126
|
-
|
|
127
|
-
`README.md` and `docs/index.html`: update any hardcoded version strings (badges, `npm install @phren/cli@X.Y.Z`, etc.).
|
|
128
|
-
|
|
129
|
-
### 8. Report
|
|
130
|
-
|
|
131
|
-
After reviewing and updating, output:
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
phren-docs
|
|
135
|
-
|
|
136
|
-
Version: 0.0.8
|
|
137
|
-
MCP tools: 65
|
|
138
|
-
CLI subcommands: 22
|
|
139
|
-
|
|
140
|
-
Surfaces checked: 14
|
|
141
|
-
|
|
142
|
-
Changes made:
|
|
143
|
-
- docs/documentation.html: updated tool count (64→65), added new env var PHREN_X
|
|
144
|
-
- CLAUDE.md: updated MCP Tools heading (64→65)
|
|
145
|
-
- docs/llms-full.txt: added PHREN_X to env vars section
|
|
146
|
-
|
|
147
|
-
No changes needed:
|
|
148
|
-
- README.md: version and tool count already correct
|
|
149
|
-
- CHANGELOG.md: top entry matches package.json version
|
|
150
|
-
- mcp/README.md: tool count correct
|
|
151
|
-
|
|
152
|
-
Warnings:
|
|
153
|
-
- docs/faq.md: references `phren init`, command was renamed to `phren link` in v0.0.7
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
List every file checked. Be specific about what changed and what line/section.
|
|
157
|
-
|
|
158
|
-
## What not to do
|
|
159
|
-
|
|
160
|
-
- Do not restructure or reformat documentation for style. Only fix accuracy
|
|
161
|
-
- Do not add new sections or features to the docs without user direction
|
|
162
|
-
- Do not fabricate changelog entries for unreleased versions
|
|
163
|
-
- Do not silently skip a surface because it looks "probably fine". Check all of them
|
|
164
|
-
- Do not guess tool counts. Always derive from `grep` on the source file
|
|
165
|
-
|
|
166
|
-
## Related skills
|
|
167
|
-
|
|
168
|
-
- `/parity`: numeric cross-check across all documentation surfaces
|
|
169
|
-
- `/consolidate`: surface cross-project patterns before updating architecture docs
|
|
170
|
-
- `/discover`: find gaps in project documentation
|
package/skills/init/SKILL.md
DELETED
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: init
|
|
3
|
-
description: Set up a new project in phren with summary, CLAUDE.md, task, and skill templates.
|
|
4
|
-
dependencies:
|
|
5
|
-
- git
|
|
6
|
-
---
|
|
7
|
-
# phren-init - Scaffold a new project
|
|
8
|
-
|
|
9
|
-
> Set up a new project in phren with summary, CLAUDE.md, task, and skill templates.
|
|
10
|
-
|
|
11
|
-
Tell phren about a new project, or bootstrap phren himself if you're starting fresh.
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
phren-init my-new-project # scaffold a specific project
|
|
17
|
-
phren-init # list existing projects, suggest unconfigured ones
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## First: find or create the phren directory
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
PHREN_DIR="${PHREN_DIR:-$HOME/.phren}"
|
|
24
|
-
ls "$PHREN_DIR" 2>/dev/null
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
If the phren directory doesn't exist, offer to create it:
|
|
28
|
-
> "No phren repo found. Want me to create one at ~/.phren? This will set up the base directory structure (global/, profiles/, machines.yaml)."
|
|
29
|
-
|
|
30
|
-
If the user says yes, create the base structure:
|
|
31
|
-
```bash
|
|
32
|
-
mkdir -p "$PHREN_DIR"/{global/skills,profiles}
|
|
33
|
-
# Create a starter machines.yaml
|
|
34
|
-
# Create a starter profile
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Then continue with the project scaffolding below.
|
|
38
|
-
|
|
39
|
-
## With a project name
|
|
40
|
-
|
|
41
|
-
### 1. Check it doesn't already exist
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
ls "$PHREN_DIR/<project-name>/" 2>/dev/null
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
If it exists, tell the user and ask if they want to reset it or just update specific files.
|
|
48
|
-
|
|
49
|
-
### 2. Create the project directory
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
mkdir -p "$PHREN_DIR/<project-name>/skills"
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### 3. Create summary.md
|
|
56
|
-
|
|
57
|
-
This is the project's identity card. Five lines, no more.
|
|
58
|
-
|
|
59
|
-
```markdown
|
|
60
|
-
# <project-name>
|
|
61
|
-
|
|
62
|
-
What: <one sentence about what this project does>
|
|
63
|
-
Stack: <languages, frameworks, key deps>
|
|
64
|
-
Status: <active / maintenance / new / archived>
|
|
65
|
-
Run: <the main command to start it, e.g. "npm run dev">
|
|
66
|
-
Watch out: <the one thing that trips people up>
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Ask the user for these if you can't figure them out from the project directory. If the project directory exists on disk (e.g. `~/<project-name>/`), read its package.json, pyproject.toml, README, or similar to pre-fill.
|
|
70
|
-
|
|
71
|
-
### 4. Create CLAUDE.md
|
|
72
|
-
|
|
73
|
-
```markdown
|
|
74
|
-
# <project-name>
|
|
75
|
-
|
|
76
|
-
<One paragraph: what this project is and what it does.>
|
|
77
|
-
|
|
78
|
-
## Commands
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
<dev command>
|
|
82
|
-
<build command>
|
|
83
|
-
<test command>
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Architecture
|
|
87
|
-
|
|
88
|
-
<!-- Fill this in as the project grows -->
|
|
89
|
-
|
|
90
|
-
## Conventions
|
|
91
|
-
|
|
92
|
-
<!-- Project-specific rules, patterns, naming conventions -->
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Pre-fill from the project's existing README or package.json if available. Leave architecture and conventions as placeholders with the HTML comments.
|
|
96
|
-
|
|
97
|
-
### 5. Create tasks.md
|
|
98
|
-
|
|
99
|
-
```markdown
|
|
100
|
-
# <project-name> tasks
|
|
101
|
-
|
|
102
|
-
## Active
|
|
103
|
-
|
|
104
|
-
## Queue
|
|
105
|
-
|
|
106
|
-
## Done
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### 6. Create skills README
|
|
110
|
-
|
|
111
|
-
```markdown
|
|
112
|
-
# <project-name> skills
|
|
113
|
-
|
|
114
|
-
Project-specific skills go here. Add `.md` files and phren will resolve them together with global skills, then mirror the effective set into the project's `.claude/skills/` directory on sync.
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Write this to `$PHREN_DIR/<project-name>/skills/README.md`.
|
|
118
|
-
|
|
119
|
-
### 7. Add to profile(s)
|
|
120
|
-
|
|
121
|
-
Check if profiles exist:
|
|
122
|
-
```bash
|
|
123
|
-
ls "$PHREN_DIR/profiles/"*.yaml 2>/dev/null
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
If profiles exist, ask: "Which profile should this project be in?" and show the options.
|
|
127
|
-
|
|
128
|
-
If no profiles exist, offer to create one:
|
|
129
|
-
> "No profiles set up yet. Want me to create a 'default' profile with this project in it?"
|
|
130
|
-
|
|
131
|
-
Then add the project name to the chosen profile's `projects` list.
|
|
132
|
-
|
|
133
|
-
### 8. Commit (if git repo)
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
cd "$PHREN_DIR"
|
|
137
|
-
git add <project-name>/
|
|
138
|
-
git add profiles/ # if modified
|
|
139
|
-
git commit -m "add <project-name>"
|
|
140
|
-
git push # only if remote exists
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
If phren isn't a git repo yet, walk them through the full setup:
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
cd "$PHREN_DIR"
|
|
147
|
-
git init
|
|
148
|
-
git add -A
|
|
149
|
-
git commit -m "initial phren setup"
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
Then check if `gh` is available:
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
which gh && gh auth status
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
If yes, offer to create the GitHub repo:
|
|
159
|
-
> "Your phren isn't on GitHub yet. Want me to create a private repo and push it? That's what lets you sync across machines."
|
|
160
|
-
|
|
161
|
-
If they say yes:
|
|
162
|
-
```bash
|
|
163
|
-
gh repo create my-phren --private --source=. --push
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
If `gh` isn't available, show the manual steps:
|
|
167
|
-
> "Create a private repo at github.com/new, then:
|
|
168
|
-
> git remote add origin git@github.com:YOU/my-phren.git
|
|
169
|
-
> git push -u origin main
|
|
170
|
-
>
|
|
171
|
-
> Once it's on GitHub, clone it on any machine and run `phren-sync` to activate."
|
|
172
|
-
|
|
173
|
-
### 9. Report
|
|
174
|
-
|
|
175
|
-
```
|
|
176
|
-
phren-init <project-name>
|
|
177
|
-
|
|
178
|
-
Created:
|
|
179
|
-
$PHREN_DIR/<project-name>/summary.md
|
|
180
|
-
$PHREN_DIR/<project-name>/CLAUDE.md
|
|
181
|
-
$PHREN_DIR/<project-name>/tasks.md
|
|
182
|
-
$PHREN_DIR/<project-name>/skills/README.md
|
|
183
|
-
|
|
184
|
-
Added to profile: default
|
|
185
|
-
|
|
186
|
-
Run phren-sync to activate on this machine.
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
## Without a project name
|
|
190
|
-
|
|
191
|
-
When user just runs `phren-init` with no args:
|
|
192
|
-
|
|
193
|
-
1. If phren directory exists, list all directories that have a `summary.md` (configured projects)
|
|
194
|
-
2. Look for directories in `~/` that look like projects (have package.json, pyproject.toml, Cargo.toml, go.mod, etc.) but don't have a phren entry
|
|
195
|
-
3. Show both lists and suggest adding unconfigured ones
|
|
196
|
-
|
|
197
|
-
```
|
|
198
|
-
phren-init: project scan
|
|
199
|
-
|
|
200
|
-
Configured in phren:
|
|
201
|
-
myapp, api-server
|
|
202
|
-
|
|
203
|
-
Found on this machine but not in phren:
|
|
204
|
-
~/side-project (has package.json)
|
|
205
|
-
~/experiments/rust-thing (has Cargo.toml)
|
|
206
|
-
|
|
207
|
-
Run phren-init <name> to add one.
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
If phren doesn't exist at all, offer to bootstrap it from scratch.
|
|
211
|
-
|
|
212
|
-
## Related skills
|
|
213
|
-
|
|
214
|
-
- `phren-sync`: activate the new project on this machine after init
|
|
215
|
-
- `phren-discover`: find what to build next in a project
|
|
216
|
-
- `/tasks`: manage the project's task queue
|
package/skills/profiles/SKILL.md
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: profiles
|
|
3
|
-
description: Manage machine-to-profile and profile-to-project mappings in phren.
|
|
4
|
-
dependencies:
|
|
5
|
-
- git
|
|
6
|
-
---
|
|
7
|
-
# phren-profiles - Manage your profiles
|
|
8
|
-
|
|
9
|
-
> **Multi-machine only.** This skill is for users who sync phren across multiple machines and need to control which projects appear where. If you only use one machine, you can skip this -- `phren-sync` handles everything you need.
|
|
10
|
-
|
|
11
|
-
> Add projects to profiles, move projects between profiles, create new profiles, and check what's in each one.
|
|
12
|
-
|
|
13
|
-
Manage which projects appear on which machines by editing your profile definitions. Each machine maps to one profile, and each profile is a list of projects.
|
|
14
|
-
|
|
15
|
-
## Prerequisites
|
|
16
|
-
|
|
17
|
-
You need a phren repo. The profiles live in `~/.phren/profiles/` and machine mappings live in `~/.phren/machines.yaml`.
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
~/.phren/
|
|
21
|
-
profiles/
|
|
22
|
-
work.yaml
|
|
23
|
-
personal.yaml
|
|
24
|
-
machines.yaml
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
If you don't have a phren repo yet, start with `phren-init`.
|
|
28
|
-
|
|
29
|
-
## What's a profile?
|
|
30
|
-
|
|
31
|
-
A profile is a YAML file listing projects for a machine role. Example:
|
|
32
|
-
|
|
33
|
-
```yaml
|
|
34
|
-
name: work
|
|
35
|
-
description: Work laptop with company projects
|
|
36
|
-
projects:
|
|
37
|
-
- global
|
|
38
|
-
- my-api
|
|
39
|
-
- frontend
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
When you sync on a machine mapped to this profile, only those projects appear. Personal projects stay off work machines.
|
|
43
|
-
|
|
44
|
-
## How to use it
|
|
45
|
-
|
|
46
|
-
### "Add a project to a profile"
|
|
47
|
-
|
|
48
|
-
User says: "add my-project to my work profile"
|
|
49
|
-
|
|
50
|
-
1. Find the profile file: `~/.phren/profiles/work.yaml`
|
|
51
|
-
2. Read it and find the `projects:` list
|
|
52
|
-
3. Add the project name if it's not already there
|
|
53
|
-
4. Commit the change
|
|
54
|
-
|
|
55
|
-
### "Create a new profile"
|
|
56
|
-
|
|
57
|
-
User says: "create a new profile called staging"
|
|
58
|
-
|
|
59
|
-
1. Create a new file: `~/.phren/profiles/staging.yaml`
|
|
60
|
-
2. Fill it with the required structure:
|
|
61
|
-
|
|
62
|
-
```yaml
|
|
63
|
-
name: staging
|
|
64
|
-
description: Staging servers and experiments
|
|
65
|
-
projects:
|
|
66
|
-
- global
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
3. Ask which projects should be in this new profile (can add more later)
|
|
70
|
-
4. Commit the file
|
|
71
|
-
|
|
72
|
-
### "Show me what's in a profile"
|
|
73
|
-
|
|
74
|
-
User says: "what's in my personal profile?"
|
|
75
|
-
|
|
76
|
-
1. Find `~/.phren/profiles/personal.yaml`
|
|
77
|
-
2. Read it and display the projects list
|
|
78
|
-
|
|
79
|
-
### "Move a project between profiles"
|
|
80
|
-
|
|
81
|
-
User says: "move my-project from personal to work"
|
|
82
|
-
|
|
83
|
-
1. Find `~/.phren/profiles/personal.yaml` and remove the project
|
|
84
|
-
2. Find `~/.phren/profiles/work.yaml` and add the project
|
|
85
|
-
3. Commit both changes
|
|
86
|
-
|
|
87
|
-
### "Set this machine's profile"
|
|
88
|
-
|
|
89
|
-
User says: "this machine is my work laptop"
|
|
90
|
-
|
|
91
|
-
1. Get the current machine name: `cat ~/.phren/.machine-id` or `hostname`
|
|
92
|
-
2. Ask which profile to use (show available profiles from `~/.phren/profiles/`)
|
|
93
|
-
3. Add/update the line in `~/.phren/machines.yaml`: `work-laptop: work`
|
|
94
|
-
4. Commit the change
|
|
95
|
-
5. Run `phren-sync` to activate
|
|
96
|
-
|
|
97
|
-
### "List my profiles"
|
|
98
|
-
|
|
99
|
-
If the user asks what profiles exist:
|
|
100
|
-
|
|
101
|
-
1. List all files in `~/.phren/profiles/`
|
|
102
|
-
2. For each one, read the name and description fields
|
|
103
|
-
3. Show which machine is mapped to each profile (from `machines.yaml`)
|
|
104
|
-
|
|
105
|
-
## After making changes
|
|
106
|
-
|
|
107
|
-
Always commit to the phren git repo:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
cd ~/.phren
|
|
111
|
-
git add profiles/ machines.yaml
|
|
112
|
-
git commit -m "update profiles"
|
|
113
|
-
git push # only if remote exists
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Then suggest running `phren-sync` to activate changes on this machine.
|
|
117
|
-
|
|
118
|
-
## Related skills
|
|
119
|
-
|
|
120
|
-
- `phren-sync`: sync your profiles to this machine and activate them
|
|
121
|
-
- `phren-init`: create a new project or bootstrap phren from scratch
|