purple-ai 0.0.6 → 0.0.7
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 +58 -0
- package/bin/darwin-arm64/purple +0 -0
- package/bin/darwin-x64/purple +0 -0
- package/bin/linux-x64/purple +0 -0
- package/bin/purple-ai.js +126 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Purple AI
|
|
2
|
+
|
|
3
|
+
Workspace management for Claude Code.
|
|
4
|
+
|
|
5
|
+
Purple AI is a terminal-based workspace manager that provides a polished TUI for managing workspaces, teams, and feature development sessions that integrate with Claude Code.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g purple-ai
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or run directly with npx:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx purple-ai
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Requirements
|
|
20
|
+
|
|
21
|
+
- Node.js 18.0.0 or higher
|
|
22
|
+
- [Claude Code](https://claude.ai/code) installed
|
|
23
|
+
- Git
|
|
24
|
+
- macOS (Intel or Apple Silicon) or Linux (x64)
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Start Purple
|
|
30
|
+
purple-ai
|
|
31
|
+
|
|
32
|
+
# Show version
|
|
33
|
+
purple-ai --version
|
|
34
|
+
|
|
35
|
+
# Show help
|
|
36
|
+
purple-ai --help
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Features
|
|
40
|
+
|
|
41
|
+
- **Workspace Management**: Create and manage workspaces with multiple repositories
|
|
42
|
+
- **Team Collaboration**: Share workspaces and standards with your team
|
|
43
|
+
- **Claude Code Integration**: Seamless integration with status bar overlay
|
|
44
|
+
- **Plugin System**: Extend functionality with plugins
|
|
45
|
+
- **Standards Sync**: Keep coding standards in sync across your team
|
|
46
|
+
|
|
47
|
+
## Documentation
|
|
48
|
+
|
|
49
|
+
Visit [docs.bepurple.ai](https://docs.bepurple.ai) for full documentation.
|
|
50
|
+
|
|
51
|
+
## Support
|
|
52
|
+
|
|
53
|
+
- GitHub Issues: [github.com/purple-ai/purple-client/issues](https://github.com/purple-ai/purple-client/issues)
|
|
54
|
+
- Website: [bepurple.ai](https://bepurple.ai)
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
MIT
|
package/bin/darwin-arm64/purple
CHANGED
|
Binary file
|
package/bin/darwin-x64/purple
CHANGED
|
Binary file
|
package/bin/linux-x64/purple
CHANGED
|
Binary file
|
package/bin/purple-ai.js
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Purple AI CLI Entry Point
|
|
4
|
+
// Spawns the correct Go binary for the current platform
|
|
5
|
+
//
|
|
6
|
+
// Changelog:
|
|
7
|
+
// - 2026-01-12: Initial implementation
|
|
8
|
+
|
|
9
|
+
const { spawn } = require('child_process');
|
|
10
|
+
const path = require('path');
|
|
11
|
+
const os = require('os');
|
|
12
|
+
const fs = require('fs');
|
|
13
|
+
|
|
14
|
+
// Map Node.js platform names to Go platform names
|
|
15
|
+
const platformMap = {
|
|
16
|
+
darwin: 'darwin',
|
|
17
|
+
linux: 'linux'
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Map Node.js architecture names to Go architecture names
|
|
21
|
+
const archMap = {
|
|
22
|
+
x64: 'amd64',
|
|
23
|
+
arm64: 'arm64'
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Get the path to the binary for the current platform
|
|
28
|
+
* @returns {string} Path to the platform-specific binary
|
|
29
|
+
*/
|
|
30
|
+
function getBinaryPath() {
|
|
31
|
+
const platform = platformMap[os.platform()];
|
|
32
|
+
const arch = archMap[os.arch()];
|
|
33
|
+
|
|
34
|
+
if (!platform || !arch) {
|
|
35
|
+
console.error(`Unsupported platform: ${os.platform()}-${os.arch()}`);
|
|
36
|
+
console.error('');
|
|
37
|
+
console.error('Purple AI supports:');
|
|
38
|
+
console.error(' - macOS (x64, arm64)');
|
|
39
|
+
console.error(' - Linux (x64)');
|
|
40
|
+
console.error('');
|
|
41
|
+
console.error('For Windows, please use WSL (Windows Subsystem for Linux).');
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const binaryName = `purple-${platform}-${arch}`;
|
|
46
|
+
return path.join(__dirname, '..', 'binaries', binaryName);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if the binary exists and is executable
|
|
51
|
+
* @param {string} binaryPath - Path to the binary
|
|
52
|
+
* @returns {boolean} True if binary exists
|
|
53
|
+
*/
|
|
54
|
+
function verifyBinary(binaryPath) {
|
|
55
|
+
try {
|
|
56
|
+
fs.accessSync(binaryPath, fs.constants.X_OK);
|
|
57
|
+
return true;
|
|
58
|
+
} catch (err) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Main entry point
|
|
65
|
+
*/
|
|
66
|
+
function main() {
|
|
67
|
+
const binaryPath = getBinaryPath();
|
|
68
|
+
|
|
69
|
+
if (!verifyBinary(binaryPath)) {
|
|
70
|
+
console.error('Purple binary not found or not executable.');
|
|
71
|
+
console.error('');
|
|
72
|
+
console.error('This may happen if:');
|
|
73
|
+
console.error(' 1. The postinstall script failed');
|
|
74
|
+
console.error(' 2. The binary was removed');
|
|
75
|
+
console.error(' 3. The npm package is corrupted');
|
|
76
|
+
console.error('');
|
|
77
|
+
console.error('Try reinstalling:');
|
|
78
|
+
console.error(' npm uninstall -g purple-ai && npm install -g purple-ai');
|
|
79
|
+
console.error('');
|
|
80
|
+
console.error('If the problem persists, please report an issue at:');
|
|
81
|
+
console.error(' https://github.com/purple-ai/purple-client/issues');
|
|
82
|
+
process.exit(1);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Spawn the Go binary with all arguments passed through
|
|
86
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
87
|
+
stdio: 'inherit',
|
|
88
|
+
env: process.env
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// Handle errors during spawn
|
|
92
|
+
child.on('error', (err) => {
|
|
93
|
+
if (err.code === 'ENOENT') {
|
|
94
|
+
console.error('Purple binary not found. Try reinstalling:');
|
|
95
|
+
console.error(' npm uninstall -g purple-ai && npm install -g purple-ai');
|
|
96
|
+
} else if (err.code === 'EACCES') {
|
|
97
|
+
console.error('Permission denied. The binary may not be executable.');
|
|
98
|
+
console.error('');
|
|
99
|
+
console.error('Try fixing permissions:');
|
|
100
|
+
console.error(` chmod +x "${binaryPath}"`);
|
|
101
|
+
} else {
|
|
102
|
+
console.error('Failed to start Purple:', err.message);
|
|
103
|
+
}
|
|
104
|
+
process.exit(1);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// Exit with the same code as the Go binary
|
|
108
|
+
child.on('exit', (code, signal) => {
|
|
109
|
+
if (signal) {
|
|
110
|
+
// If killed by signal, exit with 128 + signal number (Unix convention)
|
|
111
|
+
process.exit(128);
|
|
112
|
+
}
|
|
113
|
+
process.exit(code || 0);
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// Forward signals to the child process
|
|
117
|
+
['SIGINT', 'SIGTERM', 'SIGHUP'].forEach((signal) => {
|
|
118
|
+
process.on(signal, () => {
|
|
119
|
+
if (!child.killed) {
|
|
120
|
+
child.kill(signal);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
main();
|