argonctl 1.0.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 +33 -0
- package/install.js +100 -0
- package/package.json +50 -0
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# argonctl
|
|
2
|
+
|
|
3
|
+
Git-like MongoDB branching for ML/AI workflows.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g argonctl
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Verify installation
|
|
15
|
+
argon --version
|
|
16
|
+
|
|
17
|
+
# Create a project
|
|
18
|
+
argon projects create --name my-project
|
|
19
|
+
|
|
20
|
+
# List projects
|
|
21
|
+
argon projects list
|
|
22
|
+
|
|
23
|
+
# Get help
|
|
24
|
+
argon --help
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Documentation
|
|
28
|
+
|
|
29
|
+
Visit [https://github.com/argon-lab/argon](https://github.com/argon-lab/argon) for full documentation.
|
|
30
|
+
|
|
31
|
+
## License
|
|
32
|
+
|
|
33
|
+
MIT
|
package/install.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const https = require('https');
|
|
6
|
+
const { execSync } = require('child_process');
|
|
7
|
+
|
|
8
|
+
const GITHUB_REPO = 'argon-lab/argon';
|
|
9
|
+
const VERSION = require('./package.json').version;
|
|
10
|
+
|
|
11
|
+
function getPlatform() {
|
|
12
|
+
const platform = process.platform;
|
|
13
|
+
const arch = process.arch;
|
|
14
|
+
|
|
15
|
+
let platformName;
|
|
16
|
+
switch (platform) {
|
|
17
|
+
case 'darwin':
|
|
18
|
+
platformName = 'darwin';
|
|
19
|
+
break;
|
|
20
|
+
case 'linux':
|
|
21
|
+
platformName = 'linux';
|
|
22
|
+
break;
|
|
23
|
+
case 'win32':
|
|
24
|
+
platformName = 'windows';
|
|
25
|
+
break;
|
|
26
|
+
default:
|
|
27
|
+
throw new Error(`Unsupported platform: ${platform}`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
let archName;
|
|
31
|
+
switch (arch) {
|
|
32
|
+
case 'x64':
|
|
33
|
+
archName = 'amd64';
|
|
34
|
+
break;
|
|
35
|
+
case 'arm64':
|
|
36
|
+
archName = 'arm64';
|
|
37
|
+
break;
|
|
38
|
+
default:
|
|
39
|
+
throw new Error(`Unsupported architecture: ${arch}`);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return `${platformName}-${archName}`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function downloadBinary() {
|
|
46
|
+
const platform = getPlatform();
|
|
47
|
+
const binaryName = platform === 'windows-amd64' ? 'argon.exe' : 'argon';
|
|
48
|
+
const downloadUrl = `https://github.com/${GITHUB_REPO}/releases/download/v${VERSION}/argon-${platform}${platform.includes('windows') ? '.exe' : ''}`;
|
|
49
|
+
|
|
50
|
+
const binDir = path.join(__dirname, 'bin');
|
|
51
|
+
const binaryPath = path.join(binDir, binaryName);
|
|
52
|
+
|
|
53
|
+
// Create bin directory
|
|
54
|
+
if (!fs.existsSync(binDir)) {
|
|
55
|
+
fs.mkdirSync(binDir, { recursive: true });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
console.log(`Downloading Argon CLI for ${platform}...`);
|
|
59
|
+
console.log(`URL: ${downloadUrl}`);
|
|
60
|
+
|
|
61
|
+
return new Promise((resolve, reject) => {
|
|
62
|
+
const file = fs.createWriteStream(binaryPath);
|
|
63
|
+
|
|
64
|
+
https.get(downloadUrl, (response) => {
|
|
65
|
+
if (response.statusCode !== 200) {
|
|
66
|
+
reject(new Error(`Failed to download binary: HTTP ${response.statusCode}`));
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
response.pipe(file);
|
|
71
|
+
|
|
72
|
+
file.on('finish', () => {
|
|
73
|
+
file.close();
|
|
74
|
+
|
|
75
|
+
// Make binary executable on Unix systems
|
|
76
|
+
if (process.platform !== 'win32') {
|
|
77
|
+
try {
|
|
78
|
+
fs.chmodSync(binaryPath, '755');
|
|
79
|
+
} catch (err) {
|
|
80
|
+
console.warn('Warning: Could not make binary executable:', err.message);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
console.log('Argon CLI installed successfully!');
|
|
85
|
+
console.log('Run "argon --version" to verify installation.');
|
|
86
|
+
resolve();
|
|
87
|
+
});
|
|
88
|
+
}).on('error', (err) => {
|
|
89
|
+
fs.unlink(binaryPath, () => {}); // Delete partial file
|
|
90
|
+
reject(err);
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Install binary
|
|
96
|
+
downloadBinary().catch((err) => {
|
|
97
|
+
console.error('Installation failed:', err.message);
|
|
98
|
+
console.error('Please install manually from: https://github.com/argon-lab/argon/releases');
|
|
99
|
+
process.exit(1);
|
|
100
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "argonctl",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Git-like MongoDB branching for ML/AI workflows",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"argon": "./bin/argon",
|
|
8
|
+
"argonctl": "./bin/argon"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"postinstall": "node install.js",
|
|
12
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/argon-lab/argon.git"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"mongodb",
|
|
20
|
+
"branching",
|
|
21
|
+
"database",
|
|
22
|
+
"ml",
|
|
23
|
+
"ai",
|
|
24
|
+
"data-science",
|
|
25
|
+
"cli"
|
|
26
|
+
],
|
|
27
|
+
"author": "Argon Lab",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/argon-lab/argon/issues"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/argon-lab/argon#readme",
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=16"
|
|
35
|
+
},
|
|
36
|
+
"os": [
|
|
37
|
+
"darwin",
|
|
38
|
+
"linux",
|
|
39
|
+
"win32"
|
|
40
|
+
],
|
|
41
|
+
"cpu": [
|
|
42
|
+
"x64",
|
|
43
|
+
"arm64"
|
|
44
|
+
],
|
|
45
|
+
"files": [
|
|
46
|
+
"bin/",
|
|
47
|
+
"install.js",
|
|
48
|
+
"README.md"
|
|
49
|
+
]
|
|
50
|
+
}
|