phewsh 0.11.12 → 0.11.13
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/bin/phewsh.js +12 -12
- package/commands/session.js +2 -1
- package/commands/watch.js +12 -12
- package/lib/ui.js +29 -30
- package/package.json +1 -1
package/bin/phewsh.js
CHANGED
|
@@ -30,7 +30,7 @@ function showBrand() {
|
|
|
30
30
|
console.log('');
|
|
31
31
|
console.log(` ${b(w('█▀█ █░█ █▀▀ █░█ █▀ █░█'))}`);
|
|
32
32
|
console.log(` ${b(w('█▀▀ █▀█ ██▄ ▀▄▀ ▄█ █▀█'))}`);
|
|
33
|
-
console.log(` ${g('
|
|
33
|
+
console.log(` ${g('.intent/ — your project\'s working memory for every AI tool.')}`);
|
|
34
34
|
console.log('');
|
|
35
35
|
|
|
36
36
|
// Context-aware hint
|
|
@@ -80,21 +80,21 @@ function showHelp() {
|
|
|
80
80
|
console.log(` ${g('─'.repeat(48))}`);
|
|
81
81
|
console.log('');
|
|
82
82
|
console.log(` ${b(w('start here'))}`);
|
|
83
|
-
console.log(` ${cyan('phewsh')} Open AI session
|
|
84
|
-
console.log(` ${cyan('phewsh clarify')} Turn a messy idea into
|
|
83
|
+
console.log(` ${cyan('phewsh')} Open AI session with your .intent/ context`);
|
|
84
|
+
console.log(` ${cyan('phewsh clarify')} Turn a messy idea into .intent/ artifacts`);
|
|
85
85
|
console.log(` ${cyan('phewsh login')} Set up identity + API key`);
|
|
86
86
|
console.log('');
|
|
87
|
-
console.log(` ${b(w('
|
|
88
|
-
console.log(` ${cyan('intent')} ${g('
|
|
87
|
+
console.log(` ${b(w('.intent/ management'))}`);
|
|
88
|
+
console.log(` ${cyan('intent')} ${g('Create, view, and evolve .intent/ artifacts')}`);
|
|
89
89
|
console.log(` ${cyan('gate')} ${g('Declare constraints (budget, time, skill, urgency)')}`);
|
|
90
|
-
console.log(` ${cyan('context')} ${g('Export portable context for any AI tool')}`);
|
|
91
|
-
console.log(` ${cyan('ai')} ${g('One-shot AI prompt with .intent/ context')}`);
|
|
90
|
+
console.log(` ${cyan('context')} ${g('Export .intent/ as portable context for any AI tool')}`);
|
|
91
|
+
console.log(` ${cyan('ai')} ${g('One-shot AI prompt with .intent/ context injected')}`);
|
|
92
92
|
console.log('');
|
|
93
93
|
console.log(` ${b(w('sync'))}`);
|
|
94
|
-
console.log(` ${cyan('
|
|
95
|
-
console.log(` ${cyan('
|
|
96
|
-
console.log(` ${cyan('
|
|
97
|
-
console.log(` ${cyan('serve')} ${g('Execution bridge for
|
|
94
|
+
console.log(` ${cyan('watch')} ${g('Keep AI tools in sync with .intent/ (CLAUDE.md + cloud)')}`);
|
|
95
|
+
console.log(` ${cyan('push')} ${g('Push .intent/ to phewsh.com/intent')}`);
|
|
96
|
+
console.log(` ${cyan('pull')} ${g('Pull from phewsh.com/intent to .intent/')}`);
|
|
97
|
+
console.log(` ${cyan('serve')} ${g('Execution bridge for phewsh.com/intent')}`);
|
|
98
98
|
console.log('');
|
|
99
99
|
console.log(` ${b(w('connect'))}`);
|
|
100
100
|
console.log(` ${cyan('mcp')} ${g('Connect AI agents via MCP protocol')}`);
|
|
@@ -105,7 +105,7 @@ function showHelp() {
|
|
|
105
105
|
console.log(` ${cyan('style')} ${g('Style identity — ingest, profile, sync')}`);
|
|
106
106
|
console.log(` ${cyan('mbhd')} ${g('MBHD music engine')}`);
|
|
107
107
|
console.log('');
|
|
108
|
-
console.log(` ${g('
|
|
108
|
+
console.log(` ${g('Everything works without an account. Account adds sync + sharing.')}`);
|
|
109
109
|
console.log('');
|
|
110
110
|
}
|
|
111
111
|
|
package/commands/session.js
CHANGED
|
@@ -213,7 +213,8 @@ async function main() {
|
|
|
213
213
|
// ── First-run welcome ──────────────────────────────────
|
|
214
214
|
if (!config?.apiKey) {
|
|
215
215
|
console.log(` ${b(cream('Welcome.'))}`);
|
|
216
|
-
console.log(` ${sage('
|
|
216
|
+
console.log(` ${sage('.intent/ is your project\'s working memory.')}`);
|
|
217
|
+
console.log(` ${sage('Define it once — every AI tool reads it. No more re-explaining.')}`);
|
|
217
218
|
console.log('');
|
|
218
219
|
console.log(` ${cream('To chat, you need an API key.')} ${slate('(not a subscription)')}`);
|
|
219
220
|
console.log(` ${slate('ChatGPT Plus / Claude Pro don\'t include API access.')}`);
|
package/commands/watch.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
//
|
|
3
3
|
// Watches .intent/ for changes and auto-pushes to Supabase + regenerates CLAUDE.md.
|
|
4
4
|
// This is the backbone of cross-tool continuity:
|
|
5
|
-
// edit in terminal →
|
|
5
|
+
// edit in terminal → phewsh.com/intent updates → Claude Code knows.
|
|
6
6
|
//
|
|
7
7
|
// Usage:
|
|
8
8
|
// phewsh watch Start watching (push + CLAUDE.md)
|
|
@@ -85,8 +85,8 @@ function generateClaudeSection() {
|
|
|
85
85
|
const decisionGate = gate || projectJson?.decisionGate;
|
|
86
86
|
|
|
87
87
|
sections.push(`# PHEWSH Adaptive Context — ${projectName}`);
|
|
88
|
+
sections.push(`> **Generated file. Do not edit.** Modify .intent/ instead — this section regenerates automatically.`);
|
|
88
89
|
sections.push(`> Auto-synced by \`phewsh watch\` | ${new Date().toISOString().split('T')[0]}`);
|
|
89
|
-
sections.push(`> This section is regenerated on every .intent/ change. Do not edit manually.`);
|
|
90
90
|
sections.push('');
|
|
91
91
|
|
|
92
92
|
// Project identity
|
|
@@ -318,25 +318,25 @@ function watchIntent() {
|
|
|
318
318
|
|
|
319
319
|
function showHelp() {
|
|
320
320
|
console.log(`
|
|
321
|
-
phewsh watch —
|
|
321
|
+
phewsh watch — Keep AI tools in sync with .intent/
|
|
322
322
|
|
|
323
323
|
Usage:
|
|
324
324
|
phewsh watch Start watching
|
|
325
325
|
phewsh watch --no-claude Skip CLAUDE.md regeneration
|
|
326
|
-
phewsh watch --no-push Skip cloud push (local
|
|
326
|
+
phewsh watch --no-push Skip cloud push (local only)
|
|
327
327
|
phewsh watch --verbose Show detailed sync info
|
|
328
328
|
|
|
329
329
|
What it does:
|
|
330
330
|
Watches .intent/ for changes and automatically:
|
|
331
|
-
1.
|
|
332
|
-
2.
|
|
331
|
+
1. Regenerates CLAUDE.md so Claude Code stays current with .intent/
|
|
332
|
+
2. Pushes to phewsh.com/intent (optional — needs account)
|
|
333
333
|
|
|
334
|
-
|
|
335
|
-
edit
|
|
334
|
+
The loop:
|
|
335
|
+
edit .intent/ → CLAUDE.md updates → cloud mirror updates → every tool knows
|
|
336
336
|
|
|
337
337
|
Requirements:
|
|
338
338
|
- .intent/ directory must exist (run \`phewsh intent --init\`)
|
|
339
|
-
-
|
|
339
|
+
- Everything works without an account. Account adds cloud sync.
|
|
340
340
|
`);
|
|
341
341
|
}
|
|
342
342
|
|
|
@@ -352,8 +352,8 @@ async function main() {
|
|
|
352
352
|
const loggedIn = !!config?.supabaseUserId;
|
|
353
353
|
|
|
354
354
|
console.log('');
|
|
355
|
-
console.log(` ${b(w('
|
|
356
|
-
console.log(` ${g('
|
|
355
|
+
console.log(` ${b(w('.intent/ Watch'))} ${g('v' + require('../package.json').version)}`);
|
|
356
|
+
console.log(` ${g('Keeps your AI tools in sync with .intent/')}`);
|
|
357
357
|
console.log('');
|
|
358
358
|
|
|
359
359
|
// Show what's enabled
|
|
@@ -361,7 +361,7 @@ async function main() {
|
|
|
361
361
|
if (!flags.noClaude) features.push(`${green('●')} CLAUDE.md auto-sync`);
|
|
362
362
|
else features.push(`${g('○')} CLAUDE.md ${g('(disabled)')}`);
|
|
363
363
|
|
|
364
|
-
if (!flags.noPush && loggedIn) features.push(`${green('●')} Cloud push
|
|
364
|
+
if (!flags.noPush && loggedIn) features.push(`${green('●')} Cloud push → phewsh.com/intent`);
|
|
365
365
|
else if (!flags.noPush && !loggedIn) features.push(`${yellow('●')} Cloud push ${g('(not logged in — run phewsh login)')}`);
|
|
366
366
|
else features.push(`${g('○')} Cloud push ${g('(disabled)')}`);
|
|
367
367
|
|
package/lib/ui.js
CHANGED
|
@@ -150,7 +150,7 @@ async function brandReveal(fast = false) {
|
|
|
150
150
|
await sleep(100);
|
|
151
151
|
|
|
152
152
|
// Phase 5: Tagline fades in — dim → sage → cream
|
|
153
|
-
const tagline = '
|
|
153
|
+
const tagline = '.intent/ is your project\'s working memory.';
|
|
154
154
|
process.stdout.write(` ${slate(tagline)}`);
|
|
155
155
|
await sleep(200);
|
|
156
156
|
process.stdout.write(`${clearLine} ${sage(tagline)}`);
|
|
@@ -227,14 +227,14 @@ function typewrite(text, speed = 25) {
|
|
|
227
227
|
|
|
228
228
|
// ── Welcome tips ─────────────────────────────────────────
|
|
229
229
|
const TIPS = [
|
|
230
|
-
`${slate('·')} ${
|
|
231
|
-
`${slate('·')} ${cream('/gate')} ${sage('sets
|
|
232
|
-
`${slate('·')} ${sage('Run')} ${cream('phewsh watch')} ${sage('in another tab
|
|
233
|
-
`${slate('·')} ${cream('/export')} ${sage('
|
|
234
|
-
`${slate('·')} ${
|
|
235
|
-
`${slate('·')} ${
|
|
236
|
-
`${slate('·')} ${cream('
|
|
237
|
-
`${slate('·')} ${
|
|
230
|
+
`${slate('·')} ${cream('/clarify')} ${sage('turns a messy idea into .intent/ artifacts')}`,
|
|
231
|
+
`${slate('·')} ${cream('/gate')} ${sage('sets constraints — every AI response respects your budget and time')}`,
|
|
232
|
+
`${slate('·')} ${sage('Run')} ${cream('phewsh watch')} ${sage('in another tab — keeps CLAUDE.md in sync with .intent/')}`,
|
|
233
|
+
`${slate('·')} ${cream('/export')} ${sage('exports .intent/ as portable context for any AI tool')}`,
|
|
234
|
+
`${slate('·')} ${sage('.intent/ files are plain markdown — edit them directly anytime')}`,
|
|
235
|
+
`${slate('·')} ${cream('phewsh context --copy')} ${sage('puts your .intent/ context on the clipboard')}`,
|
|
236
|
+
`${slate('·')} ${cream('/tour')} ${sage('walks through the .intent/ workflow (no key needed)')}`,
|
|
237
|
+
`${slate('·')} ${sage('Everything works without an account. Account adds sync + sharing.')}`,
|
|
238
238
|
];
|
|
239
239
|
|
|
240
240
|
function randomTip() {
|
|
@@ -244,20 +244,20 @@ function randomTip() {
|
|
|
244
244
|
// ── Tour content ─────────────────────────────────────────
|
|
245
245
|
const TOUR_PAGES = [
|
|
246
246
|
{
|
|
247
|
-
title: 'What is
|
|
247
|
+
title: 'What is .intent/?',
|
|
248
248
|
body: [
|
|
249
249
|
'',
|
|
250
|
-
` ${
|
|
251
|
-
`
|
|
250
|
+
` ${teal('.intent/')} ${sage('is your project\'s working memory.')}`,
|
|
251
|
+
` Plain markdown files, committed with your code, read by every AI tool.`,
|
|
252
252
|
'',
|
|
253
|
-
`
|
|
254
|
-
`
|
|
253
|
+
` ${cream('phew')} ${sage('— the relief of not re-explaining.')}`,
|
|
254
|
+
` ${cream('shh')} ${sage('— it just works. No noise.')}`,
|
|
255
255
|
'',
|
|
256
|
-
`
|
|
257
|
-
`
|
|
256
|
+
` PHEWSH is the tool that ${cream('authors')} and ${cream('syncs')} .intent/.`,
|
|
257
|
+
` It works standalone, inside Claude Code, Cursor, ChatGPT, or any MCP agent.`,
|
|
258
258
|
'',
|
|
259
|
-
` ${sage('
|
|
260
|
-
` ${sage('
|
|
259
|
+
` ${sage('You own these files. They travel with your code.')}`,
|
|
260
|
+
` ${sage('Everything works without an account. Account adds sync + sharing.')}`,
|
|
261
261
|
]
|
|
262
262
|
},
|
|
263
263
|
{
|
|
@@ -278,26 +278,25 @@ const TOUR_PAGES = [
|
|
|
278
278
|
body: [
|
|
279
279
|
'',
|
|
280
280
|
` Run ${cream('phewsh')} and type naturally.`,
|
|
281
|
-
` Every message carries your
|
|
281
|
+
` Every message carries your .intent/ context automatically.`,
|
|
282
282
|
'',
|
|
283
283
|
` ${teal('phewsh')} ${sage('>')} what should I focus on today?`,
|
|
284
284
|
` ${teal('phewsh')} ${sage('>')} is my plan realistic given my budget?`,
|
|
285
285
|
` ${teal('phewsh')} ${sage('>')} break this feature into tasks`,
|
|
286
286
|
'',
|
|
287
|
-
` ${sage('The AI
|
|
287
|
+
` ${sage('The AI reads .intent/ — no warmup needed.')}`,
|
|
288
288
|
]
|
|
289
289
|
},
|
|
290
290
|
{
|
|
291
|
-
title: '
|
|
291
|
+
title: '.intent/ in other tools',
|
|
292
292
|
body: [
|
|
293
293
|
'',
|
|
294
|
-
` ${b(cream('Claude Code'))} ${sage('phewsh watch →
|
|
295
|
-
` ${b(cream('Cursor'))} ${sage('phewsh context --file → .phewsh.context')}`,
|
|
296
|
-
` ${b(cream('ChatGPT'))} ${sage('phewsh context --copy →
|
|
297
|
-
` ${b(cream('MCP agents'))} ${sage('phewsh mcp setup → agents
|
|
294
|
+
` ${b(cream('Claude Code'))} ${sage('phewsh watch → CLAUDE.md stays in sync with .intent/')}`,
|
|
295
|
+
` ${b(cream('Cursor'))} ${sage('phewsh context --file → exports .intent/ to .phewsh.context')}`,
|
|
296
|
+
` ${b(cream('ChatGPT'))} ${sage('phewsh context --copy → .intent/ on your clipboard')}`,
|
|
297
|
+
` ${b(cream('MCP agents'))} ${sage('phewsh mcp setup → agents read .intent/ automatically')}`,
|
|
298
298
|
'',
|
|
299
|
-
` ${sage('Same
|
|
300
|
-
` ${sage('Switch tools mid-thought. Nothing lost.')}`,
|
|
299
|
+
` ${sage('Same .intent/. Every tool. Switch mid-thought. Nothing lost.')}`,
|
|
301
300
|
]
|
|
302
301
|
},
|
|
303
302
|
{
|
|
@@ -318,13 +317,13 @@ const TOUR_PAGES = [
|
|
|
318
317
|
title: 'You\'re ready',
|
|
319
318
|
body: [
|
|
320
319
|
'',
|
|
321
|
-
` ${teal('●')} Type naturally to chat with your project context`,
|
|
322
320
|
` ${teal('●')} ${cream('/init')} or ${cream('/clarify')} to create .intent/ artifacts`,
|
|
321
|
+
` ${teal('●')} Type naturally — .intent/ context is always loaded`,
|
|
323
322
|
` ${teal('●')} ${cream('/gate')} to set your constraints`,
|
|
323
|
+
` ${teal('●')} ${cream('phewsh watch')} to keep AI tools in sync`,
|
|
324
324
|
` ${teal('●')} ${cream('/help')} for all commands`,
|
|
325
325
|
'',
|
|
326
|
-
` ${sage('
|
|
327
|
-
` ${sage('The exhale before execution.')}`,
|
|
326
|
+
` ${sage('.intent/ is your project\'s working memory. PHEWSH keeps it useful.')}`,
|
|
328
327
|
]
|
|
329
328
|
},
|
|
330
329
|
];
|