@thelapyae/geniclaw 1.1.2 → 1.1.4

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.
Files changed (3) hide show
  1. package/README.md +2 -0
  2. package/geniclaw.sh +12 -8
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -23,9 +23,11 @@
23
23
  ### Installation
24
24
 
25
25
  1. **Install via NPM**:
26
+ ```bash
26
27
  ```bash
27
28
  npm install -g @thelapyae/geniclaw
28
29
  ```
30
+ *Note: The `-g` flag installs it globally so you can run `geniclaw` from anywhere.*
29
31
 
30
32
  2. **Run Setup**:
31
33
  This will guide you through entering your API keys.
package/geniclaw.sh CHANGED
@@ -46,10 +46,13 @@ session_exists() {
46
46
  # Check Environment using Node.js
47
47
  check_env() {
48
48
  # Ensure config exists or run setup
49
- if ! node -e 'const fs=require("fs"); const c=JSON.parse(fs.readFileSync(require("path").join(process.env.GENICLAW_WORK_DIR || require("os").homedir()+"/.geniclaw", "config.json"))); if(!c.geminiApiKey || !c.telegramBotToken) process.exit(1)' 2>/dev/null; then
49
+ # We must run this check from SCRIPT_DIR to ensure require resolution works if needed,
50
+ # though fs and path are builtins.
51
+ if ! node -e 'const fs=require("fs"); const c=JSON.parse(fs.readFileSync(require("path").join(process.env.GENICLAW_WORK_DIR || require("os").homedir()+"/.geniclaw", "config.json"))); if(!c.geminiApiKey) process.exit(1)' 2>/dev/null; then
50
52
  echo -e "${YELLOW}Configuration missing or incomplete.${NC}"
51
53
  echo "Running setup..."
52
- npm run build >/dev/null 2>&1
54
+ # Change to script dir to find dist/setup.js
55
+ cd "$SCRIPT_DIR"
53
56
  node dist/setup.js
54
57
  fi
55
58
  }
@@ -157,13 +160,13 @@ stop_daemon() {
157
160
  tmux kill-session -t "$TMUX_SESSION"
158
161
  echo -e "${GREEN}✓ Geniclaw stopped (tmux)${NC}"
159
162
  elif command -v pm2 &> /dev/null && pm2 describe geniclaw-queue &> /dev/null; then
160
- cd "$SCRIPT_DIR"
161
- pm2 stop ecosystem.config.js
162
- pm2 delete ecosystem.config.js
163
- pm2 save
164
- echo -e "${GREEN}✓ Geniclaw stopped (PM2)${NC}"
163
+ cd "$SCRIPT_DIR"
164
+ pm2 stop ecosystem.config.js
165
+ pm2 delete ecosystem.config.js
166
+ pm2 save
167
+ echo -e "${GREEN}✓ Geniclaw stopped (PM2)${NC}"
165
168
  else
166
- echo -e "${YELLOW}Geniclaw not running (tmux/pm2)${NC}"
169
+ echo -e "${YELLOW}Geniclaw not running (tmux/pm2)${NC}"
167
170
  fi
168
171
 
169
172
  # Kill any remaining processes (fallback)
@@ -357,6 +360,7 @@ case "${1:-}" in
357
360
  ;;
358
361
  setup)
359
362
  echo -e "${BLUE}Welcome to Geniclaw Setup!${NC}"
363
+ cd "$SCRIPT_DIR"
360
364
  npm run build >/dev/null 2>&1
361
365
  node dist/setup.js
362
366
  echo ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thelapyae/geniclaw",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Geniclaw - Gemini + Telegram CLI Assistant",
5
5
  "main": "dist/telegram-client.js",
6
6
  "bin": {
@@ -25,7 +25,7 @@
25
25
  "commander": "^14.0.3",
26
26
  "dotenv": "^17.2.4",
27
27
  "google-auth-library": "^10.5.0",
28
- "inquirer": "^13.2.2",
28
+ "inquirer": "^9.3.8",
29
29
  "telegraf": "^4.16.3"
30
30
  },
31
31
  "devDependencies": {