taskforceai-cli 0.3.1

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,37 @@
1
+ MIT License with Attribution Requirement for Large-Scale Commercial Use
2
+
3
+ Copyright (c) 2025 Clay Warren
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ ADDITIONAL COMMERCIAL ATTRIBUTION REQUIREMENT:
16
+ If you use this Software, in whole or in part, in any product, service, or
17
+ application that serves more than 100,000 users, you must:
18
+
19
+ 1. Provide clear attribution to Pietro Schirano as the original creator
20
+ 2. Include a statement that your product uses the "Grok 4 Fast Heavy" framework
21
+ 3. This attribution must be visible in one of the following locations:
22
+ - Product documentation
23
+ - About page/section
24
+ - Credits section
25
+ - Help/support documentation
26
+ - Or equivalent user-accessible location
27
+
28
+ Example attribution: "Powered by Grok 4 Fast heavy framework by Clay Warren"
29
+ or "Uses Make It heavy multi-agent system created by Clay Warren"
30
+
31
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
34
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
36
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # taskforceai-cli
2
+
3
+ The TaskForceAI terminal client packaged for npm-compatible registries. It bundles the Go-based Bubble Tea TUI and exposes it as a cross-platform executable.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ # Using pnpm (recommended)
9
+ pnpm add -g taskforceai-cli
10
+
11
+ # Using npm
12
+ npm install -g taskforceai-cli
13
+
14
+ # Using yarn
15
+ yarn global add taskforceai-cli
16
+ ```
17
+
18
+ The installer will attempt to build the latest Go binary locally. If Go is not available in your `PATH`, the script logs a warning and skips the build—you will need to install Go or provide a prebuilt binary before running `taskforceai`.
19
+
20
+ ## Usage
21
+
22
+ Once installed you will have the `taskforceai` (and `taskforceai-tui`) commands on your `PATH`:
23
+
24
+ ```bash
25
+ taskforceai
26
+ ```
27
+
28
+ The CLI launches the full TaskForceAI TUI with streaming agent telemetry, device-code authentication, and slash-command shortcuts. Provide the `TASKFORCEAI_API_URL` and `TASKFORCEAI_API_KEY` environment variables to target self-hosted deployments.
29
+
30
+ ## Development
31
+
32
+ This package is a thin wrapper around the Go sources in `apps/cmd/taskforceai-tui`. To build locally without installing:
33
+
34
+ ```bash
35
+ pnpm --filter taskforceai-cli run build
36
+ ```
37
+
38
+ This compiles the Go binary into `packages/taskforceai-cli/dist/`.
39
+
40
+ ## License
41
+
42
+ MIT
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ import { spawn } from 'node:child_process';
3
+ import { existsSync } from 'node:fs';
4
+ import { dirname, join } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = dirname(__filename);
9
+
10
+ const ext = process.platform === 'win32' ? '.exe' : '';
11
+ const binaryName = `taskforceai${ext}`;
12
+ const binaryPath = join(__dirname, '..', 'dist', binaryName);
13
+
14
+ if (!existsSync(binaryPath)) {
15
+ console.error('TaskForceAI CLI binary not found. Try reinstalling taskforceai-cli.');
16
+ process.exit(1);
17
+ }
18
+
19
+ const args = process.argv.slice(2);
20
+ const child = spawn(binaryPath, args, { stdio: 'inherit' });
21
+
22
+ child.on('close', (code) => {
23
+ process.exit(code ?? 0);
24
+ });
25
+
26
+ child.on('error', (error) => {
27
+ console.error('Failed to launch TaskForceAI CLI:', error);
28
+ process.exit(1);
29
+ });
Binary file
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "taskforceai-cli",
3
+ "version": "0.3.1",
4
+ "description": "TaskForceAI terminal client packaged for npm-based installs.",
5
+ "type": "module",
6
+ "bin": {
7
+ "taskforceai": "./bin/taskforceai.js",
8
+ "taskforceai-tui": "./bin/taskforceai.js"
9
+ },
10
+ "files": [
11
+ "bin",
12
+ "scripts",
13
+ "dist",
14
+ "README.md"
15
+ ],
16
+ "engines": {
17
+ "node": ">=18.0.0"
18
+ },
19
+ "keywords": [
20
+ "taskforceai",
21
+ "cli",
22
+ "tui",
23
+ "ai"
24
+ ],
25
+ "license": "MIT",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/ClayWarren/grok4fastheavy"
29
+ },
30
+ "bugs": {
31
+ "url": "https://github.com/ClayWarren/grok4fastheavy/issues"
32
+ },
33
+ "homepage": "https://taskforceai.chat",
34
+ "scripts": {
35
+ "postinstall": "node ./scripts/build.js",
36
+ "build": "node ./scripts/build.js"
37
+ }
38
+ }
@@ -0,0 +1,41 @@
1
+ import { spawnSync } from 'node:child_process';
2
+ import { mkdirSync } from 'node:fs';
3
+ import { dirname, join } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = dirname(__filename);
8
+
9
+ const packageRoot = join(__dirname, '..');
10
+ const repoRoot = join(packageRoot, '..', '..');
11
+ const cliSourceDir = join(repoRoot, 'apps', 'cmd', 'taskforceai-tui');
12
+ const outputDir = join(packageRoot, 'dist');
13
+ const binaryName = `taskforceai${process.platform === 'win32' ? '.exe' : ''}`;
14
+ const outputPath = join(outputDir, binaryName);
15
+
16
+ mkdirSync(outputDir, { recursive: true });
17
+
18
+ const goVersion = spawnSync('go', ['version'], { stdio: 'ignore' });
19
+ if (goVersion.error || goVersion.status !== 0) {
20
+ console.warn('[taskforceai-cli] Skipping Go build: Go toolchain not found in PATH.');
21
+ process.exit(0);
22
+ }
23
+
24
+ const env = { ...process.env, CGO_ENABLED: process.env.CGO_ENABLED ?? '0' };
25
+ const build = spawnSync('go', ['build', '-o', outputPath], {
26
+ cwd: cliSourceDir,
27
+ stdio: 'inherit',
28
+ env,
29
+ });
30
+
31
+ if (build.error) {
32
+ console.error('[taskforceai-cli] Failed to build TaskForceAI CLI binary:', build.error);
33
+ process.exit(1);
34
+ }
35
+
36
+ if (build.status !== 0) {
37
+ console.error('[taskforceai-cli] Go build exited with status', build.status);
38
+ process.exit(build.status ?? 1);
39
+ }
40
+
41
+ console.log(`[taskforceai-cli] Built TaskForceAI CLI binary -> ${outputPath}`);