Closed Sylvestre67 closed 9 months ago
How are you going to show a thumbnail of the project in the command line? And won’t this require re-inventing UI that we already have on the platform, such as the share modal (if you want to set permissions at the same time that you’re deploying a project for the first time)?
I’m all for having CLI-only as a backup for edge cases like running the CLI on a remote machine, but I don’t think we should optimize for that, and I think going this route may discourage us from leveraging the strengths of the platform.
Projects don't have thumbnails, though I take your point to mean that the web can offer a richer UI than the CLI.
I think that we will end up making a lot of that UI in both places, eventually. That's because if a user starts their journey in one place, I think we should help them stay in that place as long as they want to.
Github's gh
has a good example here: its command to create a pull request. It doesn't expose every option available when creating a PR, but it has options for common ones, and an escape hatch to continue on the web.
If a user starts by creating a project on the website, we can give them an easy command to paste into the command line. (or maybe even hooking up a Github repo to deploy without ever touching a CLI). This again keeps them in the environment they started in as much as possible.
Per #606, anything we build for this issue should probably use @clack/prompts
.
Fixed by #634.
(Written by @mythmon) Selecting a project, or defining the details of a newly created project, should not require hand-editing the
observable.config.ts
file.There have been two proposals for how to do this:
The web UI sounds nice in some cases, and gives us a lot of integration with the rest of the flow (like automatic authentication, and other niceties), but recent experience with the authentication system has shown us that communicating from the browser to the CLI is hard to do reliably.
Instead I suggest we stay entirely on the CLI, with the exception of
observable login
. There are a lot of tools that we can draw inspiration from (such as Cloudflare's Wrangler and Github'sgh
).We might continue to roll our own, or use a library like. Per #606 lets useprompts
(used in Create),enquirer
,inquirer
, or@clack/prompts
.@clack/prompts
.I don't think we should use a more opinionated library like
ink
.