Overview

Build by drizzle team

Tento - is simple yet powerful API for working with Shopify data, including metaobjects, metafields and products. It also provides a CLI tool for two-way synchronization between your local schema definition and Shopify.

npm
yarn
pnpm
bun
npm i @drizzle-team/tento
import { tento } from '@drizzle-team/tento';
import * as schema from './schema';

const client = tento({ schema });

await client.metaobjects.designer.list();

Schema

Tento lets you declare a definition schema with both metaobjects and metafields. It serves as the source of truth for queries and migrations.

import { metaobject } from "@drizzle-team/tento";

export const designer = metaobject({
  name: "Designer",
  type: "designer",
  fieldDefinitions: (f) => ({
    name: f.singleLineTextField(),
  }),
});

Metaobjects

Tento represents Shopify Metaobject API.

await client.metaobjects.designer.list();

Metafields

Tento represents Shopify Metafield API. Now you can declare your schema file with metafield definitions and use it for metaobject definition reference, products.

Products

Tento represents Shopify Product API.

await client.products.list();

Migrations

Tento has a CLI tool for managing Shopify Metaobjects and Metafields schema definitions.

npm
yarn
pnpm
bun
npx tento pull
npx tento push
export default defineConfig({
  schemaPath: './src/schema.ts',
  shop: process.env.SHOPIFY_SHOP_ID!,
  headers: {
    'X-Shopify-Access-Token': process.env.SHOPIFY_ACCESS_TOKEN!,
  },
});

What’s next?