5hanth/zdev-skill
Overview
This skill manages isolated feature development environments using git worktrees, automatic port allocation, and optional public preview URLs. It streamlines starting, pausing, and cleaning up per-feature workspaces so you can develop, preview, and create PRs with minimal manual setup. Ideal for Vite-based frontends and optional Convex backends.
How this skill works
The skill creates one worktree per feature with its own branch, node modules, ports, and optional Convex dev instance. It configures local and public preview routing, runs a setup script in the worktree, and can auto-patch Vite to allow preview hostnames. Commands let you create or initialize projects, start/stop feature environments, generate PRs that include preview URLs, and clean up after merge.
When to use it
- Develop a new feature without affecting the main workspace
- Share a live preview of a feature with reviewers via a public URL
- Work on multiple features concurrently with isolated node_modules and ports
- Create a disposable development environment for experiments
- Auto-generate PRs that include preview URLs for QA and design review
Best practices
- Initialize existing projects with zdev init to store project metadata before starting features
- Run zdev list before starting to avoid duplicate worktrees or port conflicts
- Commit and push feature branches regularly; zdev creates branch feature/<name> in the worktree
- Set devDomain via zdev config to enable public previews consistently
- Use zdev stop --keep to pause work while preserving the worktree and resume later
Example use cases
- Start an isolated feature: zdev start my-feature -p /path/to/project and get local and public URLs for sharing
- Create a new starter project with optional Convex backend: zdev create my-app --convex
- Open a preview PR: zdev pr -p /path/to/project — the PR body contains the preview URL automatically
- Recover from conflicts: set the correct base branch with --base-branch when starting a feature
- Clean up after merge: zdev clean my-feature -p /path/to/project removes worktree, route, and port allocation
FAQ
Install the zdev CLI (bunx zdev or bun add -g zdev) and use a Vite-based frontend. Convex is optional and auto-detected.
Why no public URL appears?
Set devDomain with zdev config --set devDomain=dev.example.com and ensure your Traefik config directory is set if required.