rules-cli 1.0.2
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 +68 -0
- package/bin/darwin-amd64/rules-cli +0 -0
- package/bin/darwin-arm64/rules-cli +0 -0
- package/bin/linux-arm64/rules-cli +0 -0
- package/bin/linux-x64/rules-cli +0 -0
- package/bin/win32-x64/rules-cli.exe +0 -0
- package/bin.js +49 -0
- package/package.json +44 -0
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Private Homebrew Tap for Continue Dev Tools
|
|
2
|
+
|
|
3
|
+
This is a private Homebrew tap for internal Continue Dev tools.
|
|
4
|
+
|
|
5
|
+
## Installation Options
|
|
6
|
+
|
|
7
|
+
### Option 1: Using NPM (Cross-platform)
|
|
8
|
+
|
|
9
|
+
You can install and run the rules CLI using npm:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Install globally
|
|
13
|
+
npm install -g rules-cli
|
|
14
|
+
|
|
15
|
+
# Run the CLI
|
|
16
|
+
rules-cli
|
|
17
|
+
|
|
18
|
+
# Or run directly without installing
|
|
19
|
+
npx rules-cli
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The npm package provides binaries for:
|
|
23
|
+
|
|
24
|
+
- macOS (x64, arm64)
|
|
25
|
+
- Linux (x64, arm64)
|
|
26
|
+
- Windows (x64)
|
|
27
|
+
|
|
28
|
+
### Option 2: Using Homebrew (macOS/Linux)
|
|
29
|
+
|
|
30
|
+
#### Prerequisites
|
|
31
|
+
|
|
32
|
+
- You must have [Homebrew](https://brew.sh/) installed
|
|
33
|
+
- You need Git SSH access to the private repositories at Continue Dev
|
|
34
|
+
|
|
35
|
+
#### 1. Tap the Repository
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Using SSH (recommended for private repos)
|
|
39
|
+
brew tap continuedev/tap git@github.com:continuedev/homebrew-tap.git
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### 2. Install the Rules CLI Tool
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
brew install rules
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
#### Updating
|
|
49
|
+
|
|
50
|
+
To get the latest version:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
brew update
|
|
54
|
+
brew upgrade rules
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Available Tools
|
|
58
|
+
|
|
59
|
+
- `rules`: Internal rules CLI tool for Continue Dev
|
|
60
|
+
|
|
61
|
+
## Troubleshooting
|
|
62
|
+
|
|
63
|
+
If you encounter issues:
|
|
64
|
+
|
|
65
|
+
- Ensure you have SSH access to the `continuedev/rules-cli` repository
|
|
66
|
+
- Make sure your SSH key is loaded (`ssh-add -l` to check)
|
|
67
|
+
- Try running `brew doctor` to check for general Homebrew issues
|
|
68
|
+
- If the formula fails to install, try with verbose output: `brew install -v rules`
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const os = require('os');
|
|
7
|
+
|
|
8
|
+
// Determine platform and architecture
|
|
9
|
+
const platform = os.platform();
|
|
10
|
+
const arch = os.arch();
|
|
11
|
+
|
|
12
|
+
// Map OS and architecture to binary name
|
|
13
|
+
let binaryName;
|
|
14
|
+
if (platform === 'win32') {
|
|
15
|
+
binaryName = 'rules-cli.exe';
|
|
16
|
+
} else {
|
|
17
|
+
binaryName = 'rules-cli';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Construct path to the binary
|
|
21
|
+
const binaryPath = path.join(__dirname, 'bin', `${platform}-${arch}`, binaryName);
|
|
22
|
+
|
|
23
|
+
// Check if binary exists
|
|
24
|
+
if (!fs.existsSync(binaryPath)) {
|
|
25
|
+
console.error(`Binary not found for your platform (${platform}-${arch})`);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Make binary executable (not needed on Windows)
|
|
30
|
+
if (platform !== 'win32') {
|
|
31
|
+
try {
|
|
32
|
+
fs.chmodSync(binaryPath, '755');
|
|
33
|
+
} catch (error) {
|
|
34
|
+
console.error(`Failed to make binary executable: ${error.message}`);
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Execute the binary with all arguments passed through
|
|
40
|
+
const childProcess = spawn(binaryPath, process.argv.slice(2), { stdio: 'inherit' });
|
|
41
|
+
|
|
42
|
+
childProcess.on('error', (error) => {
|
|
43
|
+
console.error(`Failed to start binary: ${error.message}`);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
childProcess.on('close', (code) => {
|
|
48
|
+
process.exit(code);
|
|
49
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rules-cli",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Rules CLI tool",
|
|
5
|
+
"files": [
|
|
6
|
+
"bin.js",
|
|
7
|
+
"bin/"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "node build.js",
|
|
11
|
+
"prepublishOnly": "npm run build",
|
|
12
|
+
"semantic-release": "semantic-release"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [],
|
|
15
|
+
"author": "",
|
|
16
|
+
"license": "ISC",
|
|
17
|
+
"os": [
|
|
18
|
+
"darwin",
|
|
19
|
+
"linux",
|
|
20
|
+
"win32"
|
|
21
|
+
],
|
|
22
|
+
"cpu": [
|
|
23
|
+
"x64",
|
|
24
|
+
"arm64"
|
|
25
|
+
],
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=12"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
31
|
+
"@semantic-release/git": "^10.0.1",
|
|
32
|
+
"@semantic-release/github": "^9.2.6",
|
|
33
|
+
"@semantic-release/npm": "^10.0.6",
|
|
34
|
+
"semantic-release": "^21.1.2",
|
|
35
|
+
"tar": "^6.2.0"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "https://github.com/continuedev/rules-cli.git"
|
|
43
|
+
}
|
|
44
|
+
}
|