@hummingbot/skills 1.0.0 → 1.0.5

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 (40) hide show
  1. package/README.md +15 -14
  2. package/package.json +5 -1
  3. package/skills/candles-feed/SKILL.md +2 -1
  4. package/skills/candles-feed/scripts/calculate_indicator.sh +2 -0
  5. package/skills/candles-feed/scripts/get_candles.sh +2 -0
  6. package/skills/candles-feed/scripts/get_funding_rate.sh +2 -0
  7. package/skills/candles-feed/scripts/get_price.sh +2 -0
  8. package/skills/candles-feed/scripts/list_candle_connectors.sh +2 -0
  9. package/skills/executor-creator/SKILL.md +48 -6
  10. package/skills/executor-creator/scripts/clear_position.sh +2 -0
  11. package/skills/executor-creator/scripts/create_executor.sh +11 -2
  12. package/skills/executor-creator/scripts/get_executor.sh +2 -0
  13. package/skills/executor-creator/scripts/get_executor_schema.sh +2 -0
  14. package/skills/executor-creator/scripts/get_executors_summary.sh +2 -0
  15. package/skills/executor-creator/scripts/get_position.sh +2 -0
  16. package/skills/executor-creator/scripts/get_positions.sh +2 -0
  17. package/skills/executor-creator/scripts/list_executor_types.sh +2 -0
  18. package/skills/executor-creator/scripts/list_executors.sh +2 -0
  19. package/skills/executor-creator/scripts/setup_executor.sh +23 -7
  20. package/skills/executor-creator/scripts/stop_executor.sh +2 -0
  21. package/skills/hummingbot-api-setup/SKILL.md +50 -258
  22. package/skills/hummingbot-api-setup/scripts/health_check.sh +2 -0
  23. package/skills/hummingbot-api-setup/{references/original_setup.sh → scripts/setup.sh} +76 -54
  24. package/skills/keys-manager/SKILL.md +2 -1
  25. package/skills/keys-manager/scripts/add_credentials.sh +2 -0
  26. package/skills/keys-manager/scripts/get_connector_config.sh +2 -0
  27. package/skills/keys-manager/scripts/list_account_credentials.sh +2 -0
  28. package/skills/keys-manager/scripts/list_connectors.sh +2 -0
  29. package/skills/keys-manager/scripts/remove_credentials.sh +2 -0
  30. package/skills/keys-manager/scripts/setup_connector.sh +2 -0
  31. package/skills/portfolio/SKILL.md +181 -0
  32. package/skills/portfolio/scripts/get_distribution.sh +52 -0
  33. package/skills/portfolio/scripts/get_history.sh +75 -0
  34. package/skills/portfolio/scripts/get_overview.sh +96 -0
  35. package/skills/portfolio/scripts/get_state.sh +96 -0
  36. package/skills.json +26 -6
  37. package/skills/hummingbot-api-setup/scripts/check_prerequisites.sh +0 -92
  38. package/skills/hummingbot-api-setup/scripts/deploy_full_stack.sh +0 -151
  39. package/skills/hummingbot-api-setup/scripts/step1_detect_system.sh +0 -88
  40. package/skills/hummingbot-api-setup/scripts/step2_check_dependencies.sh +0 -81
@@ -1,7 +1,6 @@
1
1
  #!/bin/bash
2
2
  #
3
3
  # Hummingbot Deploy Instance Installer
4
- # Original source: https://github.com/hummingbot/deploy/blob/main/setup.sh
5
4
  #
6
5
  # This script sets up Hummingbot instances with optional Hummingbot API integration.
7
6
  # Each repository manages its own docker-compose and setup via Makefile.
@@ -27,7 +26,7 @@ cleanup() {
27
26
  local exit_code=$?
28
27
  # Remove any partial downloads
29
28
  rm -f get-docker.sh 2>/dev/null || true
30
-
29
+
31
30
  # If we're exiting with an error, remove partial git clones we created
32
31
  if [ $exit_code -ne 0 ]; then
33
32
  for dir in "${CREATED_DIRS[@]}"; do
@@ -81,12 +80,17 @@ command_exists() {
81
80
  }
82
81
  # Check if running in interactive mode
83
82
  is_interactive() {
83
+ # Check if stdin (fd 0) and stdout (fd 1) are terminals
84
+ # Also ensure we have a proper TERM set
84
85
  if [[ -t 0 ]] && [[ -t 1 ]] && [[ "${TERM:-dumb}" != "dumb" ]]; then
85
86
  return 0
86
87
  fi
88
+
89
+ # Additional check: if /dev/tty is available and writable, we can still be interactive
87
90
  if [[ -c /dev/tty ]] && [[ -w /dev/tty ]]; then
88
91
  return 0
89
92
  fi
93
+
90
94
  return 1
91
95
  }
92
96
  # Check if running inside a container
@@ -139,7 +143,8 @@ detect_os_arch() {
139
143
  *) msg_warn "Unknown architecture: $ARCH, defaulting to amd64"; ARCH="amd64" ;;
140
144
  esac
141
145
  msg_info "Detected OS: $OS, Architecture: $ARCH"
142
-
146
+
147
+ # Detect Homebrew location for Apple Silicon
143
148
  if [[ "$OS" == "darwin" ]]; then
144
149
  if [[ -x "/opt/homebrew/bin/brew" ]]; then
145
150
  eval "$(/opt/homebrew/bin/brew shellenv)"
@@ -179,17 +184,18 @@ check_docker_running() {
179
184
  msg_ok "Docker daemon is running"
180
185
  }
181
186
  check_disk_space() {
182
- local required_mb=2048
187
+ local required_mb=2048 # 2GB minimum
183
188
  local available_mb
184
-
189
+
185
190
  if [[ "$OS" == "linux" ]]; then
186
191
  available_mb=$(df -m . 2>/dev/null | tail -1 | awk '{print $4}')
187
192
  elif [[ "$OS" == "darwin" ]]; then
188
193
  available_mb=$(df -m . 2>/dev/null | tail -1 | awk '{print $4}')
189
194
  else
195
+ # Skip check on unknown OS
190
196
  return
191
197
  fi
192
-
198
+
193
199
  if [[ -n "$available_mb" ]] && [[ $available_mb -lt $required_mb ]]; then
194
200
  msg_error "Insufficient disk space. Need ${required_mb}MB, have ${available_mb}MB"
195
201
  exit 1
@@ -198,9 +204,9 @@ check_disk_space() {
198
204
  }
199
205
  install_dependencies() {
200
206
  msg_info "Checking for dependencies..."
201
-
207
+
202
208
  MISSING_DEPS=()
203
-
209
+
204
210
  if ! command_exists git; then
205
211
  MISSING_DEPS+=("git")
206
212
  fi
@@ -210,11 +216,12 @@ install_dependencies() {
210
216
  if ! command_exists docker; then
211
217
  MISSING_DEPS+=("docker")
212
218
  fi
213
-
219
+
220
+ # Check for docker-compose (either standalone or as docker compose plugin)
214
221
  if ! (command_exists docker-compose || (command_exists docker && docker compose version >/dev/null 2>&1)); then
215
222
  MISSING_DEPS+=("docker-compose")
216
223
  fi
217
-
224
+
218
225
  if ! command_exists make; then
219
226
  MISSING_DEPS+=("make")
220
227
  fi
@@ -222,9 +229,10 @@ install_dependencies() {
222
229
  msg_ok "All dependencies (git, curl, docker, docker-compose, make) are already installed."
223
230
  return
224
231
  fi
225
-
232
+
226
233
  msg_warn "The following dependencies are missing: ${MISSING_DEPS[*]}"
227
-
234
+
235
+ # Only attempt auto-install on Linux
228
236
  if [[ "$OS" != "linux" ]]; then
229
237
  msg_error "Please install missing dependencies manually:"
230
238
  for dep in "${MISSING_DEPS[@]}"; do
@@ -235,12 +243,14 @@ install_dependencies() {
235
243
  fi
236
244
  exit 1
237
245
  fi
238
-
246
+
247
+ # Check if running in non-interactive mode
239
248
  if ! is_interactive; then
240
249
  msg_error "Running in non-interactive mode. Please install the missing dependencies manually."
241
250
  exit 1
242
251
  fi
243
-
252
+
253
+ # Check for root/sudo
244
254
  if [[ $EUID -ne 0 ]]; then
245
255
  if ! command_exists sudo; then
246
256
  msg_error "Missing dependencies require root/sudo privileges."
@@ -251,18 +261,19 @@ install_dependencies() {
251
261
  else
252
262
  SUDO_CMD=""
253
263
  fi
254
-
264
+
255
265
  echo ""
256
266
  msg_warn "Some dependencies are missing and need to be installed."
257
267
  INSTALL_DEPS=$(prompt_yesno "Would you like to install them automatically?")
258
-
268
+
259
269
  if [ "$INSTALL_DEPS" != "y" ]; then
260
270
  msg_error "Installation cannot proceed without required dependencies."
261
271
  exit 1
262
272
  fi
263
-
273
+
264
274
  msg_info "Installing dependencies..."
265
-
275
+
276
+ # Detect package manager
266
277
  if command_exists apt-get; then
267
278
  PKG_MANAGER="apt-get"
268
279
  UPDATE_CMD="$SUDO_CMD apt-get update"
@@ -288,12 +299,12 @@ install_dependencies() {
288
299
  msg_info "Please install the following packages manually: ${MISSING_DEPS[*]}"
289
300
  exit 1
290
301
  fi
291
-
302
+
292
303
  msg_info "Updating package lists..."
293
304
  if ! eval "$UPDATE_CMD"; then
294
305
  msg_warn "Failed to update package lists, continuing anyway..."
295
306
  fi
296
-
307
+
297
308
  for dep in "${MISSING_DEPS[@]}"; do
298
309
  case $dep in
299
310
  docker)
@@ -305,7 +316,8 @@ install_dependencies() {
305
316
  exit 1
306
317
  fi
307
318
  rm -f get-docker.sh
308
-
319
+
320
+ # Add current user to docker group (non-root only)
309
321
  if [[ $EUID -ne 0 ]] && command_exists usermod; then
310
322
  $SUDO_CMD usermod -aG docker "$USER" || true
311
323
  msg_info "Added $USER to docker group. You may need to log out and back in for this to take effect."
@@ -317,6 +329,7 @@ install_dependencies() {
317
329
  ;;
318
330
  docker-compose)
319
331
  msg_info "Installing docker-compose..."
332
+ # Try to install docker compose plugin first
320
333
  if [[ "$PKG_MANAGER" == "apt-get" ]]; then
321
334
  if ! eval "$INSTALL_CMD docker-compose-plugin"; then
322
335
  msg_warn "Failed to install docker-compose-plugin, trying standalone..."
@@ -326,6 +339,7 @@ install_dependencies() {
326
339
  }
327
340
  fi
328
341
  else
342
+ # For other package managers, try standalone docker-compose
329
343
  eval "$INSTALL_CMD docker-compose" || {
330
344
  msg_error "Failed to install docker-compose"
331
345
  exit 1
@@ -341,9 +355,10 @@ install_dependencies() {
341
355
  ;;
342
356
  esac
343
357
  done
344
-
358
+
345
359
  msg_ok "All dependencies installed successfully!"
346
-
360
+
361
+ # Start Docker if it was just installed
347
362
  if [[ " ${MISSING_DEPS[*]} " =~ " docker " ]]; then
348
363
  msg_info "Starting Docker service..."
349
364
  if command_exists systemctl; then
@@ -358,7 +373,8 @@ install_dependencies() {
358
373
 
359
374
  run_upgrade() {
360
375
  msg_info "Existing installation detected. Starting upgrade/installation process..."
361
-
376
+
377
+ # Upgrade Condor if it exists
362
378
  if [ -d "$CONDOR_DIR" ]; then
363
379
  msg_info "Upgrading Condor..."
364
380
  if ! (cd "$CONDOR_DIR" && git pull); then
@@ -369,12 +385,12 @@ run_upgrade() {
369
385
  else
370
386
  msg_warn "Condor directory not found, skipping Condor upgrade."
371
387
  fi
372
-
388
+ # Check if API needs to be installed (Condor exists but API doesn't)
373
389
  if [ -d "$CONDOR_DIR" ] && [ ! -d "$API_DIR" ]; then
374
390
  echo ""
375
391
  msg_info "Hummingbot API is not installed yet."
376
392
  INSTALL_API=$(prompt_yesno "Do you want to install Hummingbot API now?")
377
-
393
+
378
394
  if [ "$INSTALL_API" = "y" ]; then
379
395
  echo ""
380
396
  echo -e "${BLUE}Installing Hummingbot API:${NC}"
@@ -384,13 +400,13 @@ run_upgrade() {
384
400
  msg_error "Failed to clone Hummingbot API repository"
385
401
  exit 1
386
402
  fi
387
-
403
+
388
404
  msg_info "Setting up Hummingbot API (running: make setup)..."
389
405
  if ! (cd "$API_DIR" && make setup); then
390
406
  msg_error "Failed to run make setup for Hummingbot API"
391
407
  exit 1
392
408
  fi
393
-
409
+
394
410
  msg_info "Deploying Hummingbot API (running: make deploy)..."
395
411
  if ! (cd "$API_DIR" && make deploy); then
396
412
  msg_error "Failed to deploy Hummingbot API"
@@ -398,6 +414,7 @@ run_upgrade() {
398
414
  fi
399
415
  msg_ok "Hummingbot API installation complete!"
400
416
  fi
417
+ # Upgrade Hummingbot API if it already exists
401
418
  elif [ -d "$API_DIR" ]; then
402
419
  msg_info "Upgrading Hummingbot API..."
403
420
  if ! (cd "$API_DIR" && git pull); then
@@ -406,9 +423,9 @@ run_upgrade() {
406
423
  fi
407
424
  msg_ok "Hummingbot API repository updated."
408
425
  fi
409
-
426
+ # Pull latest images for condor and hummingbot-api only
410
427
  msg_info "Pulling latest Docker images..."
411
-
428
+
412
429
  if [ -f "$CONDOR_DIR/docker-compose.yml" ]; then
413
430
  msg_info "Updating Condor container..."
414
431
  if ! (cd "$CONDOR_DIR" && $DOCKER_COMPOSE pull); then
@@ -421,7 +438,7 @@ run_upgrade() {
421
438
  msg_warn "Failed to pull Hummingbot API images, continuing anyway..."
422
439
  fi
423
440
  fi
424
-
441
+ # Restart services
425
442
  msg_info "Restarting services..."
426
443
  if [ -f "$CONDOR_DIR/docker-compose.yml" ]; then
427
444
  if ! (cd "$CONDOR_DIR" && $DOCKER_COMPOSE up -d --remove-orphans); then
@@ -434,7 +451,7 @@ run_upgrade() {
434
451
  fi
435
452
  fi
436
453
  msg_ok "Installation/upgrade complete!"
437
-
454
+
438
455
  echo ""
439
456
  echo -e "${BLUE}Running services:${NC}"
440
457
  if [ -d "$CONDOR_DIR" ]; then
@@ -447,32 +464,33 @@ run_upgrade() {
447
464
 
448
465
  install_api_standalone() {
449
466
  msg_info "Starting Hummingbot API standalone installation..."
450
-
467
+
451
468
  SCRIPT_DIR="$(pwd)"
452
469
  msg_ok "Installation directory: $SCRIPT_DIR"
453
-
470
+
454
471
  echo ""
455
472
  echo -e "${BLUE}Installing Hummingbot API:${NC}"
456
-
473
+
457
474
  msg_info "Cloning Hummingbot API repository..."
458
475
  CREATED_DIRS+=("$API_DIR")
459
476
  if ! git clone --depth 1 "$API_REPO" "$API_DIR"; then
460
477
  msg_error "Failed to clone Hummingbot API repository"
461
478
  exit 1
462
479
  fi
463
-
480
+
464
481
  msg_info "Setting up Hummingbot API (running: make setup)..."
465
482
  if ! (cd "$API_DIR" && make setup); then
466
483
  msg_error "Failed to run make setup for Hummingbot API"
467
484
  exit 1
468
485
  fi
469
-
486
+
470
487
  msg_info "Deploying Hummingbot API (running: make deploy)..."
471
488
  if ! (cd "$API_DIR" && make deploy); then
472
489
  msg_error "Failed to deploy Hummingbot API"
473
490
  exit 1
474
491
  fi
475
-
492
+
493
+ # --- Summary ---
476
494
  echo ""
477
495
  echo -e "${GREEN}════════════════════════════════════════${NC}"
478
496
  msg_ok "Hummingbot API Installation Complete!"
@@ -481,12 +499,12 @@ install_api_standalone() {
481
499
  echo -e "${BLUE}Installation Summary:${NC}"
482
500
  msg_info "Installation directory: $SCRIPT_DIR/$API_DIR"
483
501
  msg_info "Hummingbot API is installed and running"
484
-
502
+
485
503
  echo ""
486
504
  echo -e "${BLUE}Next Steps:${NC}"
487
505
  msg_info "Check API status: cd $SCRIPT_DIR/$API_DIR && $DOCKER_COMPOSE ps"
488
506
  msg_info "View logs: cd $SCRIPT_DIR/$API_DIR && $DOCKER_COMPOSE logs -f"
489
-
507
+
490
508
  echo ""
491
509
  echo -e "${BLUE}To upgrade in the future:${NC}"
492
510
  msg_info "Run: cd $SCRIPT_DIR/$API_DIR && git pull && make deploy"
@@ -494,10 +512,10 @@ install_api_standalone() {
494
512
 
495
513
  run_installation() {
496
514
  msg_info "Starting new installation..."
497
-
515
+
498
516
  SCRIPT_DIR="$(pwd)"
499
517
  msg_ok "Installation directory: $SCRIPT_DIR"
500
-
518
+ # --- Clone and Setup Condor ---
501
519
  echo ""
502
520
  echo -e "${BLUE}Installing Condor Bot:${NC}"
503
521
  msg_info "Cloning Condor repository..."
@@ -506,7 +524,8 @@ run_installation() {
506
524
  msg_error "Failed to clone Condor repository"
507
525
  exit 1
508
526
  fi
509
-
527
+
528
+ # Run Condor's setup-environment.sh script
510
529
  msg_info "Running Condor setup script..."
511
530
  if [ -f "$CONDOR_DIR/setup-environment.sh" ]; then
512
531
  if ! (cd "$CONDOR_DIR" && bash setup-environment.sh); then
@@ -517,34 +536,35 @@ run_installation() {
517
536
  msg_error "Condor setup-environment.sh not found"
518
537
  exit 1
519
538
  fi
520
-
539
+
521
540
  msg_info "Deploying Condor (running: make deploy)..."
522
541
  if ! (cd "$CONDOR_DIR" && make deploy); then
523
542
  msg_error "Failed to deploy Condor"
524
543
  exit 1
525
544
  fi
526
545
  msg_ok "Condor installation complete!"
527
-
546
+
547
+ # --- Prompt for API Installation ---
528
548
  echo ""
529
549
  INSTALL_API=$(prompt_yesno "Do you also want to install Hummingbot API on this machine?")
530
-
550
+
531
551
  if [ "$INSTALL_API" = "y" ]; then
532
552
  echo ""
533
553
  echo -e "${BLUE}Installing Hummingbot API:${NC}"
534
-
554
+
535
555
  msg_info "Cloning Hummingbot API repository..."
536
556
  CREATED_DIRS+=("$API_DIR")
537
557
  if ! git clone --depth 1 "$API_REPO" "$API_DIR"; then
538
558
  msg_error "Failed to clone Hummingbot API repository"
539
559
  exit 1
540
560
  fi
541
-
561
+
542
562
  msg_info "Setting up Hummingbot API (running: make setup)..."
543
563
  if ! (cd "$API_DIR" && make setup); then
544
564
  msg_error "Failed to run make setup for Hummingbot API"
545
565
  exit 1
546
566
  fi
547
-
567
+
548
568
  msg_info "Deploying Hummingbot API (running: make deploy)..."
549
569
  if ! (cd "$API_DIR" && make deploy); then
550
570
  msg_error "Failed to deploy Hummingbot API"
@@ -552,7 +572,7 @@ run_installation() {
552
572
  fi
553
573
  msg_ok "Hummingbot API installation complete!"
554
574
  fi
555
-
575
+ # --- Summary ---
556
576
  echo ""
557
577
  echo -e "${GREEN}════════════════════════════════════════${NC}"
558
578
  msg_ok "Installation Complete!"
@@ -564,7 +584,7 @@ run_installation() {
564
584
  if [ "$INSTALL_API" = "y" ]; then
565
585
  msg_info "Hummingbot API is installed and running"
566
586
  fi
567
-
587
+
568
588
  echo ""
569
589
  echo -e "${BLUE}Next Steps:${NC}"
570
590
  msg_info "1. Open Telegram and start a chat with your Condor bot"
@@ -573,14 +593,14 @@ run_installation() {
573
593
  if [ "$INSTALL_API" = "y" ]; then
574
594
  msg_info "4. Check API status: cd $SCRIPT_DIR/$API_DIR && $DOCKER_COMPOSE ps"
575
595
  fi
576
-
596
+
577
597
  echo ""
578
598
  echo -e "${BLUE}Management Commands:${NC}"
579
599
  msg_info "View Condor logs: cd $SCRIPT_DIR/$CONDOR_DIR && $DOCKER_COMPOSE logs -f"
580
600
  if [ "$INSTALL_API" = "y" ]; then
581
601
  msg_info "View API logs: cd $SCRIPT_DIR/$API_DIR && $DOCKER_COMPOSE logs -f"
582
602
  fi
583
-
603
+
584
604
  echo ""
585
605
  echo -e "${BLUE}To upgrade in the future:${NC}"
586
606
  msg_info "Run this script with --upgrade flag: bash $0 --upgrade"
@@ -589,7 +609,7 @@ run_installation() {
589
609
  clear
590
610
  echo -e "${GREEN}"
591
611
  cat << "BANNER"
592
- ██████╗ ██████╗ ███╗ ██╗██████╗ ██████╗ ██████╗
612
+ ██████╗ ██████╗ ███╗ ██╗██████╗ ██████╗ ██████╗
593
613
  ██╔════╝██╔═══██╗████╗ ██║██╔══██╗██╔═══██╗██╔══██╗
594
614
  ██║ ██║ ██║██╔██╗ ██║██║ ██║██║ ██║██████╔╝
595
615
  ██║ ██║ ██║██║╚██╗██║██║ ██║██║ ██║██╔══██╗
@@ -605,6 +625,7 @@ install_dependencies
605
625
  check_docker_running
606
626
  detect_docker_compose
607
627
 
628
+ # Handle --api flag for standalone API installation
608
629
  if [ "$API_ONLY_MODE" = "y" ]; then
609
630
  if [ -d "$API_DIR" ]; then
610
631
  msg_warn "Hummingbot API directory already exists at $API_DIR"
@@ -621,6 +642,7 @@ if [ "$API_ONLY_MODE" = "y" ]; then
621
642
  exit 0
622
643
  fi
623
644
 
645
+ # Determine installation or upgrade path
624
646
  if [ "$UPGRADE_MODE" = "y" ] || ([ -d "$CONDOR_DIR" ] && [ -d "$API_DIR" ]) || ([ -d "$CONDOR_DIR" ] && [ -f "$CONDOR_DIR/docker-compose.yml" ]); then
625
647
  run_upgrade
626
648
  else
@@ -2,9 +2,10 @@
2
2
  name: keys-manager
3
3
  description: Manage exchange API keys and credentials for Hummingbot trading. Use this skill when the user wants to add, remove, or list API credentials for exchanges like Binance, Coinbase, Kraken, etc.
4
4
  license: Apache-2.0
5
+ creator-github-handle: cardosofede
5
6
  ---
6
7
 
7
- # Hummingbot Keys Skill
8
+ # keys-manager
8
9
 
9
10
  This skill manages exchange API keys and credentials for Hummingbot. It uses **progressive disclosure** to guide users through the setup process step by step.
10
11
 
@@ -4,6 +4,8 @@
4
4
 
5
5
  set -e
6
6
 
7
+ # Load .env if present (check current dir, ~/.hummingbot/, ~/)
8
+ for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
7
9
  API_URL="${API_URL:-http://localhost:8000}"
8
10
  API_USER="${API_USER:-admin}"
9
11
  API_PASS="${API_PASS:-admin}"
@@ -4,6 +4,8 @@
4
4
 
5
5
  set -e
6
6
 
7
+ # Load .env if present (check current dir, ~/.hummingbot/, ~/)
8
+ for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
7
9
  API_URL="${API_URL:-http://localhost:8000}"
8
10
  API_USER="${API_USER:-admin}"
9
11
  API_PASS="${API_PASS:-admin}"
@@ -4,6 +4,8 @@
4
4
 
5
5
  set -e
6
6
 
7
+ # Load .env if present (check current dir, ~/.hummingbot/, ~/)
8
+ for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
7
9
  API_URL="${API_URL:-http://localhost:8000}"
8
10
  API_USER="${API_USER:-admin}"
9
11
  API_PASS="${API_PASS:-admin}"
@@ -4,6 +4,8 @@
4
4
 
5
5
  set -e
6
6
 
7
+ # Load .env if present (check current dir, ~/.hummingbot/, ~/)
8
+ for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
7
9
  API_URL="${API_URL:-http://localhost:8000}"
8
10
  API_USER="${API_USER:-admin}"
9
11
  API_PASS="${API_PASS:-admin}"
@@ -4,6 +4,8 @@
4
4
 
5
5
  set -e
6
6
 
7
+ # Load .env if present (check current dir, ~/.hummingbot/, ~/)
8
+ for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
7
9
  API_URL="${API_URL:-http://localhost:8000}"
8
10
  API_USER="${API_USER:-admin}"
9
11
  API_PASS="${API_PASS:-admin}"
@@ -15,6 +15,8 @@
15
15
 
16
16
  set -e
17
17
 
18
+ # Load .env if present (check current dir, ~/.hummingbot/, ~/)
19
+ for f in .env ~/.hummingbot/.env ~/.env; do [ -f "$f" ] && source "$f" && break; done
18
20
  API_URL="${API_URL:-http://localhost:8000}"
19
21
  API_USER="${API_USER:-admin}"
20
22
  API_PASS="${API_PASS:-admin}"