Skip to content

feat: add NSB manager CLI for service lifecycle management - #15

Open
EclipseWraith wants to merge 1 commit into
nsb-ucsc:mainfrom
EclipseWraith:feat/nsb-manager-cli
Open

EclipseWraith wants to merge 1 commit into
nsb-ucsc:mainfrom
EclipseWraith:feat/nsb-manager-cli

Conversation

@EclipseWraith

Copy link
Copy Markdown

Summary

Added a CLI tool to manage NSB services (Redis + daemon) from a single
interface, replacing the need to manually run multiple commands across
multiple terminals.

Usage

python nsb_manager.py start   -c config.yaml   # start Redis + daemon
python nsb_manager.py stop    -c config.yaml   # stop all services
python nsb_manager.py status  -c config.yaml   # check what's running
python nsb_manager.py restart -c config.yaml   # restart everything

What it does

  • Reads config.yaml to determine ports and settings
  • Starts/stops Redis and nsb_daemon as a pair
  • Checks for port conflicts before starting
  • Auto-discovers the nsb_daemon binary in build/ or system PATH
  • Reports clear status with service state, ports, and config info

Before vs After

Before (5 manual commands):
redis-server --port 5050 --daemonize yes
redis-cli -p 5050 ping
cd build && ./nsb_daemon ../config.yaml &
kill $(lsof -t -i:65432)
redis-cli -p 5050 shutdown

After (1 command):
python nsb_manager.py start -c config.yaml

Testing

Verified on WSL Ubuntu 24.04. All services start, stop, and restart
correctly. Client connectivity confirmed after manager-initiated startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant