client-handover 1.0.1 → 1.0.2

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.
Files changed (3) hide show
  1. package/README.md +16 -16
  2. package/cli.js +21 -15
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -34,7 +34,7 @@ Get a free API key at [console.anthropic.com](https://console.anthropic.com)
34
34
  ## Quick start
35
35
 
36
36
  ```bash
37
- handover /handover
37
+ handover handover
38
38
  ```
39
39
 
40
40
  This generates a full handover document with placeholder content in an `output/` folder in your current directory.
@@ -45,12 +45,12 @@ This generates a full handover document with placeholder content in an `output/`
45
45
 
46
46
  | Command | Description |
47
47
  |---------|-------------|
48
- | `/all` | Every section as separate files in one folder |
49
- | `/handover` | Full handover document (all sections combined) |
50
- | `/setup` | Project setup & dependencies |
51
- | `/deploy` | Deployment & hosting info |
52
- | `/credentials` | Logins & API keys template |
53
- | `/license` | Licensing & attribution |
48
+ | `all` | Every section as separate files in one folder |
49
+ | `handover` | Full handover document (all sections combined) |
50
+ | `setup` | Project setup & dependencies |
51
+ | `deploy` | Deployment & hosting info |
52
+ | `credentials` | Logins & API keys template |
53
+ | `license` | Licensing & attribution |
54
54
 
55
55
  ---
56
56
 
@@ -78,19 +78,19 @@ Then run any command with that file as input:
78
78
 
79
79
  ```bash
80
80
  # Every section as separate files in one folder
81
- handover /all project-info.txt acme-client
81
+ handover all project-info.txt acme-client
82
82
 
83
83
  # Full combined doc
84
- handover /handover project-info.txt
84
+ handover handover project-info.txt
85
85
 
86
86
  # Full combined doc with a custom output filename
87
- handover /handover project-info.txt acme-handover
87
+ handover handover project-info.txt acme-handover
88
88
 
89
89
  # Individual sections
90
- handover /setup project-info.txt
91
- handover /deploy project-info.txt
92
- handover /credentials project-info.txt
93
- handover /license project-info.txt
90
+ handover setup project-info.txt
91
+ handover deploy project-info.txt
92
+ handover credentials project-info.txt
93
+ handover license project-info.txt
94
94
  ```
95
95
 
96
96
  The more detail you put in your project-info file, the more accurate and useful the output will be.
@@ -101,7 +101,7 @@ The more detail you put in your project-info file, the more accurate and useful
101
101
 
102
102
  All commands generate three files per section inside an `output/` folder.
103
103
 
104
- **Single command** (e.g. `/handover`):
104
+ **Single command** (e.g. `handover`):
105
105
  ```
106
106
  output/
107
107
  ├── handover.md ← Paste into Notion, GitHub, or a README
@@ -109,7 +109,7 @@ output/
109
109
  └── handover.html ← Styled HTML ready to send directly to a client
110
110
  ```
111
111
 
112
- **`/all` command** — every section in its own subfolder:
112
+ **`all` command** — every section in its own subfolder:
113
113
  ```
114
114
  output/acme-client/
115
115
  ├── handover.md / .txt / .html
package/cli.js CHANGED
@@ -10,11 +10,15 @@ import chalk from 'chalk'
10
10
  import fs from 'fs'
11
11
 
12
12
  const COMMANDS = {
13
- '/setup': { fn: setup, label: 'Project Setup & Dependencies' },
14
- '/deploy': { fn: deploy, label: 'Deployment & Hosting' },
15
- '/credentials': { fn: credentials, label: 'Credentials & Access' },
16
- '/handover': { fn: handover, label: 'Full Handover Document' },
17
- '/license': { fn: license, label: 'Licensing & Attribution' },
13
+ 'setup': { fn: setup, label: 'Project Setup & Dependencies' },
14
+ 'deploy': { fn: deploy, label: 'Deployment & Hosting' },
15
+ 'credentials': { fn: credentials, label: 'Credentials & Access' },
16
+ 'handover': { fn: handover, label: 'Full Handover Document' },
17
+ 'license': { fn: license, label: 'Licensing & Attribution' },
18
+ }
19
+
20
+ function normalizeCommand(cmd) {
21
+ return cmd.replace(/^\/+/, '')
18
22
  }
19
23
 
20
24
  function printHelp() {
@@ -25,12 +29,12 @@ function printHelp() {
25
29
  Object.entries(COMMANDS).forEach(([cmd, { label }]) => {
26
30
  console.log(` ${chalk.cyan(cmd.padEnd(16))} ${label}`)
27
31
  })
28
- console.log(` ${chalk.cyan('/all'.padEnd(16))} All sections in a single folder`)
32
+ console.log(` ${chalk.cyan('all'.padEnd(16))} All sections in a single folder`)
29
33
  console.log('\n' + chalk.dim('Examples:'))
30
- console.log(' handover /handover # Full doc with placeholders')
31
- console.log(' handover /setup project-info.txt # Setup section using your notes')
32
- console.log(' handover /handover project-info.txt my-client # Full doc, custom filename')
33
- console.log(' handover /all project-info.txt acme-client # Every section in output/acme-client/')
34
+ console.log(' handover handover # Full doc with placeholders')
35
+ console.log(' handover setup project-info.txt # Setup section using your notes')
36
+ console.log(' handover handover project-info.txt my-client # Full doc, custom filename')
37
+ console.log(' handover all project-info.txt acme-client # Every section in output/acme-client/')
34
38
  console.log()
35
39
  }
36
40
 
@@ -58,13 +62,15 @@ async function runAll(projectInfo, folderName) {
58
62
  }
59
63
 
60
64
  async function main() {
61
- const [,, command, infoFile, outputName] = process.argv
65
+ const [,, rawCommand, infoFile, outputName] = process.argv
62
66
 
63
- if (!command || command === '--help' || command === '-h') {
67
+ if (!rawCommand || rawCommand === '--help' || rawCommand === '-h') {
64
68
  printHelp()
65
69
  process.exit(0)
66
70
  }
67
71
 
72
+ const command = normalizeCommand(rawCommand)
73
+
68
74
  // Read optional project info file
69
75
  let projectInfo = ''
70
76
  if (infoFile) {
@@ -76,7 +82,7 @@ async function main() {
76
82
  console.log(chalk.green(`\n📄 Loaded project info from: ${infoFile}`))
77
83
  }
78
84
 
79
- if (command === '/all') {
85
+ if (command === 'all') {
80
86
  const folderName = outputName || 'all'
81
87
  try {
82
88
  await runAll(projectInfo, folderName)
@@ -93,12 +99,12 @@ async function main() {
93
99
 
94
100
  const entry = COMMANDS[command]
95
101
  if (!entry) {
96
- console.error(chalk.red(`\n❌ Unknown command: ${command}\n`))
102
+ console.error(chalk.red(`\n❌ Unknown command: ${rawCommand}\n`))
97
103
  printHelp()
98
104
  process.exit(1)
99
105
  }
100
106
 
101
- const docName = outputName || command.replace('/', '')
107
+ const docName = outputName || command
102
108
  const prompt = entry.fn(projectInfo)
103
109
 
104
110
  console.log(chalk.bold(`\n📝 Generating: ${entry.label}`))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "client-handover",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "AI-powered handover document generator for frontend developers handing off client websites",
5
5
  "type": "module",
6
6
  "main": "index.js",