---
name: php186-skill-80499
description: "一个基于源码的 Hygraph Management SDK ASE 技能，Hygraph Management SDK 是通过代码优先迁移来管理 Hygraph 项目模式的 JavaScript 包。它非常适合需要可重复的内容模型更改、环境感知的模式更新以及预演迁移预览的代理工作流程。"
---

# Hygraph 管理 SDK 用于模式迁移自动化

## Hygraph 管理 SDK 用于模式迁移自动化

 

A source-backed ASE skill for the Hygraph Management SDK, the JavaScript package for managing Hygraph project schema through code-first migrations. It is a good fit for agent workflows that need repeatable content-model changes, environment-aware schema updates, and dry-run migration previews.

 

## Prerequisites

 

Node.js, a Hygraph auth token, and a Hygraph environment endpoint

 

## Installation

 

Use the upstream install or setup path that matches your environment:

 

- npm install @hygraph/management-sdk --save-dev
- To update the Management API schema this SDK depends on you must run npm run generate.

 

Requirements and caveats from upstream:

 

- const { newMigration, FieldType } = require("@hygraph/management-sdk");
- const { newMigration } = require("@hygraph/management-sdk");
- const { FieldType } = require("@hygraph/management-sdk");

 

Basic usage or getting-started notes:

 

- js
- const migration = newMigration({ endpoint: "...", authToken: "..." });
- const author = migration.createModel({
- Source: https://github.com/1991513ccie-png/skills
- Extracted from upstream docs: https://raw.githubusercontent.com/hygraph/management-sdk/HEAD/README.md

 

## Documentation

 

- https://hygraph.com/docs/api-reference/developer-tools/management-sdk
