@superadnim/rlm-pro 1.0.0 → 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 CHANGED
@@ -7,11 +7,11 @@ Based on the [RLM research](https://arxiv.org/abs/2512.24601) from MIT OASYS lab
7
7
  ## Installation
8
8
 
9
9
  ```bash
10
- # Using npx (recommended - no installation needed)
11
- npx rlm-codebase ./my-project -q "Explain the architecture"
10
+ # Using npx (recommended - auto-installs Python package from GitHub)
11
+ npx @superadnim/rlm-pro ./my-project -q "Explain the architecture"
12
12
 
13
13
  # Or install globally
14
- npm install -g rlm-codebase
14
+ npm install -g @superadnim/rlm-pro
15
15
  ```
16
16
 
17
17
  ### Prerequisites
@@ -24,6 +24,9 @@ npm install -g rlm-codebase
24
24
  # Install uv if not already installed
25
25
  curl -LsSf https://astral.sh/uv/install.sh | sh
26
26
 
27
+ # Install the Python package (auto-installed on first run, or install manually)
28
+ uv pip install git+https://github.com/CG-Labs/RLM-PRO.git
29
+
27
30
  # Set your API key
28
31
  export OPENAI_API_KEY="your-key"
29
32
  ```
@@ -34,34 +37,34 @@ export OPENAI_API_KEY="your-key"
34
37
 
35
38
  ```bash
36
39
  # Basic usage
37
- npx rlm-codebase ./my-project -q "Explain the architecture"
40
+ npx @superadnim/rlm-pro ./my-project -q "Explain the architecture"
38
41
 
39
42
  # Get JSON output (for programmatic use)
40
- npx rlm-codebase ./my-project -q "List all API endpoints" --json
43
+ npx @superadnim/rlm-pro ./my-project -q "List all API endpoints" --json
41
44
 
42
45
  # Use a specific model
43
- npx rlm-codebase ./my-project -q "Find potential bugs" -m gpt-4o
46
+ npx @superadnim/rlm-pro ./my-project -q "Find potential bugs" -m gpt-5.2
44
47
 
45
48
  # Use Anthropic backend
46
- npx rlm-codebase ./my-project -q "Review this code" -b anthropic
49
+ npx @superadnim/rlm-pro ./my-project -q "Review this code" -b anthropic
47
50
 
48
51
  # Verbose output for debugging
49
- npx rlm-codebase ./my-project -q "How does authentication work?" -v
52
+ npx @superadnim/rlm-pro ./my-project -q "How does authentication work?" -v
50
53
 
51
54
  # Only build context (no LLM call)
52
- npx rlm-codebase ./my-project -q "" --context-only
55
+ npx @superadnim/rlm-pro ./my-project -q "" --context-only
53
56
  ```
54
57
 
55
58
  ### Programmatic Usage (Node.js)
56
59
 
57
60
  ```javascript
58
- const { analyzeCodebase } = require('rlm-codebase');
61
+ const { analyzeCodebase } = require('@superadnim/rlm-pro');
59
62
 
60
63
  async function main() {
61
64
  const result = await analyzeCodebase('./my-project', {
62
65
  query: 'Summarize the codebase structure',
63
66
  backend: 'openai',
64
- model: 'gpt-4o',
67
+ model: 'gpt-5.2',
65
68
  });
66
69
 
67
70
  console.log(result.response);
@@ -77,7 +80,7 @@ main();
77
80
  |--------|-------------|---------|
78
81
  | `-q, --query <query>` | Question or task to perform (required) | - |
79
82
  | `-b, --backend <backend>` | LLM backend (openai, anthropic, etc.) | `openai` |
80
- | `-m, --model <model>` | Model name | `gpt-4o` |
83
+ | `-m, --model <model>` | Model name | `gpt-5.2` |
81
84
  | `-e, --env <env>` | Execution environment (local, docker) | `local` |
82
85
  | `--max-depth <n>` | Maximum recursion depth | `1` |
83
86
  | `--max-iterations <n>` | Maximum iterations | `30` |
@@ -110,22 +113,22 @@ This allows answering complex questions about large codebases that would exceed
110
113
 
111
114
  ### Architecture Analysis
112
115
  ```bash
113
- npx rlm-codebase ./backend -q "Describe the system architecture and key design patterns"
116
+ npx @superadnim/rlm-pro ./backend -q "Describe the system architecture and key design patterns"
114
117
  ```
115
118
 
116
119
  ### Bug Finding
117
120
  ```bash
118
- npx rlm-codebase ./src -q "Find potential security vulnerabilities" --json
121
+ npx @superadnim/rlm-pro ./src -q "Find potential security vulnerabilities" --json
119
122
  ```
120
123
 
121
124
  ### Documentation Generation
122
125
  ```bash
123
- npx rlm-codebase ./api -q "Generate API documentation for all endpoints"
126
+ npx @superadnim/rlm-pro ./api -q "Generate API documentation for all endpoints"
124
127
  ```
125
128
 
126
129
  ### Code Review
127
130
  ```bash
128
- npx rlm-codebase ./feature-branch -q "Review this code for best practices"
131
+ npx @superadnim/rlm-pro ./feature-branch -q "Review this code for best practices"
129
132
  ```
130
133
 
131
134
  ## License
@@ -135,5 +138,4 @@ MIT
135
138
  ## Links
136
139
 
137
140
  - [RLM Research Paper](https://arxiv.org/abs/2512.24601)
138
- - [Python Package (PyPI)](https://pypi.org/project/rlm/)
139
- - [GitHub Repository](https://github.com/mit-oasys/rlm)
141
+ - [GitHub Repository](https://github.com/CG-Labs/RLM-PRO)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superadnim/rlm-pro",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "RLM PRO - Enterprise-grade Recursive Language Models for infinite context code analysis. Analyze entire codebases with AI.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/executor.js CHANGED
@@ -45,17 +45,17 @@ async function runRlm(args) {
45
45
  let result = null;
46
46
  let lastError = null;
47
47
 
48
- // Method 1: Try uvx (for published packages on PyPI)
49
- result = await tryCommand('uvx', ['rlm', ...args], execOptions);
48
+ // Method 1: Try uvx with rlm-pro (if installed via pip from GitHub)
49
+ result = await tryCommand('rlm-pro', args, execOptions);
50
50
 
51
- // Method 2: Try uv run rlm-codebase (for local development with pyproject.toml)
51
+ // Method 2: Try rlm-codebase command (alternative entry point)
52
52
  if (!result) {
53
- result = await tryCommand('uv', ['run', 'rlm-codebase', ...args], execOptions);
53
+ result = await tryCommand('rlm-codebase', args, execOptions);
54
54
  }
55
55
 
56
- // Method 3: Try direct rlm-codebase command (if installed in PATH)
56
+ // Method 3: Try uv run rlm-codebase (for local development with pyproject.toml)
57
57
  if (!result) {
58
- result = await tryCommand('rlm-codebase', args, execOptions);
58
+ result = await tryCommand('uv', ['run', 'rlm-codebase', ...args], execOptions);
59
59
  }
60
60
 
61
61
  // Method 4: Try python -m rlm.cli (fallback)
@@ -72,8 +72,7 @@ async function runRlm(args) {
72
72
  throw new Error(
73
73
  'Could not run RLM CLI. Please ensure:\n' +
74
74
  '1. uv is installed: curl -LsSf https://astral.sh/uv/install.sh | sh\n' +
75
- '2. rlm package is installed: uv pip install rlm\n' +
76
- ' Or for local development: cd <rlm-repo> && uv pip install -e .\n' +
75
+ '2. rlm-pro is installed: uv pip install git+https://github.com/CG-Labs/RLM-PRO.git\n' +
77
76
  '3. Restart your terminal after installation'
78
77
  );
79
78
  }
@@ -107,10 +106,15 @@ async function runRlm(args) {
107
106
  */
108
107
  async function checkSetup() {
109
108
  try {
110
- await execFileAsync('uvx', ['rlm-codebase', '--version']);
109
+ await execFileAsync('rlm-pro', ['--version']);
111
110
  return true;
112
111
  } catch {
113
- return false;
112
+ try {
113
+ await execFileAsync('rlm-codebase', ['--version']);
114
+ return true;
115
+ } catch {
116
+ return false;
117
+ }
114
118
  }
115
119
  }
116
120
 
@@ -26,15 +26,37 @@ async function checkUv() {
26
26
  }
27
27
 
28
28
  /**
29
- * Check if uvx can run rlm-codebase.
29
+ * Check if rlm-pro is installed.
30
30
  * @returns {Promise<boolean>}
31
31
  */
32
32
  async function checkRlmInstalled() {
33
33
  try {
34
- await execFileAsync('uvx', ['rlm-codebase', '--version']);
34
+ await execFileAsync('rlm-pro', ['--version']);
35
35
  return true;
36
36
  } catch {
37
- // uvx might not have rlm-codebase cached yet, which is fine
37
+ try {
38
+ await execFileAsync('rlm-codebase', ['--version']);
39
+ return true;
40
+ } catch {
41
+ return false;
42
+ }
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Install rlm-pro from GitHub.
48
+ * @returns {Promise<boolean>}
49
+ */
50
+ async function installRlmPro() {
51
+ try {
52
+ console.log('Installing rlm-pro from GitHub...');
53
+ await execFileAsync('uv', ['pip', 'install', 'git+https://github.com/CG-Labs/RLM-PRO.git'], {
54
+ timeout: 120000,
55
+ });
56
+ console.log('rlm-pro installed successfully.');
57
+ return true;
58
+ } catch (err) {
59
+ console.error('Failed to install rlm-pro:', err.message);
38
60
  return false;
39
61
  }
40
62
  }
@@ -94,19 +116,31 @@ async function checkPythonSetup() {
94
116
  /**
95
117
  * Check command - run from postinstall
96
118
  */
97
- function runCheck() {
98
- checkUv()
99
- .then(hasUv => {
100
- if (hasUv) {
101
- console.log('RLM Codebase: Python environment ready (uv detected)');
102
- } else {
103
- console.log('RLM Codebase: uv not detected. Install it to use this tool:');
104
- console.log(' curl -LsSf https://astral.sh/uv/install.sh | sh');
119
+ async function runCheck() {
120
+ try {
121
+ const hasUv = await checkUv();
122
+ if (!hasUv) {
123
+ console.log('RLM PRO: uv not detected. Install it to use this tool:');
124
+ console.log(' curl -LsSf https://astral.sh/uv/install.sh | sh');
125
+ return;
126
+ }
127
+
128
+ console.log('RLM PRO: Python environment ready (uv detected)');
129
+
130
+ const hasRlm = await checkRlmInstalled();
131
+ if (!hasRlm) {
132
+ console.log('RLM PRO: Installing Python package from GitHub...');
133
+ const installed = await installRlmPro();
134
+ if (!installed) {
135
+ console.log('RLM PRO: Auto-install failed. Install manually:');
136
+ console.log(' uv pip install git+https://github.com/CG-Labs/RLM-PRO.git');
105
137
  }
106
- })
107
- .catch(err => {
108
- console.error('RLM Codebase: Setup check failed:', err.message);
109
- });
138
+ } else {
139
+ console.log('RLM PRO: Python package already installed');
140
+ }
141
+ } catch (err) {
142
+ console.error('RLM PRO: Setup check failed:', err.message);
143
+ }
110
144
  }
111
145
 
112
146
  // Handle CLI invocation
@@ -125,4 +159,5 @@ module.exports = {
125
159
  checkRlmInstalled,
126
160
  checkPythonSetup,
127
161
  getUvInstallInstructions,
162
+ installRlmPro,
128
163
  };