codeadd 0.1.2 → 0.1.3
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 +12 -12
- package/package.json +4 -4
- package/src/config.js +3 -3
- package/src/github.js +1 -1
- package/src/installer.js +2 -2
- package/src/providers.js +1 -1
- package/src/uninstaller.js +2 -2
- package/src/updater.js +3 -3
- package/src/validator.js +3 -3
package/README.md
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
# add
|
|
2
2
|
|
|
3
|
-
CLI installer for [
|
|
3
|
+
CLI installer for [Code Addiction (ADD)](https://github.com/brabos-ai/code-addiction).
|
|
4
4
|
|
|
5
5
|
## Install and run
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
# interactive install
|
|
9
|
-
npx
|
|
9
|
+
npx codeadd install
|
|
10
10
|
|
|
11
11
|
# install from main branch
|
|
12
|
-
npx
|
|
12
|
+
npx codeadd install --version main
|
|
13
13
|
|
|
14
14
|
# install from a specific tag
|
|
15
|
-
npx
|
|
15
|
+
npx codeadd install --version v2.0.1
|
|
16
16
|
|
|
17
17
|
# update installed files to latest release
|
|
18
|
-
npx
|
|
18
|
+
npx codeadd update
|
|
19
19
|
|
|
20
20
|
# environment checks
|
|
21
|
-
npx
|
|
21
|
+
npx codeadd doctor
|
|
22
22
|
|
|
23
23
|
# integrity checks
|
|
24
|
-
npx
|
|
24
|
+
npx codeadd validate
|
|
25
25
|
|
|
26
26
|
# repair integrity issues by restoring from release
|
|
27
|
-
npx
|
|
27
|
+
npx codeadd validate --repair
|
|
28
28
|
|
|
29
29
|
# remove installed files
|
|
30
|
-
npx
|
|
31
|
-
npx
|
|
30
|
+
npx codeadd uninstall
|
|
31
|
+
npx codeadd uninstall --force
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## Commands
|
|
@@ -59,5 +59,5 @@ npx add uninstall --force
|
|
|
59
59
|
|
|
60
60
|
## Links
|
|
61
61
|
|
|
62
|
-
- Repository: https://github.com/brabos-ai/
|
|
63
|
-
- Issues: https://github.com/brabos-ai/
|
|
62
|
+
- Repository: https://github.com/brabos-ai/code-addiction
|
|
63
|
+
- Issues: https://github.com/brabos-ai/code-addiction/issues
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeadd",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "CLI for Code Addiction framework - AI-powered development workflows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/brabos-ai/
|
|
8
|
+
"url": "git+https://github.com/brabos-ai/code-addiction.git"
|
|
9
9
|
},
|
|
10
|
-
"homepage": "https://github.com/brabos-ai/
|
|
10
|
+
"homepage": "https://github.com/brabos-ai/code-addiction#readme",
|
|
11
11
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/brabos-ai/
|
|
12
|
+
"url": "https://github.com/brabos-ai/code-addiction/issues"
|
|
13
13
|
},
|
|
14
14
|
"bin": {
|
|
15
15
|
"codeadd": "./bin/codeadd.js"
|
package/src/config.js
CHANGED
|
@@ -50,7 +50,7 @@ export async function config(cwd, verbose = false) {
|
|
|
50
50
|
const manifest = readManifest(cwd);
|
|
51
51
|
|
|
52
52
|
if (!manifest) {
|
|
53
|
-
outro('ERROR: ADD not installed. Run `npx
|
|
53
|
+
outro('ERROR: ADD not installed. Run `npx codeadd install` first.');
|
|
54
54
|
process.exit(1);
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -82,7 +82,7 @@ export async function config(cwd, verbose = false) {
|
|
|
82
82
|
log.success('OK You are running the latest version!');
|
|
83
83
|
} else {
|
|
84
84
|
log.warn(`WARN Update available: ${latestTag} (current: ${manifest.releaseTag || manifest.version})`);
|
|
85
|
-
log.info(' Run `npx
|
|
85
|
+
log.info(' Run `npx codeadd update` to upgrade.');
|
|
86
86
|
}
|
|
87
87
|
} catch (err) {
|
|
88
88
|
s.stop('Update check failed.');
|
|
@@ -93,4 +93,4 @@ export async function config(cwd, verbose = false) {
|
|
|
93
93
|
log.info('');
|
|
94
94
|
outro('Config display complete.');
|
|
95
95
|
process.exit(0);
|
|
96
|
-
}
|
|
96
|
+
}
|
package/src/github.js
CHANGED
package/src/installer.js
CHANGED
|
@@ -159,7 +159,7 @@ function dirExists(dir) {
|
|
|
159
159
|
* Returns array of relative paths (from cwd) of files copied.
|
|
160
160
|
*
|
|
161
161
|
* @param {AdmZip} zip
|
|
162
|
-
* @param {string} zipRoot top-level folder name inside zip (e.g. "
|
|
162
|
+
* @param {string} zipRoot top-level folder name inside zip (e.g. "code-addiction-2.0.1")
|
|
163
163
|
* @param {string} srcPrefix path inside zip after zipRoot (e.g. "framwork/.add")
|
|
164
164
|
* @param {string} destDir absolute destination directory
|
|
165
165
|
* @param {string} cwd project root
|
|
@@ -267,6 +267,6 @@ export async function install(cwd, options = {}) {
|
|
|
267
267
|
`Next steps:\n` +
|
|
268
268
|
` 1. Open your AI editor and run: /add-init\n` +
|
|
269
269
|
` 2. Follow the onboarding to configure your project\n\n` +
|
|
270
|
-
`Docs: https://github.com/brabos-ai/
|
|
270
|
+
`Docs: https://github.com/brabos-ai/code-addiction`
|
|
271
271
|
);
|
|
272
272
|
}
|
package/src/providers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Map of AI provider keys to their source (inside zip) and destination paths.
|
|
3
|
-
* Source is relative to the extracted zip root (e.g.
|
|
3
|
+
* Source is relative to the extracted zip root (e.g. code-addiction-2.0.1/framwork/).
|
|
4
4
|
* Destination is relative to the user's project root (cwd).
|
|
5
5
|
*/
|
|
6
6
|
export const PROVIDERS = {
|
package/src/uninstaller.js
CHANGED
|
@@ -77,7 +77,7 @@ export async function uninstall(cwd, force = false) {
|
|
|
77
77
|
const manifest = readManifest(cwd);
|
|
78
78
|
|
|
79
79
|
if (!manifest) {
|
|
80
|
-
throw new Error('No ADD installation found. Run `npx
|
|
80
|
+
throw new Error('No ADD installation found. Run `npx codeadd install` first.');
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
if (manifest.corrupted) {
|
|
@@ -177,4 +177,4 @@ export async function uninstall(cwd, force = false) {
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
outro('ADD removed successfully.');
|
|
180
|
-
}
|
|
180
|
+
}
|
package/src/updater.js
CHANGED
|
@@ -63,14 +63,14 @@ export async function update(cwd) {
|
|
|
63
63
|
|
|
64
64
|
const manifestPath = path.join(cwd, '.add', 'manifest.json');
|
|
65
65
|
if (!fs.existsSync(manifestPath)) {
|
|
66
|
-
throw new Error('No ADD installation found. Run `npx
|
|
66
|
+
throw new Error('No ADD installation found. Run `npx codeadd install` first.');
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
let manifest;
|
|
70
70
|
try {
|
|
71
71
|
manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
72
72
|
} catch {
|
|
73
|
-
throw new Error('Manifest is corrupted. Run `npx
|
|
73
|
+
throw new Error('Manifest is corrupted. Run `npx codeadd install` to reinstall.');
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
const currentVersion = manifest.version ?? 'unknown';
|
|
@@ -117,4 +117,4 @@ export async function update(cwd) {
|
|
|
117
117
|
|
|
118
118
|
log.success(`Updated from v${currentVersion} to v${newVersion}`);
|
|
119
119
|
outro('ADD updated successfully!');
|
|
120
|
-
}
|
|
120
|
+
}
|
package/src/validator.js
CHANGED
|
@@ -115,14 +115,14 @@ export async function validate(cwd, repair = false) {
|
|
|
115
115
|
const manifest = readManifest(cwd);
|
|
116
116
|
|
|
117
117
|
if (!manifest) {
|
|
118
|
-
outro('ERROR: ADD not installed. Run `npx
|
|
118
|
+
outro('ERROR: ADD not installed. Run `npx codeadd install` first.');
|
|
119
119
|
process.exit(1);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
if (!manifest.hashes || Object.keys(manifest.hashes).length === 0) {
|
|
123
123
|
log.warn('');
|
|
124
124
|
log.warn('WARN Hash not available for this install.');
|
|
125
|
-
log.warn(' Run `npx
|
|
125
|
+
log.warn(' Run `npx codeadd update` to enable validation.');
|
|
126
126
|
log.warn('');
|
|
127
127
|
outro('Validation skipped.');
|
|
128
128
|
process.exit(0);
|
|
@@ -198,4 +198,4 @@ export async function validate(cwd, repair = false) {
|
|
|
198
198
|
outro('OK All files validated successfully!');
|
|
199
199
|
process.exit(0);
|
|
200
200
|
}
|
|
201
|
-
}
|
|
201
|
+
}
|