@dockydoo/cli 0.1.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 +33 -0
- package/README.md +55 -0
- package/bin/docky.js +65 -0
- package/package.json +36 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
DockyDoo CLI License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DockyDoo. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This package ("the Software") distributes the DockyDoo command-line tool
|
|
6
|
+
("docky") in prebuilt binary form, together with a thin Node.js launcher
|
|
7
|
+
("bin/docky.js").
|
|
8
|
+
|
|
9
|
+
1. License grant. Subject to the terms below, DockyDoo grants you a personal,
|
|
10
|
+
non-exclusive, non-transferable, revocable license to download, install, and
|
|
11
|
+
run the Software to use the DockyDoo service.
|
|
12
|
+
|
|
13
|
+
2. Restrictions. You may not, and may not permit others to: (a) reverse
|
|
14
|
+
engineer, decompile, or disassemble the binary, except to the extent this
|
|
15
|
+
restriction is prohibited by applicable law; (b) redistribute, sell, sublicense,
|
|
16
|
+
rent, or lease the binary; (c) remove or alter any proprietary notices; or
|
|
17
|
+
(d) use the Software to build a competing product.
|
|
18
|
+
|
|
19
|
+
3. The launcher. The Node.js launcher source in bin/docky.js may be read and
|
|
20
|
+
modified for the sole purpose of running the binary; it is provided as-is.
|
|
21
|
+
|
|
22
|
+
4. No source. The DockyDoo source code is proprietary and is not included or
|
|
23
|
+
licensed under this agreement.
|
|
24
|
+
|
|
25
|
+
5. No warranty. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
26
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
27
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
|
|
28
|
+
|
|
29
|
+
6. Limitation of liability. IN NO EVENT SHALL DOCKYDOO BE LIABLE FOR ANY CLAIM,
|
|
30
|
+
DAMAGES, OR OTHER LIABILITY ARISING FROM OR IN CONNECTION WITH THE SOFTWARE OR
|
|
31
|
+
ITS USE.
|
|
32
|
+
|
|
33
|
+
For questions about licensing, contact: hello@dockydoo.dev
|
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @dockydoo/cli
|
|
2
|
+
|
|
3
|
+
The DockyDoo CLI: `docky` compiles your code into a living, verified
|
|
4
|
+
documentation graph, on your machine, free and offline.
|
|
5
|
+
|
|
6
|
+
> This is the public **distribution** package. The DockyDoo source is private;
|
|
7
|
+
> only the prebuilt `docky` binaries are published here and to npm.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g @dockydoo/cli
|
|
13
|
+
docky --help
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Then in a project:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
docky build # compile .docky/graph.json
|
|
20
|
+
docky ask "safe to ship?" # query the graph for a tiny token cost
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Prefer a raw binary? Grab one from the
|
|
24
|
+
[Releases](https://github.com/dockydoo/cli/releases) page.
|
|
25
|
+
|
|
26
|
+
## How distribution works
|
|
27
|
+
|
|
28
|
+
`@dockydoo/cli` is a thin launcher. The actual binary is delivered by a
|
|
29
|
+
per-platform optional dependency, and npm installs only the one that matches
|
|
30
|
+
your machine:
|
|
31
|
+
|
|
32
|
+
| Platform | Package | Rust target |
|
|
33
|
+
| --------------- | ---------------------------- | ------------------------- |
|
|
34
|
+
| macOS (Apple) | `@dockydoo/cli-darwin-arm64` | `aarch64-apple-darwin` |
|
|
35
|
+
| macOS (Intel) | `@dockydoo/cli-darwin-x64` | `x86_64-apple-darwin` |
|
|
36
|
+
| Linux x64 | `@dockydoo/cli-linux-x64` | `x86_64-unknown-linux-gnu`|
|
|
37
|
+
| Linux arm64 | `@dockydoo/cli-linux-arm64` | `aarch64-unknown-linux-gnu`|
|
|
38
|
+
| Windows x64 | `@dockydoo/cli-win32-x64` | `x86_64-pc-windows-msvc` |
|
|
39
|
+
|
|
40
|
+
No postinstall download, no network at install time: each platform package
|
|
41
|
+
carries its binary and declares `os`/`cpu` so npm picks the right one. The
|
|
42
|
+
`bin/docky.js` launcher resolves that package and execs the binary.
|
|
43
|
+
|
|
44
|
+
## Releasing (maintainers)
|
|
45
|
+
|
|
46
|
+
Releases are cut from the private monorepo's `release-cli` workflow, which
|
|
47
|
+
cross-compiles `docky` for every target, then runs:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cd cli
|
|
51
|
+
node scripts/build-platform-packages.mjs <artifacts-dir> <version>
|
|
52
|
+
# publishes dist/* (platform packages) then the main wrapper
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
See `cli/scripts/targets.mjs` for the target table.
|
package/bin/docky.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// @dockydoo/cli launcher. This package ships no binary itself; the actual
|
|
3
|
+
// `docky` executable is delivered by a per-platform optional dependency
|
|
4
|
+
// (@dockydoo/cli-<os>-<cpu>). npm installs only the one matching the host
|
|
5
|
+
// (enforced by the platform package's `os`/`cpu` fields), and this shim execs
|
|
6
|
+
// it with the user's args. No network at install, no postinstall download.
|
|
7
|
+
//
|
|
8
|
+
// The DockyDoo source stays private; only these prebuilt binaries are public.
|
|
9
|
+
|
|
10
|
+
'use strict'
|
|
11
|
+
|
|
12
|
+
const path = require('node:path')
|
|
13
|
+
const { spawnSync } = require('node:child_process')
|
|
14
|
+
|
|
15
|
+
// node platform-arch -> the platform package that carries its binary.
|
|
16
|
+
const PACKAGES = {
|
|
17
|
+
'darwin-arm64': '@dockydoo/cli-darwin-arm64',
|
|
18
|
+
'darwin-x64': '@dockydoo/cli-darwin-x64',
|
|
19
|
+
'linux-x64': '@dockydoo/cli-linux-x64',
|
|
20
|
+
'linux-arm64': '@dockydoo/cli-linux-arm64',
|
|
21
|
+
'win32-x64': '@dockydoo/cli-win32-x64',
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function resolveBinary() {
|
|
25
|
+
const key = `${process.platform}-${process.arch}`
|
|
26
|
+
const pkg = PACKAGES[key]
|
|
27
|
+
if (!pkg) {
|
|
28
|
+
throw new Error(
|
|
29
|
+
`docky: unsupported platform "${key}". ` +
|
|
30
|
+
`Supported: ${Object.keys(PACKAGES).join(', ')}.`,
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
const binName = process.platform === 'win32' ? 'docky.exe' : 'docky'
|
|
34
|
+
let pkgJson
|
|
35
|
+
try {
|
|
36
|
+
pkgJson = require.resolve(`${pkg}/package.json`)
|
|
37
|
+
} catch {
|
|
38
|
+
throw new Error(
|
|
39
|
+
`docky: the platform package "${pkg}" is not installed.\n` +
|
|
40
|
+
`This usually means it was skipped (e.g. --no-optional or an offline\n` +
|
|
41
|
+
`cache). Install it explicitly with: npm install ${pkg}`,
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
return path.join(path.dirname(pkgJson), 'bin', binName)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function main() {
|
|
48
|
+
let bin
|
|
49
|
+
try {
|
|
50
|
+
bin = resolveBinary()
|
|
51
|
+
} catch (err) {
|
|
52
|
+
process.stderr.write(`${err.message}\n`)
|
|
53
|
+
process.exit(1)
|
|
54
|
+
}
|
|
55
|
+
const result = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' })
|
|
56
|
+
if (result.error) {
|
|
57
|
+
process.stderr.write(`docky: failed to run binary: ${result.error.message}\n`)
|
|
58
|
+
process.exit(1)
|
|
59
|
+
}
|
|
60
|
+
// Forward the child's exit code (and signal, if any).
|
|
61
|
+
if (typeof result.status === 'number') process.exit(result.status)
|
|
62
|
+
process.exit(result.signal ? 1 : 0)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
main()
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dockydoo/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "DockyDoo CLI - living product documentation compiled from your code.",
|
|
5
|
+
"homepage": "https://github.com/dockydoo/cli",
|
|
6
|
+
"bugs": "https://github.com/dockydoo/cli/issues",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dockydoo/cli.git"
|
|
10
|
+
},
|
|
11
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
12
|
+
"bin": {
|
|
13
|
+
"docky": "bin/docky.js"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"bin/docky.js"
|
|
17
|
+
],
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=18"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"dockydoo",
|
|
23
|
+
"docky",
|
|
24
|
+
"documentation",
|
|
25
|
+
"docs",
|
|
26
|
+
"code",
|
|
27
|
+
"cli"
|
|
28
|
+
],
|
|
29
|
+
"optionalDependencies": {
|
|
30
|
+
"@dockydoo/cli-darwin-arm64": "0.1.0",
|
|
31
|
+
"@dockydoo/cli-darwin-x64": "0.1.0",
|
|
32
|
+
"@dockydoo/cli-linux-x64": "0.1.0",
|
|
33
|
+
"@dockydoo/cli-linux-arm64": "0.1.0",
|
|
34
|
+
"@dockydoo/cli-win32-x64": "0.1.0"
|
|
35
|
+
}
|
|
36
|
+
}
|