Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider making the init command interactive #4877

Open
Mr0grog opened this issue Mar 26, 2018 · 1 comment
Open

Consider making the init command interactive #4877

Mr0grog opened this issue Mar 26, 2018 · 1 comment

Comments

@Mr0grog
Copy link
Contributor

Mr0grog commented Mar 26, 2018

Feature

(This is a continuation of a discussion started over at #4843 (comment), so it might be worth reading that for background. It was a little off-topic there, so I thought I’d open a new issue.)

I think @nothingismagick has a pretty valid point in #4843 — not configuring IPFS right for a given situation can potentially put someone in pretty hot water. The --profile option can (should?) really help solve that problem, but in order for people to use it, they need to know it exists and what the possible values are.

I know presenting an interactive prompt would be a breaking change, but the unfortunate reality of us human beings is that we almost always try things first and read the directions second (and even then, often only when we hit a problem). While it’s totally my job to make sure the profiles get surfaced better in the new docs site, most people will still only see and pay attention to the docs on that feature after they set up IPFS.

I think it would be a real valuable change to:

  • Prompt the user to choose a profile (or none — none can absolutely be an option) unless the --profile option is set or they are pointing to a non-default config file.

  • Add a --non-interactive (or --yes or --force or --defaults or whatever floats your boat) flag to support script-based workflows.

I also think it’s important that the interactive mode is the default mode, not something turned on with a special flag. Again, the value of the interactive guidance is greatest when people don’t know all the options and features — which means they are also less likely to know that there’s a special interactive mode they can turn on. There’s a real reason tools like npm init or aws configure or apt install include prompt-based guidance by default — it’s often the difference between a large number of users getting things wrong without even knowing it and almost all users getting it right the first time. That’s a huge deal.

(P.S. This would almost certainly be useful for a variety of other config features, like Datastore.StorageMax, the type of datastore to use, Swarm.EnableRelayHop, etc.)

@nothingismagick
Copy link

Thanks @Mr0grog for championing this idea. For a reminder, the situation that both @ZenGround0 (on a university network) and I (on a rental-box in a data-center) just faced - was first raised almost 3 years ago by @cinderblock #1226

It's great that @Kubuxu updated that issue a few days ago with the solution, but as you just said (and was the case for me) I didn't know I had the problem until it was too late. (Yes, I also tend to read the docs after things break...)

For what its worth, I fished this comment out of that thread:

@jbenet wrote:

I've also been wanting an ipfs init --interactive that asks users questions like:

enter peer ID keysize (2048):
bootstrap to public network (yes):
dial local network addresses (yes):
enable mdns service discovery (yes):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants