@rewynd/cli 0.2.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 (2) hide show
  1. package/bin/rewynd.cjs +30 -0
  2. package/package.json +38 -0
package/bin/rewynd.cjs ADDED
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ // Resolve the prebuilt Go binary for this platform (shipped via per-platform optionalDependencies,
5
+ // the esbuild/biome model) and hand off to it. No binary in the package itself, no postinstall.
6
+ const path = require("node:path");
7
+ const { spawnSync } = require("node:child_process");
8
+
9
+ const pkg = `@rewynd/cli-${process.platform}-${process.arch}`;
10
+ const exe = process.platform === "win32" ? "rewynd.exe" : "rewynd";
11
+
12
+ let bin;
13
+ try {
14
+ // Resolve the package.json (a real module path), then locate the binary beside it.
15
+ bin = path.join(path.dirname(require.resolve(`${pkg}/package.json`)), "bin", exe);
16
+ } catch {
17
+ console.error(
18
+ `rewynd: no prebuilt binary for ${process.platform}-${process.arch}.\n` +
19
+ "Download a release from https://github.com/SrinjoyDev/rewynd/releases, or run\n" +
20
+ "`go install github.com/SrinjoyDev/rewynd/core/cmd/rewynd@latest`.",
21
+ );
22
+ process.exit(1);
23
+ }
24
+
25
+ const res = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
26
+ if (res.error) {
27
+ console.error(res.error.message);
28
+ process.exit(1);
29
+ }
30
+ process.exit(res.status === null ? 1 : res.status);
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@rewynd/cli",
3
+ "version": "0.2.0",
4
+ "description": "A zero-config, OTLP-native flight recorder for your backend — a beautiful TUI, a JSON CLI, and an MCP server your coding agent can drive.",
5
+ "keywords": [
6
+ "opentelemetry",
7
+ "observability",
8
+ "tui",
9
+ "cli",
10
+ "mcp",
11
+ "debugging",
12
+ "devtools",
13
+ "otlp"
14
+ ],
15
+ "license": "MIT",
16
+ "homepage": "https://github.com/SrinjoyDev/rewynd",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/SrinjoyDev/rewynd.git"
20
+ },
21
+ "bin": {
22
+ "rewynd": "bin/rewynd.cjs"
23
+ },
24
+ "files": [
25
+ "bin/"
26
+ ],
27
+ "dependencies": {
28
+ "@rewynd/shim": "0.2.0"
29
+ },
30
+ "optionalDependencies": {
31
+ "@rewynd/cli-linux-x64": "0.2.0",
32
+ "@rewynd/cli-darwin-arm64": "0.2.0",
33
+ "@rewynd/cli-darwin-x64": "0.2.0",
34
+ "@rewynd/cli-linux-arm64": "0.2.0",
35
+ "@rewynd/cli-win32-x64": "0.2.0",
36
+ "@rewynd/cli-win32-arm64": "0.2.0"
37
+ }
38
+ }