Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
chore(cli): add shebangs and top-level doc comments to build scripts
jkomyno committed
Feb 27, 2026 at 18:39 UTC
0f44283533be8ee666ede3bd0d3d9d7b8bf84e0d
4 files changed
+62
-30
ts/packages/cli/scripts/build-all-binaries.ts
+14
-6
@@ -1,3 +1,17 @@
1
+#!/usr/bin/env bun
2
+
3
+/**
4
+ * Build all platform binaries via Bun cross-compilation.
5
+ *
6
+ * Usage: `bun scripts/build-all-binaries.ts`
7
+ *
8
+ * Builds all 4 targets sequentially:
9
+ * composio-darwin-aarch64, composio-darwin-x64,
10
+ * composio-linux-x64, composio-linux-aarch64
11
+ *
12
+ * Output: `dist/binaries/composio-*`
13
+ */
14
+
15
import process from 'node:process';
16
import {
17
Cause,
@@ -71,12 +85,6 @@ function runBunBuild(target: string, outfile: string) {
85
});
86
}
87
74
-/**
75
- * Build all platform binaries via cross-compilation.
76
- *
77
- * Usage: `bun scripts/build-all-binaries.ts`
78
- * Output: `dist/binaries/composio-{darwin-aarch64,darwin-x64,linux-x64,linux-aarch64}`
79
- */
88
export function buildAllBinaries() {
89
return Effect.gen(function* () {
90
yield* Console.log(`Building ${TARGETS.length} platform binaries...`);
ts/packages/cli/scripts/build-binary-cross.ts
+16
-6
@@ -1,3 +1,19 @@
1
+#!/usr/bin/env bun
2
+
3
+/**
4
+ * Cross-compile a CLI binary for a specific Bun target.
5
+ *
6
+ * Usage: `bun scripts/build-binary-cross.ts --target <target>`
7
+ *
8
+ * Valid targets:
9
+ * bun-darwin-arm64 → composio-darwin-aarch64
10
+ * bun-darwin-x64 → composio-darwin-x64
11
+ * bun-linux-x64 → composio-linux-x64
12
+ * bun-linux-arm64 → composio-linux-aarch64
13
+ *
14
+ * Output: `dist/binaries/<artifact-name>`
15
+ */
16
+
17
import process from 'node:process';
18
import {
19
Cause,
@@ -46,12 +62,6 @@ function parseTarget(): { target: string; artifact: string } {
62
return { target, artifact };
63
}
64
49
-/**
50
- * Cross-compile a CLI binary for a specific Bun target.
51
- *
52
- * Usage: `bun scripts/build-binary-cross.ts --target bun-darwin-arm64`
53
- * Output: `dist/binaries/composio-darwin-aarch64`
54
- */
65
export function buildBinaryCross() {
66
const { target, artifact } = parseTarget();
67
ts/packages/cli/scripts/generate-checksums.ts
+16
-8
@@ -1,3 +1,19 @@
1
+#!/usr/bin/env bun
2
+
3
+/**
4
+ * Generate `checksums.txt` from all `.zip` files in `dist/binaries/`.
5
+ *
6
+ * Usage: `bun scripts/generate-checksums.ts`
7
+ *
8
+ * Output format (sha256sum-compatible):
9
+ * <sha256hex> composio-darwin-aarch64.zip
10
+ * <sha256hex> composio-darwin-x64.zip
11
+ * <sha256hex> composio-linux-x64.zip
12
+ * <sha256hex> composio-linux-aarch64.zip
13
+ *
14
+ * Output: `dist/binaries/checksums.txt`
15
+ */
16
+
17
import process from 'node:process';
18
import {
19
Cause,
@@ -17,14 +33,6 @@ import path from 'node:path';
33
34
const BINARIES_DIR = './dist/binaries';
35
20
-/**
21
- * Generate checksums.txt from all .zip files in dist/binaries/.
22
- *
23
- * Output format (sha256sum compatible):
24
- * <sha256hex> <filename>
25
- *
26
- * Usage: `bun scripts/generate-checksums.ts`
27
- */
36
export function generateChecksums() {
37
return Effect.gen(function* () {
38
const entries = yield* Effect.tryPromise(() => readdir(BINARIES_DIR));
ts/packages/cli/scripts/package-binaries.ts
+16
-10
@@ -1,3 +1,19 @@
1
+#!/usr/bin/env bun
2
+
3
+/**
4
+ * Package each raw binary in `dist/binaries/` into a `.zip` archive.
5
+ *
6
+ * Usage: `bun scripts/package-binaries.ts`
7
+ *
8
+ * Creates a nested directory structure inside each zip:
9
+ * composio-<target>/composio
10
+ *
11
+ * This matches the structure expected by `install.sh`.
12
+ *
13
+ * Input: `dist/binaries/composio-{platform-arch}` (raw binaries)
14
+ * Output: `dist/binaries/composio-{platform-arch}.zip`
15
+ */
16
+
17
import process from 'node:process';
18
import {
19
Cause,
@@ -28,16 +44,6 @@ const ARTIFACT_NAMES = [
44
'composio-linux-aarch64',
45
];
46
31
-/**
32
- * Package each raw binary in dist/binaries/ into a .zip archive.
33
- *
34
- * Creates a nested directory structure inside the zip:
35
- * composio-<target>/composio
36
- *
37
- * This matches the structure expected by install.sh.
38
- *
39
- * Usage: `bun scripts/package-binaries.ts`
40
- */
47
export function packageBinaries() {
48
return Effect.gen(function* () {
49
const entries = yield* Effect.tryPromise(() => readdir(BINARIES_DIR));