sofatofu 0.0.1 → 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.
package/README.md CHANGED
@@ -1,7 +1,39 @@
1
1
  # sofatofu
2
2
 
3
- ```sh
4
- npx sofatofu init
3
+ Sofatofu is the CRM your AI agent can safely operate. Let it maintain companies, people, deals, and activities with safeguards and a clear record of every change.
4
+
5
+ This package installs the `sofatofu` command-line tool.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g sofatofu
11
+ sofatofu init
12
+ ```
13
+
14
+ `sofatofu init` installs the sofatofu skill for the coding agents it finds, signs you in, and checks your account.
15
+
16
+ To let an agent do the setup, give it this prompt:
17
+
18
+ ```text
19
+ Read and follow https://sofatofu.com/skills/sofatofu/SKILL.md
5
20
  ```
6
21
 
7
- Prints 🛋️.
22
+ ## Update
23
+
24
+ ```bash
25
+ sofatofu update
26
+ ```
27
+
28
+ To remove the CLI, its skill copies, and its config, run `sofatofu uninstall`.
29
+
30
+ ## Platforms
31
+
32
+ macOS (arm64, x64), Linux (arm64, x64), and Windows (x64). npm installs the binary for your platform from an optional dependency. The package has no install script.
33
+
34
+ To install without npm, see the [setup guide](https://sofatofu.com/skills/sofatofu/references/setup.md).
35
+
36
+ ## Links
37
+
38
+ - Website: https://sofatofu.com
39
+ - License: MIT
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+ // Runs the binary of the platform package that npm installed from the
3
+ // optionalDependencies (NP-1). The package has no postinstall.
4
+ const { spawnSync } = require("node:child_process");
5
+
6
+ const os = process.platform === "win32" ? "windows" : process.platform;
7
+ const target = `${os}-${process.arch}`;
8
+ const exe = os === "windows" ? ".exe" : "";
9
+
10
+ let binary;
11
+ try {
12
+ binary = require.resolve(`sofatofu-${target}/bin/sofatofu${exe}`);
13
+ } catch {
14
+ console.error(
15
+ `sofatofu found no binary for ${target} in this npm install. Supported: darwin-arm64, darwin-x64, linux-arm64, linux-x64, windows-x64.\nTo install sofatofu without npm, see https://sofatofu.com/skills/sofatofu/references/setup.md`,
16
+ );
17
+ process.exit(1);
18
+ }
19
+
20
+ const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
21
+ if (result.error) throw result.error;
22
+ if (result.signal) process.kill(process.pid, result.signal);
23
+ process.exit(result.status ?? 1);
package/package.json CHANGED
@@ -1,9 +1,21 @@
1
1
  {
2
2
  "name": "sofatofu",
3
- "version": "0.0.1",
4
- "description": "Placeholder for sofatofu.",
3
+ "description": "Agent-first CRM command-line tool",
4
+ "homepage": "https://sofatofu.com",
5
5
  "license": "MIT",
6
- "type": "module",
7
- "bin": { "sofatofu": "cli.js" },
8
- "files": ["cli.js"]
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/Sotong-Labs/sofatofu.git"
9
+ },
10
+ "bin": {
11
+ "sofatofu": "bin/sofatofu.js"
12
+ },
13
+ "version": "0.2.0",
14
+ "optionalDependencies": {
15
+ "sofatofu-darwin-arm64": "0.2.0",
16
+ "sofatofu-darwin-x64": "0.2.0",
17
+ "sofatofu-linux-arm64": "0.2.0",
18
+ "sofatofu-linux-x64": "0.2.0",
19
+ "sofatofu-windows-x64": "0.2.0"
20
+ }
9
21
  }
package/cli.js DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- console.log("🛋️");