@mainframe/cli

Mainframe CLI

Usage no npm install needed!

<script type="module">
  import mainframeCli from 'https://cdn.skypack.dev/@mainframe/cli';
</script>

README

Mainframe CLI

Usage

# In packages/cli
./bin/run

Commands

  • env:create: create a new environment
  • env:default: get or set the default environment to use
  • env:delete: delete an environment
  • env:list: list the environments
  • daemon:setup: configure the daemon binary and socket paths
  • daemon:status: display the daemon running status and socket path
  • daemon:start: start the daemon using the store configuration
  • daemon:stop: start the daemon using the store configuration
  • client:repl: open a node REPL with an injected client object connected to the daemon
  • client:setup: ensure the environment has a default vault setup
  • vault:create: create a vault
  • vault:delete: delete a vault
  • vault:list: list existing vaults
  • vault:settings: set and/or display a vault settings
  • graphql:query: execute a GraphQL query
  • graphql:schema: write the GraphQL schema
  • graphql:server: create a HTTP proxy for GraphQL queries
  • identity:create: create an identity
  • identity:list: list identities
  • app:create: create an app
  • app:publish: publish the app to Swarm
  • wallet:createEth: create a new Ethereum wallet
  • wallet:connectLedgerAccount: connect an account from ledger hardware wallet
  • wallet:delete: delete a wallet
  • wallet:importEth: import an Ethereum wallet

Environment setup

  1. Run env:create to create a new environment, set it as default unless you want to provide it explicitly in the next commands
  2. Run daemon:setup to configure the path to the daemon CLI, ex ./bin/run daemon:setup --bin-path=../daemon/bin/run
  3. Run daemon:start to start the daemon, use DEBUG="mainframe:*" ./bin/run daemon:start to see the logs
  4. Run client:setup to create a new vault and configure it to be used by default
  5. Run client:repl to start interacting with the daemon