Squashed commit of the following:
commit 67a4068a7fe7834e7335a9f4c22ab7f91588b1bc Author: Louis Knight-Webb <louis@bloop.ai> Date: Fri Jun 20 16:09:04 2025 +0100 Update CLI commit 0c3f38c90133970d5016712056dbcc6daffb138b Author: Louis Knight-Webb <louis@bloop.ai> Date: Fri Jun 20 15:54:58 2025 +0100 Boilerplate
This commit is contained in:
39
npx-cli/bin/cli.js
Executable file
39
npx-cli/bin/cli.js
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const { execSync } = require('child_process');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
// Check if system is app-darwin-arm64
|
||||
const platform = process.platform;
|
||||
const arch = process.arch;
|
||||
|
||||
if (platform !== 'darwin' || arch !== 'arm64') {
|
||||
console.error('❌ This package only supports macOS ARM64 (Apple Silicon) systems.');
|
||||
console.error(`Current system: ${platform}-${arch}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
try {
|
||||
const zipPath = path.join(__dirname, '..', 'dist', 'app-darwin-arm64', 'vibe-kanban.zip');
|
||||
const extractDir = path.join(__dirname, '..', 'dist', 'app-darwin-arm64');
|
||||
|
||||
// Check if zip file exists
|
||||
if (!fs.existsSync(zipPath)) {
|
||||
console.error('❌ vibe-kanban.zip not found at:', zipPath);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Unzip the file
|
||||
console.log('📦 Extracting vibe-kanban...');
|
||||
execSync(`unzip -o "${zipPath}" -d "${extractDir}"`, { stdio: 'inherit' });
|
||||
|
||||
// Execute the binary
|
||||
const binaryPath = path.join(extractDir, 'vibe-kanban');
|
||||
console.log('🚀 Launching vibe-kanban...');
|
||||
execSync(`"${binaryPath}"`, { stdio: 'inherit' });
|
||||
|
||||
} catch (error) {
|
||||
console.error('❌ Error running vibe-kanban:', error.message);
|
||||
process.exit(1);
|
||||
}
|
||||
16
npx-cli/package.json
Normal file
16
npx-cli/package.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "vibe-kanban",
|
||||
"private": false,
|
||||
"version": "0.0.3",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
"my-npx-cli": "bin/cli.js"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "bloop",
|
||||
"license": "",
|
||||
"description": "NPX wrapper around vibe-kanban",
|
||||
"files": [
|
||||
"dist"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user