Native Shell
Native Shell은 모든 플랫폼의 앱 안에서 만들어지는 AI UI입니다
dify DSL 내보내기·불러오기·인스턴스 간 마이그레이션 도구, 증분 백업·정기 작업·다중 저장소 지원, npx로 바로 사용
🌊 dify dsl导出、导入与跨实例迁移工具,支持增量备份、定时任务、多存储后端(本地 / Git / S3 / OSS / COS 等)以及 MCP Server 集成。Node.js 编写,无需安装,通过 npx 直接使用。
개발 도구TypeScript · ShellGitHub @linhai0872직접 설치운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
설치형 프로젝트는 배포 도메인 없이도 확인할 수 있습니다. 개인 저장소는 GitHub 로그인으로, 조직 저장소는 위의 저장소 확인 파일로 직접 확인해 주세요.
메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Dify 应用 DSL 的一站式管道工具,涵盖导出、导入、备份、迁移、定时服务与 MCP Server 集成。
无需安装,通过 npx 命令即可直接使用。
无需安装,通过 npx 即可直接运行:
# 将所有应用导出到 ./dify-backup
npx dify-dsl-pipe export --url https://your-dify.com/console/api --token YOUR_TOKEN
# 也可以使用邮箱和密码认证
npx dify-dsl-pipe export --url https://your-dify.com/console/api \
--email [email protected] --password your-password
# 导入到目标实例(建议先以预览模式确认)
npx dify-dsl-pipe import --url https://target-dify.com/console/api --token TOKEN \
--source ./dify-backup --dry-run
# 交互式初始化配置文件
npx dify-dsl-pipe init
# 一条命令跨实例迁移:默认预演,确认后加 --yes 执行
npx dify-dsl-pipe init --name prod --url https://dify.prod.com/console/api --token PROD_TOKEN
npx dify-dsl-pipe init --name staging --url https://dify.staging.com/console/api --token STAGING_TOKEN
npx dify-dsl-pipe migrate --from prod --to staging # 预演
npx dify-dsl-pipe migrate --from prod --to staging --yes # 执行导入
# 对比备份与线上差异;--check 发现漂移即退出码 1(CI 用)
npx dify-dsl-pipe diff --profile prod --source ./dify-backup --check
# 离线检查备份目录能否干净导入
npx dify-dsl-pipe lint --source ./dify-backup
--url需指向 Console API,地址以/console/api结尾。
导入(
import/migrate)的 workflow / advanced-chat 应用默认只写入草稿,目标实例的 Service API / Web App 不会立即生效;加--publish在导入后自动发布(覆盖导入时线上仍运行旧发布版本,发布后才切换)。
在支持 Skill 协议的 AI 工具(Claude Code、Cursor、OpenCode 等)中安装 Skill,通过显式调用驱动操作:
# 安装 Skill
npx skills add linhai0872/dify-dsl-pipe
安装后,在 AI 对话中用 /dify-dsl-pipe 显式唤起,然后描述你的需求:
/dify-dsl-pipe帮我把生产环境的所有 workflow 应用备份到本地,地址是 https://dify.example.com/console/api
Skill 会识别意图、补充缺失信息,并自动组装命令执行,全程无需手动输入参数。
| 文档 | 内容 |
|---|---|
| CLI 参数参考 | export / import / migrate / diff / lint / serve 所有参数详表 |
| 存储后端配置 | local / git / MinIO / AWS S3 / Cloudflare R2 / 阿里云 OSS / 腾讯云 COS / 火山云 TOS |
| 配置文件参考 | dify-pipe.yaml 完整字段说明 |
| 定时备份服务 | serve 模式、HTTP API 端点、cron 任务管理 |
| MCP Server 集成 | 配置 AI 工具直连 Dify |
运行 npx dify-dsl-pipe init 交互式创建,或手动建立 dify-pipe.yaml:
instances:
- name: prod
url: "https://dify.prod.com/console/api"
token: "prod-token"
- name: staging
url: "https://dify-staging.com/console/api"
token: "staging-token"
profiles:
prod:
instance: prod
storage:
type: local
path: "./backup/prod"
staging:
instance: staging
storage:
type: local
path: "./backup/staging"
npx dify-dsl-pipe export --profile prod
npx dify-dsl-pipe import --profile staging --source ./backup/prod
原 Python 版(dify-dsl-exporter)用户:配置文件格式已完全变更,请运行 npx dify-dsl-pipe init 重新生成 dify-pipe.yaml。认证方式向下兼容,仍支持 email+password;存储后端统一为 --storage s3 + --s3-endpoint,各云厂商 endpoint 配置详见存储后端文档。
MIT