tablelandnetwork / studio

Discover, design, deploy, and manage data driven web3 apps on Tableland.
https://studio.tableland.xyz
4 stars 1 forks source link

(cli) add status command to show current session values #179

Closed joewagner closed 9 months ago

joewagner commented 9 months ago

NOTE: This is RFR but needs to wait until after #178 is resolved

Overview

The CLI user's current login session context and wallet contains quite a bit of information which will become more difficult to keep track of as more properties are available in the context. The PR introduces a status command which prints the user's wallet address and the current context values, e.g. project, team, chain, etc...

Details

At any point you can run npx studio status and you'll see and output similar to the example below:

logged in as: {
    "user": {
        "address": "0xd535bAd504CDd77e2C51dE26F416693DF7a01ac8",
        "teamId": "0fc35500-1b1f-41ff-bb1c-0b581f91c843"
    },
    "personalTeam": {
        "id": "0fc35500-1b1f-41ff-bb1c-0b581f91c843",
        "name": "joe",
        "slug": "joe",
        "personal": 1
    }
}
context: {
  team: undefined,
  project: undefined,
  api: https://studio.tableland.xyz,
  chain: undefined,
  provider: http://127.0.0.1:8545
}

closes https://linear.app/tableland/issue/ENG-557/cli-add-a-status-command-that-shows-the-state-of-a-user-config

linear[bot] commented 9 months ago

ENG-557 CLI: add a `status` command that shows the state of a user config.