Skip to main content

Quick start

This page will show you how to install the different components used by Metatype.

You will learn
  • how to install the meta CLI
  • how to install the typegraph SDK
  • how to run a typegate node

1. Meta CLI


Metatype is only supported on macOS and Linux. Windows users should use Linux on Windows with WSL.

You can download the binary from the releases page, make it executable and add it to your PATH or use the automated method below.

# the installer may ask for your password
curl -fsSL | bash

# (optional, read below) install libwasmedge and...
curl -sSf | bash -s -- -v $WASMEDGE_VERSION
# (linux) ...add it to dynamic libraries path
export LD_LIBRARY_PATH=~/.wasmedge/lib
# (macos) ...add it to dynamic libraries path
export DYLD_LIBRARY_PATH=~/.wasmedge/lib
# consider permanently adding this to your shell rc

# (for later) upgrade to a newer version
meta upgrade

A thin version of the cli that doesn't rely on libwasmedge is also provided. This version of the cli doesn't offer the typegate command that lets you spin up a typegate for development purposes. To install it, you can pass META_THIN=1 environment variable to the installer script or download it from the github relases.

2. Typegraph SDK

Typegraph version

Install the @typegraph/sdk package from npm using your preferred package manager and runtime. The SDK requires Node 16+ with Typescript 4.7+, Deno 1.28+ or Bun 1+.

# using pnpm
pnpm add @typegraph/sdk

# using npm
npm install @typegraph/sdk

# using yarn
yarn add @typegraph/sdk

# using Deno
import { ... } from "npm:@typegraph/sdk/mod.ts";

# using Bun
bun add @typegraph/sdk

When using Node, make sure to add this to your Typescript configuration:

    "moduleResolution": "node16", // Or "nodenext"

3. Typegate node

With Metatype Cloud

This is the easiest way to get started, yet it's not publicly accessible. You can sign up for the private beta below.

With Docker

Install Docker and use the following compose.yml to launch a typegate node. Redis is the single required dependency, however in practice you will want to add database or other systems that the typegate can connect to.

- "7890:7890"
- "host.docker.internal:host-gateway"
# only for dev, generate secure values for production
TG_SECRET: "a4lNi0PbEItlFZbus1oeH/+wyIxi9uH6TpL8AIqIaMBNvp7SESmuUBbfUwC0prxhGhZqHw8vMDYZAGMhSZ4fLw=="
REDIS_URL: redis://:password@redis:6379/0
DEBUG: "true"
- redis

image: redis:7
restart: always
command: --requirepass password
# launch the containers
docker compose up --detach

# watch the typegate logs
docker compose logs typegate --follow

4. Verify your installation

The doctor subcommand will attempt to detect all the components and report any potential issue. Please make sure to run it before opening an issue and include the output in your report.

meta doctor

5. Install the development tools (Optional)


🚧 This is a work in progress and still experimental.

The development tools provide some additional real-time diagnostics on the typegraph definition and autocompletion (WIP).

Currently, it only works for TypeScript/JavaScript typegraph definitions and the VS Code editor.

VS Code

VS Code users can use the VSCode extension for Metatype.

To install it, launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

ext install metatypedev.vscode-metatype

Alternatively, you can download the .vsix file from the releases page and manually install the extension.