mix tak.create (tak v0.4.2)

View Source

Creates a git worktree with an isolated port and database for parallel development.

$ mix tak.create <branch-name> [name]

The worktree lands in trees/<name>/ and gets its own config/dev.local.exs with a dedicated port and (optionally) a dedicated database. If mise is installed, a mise.local.toml is also written so the PORT env var stays consistent across shells.

After setup, the task runs mix deps.get and, when creating a database, mix ecto.setup inside the new worktree.

If a .env file exists in the project root, it is copied into the worktree.

Arguments

  • branch-name — the git branch to create or check out (required)
  • name — the worktree slot name (optional; first available is picked when omitted)

Options

  • --db — create the database, overriding the create_database config value
  • --no-db — skip database creation, overriding the create_database config value

Examples

$ mix tak.create feature/login
$ mix tak.create feature/login armstrong
$ mix tak.create feature/login --no-db

Run mix tak.doctor first if this is a new project to verify your config is ready.