dify-setup
v0.2.1
Published
Bootstrap a Dify frontend development environment from a single CLI entry point.
Downloads
860
Maintainers
Readme
dify-setup
dify-setup is a Node.js CLI that prepares a local Dify frontend development environment.
Prerequisites
- macOS
- Node.js 22.18+ available on the machine
pnpmavailable via Corepack is recommended- Google Chrome
- GitHub CLI (
gh) authenticated for the target account - Manual Chrome extension loading is still required during the plugin phase
Recommended setup:
- install Node.js with
fnm - enable
pnpmwith Corepack:npm install --global corepack@latestcorepack enable pnpm
Commands
npx dify-setup initnpx dify-setup doctornpx dify-setup plugin
init starts the Dify frontend dev server in the background during the runtime phase. When startup succeeds, the CLI prints the reachable local URL, reuses an existing reachable frontend when one is already running, tells you how to stop a CLI-started server, and writes runtime logs to ~/.dify-setup/runtime.log.
At the workspace step, init asks whether to use the current directory or a custom path. It no longer assumes a fixed default clone path.
After you confirm a path, the CLI shows a workspace loading state while it checks the directory and, when needed, clones the Dify repository.
By default, the final login-sync step targets https://cloud.dify.ai, which matches the default API prefixes written to web/.env.local.
Local workflows
vp installvp configvp checkvp test runvp packvp staged
vp check is the static quality gate for this project. With lint.options.typeCheck: true enabled in vite.config.ts, it already includes TypeScript type checking.
vp staged reads rules from the staged block in vite.config.ts. To make those checks run automatically at commit time, run vp config once after cloning the repository. Vite+ installs local Git hooks under .vite-hooks/, which should remain local setup output rather than tracked project files.
Configuration
Copy dify-setup.config.example.json to dify-setup.config.json and override plugin, env, or runtime values when needed.
