@getcolter/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 ADDED
@@ -0,0 +1,38 @@
1
+ Colter Proprietary License
2
+
3
+ Copyright (c) 2025-2026 Amberhill (https://amberhill.xyz). All rights reserved.
4
+
5
+ TERMS OF USE
6
+
7
+ 1. FREE USE. You may download, install, and use the Colter CLI ("Software")
8
+ free of charge for any lawful purpose, including commercial use.
9
+
10
+ 2. NO REDISTRIBUTION. You may not redistribute, sublicense, sell, or
11
+ otherwise transfer the Software or any portion of it to third parties,
12
+ except as installed via the official npm package or downloaded from
13
+ official distribution channels.
14
+
15
+ 3. NO MODIFICATION. You may not modify, reverse-engineer, decompile, or
16
+ create derivative works based on the Software.
17
+
18
+ 4. NO SOURCE CODE. The source code of the Software is proprietary and is
19
+ not provided under this license.
20
+
21
+ 5. TRADEMARKS. "Colter" and associated logos are trademarks of Amberhill.
22
+ You may not use these marks without prior written permission except to
23
+ refer to the Software.
24
+
25
+ 6. NO WARRANTY. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
26
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
28
+
29
+ 7. LIMITATION OF LIABILITY. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
30
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN
31
+ AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN
32
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33
+
34
+ 8. TERMINATION. This license is effective until terminated. It will terminate
35
+ automatically if you fail to comply with any term. Upon termination, you
36
+ must destroy all copies of the Software.
37
+
38
+ For licensing inquiries: hello@amberhill.xyz
package/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # @getcolter/cli
2
+
3
+ **Check if any online store works with AI shopping agents.**
4
+
5
+ Colter tests both major agent commerce protocols in one command:
6
+
7
+ - **UCP** (Universal Commerce Protocol) — product discovery, browsing, and purchase. Used by Gemini, AI Mode, Copilot, and others.
8
+ - **ACP** (Agent Commerce Protocol) — checkout and payment. Used by ChatGPT, Operator, and others.
9
+
10
+ Produces Evidence Packs: portable, redacted, replayable records of every verification.
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ npm install -g @getcolter/cli
16
+ ```
17
+
18
+ Or run directly:
19
+
20
+ ```bash
21
+ npx @getcolter/cli check https://your-store.com
22
+ ```
23
+
24
+ ## Quick start
25
+
26
+ ```bash
27
+ # Fast readiness scan
28
+ colter check https://your-store.com
29
+
30
+ # Full conformance test with Evidence Pack
31
+ colter verify https://your-store.com
32
+
33
+ # Batch check multiple stores
34
+ colter check --batch stores.yaml
35
+ ```
36
+
37
+ ## What it checks
38
+
39
+ | Protocol | What it does | Agents using it |
40
+ |----------|-------------|-----------------|
41
+ | **UCP** | Full-lifecycle commerce (discover, browse, cart, checkout) | Gemini, AI Mode, Copilot, Shopping Graph |
42
+ | **ACP** | Agent checkout and payment | ChatGPT, Operator |
43
+
44
+ ## MCP server
45
+
46
+ Colter includes an MCP server for AI agent integration:
47
+
48
+ ```json
49
+ {
50
+ "mcpServers": {
51
+ "colter": {
52
+ "command": "colter",
53
+ "args": ["mcp", "--admin-tools"]
54
+ }
55
+ }
56
+ }
57
+ ```
58
+
59
+ ## Platforms
60
+
61
+ Pre-built binaries for macOS (ARM64, x64), Linux (x64, ARM64), and Windows (x64).
62
+
63
+ ## Links
64
+
65
+ - [Documentation](https://agenticcom.ai/docs)
66
+ - [GitHub](https://github.com/mfbahc/colter)
67
+ - [Report an issue](https://github.com/mfbahc/colter/issues)
68
+
69
+ ## License
70
+
71
+ Colter is free to use. See [LICENSE](./LICENSE) for terms.
package/cli/colter.js ADDED
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env node
2
+
3
+ "use strict";
4
+
5
+ const { execFileSync } = require("child_process");
6
+ const path = require("path");
7
+ const os = require("os");
8
+ const fs = require("fs");
9
+
10
+ const PLATFORM_PACKAGES = {
11
+ "darwin-arm64": "@getcolter/cli-darwin-arm64",
12
+ "darwin-x64": "@getcolter/cli-darwin-x64",
13
+ "linux-x64": "@getcolter/cli-linux-x64",
14
+ "linux-arm64": "@getcolter/cli-linux-arm64",
15
+ "win32-x64": "@getcolter/cli-win32-x64",
16
+ };
17
+
18
+ function findBinary() {
19
+ const platform = os.platform();
20
+ const arch = os.arch();
21
+ const key = `${platform}-${arch}`;
22
+ const pkg = PLATFORM_PACKAGES[key];
23
+ const binaryName = platform === "win32" ? "colter.exe" : "colter";
24
+
25
+ // 1. Try platform-specific optional dependency
26
+ if (pkg) {
27
+ try {
28
+ const pkgDir = path.dirname(require.resolve(`${pkg}/package.json`));
29
+ const binPath = path.join(pkgDir, "bin", binaryName);
30
+ if (fs.existsSync(binPath)) return binPath;
31
+ } catch {}
32
+ }
33
+
34
+ // 2. Try system PATH
35
+ try {
36
+ const which = platform === "win32" ? "where" : "which";
37
+ const result = require("child_process")
38
+ .execSync(`${which} colter`, { encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] })
39
+ .trim();
40
+ if (result && fs.existsSync(result)) return result;
41
+ } catch {}
42
+
43
+ return null;
44
+ }
45
+
46
+ const binary = findBinary();
47
+
48
+ if (!binary) {
49
+ const platform = os.platform();
50
+ const arch = os.arch();
51
+ console.error(
52
+ `Colter: no prebuilt binary for ${platform}-${arch}.\n\n` +
53
+ `Supported: darwin-arm64, darwin-x64, linux-x64, linux-arm64, win32-x64\n\n` +
54
+ `Install from source:\n` +
55
+ ` go install github.com/mfbahc/agentic-com/cmd/colter@latest\n\n` +
56
+ `Or download from: https://github.com/mfbahc/colter/releases`
57
+ );
58
+ process.exit(1);
59
+ }
60
+
61
+ try {
62
+ execFileSync(binary, process.argv.slice(2), { stdio: "inherit" });
63
+ } catch (err) {
64
+ process.exit(err.status || 1);
65
+ }
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env node
2
+
3
+ "use strict";
4
+
5
+ // Verify the platform binary was installed correctly.
6
+ // Exits cleanly (0) even on failure so npm install doesn't break.
7
+
8
+ const os = require("os");
9
+ const path = require("path");
10
+ const fs = require("fs");
11
+
12
+ const PLATFORM_PACKAGES = {
13
+ "darwin-arm64": "@getcolter/cli-darwin-arm64",
14
+ "darwin-x64": "@getcolter/cli-darwin-x64",
15
+ "linux-x64": "@getcolter/cli-linux-x64",
16
+ "linux-arm64": "@getcolter/cli-linux-arm64",
17
+ "win32-x64": "@getcolter/cli-win32-x64",
18
+ };
19
+
20
+ const platform = os.platform();
21
+ const arch = os.arch();
22
+ const key = `${platform}-${arch}`;
23
+ const pkg = PLATFORM_PACKAGES[key];
24
+
25
+ if (!pkg) {
26
+ console.warn(
27
+ `[colter] No prebuilt binary for ${platform}-${arch}. ` +
28
+ `Install via Go: go install github.com/mfbahc/agentic-com/cmd/colter@latest`
29
+ );
30
+ process.exit(0);
31
+ }
32
+
33
+ try {
34
+ const pkgDir = path.dirname(require.resolve(`${pkg}/package.json`));
35
+ const binaryName = platform === "win32" ? "colter.exe" : "colter";
36
+ const binPath = path.join(pkgDir, "bin", binaryName);
37
+
38
+ if (!fs.existsSync(binPath)) {
39
+ console.warn(`[colter] Binary not found at ${binPath}. Try reinstalling: npm install -g @getcolter/cli`);
40
+ process.exit(0);
41
+ }
42
+
43
+ // Ensure executable permissions on Unix
44
+ if (platform !== "win32") {
45
+ fs.chmodSync(binPath, 0o755);
46
+ }
47
+ } catch {
48
+ console.warn(`[colter] Could not verify binary. The CLI may still work if colter is on your PATH.`);
49
+ process.exit(0);
50
+ }
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@getcolter/cli",
3
+ "version": "0.1.0",
4
+ "description": "Check if any online store works with AI shopping agents. Tests UCP (Universal Commerce) and ACP (Agent Commerce) protocols in one command.",
5
+ "keywords": [
6
+ "colter",
7
+ "agentic-commerce",
8
+ "ucp",
9
+ "acp",
10
+ "commerce-verification",
11
+ "agent-ready",
12
+ "evidence-packs",
13
+ "mcp-server",
14
+ "ai-shopping"
15
+ ],
16
+ "homepage": "https://agenticcom.ai",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/mfbahc/colter.git"
20
+ },
21
+ "bugs": {
22
+ "url": "https://github.com/mfbahc/colter/issues"
23
+ },
24
+ "license": "SEE LICENSE IN LICENSE",
25
+ "author": {
26
+ "name": "Amberhill",
27
+ "url": "https://amberhill.xyz"
28
+ },
29
+ "bin": {
30
+ "colter": "./cli/colter.js"
31
+ },
32
+ "files": [
33
+ "cli/",
34
+ "README.md",
35
+ "LICENSE"
36
+ ],
37
+ "scripts": {
38
+ "postinstall": "node cli/postinstall.js"
39
+ },
40
+ "optionalDependencies": {
41
+ "@getcolter/cli-darwin-arm64": "0.1.0",
42
+ "@getcolter/cli-darwin-x64": "0.1.0",
43
+ "@getcolter/cli-linux-x64": "0.1.0",
44
+ "@getcolter/cli-linux-arm64": "0.1.0",
45
+ "@getcolter/cli-win32-x64": "0.1.0"
46
+ },
47
+ "engines": {
48
+ "node": ">=18"
49
+ }
50
+ }