salmonrun 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 +15 -0
- package/README.md +35 -0
- package/bin/salmon.js +45 -0
- package/package.json +25 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Copyright (c) 2026 Salmon Run, Inc.
|
|
2
|
+
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software and the associated documentation are proprietary and
|
|
6
|
+
confidential. No part of this software may be reproduced, distributed,
|
|
7
|
+
or transmitted in any form or by any means, including photocopying,
|
|
8
|
+
recording, or other electronic or mechanical methods, without the prior
|
|
9
|
+
written permission of Salmon Run, Inc., except in the case of brief
|
|
10
|
+
quotations embodied in critical reviews and certain other noncommercial
|
|
11
|
+
uses permitted by copyright law.
|
|
12
|
+
|
|
13
|
+
Unauthorized copying of this file, via any medium, is strictly prohibited.
|
|
14
|
+
|
|
15
|
+
For permissions, contact: hello@salmonrun.ai
|
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# salmonrun
|
|
2
|
+
|
|
3
|
+
The `salmon` CLI — data enrichment and sourcing from the terminal, CI, and agent sandboxes.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm i -g salmonrun # installs the `salmon` command
|
|
9
|
+
salmon version
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Or run without installing:
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
npx salmonrun version
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## How it works
|
|
19
|
+
|
|
20
|
+
The prebuilt Go binary ships in a per-platform optional dependency
|
|
21
|
+
(`@salmonrun/darwin-arm64`, `@salmonrun/linux-x64`, …). npm installs only the one
|
|
22
|
+
matching your OS and CPU; a tiny zero-dependency launcher resolves and runs it.
|
|
23
|
+
No postinstall script, so it works under `npm ci --ignore-scripts`.
|
|
24
|
+
|
|
25
|
+
Supported platforms: macOS (arm64, x64), Linux (x64, arm64), Windows (x64).
|
|
26
|
+
|
|
27
|
+
## Auth
|
|
28
|
+
|
|
29
|
+
In containers and CI, authenticate with an API key:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
SALMON_API_KEY=sk_... salmon enrich company --name "Acme"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
See `salmon auth --help` for the interactive browser login used on desktops.
|
package/bin/salmon.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// Zero-dependency launcher for the `salmon` CLI distributed via npm.
|
|
5
|
+
//
|
|
6
|
+
// The real binary ships in a per-platform optional dependency
|
|
7
|
+
// (@salmonrun/<platform>-<arch>); npm installs only the one matching the host's
|
|
8
|
+
// os/cpu. This shim resolves that package's binary and execs it, forwarding argv,
|
|
9
|
+
// stdio, and the exit code. Uses only Node built-ins — nothing from the registry.
|
|
10
|
+
|
|
11
|
+
const { spawnSync } = require("node:child_process");
|
|
12
|
+
const os = require("node:os");
|
|
13
|
+
|
|
14
|
+
function resolveBinary() {
|
|
15
|
+
const pkg = `@salmonrun/${process.platform}-${process.arch}`;
|
|
16
|
+
const exe = process.platform === "win32" ? "salmon.exe" : "salmon";
|
|
17
|
+
try {
|
|
18
|
+
return require.resolve(`${pkg}/bin/${exe}`);
|
|
19
|
+
} catch {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const bin = resolveBinary();
|
|
25
|
+
if (!bin) {
|
|
26
|
+
process.stderr.write(
|
|
27
|
+
`salmonrun: no prebuilt binary for ${process.platform}-${process.arch}.\n` +
|
|
28
|
+
`Your platform may be unsupported, or the optional platform package was not ` +
|
|
29
|
+
`installed (e.g. 'npm install --no-optional' / a restrictive lockfile).\n`,
|
|
30
|
+
);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const result = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
|
|
35
|
+
if (result.error) {
|
|
36
|
+
process.stderr.write(`salmonrun: failed to launch ${bin}: ${result.error.message}\n`);
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
// Mirror signal-termination as the conventional 128+signal exit code (e.g. 130
|
|
40
|
+
// for SIGINT), so shells and CI can tell an interrupt from a real failure.
|
|
41
|
+
if (result.signal) {
|
|
42
|
+
const num = os.constants.signals[result.signal];
|
|
43
|
+
process.exit(typeof num === "number" ? 128 + num : 1);
|
|
44
|
+
}
|
|
45
|
+
process.exit(result.status ?? 0);
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "salmonrun",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "The salmon CLI — data enrichment & sourcing from the terminal, CI, and agents",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/Salmon-Run-AI/cli.git"
|
|
8
|
+
},
|
|
9
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
10
|
+
"bin": {
|
|
11
|
+
"salmon": "bin/salmon.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"bin",
|
|
15
|
+
"LICENSE"
|
|
16
|
+
],
|
|
17
|
+
"optionalDependencies": {
|
|
18
|
+
"@salmonrun/darwin-arm64": "0.1.0",
|
|
19
|
+
"@salmonrun/darwin-x64": "0.1.0",
|
|
20
|
+
"@salmonrun/linux-x64": "0.1.0",
|
|
21
|
+
"@salmonrun/linux-arm64": "0.1.0",
|
|
22
|
+
"@salmonrun/win32-x64": "0.1.0",
|
|
23
|
+
"@salmonrun/win32-arm64": "0.1.0"
|
|
24
|
+
}
|
|
25
|
+
}
|