cli
cli copied to clipboard
Daemon not detected when directly started from hyperspace
When I start hypercore with hyperspace --storage $STORAGE --host $HOST --port $PORT
, then run:
❯ ps -aux | rg hyp
jrestivo 1067902 0.1 0.0 635796 54572 ? SLsl 11:08 0:00 /nix/store/5kkjf5wvfvclqj76k9f69c95gw5mfbhc-nodejs-14.17.4/bin/node /nix/store/if04chi2qyhxr5mvifmq9wfhswydj3ms-hyperspace/bin/hyperspace --storage ~/.hyperspace --host hyperspace --port 0
jrestivo 1069029 0.0 0.0 9644 6232 pts/11 S+ 11:11 0:00 rg hyp
flakes [$!+?]
❯ hyp info
The daemon is not active. Please run:
hyp daemon start
❯ hyp daemon status
Hyperspace v3.19.0
Hyperspace API v1.15.1
Your address: (Not Hole-punchable)
This is preventing me from using any of the hyp
commands. Any advice? Both hyp info
and hyp daemon start
connect to the daemon, as it prints out:
Remote client opened
Remote client closed
If you're using a --host
other than the default, you'll need to pass that param to hyp daemon status
too
I've added --host
to both invocations. Same output:
❯ hyp --host hyperspace info
The daemon is not active. Please run:
hyp daemon start
❯ hyp --host hyperspace daemon status
Hyperspace v3.19.0
Hyperspace API v1.15.1
Your address: (Not Hole-punchable)
Ah, it looks like the hyp
CLI isn't respecting this config: https://github.com/hypercore-protocol/cli/blob/master/lib/hyper/index.js#L16 and https://github.com/hypercore-protocol/cli/blob/master/lib/commands/daemon/status.js#L20 (and a few other spots)
We should either add a CLI flag or an env var. Any thoughts on which?
cc @andrewosh @mafintosh
What would the CLI flag/env var be specifying? From a usability standpoint, either sounds fine on my end as a user.
I tried making some local modifications to this for testing and I would also mention that the hyperspace-mirroring-service
is also a daemon that needs to be running for the CLI to work. I've been trying for the last while to get that running in a Docker container and I can't make sense of it; its pretty ambiguous.