ipfs / ipfs/kubo

Consider making the init command interactive

Open
#4,877 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

**Feature**

(This is a continuation of a discussion started over at https://github.com/ipfs/go-ipfs/issues/4843#issuecomment-375335964, 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.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.