Prisma1: Prisma 1.0: New CLI commands layout

Created on 27 Nov 2017  路  14Comments  路  Source: prisma/prisma1

Database service:
  init            Initialize a new service
  deploy          Deploy service changes (or new service)
  info            Display service information (endpoints, cluster, ...)
  token           Create a new service token
  list            List all deployed services
  delete          Delete an existing service

Data workflows:
  playground      Open service endpoints in GraphQL Playground
  import          Import data into a service
  export          Export service data to local file
  reset           Reset the stage data

Cloud:
  login           Login or signup to Graphcool Cloud
  console         Open Graphcool Console in browser
  account         Display account information

Local development:
  local start     Start local development cluster
  local stop      Stop local development cluster
  local upgrade   Upgrade to the latest (or specific) cluster version
  local nuke      Hard-reset local development cluster

Clusters:
  cluster list    List all clusters
  cluster logs    Output cluster logs
  cluster add     Add an existing cluster
  cluster remove  Remove cluster
arecli rf2-accepted

Most helpful comment

Makes sense, @schickling!

I still think --cluster would help a lot, I am usually interested in services for a specific cluster and all other services are just noise.

All 14 comments

@timsuchanek please add the proposal/accepted label when you think this is final

the graphcool playground command should generate a jwt that is valid for the service and automatically add the header:

Authorization: "Bearer ${valid jwt}"

As described in 1328 each stage has their own secret, so the CLI or Playground has to support this somehow.

list            List all deployed services
clusters        List all clusters
  • I prefer services and clusters.
  • Also, I propose a --cluster parameter for services to only list services for a certain cluster:
graphcool services # services of all clusters
graphcool services -c local # only local services

The reasoning behind list instead of services was to make services the "default entity". That's why there's also graphcool delete and graphcool deploy. While I see your point of this seeming inconsistent, I think this is a solid tradeoff.

Makes sense, @schickling!

I still think --cluster would help a lot, I am usually interested in services for a specific cluster and all other services are just noise.

@timsuchanek also keep https://github.com/graphcool/framework/issues/1408 in mind 馃檪

prisma clusters should show cluster version

Would it make sense to turn

prisma clusters

into one of:

prisma cluster ls
prisma cluster list

This would enable us to add more cluster commands in the future. It also fit with commands such as docker volume ls

Thanks a lot for this feedback @sorenbs. Here is a new design proposal:

image

How will prisma list function with regards to clusters (https://github.com/graphcool/prisma/issues/1330#issuecomment-352189293)?

@kbrandwijk
image

@kbrandwijk I opened a separate discussion about prisma list here: https://github.com/graphcool/prisma/issues/1493

Currently, all stages of all services are listed. With my proposed behaviour in the linked issue, I don't think a --cluster switch is necessary anymore.

This has been implemented in Prisma 1.0. For a reference list of CLI commands, consult the documentation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ragnorc picture ragnorc  路  3Comments

marktani picture marktani  路  3Comments

akoenig picture akoenig  路  3Comments

tbrannam picture tbrannam  路  3Comments

sorenbs picture sorenbs  路  3Comments