Skip to main content

CLI for managing Claude Code sessions in git worktrees and repositories

Project description

fujimoto

Tests Coverage

A terminal UI for managing Claude Code sessions across git worktrees and repositories. Spin up isolated worktree sessions or launch Claude directly in an existing repo — all from an interactive TUI with tmux-powered detachable sessions.

Why "Fujimoto"?

Fujimoto from Ponyo

Named after Fujimoto from Hayao Miyazaki's Ponyo — a former human turned fastidious caretaker of the sea. Fujimoto is obsessed with order and control, meticulously tending to the balance of his domain while managing his many daughters and their chaotic tendencies.

Like his namesake, this tool is a caretaker and orchestrator — keeping your worktrees organised, your sessions tracked, and your branches tidy. It manages the lifecycle from creation through to cleanup, fretting over unpushed commits and unmerged branches so you don't have to. And like Fujimoto learning to accept that Ponyo must live her own life, it knows when to let go — spinning off background Claude sessions to handle their own PRs and gracefully cleaning up when the work is done.

He carries himself with dignity, even in defeat. Your worktrees should too.

Prerequisites

  • Python 3.11+
  • git
  • tmux (the tool will offer to install it via brew if missing)
  • uv package manager

Installation

Install directly from GitHub:

uv tool install git+https://github.com/jongracecox/fujimoto.git

Or install from a local clone:

uv tool install --force --reinstall /path/to/this/repo

Re-run with --force --reinstall after local code changes to pick up updates.

Configuration

Both environment variables are optional:

export FUJIMOTO_WORKTREE_ROOT=~/git/worktrees/   # Optional: where worktrees are created
export FUJIMOTO_GIT_ROOT=~/git/                  # Optional: enables project switching

If FUJIMOTO_WORKTREE_ROOT is unset, worktrees are created inside the current project at <repo>/.fujimoto/worktrees/ (the .fujimoto/ directory is auto-gitignored). If FUJIMOTO_GIT_ROOT is unset, the project switcher is hidden. Add these to your shell profile (~/.zshrc, ~/.bashrc, etc.) to persist them.

Usage

Run from inside any git repository:

fujimoto

Home Screen

+ New worktree session
+ New session in <project>
+ Ad hoc session
───── active sessions ─────
🟢 20260309-cleanup-ui          (worktree)
🟢 direct-1                     (direct @ main)
───── inactive worktrees ─────
⚫ 20260308-old-experiment      (worktree)
─────
  Switch project

Three Session Types

Worktree sessions create an isolated git worktree with its own branch. Useful for standalone tasks that become PRs, or investigations where you want to fork off and explore.

Direct sessions launch Claude in an existing repo directory on its current branch. Quick and lightweight — no worktree overhead.

Ad hoc sessions launch Claude in a temporary directory outside any git project. For quick questions, investigations, and one-off tasks that don't need a repository.

Session Actions

Select any session to see contextual options:

Session State Options
Active worktree Connect, Terminate, Finish
Inactive worktree Launch, Finish
Active direct Connect, Terminate

Finish Flow

When you're done with a worktree, the Finish flow checks the branch state and offers:

  • Push & Create PR — pushes the branch and spins up a background Claude session to create the PR
  • Cherry-pick to base — applies your commits back to the original branch, then cleans up
  • Discard & Delete — throws away the work (with confirmation if there are unpushed commits)

For already-merged branches: Delete or Delete + remove remote branch.

Naming Conventions

Thing Pattern Example
Worktree directory {YYYYMMDD}-{slug} 20260309-fix-unit-tests
Git branch worktree/{dir-name} worktree/20260309-fix-unit-tests
tmux session (worktree) {project}/{dir-name} qsic-data/20260309-fix-unit-tests
tmux session (direct) {project}/direct-{N} qsic-data/direct-1

tmux Session Controls

Each session remaps the prefix key to Ctrl+A:

Shortcut Action
Ctrl+A D Detach (leave running)
Ctrl+A [ Scroll/copy mode
Ctrl+A X Kill pane

These are set per-session and don't affect your global tmux config.

Keyboard Shortcuts

Key Action
Enter Select
Escape Back (or quit from home)
q Quit
Arrow keys Navigate

Development

uv sync
uv run fujimoto        # Run locally
uv run pytest          # Run tests with coverage

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fujimoto-0.1.0.tar.gz (73.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fujimoto-0.1.0-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

Details for the file fujimoto-0.1.0.tar.gz.

File metadata

  • Download URL: fujimoto-0.1.0.tar.gz
  • Upload date:
  • Size: 73.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fujimoto-0.1.0.tar.gz
Algorithm Hash digest
SHA256 04d030c1a1ce7d98ecd3eeebb07083ff01b2d75ef4304d487b1fa3a5c505b2b6
MD5 492abc919644a6ac4606839e1b1fc265
BLAKE2b-256 0d4ddacd4b087b4a28532f5e5a3ee0802eb9080f2333f303dfe0c8bdda1797f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for fujimoto-0.1.0.tar.gz:

Publisher: release.yml on jongracecox/fujimoto

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fujimoto-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fujimoto-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fujimoto-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 17cf5afb3f13519614711832d505d79dbc1d2e8bac2bd9cf7579ec39d40cbc32
MD5 22baa25195aa7174f43e2034bb7a91a9
BLAKE2b-256 2184decd97c23128c056ccfe3b2fb0ca987d9dd9d2c318343a5beb96c4b8ced2

See more details on using hashes here.

Provenance

The following attestation bundles were made for fujimoto-0.1.0-py3-none-any.whl:

Publisher: release.yml on jongracecox/fujimoto

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page