@reepoe/plugin 1.3.21 → 1.3.23

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/bin/reepoe.js CHANGED
@@ -4,8 +4,49 @@ const fs = require('fs');
4
4
  const path = require('path');
5
5
  const os = require('os');
6
6
 
7
+ const packageJson = require('../package.json');
7
8
  const ACTIVATION_FILE = path.join(os.homedir(), '.reepoe', 'activation.json');
8
9
 
10
+ // ============= FLAG HANDLING FIRST =============
11
+ const args = process.argv.slice(2);
12
+
13
+ // Handle --version / -v
14
+ if (args.includes('--version') || args.includes('-v')) {
15
+ console.log(packageJson.version);
16
+ process.exit(0);
17
+ }
18
+
19
+ // Handle --help / -h
20
+ if (args.includes('--help') || args.includes('-h') || args.length === 0) {
21
+ console.log(`
22
+ ReePoe v${packageJson.version} - AI Context Optimization Layer
23
+
24
+ USAGE:
25
+ reepoe [options]
26
+ reepoe <query>
27
+ reepoe query <query>
28
+
29
+ OPTIONS:
30
+ --version, -v Show version number
31
+ --help, -h Show this help message
32
+
33
+ COMMANDS:
34
+ reepoe-start Start the ReePoe server (run this first!)
35
+ reepoe-stop Stop the ReePoe server
36
+ reepoe-status Check server status
37
+ reepoe-metrics Show usage metrics
38
+
39
+ EXAMPLES:
40
+ reepoe "where is authentication handled?"
41
+ reepoe query "find all API endpoints"
42
+
43
+ For more info: https://reepoe.com
44
+ `);
45
+ process.exit(0);
46
+ }
47
+
48
+ // ============= QUERY HANDLING =============
49
+
9
50
  function loadActivation() {
10
51
  if (!fs.existsSync(ACTIVATION_FILE)) {
11
52
  console.error('❌ Not activated. Run: reepoe-start');
@@ -26,7 +67,6 @@ async function query(instruction) {
26
67
  user_email: activation.email
27
68
  }, { timeout: 60000 });
28
69
 
29
- // FIX #1: Always print full JSON for AI agent parsing
30
70
  console.log(JSON.stringify(response.data, null, 2));
31
71
  } catch (error) {
32
72
  console.error('❌ Query failed:', error.response?.data?.detail || error.message);
@@ -34,21 +74,17 @@ async function query(instruction) {
34
74
  }
35
75
  }
36
76
 
37
- const args = process.argv.slice(2);
38
-
39
- // FIX #2: Support both "reepoe query <text>" AND "reepoe <text>"
40
- // Strip the "query" command to avoid parameter extraction confusion
77
+ // Support both "reepoe query <text>" AND "reepoe <text>"
41
78
  let queryText;
42
79
  if (args[0] === 'query') {
43
- // Explicit 'query' command - skip it
44
80
  queryText = args.slice(1).join(' ');
45
81
  } else {
46
- // Direct query - use all args
47
82
  queryText = args.join(' ');
48
83
  }
49
84
 
50
85
  if (!queryText) {
51
86
  console.log('Usage: reepoe query "your question" OR reepoe "your question"');
87
+ console.log('Run reepoe --help for more options');
52
88
  process.exit(1);
53
89
  }
54
90
 
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reepoe/plugin",
3
- "version": "1.3.21",
3
+ "version": "1.3.23",
4
4
  "description": "ReePoe AI Code Manager - Install in any codebase for instant AI agent integration",
5
5
  "keywords": [
6
6
  "ai",