@agi-cli/install 0.1.30
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 +47 -0
- package/package.json +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @agi-cli/install
|
|
2
|
+
|
|
3
|
+
This is a thin installer package for the agi CLI tool.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @agi-cli/install
|
|
9
|
+
# or
|
|
10
|
+
bun install -g @agi-cli/install
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This will automatically download and install the agi CLI binary via the official install script.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
After installation, you can use the `agi` command:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
agi --help
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Manual Installation
|
|
24
|
+
|
|
25
|
+
If you prefer to install manually:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
curl -fsSL https://install.agi.nitish.sh | sh
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## More Information
|
|
32
|
+
|
|
33
|
+
For more information, visit: https://github.com/ntishxyz/agi
|
package/install.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { exec } from 'child_process';
|
|
4
|
+
import { promisify } from 'util';
|
|
5
|
+
import { existsSync } from 'fs';
|
|
6
|
+
import { resolve, dirname } from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
|
|
9
|
+
const execAsync = promisify(exec);
|
|
10
|
+
|
|
11
|
+
// Skip if running in a workspace (local development)
|
|
12
|
+
function isInWorkspace() {
|
|
13
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
14
|
+
// Check if we're in a monorepo workspace by looking for workspace root indicators
|
|
15
|
+
const workspaceRoot = resolve(__dirname, '../../');
|
|
16
|
+
return (
|
|
17
|
+
existsSync(resolve(workspaceRoot, 'apps')) &&
|
|
18
|
+
existsSync(resolve(workspaceRoot, 'packages'))
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async function install() {
|
|
23
|
+
if (isInWorkspace()) {
|
|
24
|
+
console.log('Detected workspace environment, skipping install script.');
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
console.log('Installing agi CLI...');
|
|
29
|
+
console.log('Running: curl -fsSL https://install.agi.nitish.sh | sh');
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
const { stdout, stderr } = await execAsync(
|
|
33
|
+
'curl -fsSL https://install.agi.nitish.sh | sh',
|
|
34
|
+
);
|
|
35
|
+
if (stdout) console.log(stdout);
|
|
36
|
+
if (stderr) console.error(stderr);
|
|
37
|
+
console.log('\n✓ agi CLI installed successfully!');
|
|
38
|
+
console.log('Run "agi --help" to get started.');
|
|
39
|
+
} catch (error) {
|
|
40
|
+
console.error('Failed to install agi CLI:', error.message);
|
|
41
|
+
console.error('\nPlease try installing manually:');
|
|
42
|
+
console.error(' curl -fsSL https://install.agi.nitish.sh | sh');
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
install();
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agi-cli/install",
|
|
3
|
+
"version": "0.1.30",
|
|
4
|
+
"description": "AI-powered development assistant CLI - npm installer",
|
|
5
|
+
"author": "ntishxyz",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://github.com/ntishxyz/agi#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/ntishxyz/agi.git",
|
|
11
|
+
"directory": "apps/install"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/ntishxyz/agi/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"ai",
|
|
18
|
+
"cli",
|
|
19
|
+
"development",
|
|
20
|
+
"assistant",
|
|
21
|
+
"code-review",
|
|
22
|
+
"anthropic",
|
|
23
|
+
"openai",
|
|
24
|
+
"gemini"
|
|
25
|
+
],
|
|
26
|
+
"type": "module",
|
|
27
|
+
"bin": {
|
|
28
|
+
"agi": "./install.js"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"install.js",
|
|
32
|
+
"README.md"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"postinstall": "node install.js"
|
|
36
|
+
}
|
|
37
|
+
}
|