Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 1.49 KB

File metadata and controls

55 lines (41 loc) · 1.49 KB

@graphprotocol/hypergraph-cli

Hypergraph command-line toolchain for scaffolding and working with Hypergraph applications.

Installing

# npm
npm i -g @graphprotocol/hypergraph-cli

# yarn
yarn global add @graphprotocol/hypergraph-cli

# pnpm
pnpm install -g @graphprotocol/hypergraph-cli

Running

hypergraph --help
hg --help   # short alias

# opening TypeSync
hypergraph typesync
hg typesync

# opening TypeSync in firefox automatically
hypergraph typesync --open --browser firefox

Commands

  • typesync -> runs the Hypergraph API and client UI application for viewing created application schemas, browsing the Knowledge Graph, and creating new application schemas.
    • running: hypergraph typesync
    • args:
      • port [OPTIONAL, default = 3000] port to run the application on
        • example: hypergraph typesync --port 3001
      • browser [OPTION, default 'browser'] browser to open the app in, if the --open flag is passed
        • example: hypergraph typesync --open --browser firefox

Generating & running a new app

  1. Start TypeSync:
    hypergraph typesync
  2. In the UI click Generate App and choose a name (e.g. awesome-app). When the toast shows the path, the scaffold is ready and all dependencies are already installed.
  3. Run it:
    cd awesome-app
    pnpm dev

No additional pnpm install is necessary – the generator takes care of adding the app to the workspace and installing its dependencies for you.