<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Git | Bas Nijholt</title><link>https://www.nijho.lt/tag/git/</link><atom:link href="https://www.nijho.lt/tag/git/index.xml" rel="self" type="application/rss+xml"/><description>Git</description><generator>Hugo</generator><language>en-us</language><copyright>© 2026</copyright><lastBuildDate>Tue, 22 Sep 2026 00:00:00 +0000</lastBuildDate><image><url>https://www.nijho.lt/media/icon_hu_408a8f6cef43e327.png</url><title>Git</title><link>https://www.nijho.lt/tag/git/</link></image><item><title>Removing the guardrails and letting my coding agents loose</title><link>https://www.nijho.lt/post/removing-guardrails/</link><pubDate>Tue, 22 Sep 2026 00:00:00 +0000</pubDate><guid isPermaLink="false">/post/removing-guardrails/</guid><description>&lt;p&gt;I have run coding agents in YOLO mode since I started using them in May 2025.&#10;I think it is the only way to parallelize work.&#10;Sometimes I have ten agents running at the same time, and clicking &amp;ldquo;approve&amp;rdquo; on every command they run would make that impossible.&lt;/p&gt;&#10;&lt;p&gt;What makes me comfortable with it is that models tend to do what you ask, and that you can keep them in an environment where they cannot do much harm.&#10;I don&amp;rsquo;t keep secrets within their reach, and above all I have &lt;a href="https://www.nijho.lt/post/btrfs-to-zfs/"&gt;very good backups&lt;/a&gt;.&#10;The last piece is a small set of hooks that block the few things I never want an agent to do on its own.&lt;/p&gt;&#10;&lt;h2 id="why-hooks-and-not-agentsmd"&gt;Why hooks and not AGENTS.md &lt;a class="anchor" href="#why-hooks-and-not-agentsmd" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;My system prompt has always told agents not to force-push or merge PRs.&#10;Some of them did it anyway.&lt;/p&gt;&#10;&lt;p&gt;The first time I really noticed was with &lt;a href="https://www.nijho.lt/post/gemini-3-pro-first-impressions/"&gt;Gemini 3 Pro in November 2025&lt;/a&gt;, which merged my PR and force-pushed to &lt;code&gt;main&lt;/code&gt;.&#10;It happened a couple more times in the weeks after, as I parallelized more and asked more of the models.&#10;Three weeks later I had hooks for Claude Code and Gemini CLI that block these commands before they run.&#10;Codex did not support hooks yet.&#10;To my surprise, it did not need them: OpenAI&amp;rsquo;s models are extremely good at following instructions, and Codex never ignored an explicit rule in my &lt;code&gt;AGENTS.md&lt;/code&gt;.&#10;Codex supports hooks by now, so it runs the same ones as the others.&lt;/p&gt;&#10;&lt;p&gt;Claude has been worse at following rules, and Gemini far worse still: absolutely dogshit.&#10;I only try Gemini now and then, and I have been disappointed every time.&#10;By now I don&amp;rsquo;t even try the latest Google models anymore.&lt;/p&gt;&#10;&lt;p&gt;I don&amp;rsquo;t think agents are ever purposely malicious.&#10;They try to do what you asked, but they can misinterpret it, and then they force-push or merge something.&#10;A rule in a Markdown file is a hope; a hook actually stops the command.&#10;Not that a hook would stop a malicious agent: it could put the blocked command in a Bash script and run that instead.&#10;What the hook does is tell the agent why I don&amp;rsquo;t want it, because every block comes with a short explanation:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git add -A is not allowed - add files explicitly to avoid adding unrelated untracked files&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The models are well aligned, so once they know my intention, they respect it.&lt;/p&gt;&#10;&lt;h2 id="what-i-block"&gt;What I block &lt;a class="anchor" href="#what-i-block" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;All hooks live in &lt;a href="https://github.com/basnijholt/dotfiles/tree/main/configs/claude/hooks" target="_blank" rel="noopener"&gt;my dotfiles&lt;/a&gt;, and I deliberately kept them simple.&#10;The detection logic is one Python module, &lt;a href="https://github.com/basnijholt/dotfiles/blob/main/configs/claude/hooks/git_guard.py" target="_blank" rel="noopener"&gt;&lt;code&gt;git_guard.py&lt;/code&gt;&lt;/a&gt;, and the Claude Code, Codex, and Gemini CLI hooks all import it.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;&lt;code&gt;git commit --amend&lt;/code&gt; and &lt;code&gt;git push --force&lt;/code&gt;.&lt;/strong&gt;&#10;The unit I review is a PR.&#10;When I review a PR, I know I have reviewed it up to a certain commit, and later I only look at the diff of the new commits.&#10;Rewriting history breaks that.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Pushing to &lt;code&gt;main&lt;/code&gt;.&lt;/strong&gt;&#10;Everything happens in PRs.&#10;Inside a PR I don&amp;rsquo;t care how messy the history gets.&#10;I want the agent to push very often, so no work gets lost, and every commit has to be green, so each one is a snapshot I can go back to.&#10;The agent maintains its own development of the feature, and I have not written a commit message myself in a long time.&#10;When the PR is done, I squash merge it.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;&lt;code&gt;gh pr merge&lt;/code&gt;.&lt;/strong&gt;&#10;The merge comes after my review, so it is mine to do.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;&lt;code&gt;git add -A&lt;/code&gt;.&lt;/strong&gt;&#10;I often have unrelated untracked or unstaged files lying around.&#10;I work in many open source repositories, and some of those files should not be public, like deployment plans.&#10;This is the only block without an override.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;&lt;code&gt;sleep&lt;/code&gt;.&lt;/strong&gt;&#10;This one is for Claude, and Opus 5 specifically, which I hate with a passion.&#10;It would run tests in the background and then &lt;code&gt;sleep 300&lt;/code&gt;, badly overestimating how long the tests take, when a blocking tool call returns exactly when they finish.&lt;/p&gt;&#10;&lt;h2 id="the-override"&gt;The override &lt;a class="anchor" href="#the-override" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Over time the models got more capable.&#10;I could parallelize more, and I trusted them to work on their own for longer.&#10;I noticed I was spending a significant fraction of my time clicking buttons and doing operations I had forbidden the agent to do, only to end up doing them myself.&lt;/p&gt;&#10;&lt;p&gt;So in July I added an override.&#10;When a hook blocks a command, the agent gets this hint:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;If (and only if) the user has explicitly approved this exact action,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;re-run the command prefixed with EXPLICITLY_USER_APPROVED_HOOK_OVERRIDE=1 to override this block.&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Nothing checks whether I actually approved it.&#10;It is a soft gate, but it works because the agent now has to write down, in the command itself, that I approved the action.&#10;When it runs into the block without my approval, it becomes obvious to the agent that it has to ask me first.&lt;/p&gt;&#10;&lt;p&gt;&lt;code&gt;git add -A&lt;/code&gt; stays hard-blocked, and a chained command cannot carry an override past it: &lt;code&gt;EXPLICITLY_USER_APPROVED_HOOK_OVERRIDE=1 git commit --amend &amp;amp;&amp;amp; git add -A&lt;/code&gt; is still rejected.&lt;/p&gt;&#10;&lt;h2 id="when-the-override-was-used-without-approval"&gt;When the override was used without approval &lt;a class="anchor" href="#when-the-override-was-used-without-approval" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;It has happened, mostly with GPT-5.6 Sol, which I used a lot at the time.&lt;/p&gt;&#10;&lt;p&gt;It used to be that you had to keep your context window short, because auto-compaction was lossy and produced poor summaries.&#10;Since around GPT-5.3, compaction works well enough that I keep a session going for as long as I am working on the same feature.&#10;So I would ask the agent to merge a PR early on, start a follow-up PR in the same session, and after a compaction the agent concluded that it should merge the new PR too.&#10;It did, without my approval.&lt;/p&gt;&#10;&lt;p&gt;The other case was my &lt;a href="https://github.com/mindroom-ai/mindroom/blob/main/.claude/skills/pr-review/SKILL.md" target="_blank" rel="noopener"&gt;&lt;code&gt;pr-review&lt;/code&gt; skill&lt;/a&gt;, by far my favorite skill that I wrote myself.&#10;I would tell the agent to run it and squash merge the PR only if the review approved it.&#10;A few times, the review found problems, the agent fixed them, and then it merged.&#10;What I meant was: merge if it is approved right away, and otherwise wait for me.&#10;Now I spell that out and end with &amp;ldquo;otherwise, wait for my instructions.&amp;rdquo;&lt;/p&gt;&#10;&lt;h2 id="working-from-my-phone"&gt;Working from my phone &lt;a class="anchor" href="#working-from-my-phone" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;The override matters most when I am away from my computer.&#10;On a month-long trip visiting family in Europe, I worked only from my phone, using &lt;a href="https://www.nijho.lt/post/agentic-mobile-workflow/"&gt;my mobile coding workflow&lt;/a&gt;.&#10;Typing commands in a terminal on a phone is inconvenient, so I would rather say what I want and let the agent do it, including the merge.&#10;I have also built end-to-end encrypted voice calls to my agents over Matrix with &lt;a href="https://www.nijho.lt/post/mindroom/"&gt;MindRoom&lt;/a&gt;, and I am moving more toward that kind of voice-driven workflow.&lt;/p&gt;&#10;&lt;h2 id="not-much-has-changed"&gt;Not much has changed &lt;a class="anchor" href="#not-much-has-changed" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;I recently reread &lt;a href="https://www.nijho.lt/post/agentic-coding/"&gt;my first post on agentic coding&lt;/a&gt; from August 2025, and very little in it is outdated.&#10;The models are more capable, and I give them much larger scopes, but the way I work is mostly the same.&#10;The hooks are the main thing I added, and the override is how I loosened them again.&lt;/p&gt;&#10;</description></item><item><title>Parallel agentic coding made trivial with `agent-cli dev`</title><link>https://www.nijho.lt/post/parallel-agentic-coding/</link><pubDate>Tue, 13 Jan 2026 00:00:00 +0000</pubDate><guid isPermaLink="false">/post/parallel-agentic-coding/</guid><description>&lt;details class="toc" open&gt;&lt;summary&gt;Table of contents&lt;/summary&gt;&lt;nav id="TableOfContents"&gt;&#10; &lt;ul&gt;&#10; &lt;li&gt;&lt;a href="#1-the-just-use-worktrees-problem"&gt;1. The &amp;ldquo;just use worktrees&amp;rdquo; problem&lt;/a&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;a href="#2-why-parallel-development-matters-for-agentic-coding"&gt;2. Why parallel development matters for agentic coding&lt;/a&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;a href="#3-one-command-to-rule-them-all"&gt;3. One command to rule them all&lt;/a&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;a href="#4-it-knows-your-stack"&gt;4. It knows your stack&lt;/a&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;a href="#5-terminal-magic"&gt;5. Terminal magic&lt;/a&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;a href="#6-spawning-agents-with-prompts"&gt;6. Spawning agents with prompts&lt;/a&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;a href="#7-teaching-claude-to-spawn-agents"&gt;7. Teaching Claude to spawn agents&lt;/a&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;a href="#8-my-actual-workflow"&gt;8. My actual workflow&lt;/a&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;a href="#9-managing-environments"&gt;9. Managing environments&lt;/a&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;a href="#10-getting-started"&gt;10. Getting started&lt;/a&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;a href="#conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;a href="#links"&gt;Links&lt;/a&gt;&lt;/li&gt;&#10; &lt;/ul&gt;&#10;&lt;/nav&gt;&lt;/details&gt;&#10;&#10;&lt;h2 id="1-the-just-use-worktrees-problem"&gt;1. The &amp;ldquo;just use worktrees&amp;rdquo; problem &lt;a class="anchor" href="#1-the-just-use-worktrees-problem" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Last week, I was chatting with a friend about my &lt;a href="https://www.nijho.lt/post/agentic-coding/"&gt;agentic coding workflow&lt;/a&gt;.&#10;I was sharing some of my best practices, and when the topic of parallel development came up, I said:&lt;/p&gt;&#10;&lt;p&gt;&amp;ldquo;Just use git worktrees with quickly installable environments.&amp;rdquo;&lt;/p&gt;&#10;&lt;p&gt;He stared at me blankly.&lt;/p&gt;&#10;&lt;p&gt;And then it hit me: for most developers who just &lt;code&gt;git add&lt;/code&gt;, &lt;code&gt;git commit&lt;/code&gt;, &lt;code&gt;git push&lt;/code&gt; and don&amp;rsquo;t touch their environment setup once it works, this is &lt;em&gt;not&lt;/em&gt; trivial.&#10;What seems obvious to me involves:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Understanding what git worktrees even are&lt;/li&gt;&#10;&lt;li&gt;Knowing the &lt;code&gt;git worktree add&lt;/code&gt; command and its flags&lt;/li&gt;&#10;&lt;li&gt;Remembering to fetch before creating&lt;/li&gt;&#10;&lt;li&gt;Creating a sibling directory structure&lt;/li&gt;&#10;&lt;li&gt;Running your package manager&amp;rsquo;s install command&lt;/li&gt;&#10;&lt;li&gt;Copying over &lt;code&gt;.env&lt;/code&gt; files&lt;/li&gt;&#10;&lt;li&gt;Setting up direnv or manually activating your virtual environment&lt;/li&gt;&#10;&lt;li&gt;Opening a new terminal tab&lt;/li&gt;&#10;&lt;li&gt;Navigating to the worktree&lt;/li&gt;&#10;&lt;li&gt;Finally launching your coding agent&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;That&amp;rsquo;s a lot of friction for something you want to do &lt;em&gt;frequently&lt;/em&gt; when using agentic tools.&lt;/p&gt;&#10;&lt;p&gt;So I built &lt;code&gt;agent-cli dev&lt;/code&gt;.&lt;/p&gt;&#10;&lt;aside class="callout callout-note"&gt;&lt;svg class="ico" viewBox="0 0 256 256" aria-hidden="true"&gt;&lt;path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"/&gt;&lt;/svg&gt;&lt;div&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; &lt;code&gt;agent-cli dev new --agent --prompt &amp;quot;Fix the login bug&amp;quot;&lt;/code&gt; creates a complete, isolated development environment in one command.&#10;It creates a git worktree, installs dependencies, copies env files, sets up direnv, and opens your AI coding agent in a new terminal tab with your prompt already loaded—all automatically.&#10;No more manual setup, no more excuses to not work in parallel.&lt;/div&gt;&lt;/aside&gt;&#10;&lt;h2 id="2-why-parallel-development-matters-for-agentic-coding"&gt;2. Why parallel development matters for agentic coding &lt;a class="anchor" href="#2-why-parallel-development-matters-for-agentic-coding" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;In my &lt;a href="https://www.nijho.lt/post/agentic-coding/"&gt;previous post on agentic coding&lt;/a&gt;, I described my workflow of running 5-6 Claude Code sessions simultaneously, each working on a different feature.&#10;This is how I can easily work on multiple features in parallel while waiting for an agent to process and generate code.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;The usual way:&lt;/strong&gt;&#10;Start feature A → wait for Claude to finish → review → move to feature B → repeat.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;The better way:&lt;/strong&gt;&#10;Start feature A in tab 1 → switch to tab 2, start feature B while A is working → switch to tab 3, start feature C → circle back to tab 1, review what Claude did → give feedback, move to next tab → repeat every 10-15 minutes.&lt;/p&gt;&#10;&lt;p&gt;This parallel approach allows me to go much faster.&#10;But it only works if each tab has its own &lt;strong&gt;completely isolated and working environment&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;p&gt;That&amp;rsquo;s where &lt;a href="https://www.nijho.lt/post/git-worktree/"&gt;git worktrees&lt;/a&gt; come in.&#10;A worktree gives you a separate working directory for a branch, sharing the same git history but with independent file states.&lt;/p&gt;&#10;&lt;p&gt;The problem is the &lt;em&gt;setup&lt;/em&gt;.&#10;Every time you want to start a new feature:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# The manual way (don&amp;#39;t do this)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git fetch origin&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git worktree add ../my-project-worktrees/cool-feature -b cool-feature origin/main&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ../my-project-worktrees/cool-feature&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;uv sync --all-extras &lt;span class="c1"&gt;# or npm install, or poetry install, or...&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cp ../.env .env&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Now open a new terminal tab...&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Navigate there...&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Finally start claude&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After the 100th(?) time doing this manually, I knew I needed to automate it.&lt;/p&gt;&#10;&lt;h2 id="3-one-command-to-rule-them-all"&gt;3. One command to rule them all &lt;a class="anchor" href="#3-one-command-to-rule-them-all" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Here&amp;rsquo;s what I built:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;agent-cli dev new --agent&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That&amp;rsquo;s it.&#10;One command.&#10;Here&amp;rsquo;s what it looks like:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;→ Generated branch name: cool-crane&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;→ Creating worktree &lt;span class="k"&gt;for&lt;/span&gt; branch &lt;span class="s1"&gt;&amp;#39;cool-crane&amp;#39;&lt;/span&gt;...&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;→ Running: git fetch origin&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;→ Running: git worktree add -b cool-crane ~/Work/project-worktrees/cool-crane origin/main&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;✓ Created worktree at ~/Work/project-worktrees/cool-crane&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;✓ Copied env file&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt;: .env.example, .envrc&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;→ Detected Python project with uv&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;→ Running: uv sync --all-extras&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;→ Running: direnv allow&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;✓ direnv: allowed existing .envrc&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;✓ Started claude in new iterm2 tab&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;╭─────────────────────────────────────────────── Success ───────────────────────────────────────────────╮&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ Dev environment created: ~/Work/project-worktrees/cool-crane │&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ Branch: cool-crane │&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;4 seconds later, I have a new terminal tab with Claude Code already running in a fresh, isolated environment.&#10;Ready to work on my next feature.&lt;/p&gt;&#10;&lt;p&gt;What happens under the hood:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;strong&gt;Generates a random branch name&lt;/strong&gt; like &lt;code&gt;clever-fox&lt;/code&gt; (you can just set the name yourself of course)&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Creates the git worktree&lt;/strong&gt; in a sibling directory&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Detects the project type&lt;/strong&gt; and runs the appropriate setup (&lt;code&gt;uv sync&lt;/code&gt;, &lt;code&gt;npm install&lt;/code&gt;, etc.)&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Copies &lt;code&gt;.env&lt;/code&gt; files&lt;/strong&gt; from the main repo&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Sets up direnv&lt;/strong&gt; so the environment activates automatically&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Opens a new terminal tab&lt;/strong&gt; (works with tmux, zellij, iTerm2, and more)&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Launches your coding agent&lt;/strong&gt; in that tab&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;The Docker-style random names (&lt;code&gt;clever-fox&lt;/code&gt;, &lt;code&gt;happy-bear&lt;/code&gt;, &lt;code&gt;swift-owl&lt;/code&gt;) there just for those too lazy to pick a name.&#10;Just &lt;code&gt;agent-cli dev new --agent&lt;/code&gt; and start coding.&lt;/p&gt;&#10;&lt;h2 id="4-it-knows-your-stack"&gt;4. It knows your stack &lt;a class="anchor" href="#4-it-knows-your-stack" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;The command auto-detects your project type:&lt;/p&gt;&#10;&lt;div class="table-wrap"&gt;&#10;&lt;table&gt;&#10;&lt;thead&gt;&#10;&lt;tr&gt;&#10;&lt;th&gt;If it sees&amp;hellip;&lt;/th&gt;&#10;&lt;th&gt;It runs&amp;hellip;&lt;/th&gt;&#10;&lt;/tr&gt;&#10;&lt;/thead&gt;&#10;&lt;tbody&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;&lt;code&gt;uv.lock&lt;/code&gt;&lt;/td&gt;&#10;&lt;td&gt;&lt;code&gt;uv sync --all-extras&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;&lt;code&gt;pixi.lock&lt;/code&gt;&lt;/td&gt;&#10;&lt;td&gt;&lt;code&gt;pixi install&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;&lt;code&gt;poetry.lock&lt;/code&gt;&lt;/td&gt;&#10;&lt;td&gt;&lt;code&gt;poetry install&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;&lt;code&gt;requirements.yaml&lt;/code&gt;&lt;/td&gt;&#10;&lt;td&gt;&lt;code&gt;unidep install -e .&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;&lt;code&gt;package-lock.json&lt;/code&gt;&lt;/td&gt;&#10;&lt;td&gt;&lt;code&gt;npm install&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;&lt;code&gt;Cargo.toml&lt;/code&gt;&lt;/td&gt;&#10;&lt;td&gt;&lt;code&gt;cargo build&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;&lt;code&gt;go.mod&lt;/code&gt;&lt;/td&gt;&#10;&lt;td&gt;&lt;code&gt;go mod download&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;For my projects using &lt;a href="https://github.com/basnijholt/unidep" target="_blank" rel="noopener"&gt;unidep&lt;/a&gt;, it even detects monorepos and adjusts the command accordingly.&lt;/p&gt;&#10;&lt;p&gt;It also generates the right &lt;code&gt;.envrc&lt;/code&gt; for &lt;a href="https://direnv.net/" target="_blank" rel="noopener"&gt;direnv&lt;/a&gt;.&#10;For a Python project with uv, that&amp;rsquo;s &lt;code&gt;source .venv/bin/activate&lt;/code&gt;.&#10;For a conda/unidep project, it&amp;rsquo;s the full micromamba activation.&#10;For Nix projects, it&amp;rsquo;s &lt;code&gt;use flake&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;This means when you &lt;code&gt;cd&lt;/code&gt; into the worktree later, your environment is automatically activated.&#10;No more &lt;code&gt;source .venv/bin/activate&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h2 id="5-terminal-magic"&gt;5. Terminal magic &lt;a class="anchor" href="#5-terminal-magic" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;The real magic is opening a new terminal tab with the agent already running.&lt;/p&gt;&#10;&lt;p&gt;The command detects which terminal you&amp;rsquo;re in and uses the appropriate API—whether that&amp;rsquo;s iTerm2, Kitty, Warp, or GNOME Terminal.&#10;It even works with terminal multiplexers like &lt;strong&gt;tmux&lt;/strong&gt; and &lt;strong&gt;zellij&lt;/strong&gt; (my current favorite), opening a new window/tab in your existing session.&lt;/p&gt;&#10;&lt;h2 id="6-spawning-agents-with-prompts"&gt;6. Spawning agents with prompts &lt;a class="anchor" href="#6-spawning-agents-with-prompts" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;The &lt;code&gt;--prompt&lt;/code&gt; option transforms how I spawn parallel agents.&#10;Instead of just opening a blank Claude session, I can give the new agent its task immediately:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;agent-cli dev new fix-auth-bug --agent --prompt &lt;span class="s2"&gt;&amp;#34;Fix the login validation bug in auth.py. The issue is that empty passwords pass validation.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The agent opens with the prompt already loaded and starts working immediately.&#10;No copy-pasting, no context switching, no &amp;ldquo;let me explain what I need you to do.&amp;rdquo;&lt;/p&gt;&#10;&lt;p&gt;For longer, more detailed prompts (which you should use for complex tasks), there&amp;rsquo;s &lt;code&gt;--prompt-file&lt;/code&gt;:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;agent-cli dev new new-feature --agent --prompt-file .claude/spawn-prompt.md&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is particularly powerful when you&amp;rsquo;re in a Claude session and discover a feature that needs work but is unrelated to your current task.&#10;Instead of context-switching or noting it for later, you can spawn a new agent right there:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Write a detailed prompt to a file (Claude can do this)&lt;/li&gt;&#10;&lt;li&gt;Run &lt;code&gt;agent-cli dev new unrelated-feature --agent --prompt-file .claude/spawn-prompt.md&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;A new terminal tab opens with a fresh Claude session already working on the task&lt;/li&gt;&#10;&lt;li&gt;Continue with your original work&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;The spawned agent works independently in its own branch while you stay focused.&lt;/p&gt;&#10;&lt;h2 id="7-teaching-claude-to-spawn-agents"&gt;7. Teaching Claude to spawn agents &lt;a class="anchor" href="#7-teaching-claude-to-spawn-agents" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Here&amp;rsquo;s where it gets really interesting: you can teach Claude Code itself how to spawn parallel agents.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;agent-cli dev install-skill&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This installs a &lt;a href="https://docs.anthropic.com/en/docs/claude-code/skills" target="_blank" rel="noopener"&gt;Claude Code skill&lt;/a&gt; that teaches Claude how to use &lt;code&gt;agent-cli dev&lt;/code&gt;.&#10;The skill includes detailed examples and prompt templates following Anthropic&amp;rsquo;s &lt;a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview" target="_blank" rel="noopener"&gt;prompt engineering guide&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;With the skill installed, you can say things like:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&amp;ldquo;Work on auth, payments, and notifications in parallel&amp;rdquo;&lt;/li&gt;&#10;&lt;li&gt;&amp;ldquo;This feature is unrelated to what we&amp;rsquo;re doing—spawn a new agent for it&amp;rdquo;&lt;/li&gt;&#10;&lt;li&gt;&amp;ldquo;Split this refactoring by module and work on them simultaneously&amp;rdquo;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Claude will write well-structured prompts (using proper XML tags, clear context, explicit requirements) and spawn the agents for you.&#10;Each spawned agent writes a report to &lt;code&gt;.claude/REPORT.md&lt;/code&gt; when done, so you can easily review what happened.&lt;/p&gt;&#10;&lt;p&gt;One of my favorite patterns: I ask Claude to look at the latest 10 open GitHub issues and spawn an agent for each one.&#10;Ten independent parallel environments, set up in seconds, each working on a different issue.&#10;That&amp;rsquo;s the kind of leverage this enables.&lt;/p&gt;&#10;&lt;h2 id="8-my-actual-workflow"&gt;8. My actual workflow &lt;a class="anchor" href="#8-my-actual-workflow" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Here&amp;rsquo;s how I use this in practice.&#10;I&amp;rsquo;m working on &lt;a href="https://github.com/basnijholt/agent-cli" target="_blank" rel="noopener"&gt;agent-cli&lt;/a&gt; itself, and I want to add three features:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Tab 1: New RAG feature&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;agent-cli dev new rag-improvements --agent --prompt &lt;span class="s2"&gt;&amp;#34;Improve RAG chunking strategy for better retrieval accuracy&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Tab 2: Fix a bug in the transcribe command&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;agent-cli dev new fix-transcribe-vad --agent --prompt &lt;span class="s2"&gt;&amp;#34;Fix VAD detection cutting off words at sentence boundaries&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Tab 3: Refactor the config system&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;agent-cli dev new config-refactor --agent --prompt &lt;span class="s2"&gt;&amp;#34;Refactor config.py to use a single Config class with lazy loading&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Three commands, three isolated environments, three Claude Code sessions already working on their tasks.&lt;/p&gt;&#10;&lt;p&gt;I cycle through the tabs every 10-15 minutes:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Review what Claude did&lt;/li&gt;&#10;&lt;li&gt;Give voice feedback using my &lt;a href="https://www.nijho.lt/post/local-ai-journey/"&gt;transcription workflow&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;Move to the next tab&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;When a feature is done, I have Claude open a PR from that branch.&#10;When the PR is merged:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;agent-cli dev clean --merged&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This uses the GitHub CLI to check which branches have merged PRs, then removes those worktrees and deletes the branches.&#10;No more zombie worktrees cluttering my disk.&lt;/p&gt;&#10;&lt;h2 id="9-managing-environments"&gt;9. Managing environments &lt;a class="anchor" href="#9-managing-environments" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A few other commands I use regularly:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# List all worktrees&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;agent-cli dev list&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Navigate to a worktree&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;agent-cli dev path clever-fox&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Remove a worktree&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;agent-cli dev rm clever-fox&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Force removal + delete branch&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;agent-cli dev rm clever-fox --force --delete-branch&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Check what&amp;#39;s available on your system&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;agent-cli dev doctor&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;doctor&lt;/code&gt; command is handy for seeing which terminals, editors, and coding agents are installed and detected.&lt;/p&gt;&#10;&lt;h2 id="10-getting-started"&gt;10. Getting started &lt;a class="anchor" href="#10-getting-started" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;agent-cli dev&lt;/code&gt; is part of the &lt;a href="https://github.com/basnijholt/agent-cli" target="_blank" rel="noopener"&gt;agent-cli&lt;/a&gt; package:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# With uv (recommended)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;uv tool install agent-cli&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then in any git repository:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Check what&amp;#39;s available&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;agent-cli dev doctor&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Create your first parallel environment with a task&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;agent-cli dev new my-feature --agent --prompt &lt;span class="s2"&gt;&amp;#34;Add user profile page with avatar upload&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Or install the skill so Claude can spawn agents for you&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;agent-cli dev install-skill&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Supported coding agents:&lt;/strong&gt; Claude Code, Codex, Gemini, Aider, GitHub Copilot, Continue, OpenCode, and Cursor Agent.&#10;Use &lt;code&gt;--with-agent gemini&lt;/code&gt; to pick a specific one, or set a default in your config.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Supported terminals:&lt;/strong&gt; tmux, zellij, iTerm2, Terminal.app, Kitty, Warp, and GNOME Terminal.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Supported editors:&lt;/strong&gt; Cursor, VS Code, Zed, PyCharm (and other JetBrains IDEs), Neovim, Vim, Emacs, Sublime Text, and nano.&lt;/p&gt;&#10;&lt;h2 id="conclusion"&gt;Conclusion &lt;a class="anchor" href="#conclusion" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;The barrier between &amp;ldquo;I want to work on this feature&amp;rdquo; and &amp;ldquo;I&amp;rsquo;m actually working on it in an isolated environment&amp;rdquo; should be zero.&lt;/p&gt;&#10;&lt;p&gt;Before:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;2-5 minutes of manual setup per feature&lt;/li&gt;&#10;&lt;li&gt;Often skipped because &amp;ldquo;it&amp;rsquo;s not worth it for a small change&amp;rdquo;&lt;/li&gt;&#10;&lt;li&gt;Mental overhead remembering all the steps&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;After:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;One command, few seconds&lt;/li&gt;&#10;&lt;li&gt;No excuse not to work in isolation&lt;/li&gt;&#10;&lt;li&gt;More parallel features, faster iteration&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;If you&amp;rsquo;re using agentic coding tools and not yet working in parallel, you&amp;rsquo;re leaving productivity on the table.&#10;And if the setup friction was stopping you—well, now it&amp;rsquo;s gone.&lt;/p&gt;&#10;&lt;p&gt;Try it out and let me know what you think!&#10;The code is open-source at &lt;a href="https://github.com/basnijholt/agent-cli" target="_blank" rel="noopener"&gt;github.com/basnijholt/agent-cli&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h2 id="links"&gt;Links &lt;a class="anchor" href="#links" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://github.com/basnijholt/agent-cli" target="_blank" rel="noopener"&gt;agent-cli on GitHub&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://agent-cli.nijho.lt/commands/dev/" target="_blank" rel="noopener"&gt;&lt;code&gt;agent-cli dev&lt;/code&gt; documentation&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://docs.anthropic.com/en/docs/claude-code/skills" target="_blank" rel="noopener"&gt;Claude Code skills&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview" target="_blank" rel="noopener"&gt;Anthropic prompt engineering guide&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://www.nijho.lt/post/git-worktree/"&gt;My post on git worktrees&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://www.nijho.lt/post/agentic-coding/"&gt;My post on agentic coding&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zellij.dev/" target="_blank" rel="noopener"&gt;Zellij&lt;/a&gt; / &lt;a href="https://github.com/tmux/tmux" target="_blank" rel="noopener"&gt;tmux&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://direnv.net/" target="_blank" rel="noopener"&gt;direnv&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;</description></item><item><title>Discovering Git worktrees: a handy tool for multitasking 📚</title><link>https://www.nijho.lt/post/git-worktree/</link><pubDate>Thu, 19 Sep 2024 00:00:00 +0000</pubDate><guid isPermaLink="false">/post/git-worktree/</guid><description>&lt;p&gt;Recently, I discovered a game-changer in Git that has streamlined my workflow: &lt;strong&gt;worktrees&lt;/strong&gt;.&#10;This feature allows developers to handle multiple branches of a single repository simultaneously, eliminating the need for constant branch-switching or multiple clones.&#10;For example, I typically want to keep the &lt;code&gt;main&lt;/code&gt; branch in one editor window and the &lt;code&gt;feature&lt;/code&gt; branch in another to easily test changes.&#10;With Git worktrees, I essentially have two separate working directories for each branch, making it easier to manage changes and switch between tasks.&lt;/p&gt;&#10;&lt;h4 id="what-is-a-git-worktree"&gt;What is a Git Worktree?&lt;/h4&gt;&#10;&lt;p&gt;A Git worktree provides additional working directories linked to the same repository.&#10;This means you can easily work on different branches in parallel without duplicating repositories, saving both space and effort.&lt;/p&gt;&#10;&lt;h4 id="benefits-of-git-worktrees"&gt;Benefits of Git Worktrees&lt;/h4&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;strong&gt;Parallel Development&lt;/strong&gt;: Effortlessly switch between branches for urgent bug fixes or new feature developments.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Efficiency&lt;/strong&gt;: It&amp;rsquo;s lightweight, sharing the Git directory, and integrates smoothly with existing workflows.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h4 id="quick-commands"&gt;Quick Commands&lt;/h4&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;Create a Worktree&lt;/strong&gt;:&lt;br&gt;&#10;&lt;code&gt;git worktree add &amp;lt;path-to-new-worktree&amp;gt; &amp;lt;branch-name&amp;gt;&lt;/code&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;List Worktrees&lt;/strong&gt;:&lt;br&gt;&#10;&lt;code&gt;git worktree list&lt;/code&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;Remove a Worktree&lt;/strong&gt;:&lt;br&gt;&#10;&lt;code&gt;git worktree remove &amp;lt;path-to-worktree&amp;gt;&lt;/code&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h4 id="conclusion"&gt;Conclusion&lt;/h4&gt;&#10;&lt;p&gt;Incorporating Git worktrees into your workflow enhances productivity and organization.&#10;Whether dealing with bug fixes or new features, worktrees help maintain a cleaner environment.&lt;/p&gt;&#10;</description></item><item><title>ipynb_git_filters</title><link>https://www.nijho.lt/project/ipynb_git_filters/</link><pubDate>Mon, 25 Nov 2019 00:00:00 +0000</pubDate><guid isPermaLink="false">/project/ipynb_git_filters/</guid><description/></item></channel></rss>