dydo 1.0.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.
- package/LICENSE +21 -0
- package/README.md +67 -0
- package/bin/dydo +44 -0
- package/install.js +47 -0
- package/lib/download.js +88 -0
- package/lib/paths.js +48 -0
- package/lib/platform.js +67 -0
- package/package.json +48 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Balazs Bodnar
|
|
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
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# dydo
|
|
2
|
+
|
|
3
|
+
DynaDocs CLI - A platform-agnostic AI orchestration and context-management framework.
|
|
4
|
+
|
|
5
|
+
100% local, 100% under your control.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g dydo
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Initialize in your project (creates dydo/ folder structure)
|
|
17
|
+
dydo init claude
|
|
18
|
+
|
|
19
|
+
# Validate documentation
|
|
20
|
+
dydo check
|
|
21
|
+
|
|
22
|
+
# Auto-fix issues
|
|
23
|
+
dydo fix
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Workflow Flags
|
|
27
|
+
|
|
28
|
+
Use these flags in your prompts to set the agent workflow:
|
|
29
|
+
|
|
30
|
+
| Flag | Workflow |
|
|
31
|
+
|------|----------|
|
|
32
|
+
| `--feature` | Interview → Plan → Code → Review |
|
|
33
|
+
| `--task` | Plan → Code → Review |
|
|
34
|
+
| `--quick` | Code only (simple changes) |
|
|
35
|
+
| `--think` | Co-thinker mode |
|
|
36
|
+
| `--review` | Reviewer mode |
|
|
37
|
+
| `--docs` | Docs-writer mode |
|
|
38
|
+
| `--test` | Tester mode |
|
|
39
|
+
|
|
40
|
+
## Key Commands
|
|
41
|
+
|
|
42
|
+
| Command | Description |
|
|
43
|
+
|---------|-------------|
|
|
44
|
+
| `dydo init <integration>` | Initialize project (`claude`, `none`) |
|
|
45
|
+
| `dydo check` | Validate documentation |
|
|
46
|
+
| `dydo fix` | Auto-fix issues |
|
|
47
|
+
| `dydo agent claim auto` | Claim an agent identity |
|
|
48
|
+
| `dydo agent role <role>` | Set role and permissions |
|
|
49
|
+
| `dydo whoami` | Show current agent identity |
|
|
50
|
+
|
|
51
|
+
## Documentation & Details
|
|
52
|
+
|
|
53
|
+
For full documentation, architecture diagrams, and detailed command reference:
|
|
54
|
+
|
|
55
|
+
**[github.com/bodnarbalazs/dydo](https://github.com/bodnarbalazs/dydo)**
|
|
56
|
+
|
|
57
|
+
## Alternative Installation
|
|
58
|
+
|
|
59
|
+
If you have .NET installed:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
dotnet tool install -g DynaDocs
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
MIT
|
package/bin/dydo
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const { getPlatformInfo } = require('../lib/platform');
|
|
5
|
+
const { getBinaryPath, isBinaryInstalled } = require('../lib/paths');
|
|
6
|
+
|
|
7
|
+
function main() {
|
|
8
|
+
const platformInfo = getPlatformInfo();
|
|
9
|
+
|
|
10
|
+
if (!platformInfo.supported) {
|
|
11
|
+
console.error(`Error: ${platformInfo.error}`);
|
|
12
|
+
console.error('Install via .NET instead: dotnet tool install -g DynaDocs');
|
|
13
|
+
process.exit(2);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const binaryPath = getBinaryPath(platformInfo);
|
|
17
|
+
|
|
18
|
+
if (!isBinaryInstalled(platformInfo)) {
|
|
19
|
+
console.error('Error: dydo binary not found.');
|
|
20
|
+
console.error('Try reinstalling: npm install -g dydo');
|
|
21
|
+
console.error('Or install via .NET: dotnet tool install -g DynaDocs');
|
|
22
|
+
process.exit(2);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Spawn the native binary with all arguments passed through
|
|
26
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
27
|
+
stdio: 'inherit',
|
|
28
|
+
windowsHide: false
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
child.on('error', (err) => {
|
|
32
|
+
console.error(`Error launching dydo: ${err.message}`);
|
|
33
|
+
process.exit(2);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
child.on('exit', (code, signal) => {
|
|
37
|
+
if (signal) {
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
process.exit(code ?? 0);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
main();
|
package/install.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { getPlatformInfo } = require('./lib/platform');
|
|
4
|
+
const { downloadBinary } = require('./lib/download');
|
|
5
|
+
const { getBinaryDir, isBinaryInstalled, getInstalledVersion, setInstalledVersion } = require('./lib/paths');
|
|
6
|
+
const pkg = require('./package.json');
|
|
7
|
+
|
|
8
|
+
async function install() {
|
|
9
|
+
// Check platform support
|
|
10
|
+
const platformInfo = getPlatformInfo();
|
|
11
|
+
|
|
12
|
+
if (!platformInfo.supported) {
|
|
13
|
+
console.error(`\n[dydo] ${platformInfo.error}`);
|
|
14
|
+
console.error('[dydo] You can still use dydo if you have .NET installed:');
|
|
15
|
+
console.error(' dotnet tool install -g DynaDocs');
|
|
16
|
+
process.exit(0); // Don't fail npm install, just warn
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Check if already installed with correct version
|
|
20
|
+
const installedVersion = getInstalledVersion();
|
|
21
|
+
if (installedVersion === pkg.version && isBinaryInstalled(platformInfo)) {
|
|
22
|
+
console.log(`[dydo] Binary already installed (v${pkg.version})`);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
await downloadBinary(pkg.version, platformInfo, getBinaryDir());
|
|
28
|
+
setInstalledVersion(pkg.version);
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error(`\n[dydo] Failed to download binary: ${error.message}`);
|
|
31
|
+
console.error('[dydo] You can manually download from:');
|
|
32
|
+
console.error(` https://github.com/bodnarbalazs/dydo/releases/tag/v${pkg.version}`);
|
|
33
|
+
console.error('[dydo] Or install via .NET:');
|
|
34
|
+
console.error(' dotnet tool install -g DynaDocs');
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Only run during npm install, not when required as a module
|
|
40
|
+
if (require.main === module) {
|
|
41
|
+
install().catch((err) => {
|
|
42
|
+
console.error('[dydo] Installation error:', err);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
module.exports = { install };
|
package/lib/download.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
const https = require('https');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const { execFileSync } = require('child_process');
|
|
5
|
+
|
|
6
|
+
async function downloadFile(url, destPath) {
|
|
7
|
+
return new Promise((resolve, reject) => {
|
|
8
|
+
const follow = (url, redirectCount = 0) => {
|
|
9
|
+
if (redirectCount > 5) {
|
|
10
|
+
reject(new Error('Too many redirects'));
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
https.get(url, (response) => {
|
|
15
|
+
// Handle redirects (GitHub releases use them)
|
|
16
|
+
if (response.statusCode === 302 || response.statusCode === 301) {
|
|
17
|
+
follow(response.headers.location, redirectCount + 1);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (response.statusCode !== 200) {
|
|
22
|
+
reject(new Error(`Download failed: HTTP ${response.statusCode}`));
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const file = fs.createWriteStream(destPath);
|
|
27
|
+
response.pipe(file);
|
|
28
|
+
file.on('finish', () => {
|
|
29
|
+
file.close();
|
|
30
|
+
resolve();
|
|
31
|
+
});
|
|
32
|
+
file.on('error', (err) => {
|
|
33
|
+
fs.unlink(destPath, () => {});
|
|
34
|
+
reject(err);
|
|
35
|
+
});
|
|
36
|
+
}).on('error', reject);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
follow(url);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async function extractArchive(archivePath, destDir, platformInfo) {
|
|
44
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
45
|
+
|
|
46
|
+
if (platformInfo.archiveExt === '.zip') {
|
|
47
|
+
// Windows: use PowerShell to extract
|
|
48
|
+
if (process.platform === 'win32') {
|
|
49
|
+
execFileSync('powershell', [
|
|
50
|
+
'-Command',
|
|
51
|
+
`Expand-Archive -Path '${archivePath}' -DestinationPath '${destDir}' -Force`
|
|
52
|
+
], { stdio: 'pipe' });
|
|
53
|
+
} else {
|
|
54
|
+
execFileSync('unzip', ['-o', archivePath, '-d', destDir], { stdio: 'pipe' });
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
// tar.gz: use tar command
|
|
58
|
+
execFileSync('tar', ['-xzf', archivePath, '-C', destDir], { stdio: 'pipe' });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function downloadBinary(version, platformInfo, installDir) {
|
|
63
|
+
const { getDownloadUrl } = require('./platform');
|
|
64
|
+
const url = getDownloadUrl(version, platformInfo);
|
|
65
|
+
|
|
66
|
+
const archivePath = path.join(installDir, `dydo${platformInfo.archiveExt}`);
|
|
67
|
+
|
|
68
|
+
console.log(`[dydo] Downloading v${version} for ${platformInfo.rid}...`);
|
|
69
|
+
|
|
70
|
+
await downloadFile(url, archivePath);
|
|
71
|
+
console.log('[dydo] Download complete, extracting...');
|
|
72
|
+
|
|
73
|
+
await extractArchive(archivePath, installDir, platformInfo);
|
|
74
|
+
|
|
75
|
+
// Clean up archive
|
|
76
|
+
fs.unlinkSync(archivePath);
|
|
77
|
+
|
|
78
|
+
// Set executable permission on Unix systems
|
|
79
|
+
if (process.platform !== 'win32') {
|
|
80
|
+
const binaryPath = path.join(installDir, platformInfo.binaryName);
|
|
81
|
+
fs.chmodSync(binaryPath, 0o755);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
console.log('[dydo] Installation complete.');
|
|
85
|
+
return path.join(installDir, platformInfo.binaryName);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
module.exports = { downloadFile, extractArchive, downloadBinary };
|
package/lib/paths.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
|
|
4
|
+
// Binary is stored within the npm package directory
|
|
5
|
+
function getInstallDir() {
|
|
6
|
+
return path.dirname(__dirname);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function getBinaryDir() {
|
|
10
|
+
return path.join(getInstallDir(), 'native');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function getBinaryPath(platformInfo) {
|
|
14
|
+
return path.join(getBinaryDir(), platformInfo.binaryName);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function isBinaryInstalled(platformInfo) {
|
|
18
|
+
const binaryPath = getBinaryPath(platformInfo);
|
|
19
|
+
return fs.existsSync(binaryPath);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Marker file to track installed version
|
|
23
|
+
function getVersionMarkerPath() {
|
|
24
|
+
return path.join(getBinaryDir(), '.version');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function getInstalledVersion() {
|
|
28
|
+
const markerPath = getVersionMarkerPath();
|
|
29
|
+
if (fs.existsSync(markerPath)) {
|
|
30
|
+
return fs.readFileSync(markerPath, 'utf8').trim();
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function setInstalledVersion(version) {
|
|
36
|
+
const dir = getBinaryDir();
|
|
37
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
38
|
+
fs.writeFileSync(getVersionMarkerPath(), version);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
module.exports = {
|
|
42
|
+
getInstallDir,
|
|
43
|
+
getBinaryDir,
|
|
44
|
+
getBinaryPath,
|
|
45
|
+
isBinaryInstalled,
|
|
46
|
+
getInstalledVersion,
|
|
47
|
+
setInstalledVersion
|
|
48
|
+
};
|
package/lib/platform.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const os = require('os');
|
|
2
|
+
|
|
3
|
+
// Map Node.js platform/arch to .NET RID (Runtime Identifier)
|
|
4
|
+
const PLATFORM_MAPPING = {
|
|
5
|
+
'win32-x64': {
|
|
6
|
+
rid: 'win-x64',
|
|
7
|
+
binaryName: 'dydo.exe',
|
|
8
|
+
archiveExt: '.zip'
|
|
9
|
+
},
|
|
10
|
+
'linux-x64': {
|
|
11
|
+
rid: 'linux-x64',
|
|
12
|
+
binaryName: 'dydo',
|
|
13
|
+
archiveExt: '.tar.gz'
|
|
14
|
+
},
|
|
15
|
+
'linux-arm64': {
|
|
16
|
+
rid: 'linux-arm64',
|
|
17
|
+
binaryName: 'dydo',
|
|
18
|
+
archiveExt: '.tar.gz'
|
|
19
|
+
},
|
|
20
|
+
'darwin-x64': {
|
|
21
|
+
rid: 'osx-x64',
|
|
22
|
+
binaryName: 'dydo',
|
|
23
|
+
archiveExt: '.tar.gz'
|
|
24
|
+
},
|
|
25
|
+
'darwin-arm64': {
|
|
26
|
+
rid: 'osx-arm64',
|
|
27
|
+
binaryName: 'dydo',
|
|
28
|
+
archiveExt: '.tar.gz'
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
function getPlatformInfo() {
|
|
33
|
+
const platform = os.platform();
|
|
34
|
+
const arch = os.arch();
|
|
35
|
+
const key = `${platform}-${arch}`;
|
|
36
|
+
|
|
37
|
+
const info = PLATFORM_MAPPING[key];
|
|
38
|
+
if (!info) {
|
|
39
|
+
return {
|
|
40
|
+
supported: false,
|
|
41
|
+
platform,
|
|
42
|
+
arch,
|
|
43
|
+
error: `Unsupported platform: ${platform}-${arch}. ` +
|
|
44
|
+
`Supported: win-x64, linux-x64, linux-arm64, osx-x64, osx-arm64`
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
supported: true,
|
|
50
|
+
platform,
|
|
51
|
+
arch,
|
|
52
|
+
...info
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function getDownloadUrl(version, platformInfo) {
|
|
57
|
+
const baseUrl = 'https://github.com/bodnarbalazs/dydo/releases/download';
|
|
58
|
+
const assetName = `dydo-${platformInfo.rid}${platformInfo.archiveExt}`;
|
|
59
|
+
return `${baseUrl}/v${version}/${assetName}`;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function getChecksumsUrl(version) {
|
|
63
|
+
const baseUrl = 'https://github.com/bodnarbalazs/dydo/releases/download';
|
|
64
|
+
return `${baseUrl}/v${version}/checksums.txt`;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
module.exports = { getPlatformInfo, getDownloadUrl, getChecksumsUrl, PLATFORM_MAPPING };
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dydo",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "DynaDocs CLI - Documentation validation and AI agent orchestration tool",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"documentation",
|
|
7
|
+
"validation",
|
|
8
|
+
"ai-agents",
|
|
9
|
+
"cli",
|
|
10
|
+
"dynadocs",
|
|
11
|
+
"claude"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/bodnarbalazs/dydo#readme",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/bodnarbalazs/dydo/issues"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/bodnarbalazs/dydo.git"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"author": "Balazs Bodnar",
|
|
23
|
+
"bin": {
|
|
24
|
+
"dydo": "bin/dydo"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"bin/",
|
|
28
|
+
"lib/",
|
|
29
|
+
"install.js",
|
|
30
|
+
"README.md",
|
|
31
|
+
"LICENSE"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"postinstall": "node install.js"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=16"
|
|
38
|
+
},
|
|
39
|
+
"os": [
|
|
40
|
+
"darwin",
|
|
41
|
+
"linux",
|
|
42
|
+
"win32"
|
|
43
|
+
],
|
|
44
|
+
"cpu": [
|
|
45
|
+
"x64",
|
|
46
|
+
"arm64"
|
|
47
|
+
]
|
|
48
|
+
}
|