tursodatabase / turso-cli

Command line interface to Turso.
https://turso.tech
MIT License
224 stars 37 forks source link

Ask user if they want a replica on first `turso db create` #457

Closed penberg closed 1 year ago

penberg commented 1 year ago

To make the turso db replicate command discoverable, let's figure out a good location for replica and ask the user when they create their first database.

For example:

turso db create
Database created in Amsterdam (ams)
Would you want to create a replica in  Ashburn, Virginia (US) (iad)? (y/n)
CodingDoug commented 1 year ago

I have some constraints that I'd want to see on this:

  1. Transparency about the suggestion. What is it that makes the suggested location worthwhile? Without context, this feels like an unwelcome upsell tactic.
  2. This should only prompt if the command is being run from an interactive tty. A prompt here would break automation scripts.
  3. This suggestion should not happen if the account has reached its limit for number of databases.