@pcdd-dev/cli 0.0.0-stage → 0.4.0

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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +18 -2
  3. package/bin/pcdd.js +79 -0
  4. package/package.json +25 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 aledepaoligampel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,19 @@
1
- # Temporary Holding Version
1
+ # @pcdd-dev/cli
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Progressive Change-Driven Development for AI coding agents: each change gets just enough process.
4
+
5
+ PCDD is a Python package on [PyPI](https://pypi.org/project/pcdd/). This npm package is a small launcher that runs it through [uv](https://docs.astral.sh/uv/):
6
+
7
+ ```sh
8
+ npx @pcdd-dev/cli init # same as: uvx pcdd@<this package's version> init
9
+ ```
10
+
11
+ Each npm release runs the PyPI release with the same version, so `npx @pcdd-dev/cli@0.4.0` always runs PCDD 0.4.0. Installed globally (`npm install -g @pcdd-dev/cli`), the command is `pcdd`. Arguments and the exit code are passed through unchanged. uv must be installed; if it is missing, the launcher explains how to install it.
12
+
13
+ To install PCDD permanently instead:
14
+
15
+ ```sh
16
+ curl -fsSL https://pcdd.dev/install.sh | sh
17
+ ```
18
+
19
+ Documentation: [pcdd.dev](https://pcdd.dev) · Source: [github.com/aledepaoligampel/pcdd](https://github.com/aledepaoligampel/pcdd) · License: MIT
package/bin/pcdd.js ADDED
@@ -0,0 +1,79 @@
1
+ #!/usr/bin/env node
2
+ // Runs the PCDD command-line tool (a Python package on PyPI) through uv, pinned to
3
+ // the release that matches this package's version:
4
+ // npx @pcdd-dev/cli@X.Y.Z <args> -> uv tool run pcdd@X.Y.Z <args>
5
+ 'use strict';
6
+
7
+ const { spawn } = require('node:child_process');
8
+ const fs = require('node:fs');
9
+ const os = require('node:os');
10
+ const path = require('node:path');
11
+
12
+ const { version } = require('../package.json');
13
+ const ARGS = ['tool', 'run', 'pcdd@' + version, ...process.argv.slice(2)];
14
+
15
+ function candidates() {
16
+ const exe = process.platform === 'win32' ? 'uv.exe' : 'uv';
17
+ let home = '';
18
+ try { home = os.homedir(); } catch (e) { /* no home directory */ }
19
+ const dirs = [
20
+ process.env.UV_INSTALL_DIR,
21
+ process.env.XDG_BIN_HOME,
22
+ home && path.join(home, '.local', 'bin'),
23
+ home && path.join(home, '.cargo', 'bin'),
24
+ ];
25
+ return dirs.filter(Boolean).map((dir) => path.join(dir, exe));
26
+ }
27
+
28
+ function missingUv() {
29
+ process.stderr.write([
30
+ 'pcdd: uv is required to run PCDD from npm (https://docs.astral.sh/uv/).',
31
+ '',
32
+ 'Install PCDD with uv in one step:',
33
+ ' curl -fsSL https://pcdd.dev/install.sh | sh',
34
+ '',
35
+ 'Or install uv yourself and run npx @pcdd-dev/cli again:',
36
+ ' macOS/Linux: curl -LsSf https://astral.sh/uv/install.sh | sh',
37
+ ' Windows: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"',
38
+ '',
39
+ ].join('\n'));
40
+ process.exit(127);
41
+ }
42
+
43
+ // The terminal already delivers Ctrl+C and Ctrl+\ to uv; wait for it to finish.
44
+ // Termination requests sent only to this process are forwarded to uv.
45
+ const IGNORED = ['SIGINT', 'SIGQUIT'];
46
+ const FORWARDED = ['SIGTERM', 'SIGHUP'];
47
+ let child = null;
48
+ const handlers = {};
49
+ for (const sig of IGNORED) handlers[sig] = () => {};
50
+ for (const sig of FORWARDED) handlers[sig] = () => { if (child) child.kill(sig); };
51
+ for (const sig of Object.keys(handlers)) {
52
+ try { process.on(sig, handlers[sig]); } catch (e) { /* unsupported on this platform */ }
53
+ }
54
+
55
+ function finish(code, signal) {
56
+ for (const sig of Object.keys(handlers)) process.removeListener(sig, handlers[sig]);
57
+ if (signal) {
58
+ if (process.platform !== 'win32') {
59
+ try { process.kill(process.pid, signal); } catch (e) { /* fall through */ }
60
+ }
61
+ process.exit(128 + (os.constants.signals[signal] || 0));
62
+ }
63
+ process.exit(code === null ? 1 : code);
64
+ }
65
+
66
+ function run(uv, fallbacks) {
67
+ child = spawn(uv, ARGS, { stdio: 'inherit' });
68
+ child.on('error', (err) => {
69
+ if (err.code === 'ENOENT') {
70
+ if (fallbacks.length) return run(fallbacks[0], fallbacks.slice(1));
71
+ return missingUv();
72
+ }
73
+ process.stderr.write('pcdd: could not run ' + uv + ': ' + err.message + '\n');
74
+ process.exit(1);
75
+ });
76
+ child.on('exit', finish);
77
+ }
78
+
79
+ run('uv', candidates().filter((file) => fs.existsSync(file)));
package/package.json CHANGED
@@ -1,6 +1,27 @@
1
1
  {
2
2
  "name": "@pcdd-dev/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.4.0",
4
+ "description": "Progressive Change-Driven Development for AI coding agents. Runs the PCDD CLI from PyPI through uv.",
5
+ "keywords": ["ai", "agents", "codex", "claude-code", "workflow", "cli", "pcdd"],
6
+ "homepage": "https://pcdd.dev",
7
+ "bugs": "https://github.com/aledepaoligampel/pcdd/issues",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/aledepaoligampel/pcdd.git",
11
+ "directory": "npm"
12
+ },
13
+ "license": "MIT",
14
+ "author": "aledepaoligampel",
15
+ "bin": {
16
+ "pcdd": "bin/pcdd.js"
17
+ },
18
+ "files": [
19
+ "bin/pcdd.js"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "engines": {
25
+ "node": ">=18"
26
+ }
27
+ }