workler init
Set up the current project for Workler.
bash
workler initBehavior
Run in the project root (anywhere inside the repository works — the git top level is used):
- Creates a starter
.worklerfile with commented syntax examples — kept as-is if it already exists. - Creates the
.worktrees/directory. - Excludes
.worktrees/from git via.git/info/exclude— local to your machine, so your committed.gitignoreis untouched. - Records the project as a workler root (
git config workler.rootandworkler.name main).
Outside a git repository, the exclude line goes to .gitignore instead, with a warning.
init is idempotent — run it as often as you like.
Output
text
created .workler
ready .worktrees
ignored .worktrees/ in .git/info/excludeOn a second run, created becomes exists.
Examples
bash
cd my-project
workler init
echo "link node_modules" >> .workler
echo "copy .env" >> .workler
workler add feature-a