kaeru 0.1.1

Reopens your terminal tabs, and the coding agent sessions in them, after the terminal closes or the computer restarts.
kaeru-0.1.1 is not a library.

kaeru 🐸

                   _..---.._                                        _..---.._
                .-'         '-.                                  .-'         '-.
              .'    .-"""-.    '.                              .'    .-"""-.    '.
             /     /       \     \                            /     /       \     \
            |     |   (O)   |     |                          |     |   (O)   |     |
             \     \       /     /                            \     \       /     /
          /   '.    '-...-'    .'                              '.    '-...-'    .'   \
         /      '-._       _.-'----------------------------------'-._       _.-'      \
        |                                                                              |
        |                                    .    .                                    |
        |      \                                                                /      |
        |       '.                                                            .'       |
         \        '-._                                                    _.-'        /
          \           '''---...__________________________________...---'''           /
           '.                                                                      .'
             '-._                                                              _.-'
                 '''---...____________________________________________...---'''
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

kaeru reopens your terminal tabs after the terminal closes or the computer restarts. Each tab comes back in the folder it was in, and a tab that was running a coding agent, such as Claude Code or Codex, comes back with the same conversation.

The name is Japanese. kaeru can be written 帰る, "to go home", 返る, "to return to how it was", or 蛙, "frog". In Japan, a frog charm is a wish for a safe return.

Status: kaeru is in early development. Its first version works on Windows, in Windows Terminal with PowerShell, and the roadmap shows what comes next.

How it works

When you open your terminal again, the first new tab lists the tabs that were open:

 🐸 kaeru: 4 tabs were open when your terminal closed

  Agent sessions (2)
   [x] api-server   Claude Code   40 minutes ago   ~\code\api-server   Windows Terminal
   [x] mobile-app   Codex         2 hours ago      ~\code\mobile-app   Windows Terminal
  Shells (2)
   [x] web-ui       PowerShell                     ~\code\web-ui       Windows Terminal
   [ ] ~            PowerShell                     ~                   Windows Terminal

   Done: reopen 3, forget 1

  <space> check   <a> check all   <d> done   <esc> later   <o> options

Every tab starts checked, and the cursor starts on Done, so pressing Enter brings them all back. Each checked tab opens again in its folder, in the terminal it came from, and agent sessions are resumed with the agent's own command, such as claude --resume <id> or codex resume <id>. To leave a tab out, move up to it and press Space or Enter to uncheck it. Done says how many tabs it will reopen and forget, and you choose it with Enter on its line or with d from anywhere. a checks or clears every tab at once. Press Esc to decide later, or o for the options. Run kaeru to see the list again at any time.

The tabs come back one at a time, about a second apart, so that a slower computer doesn't have to start every shell and agent at once. They come back in the order they were first opened. A tab you moved by dragging it comes back where it was first opened, not where you moved it, because Windows Terminal doesn't tell other programs where its tabs are. When the list showed up by itself in a new tab, that tab closes once the others are back, so that you end up with the tabs you had.

A tab you closed yourself is not offered again. kaeru only brings back tabs that went away together with their whole terminal, for example when the terminal crashed or the computer restarted.

The details are in docs/architecture.md.

Install

kaeru works on Windows, in Windows Terminal with PowerShell, so far.

  1. Install kaeru. In PowerShell, run:

    powershell -ExecutionPolicy Bypass -c "irm https://github.com/gloomydumber/kaeru/releases/latest/download/kaeru-installer.ps1 | iex"
    

    It downloads kaeru.exe from the latest release, puts it in .cargo\bin in your home folder, and adds that folder to your PATH. You don't need Rust for this.

    Other ways:

    • With Scoop: scoop bucket add gloomydumber https://github.com/gloomydumber/scoop-bucket, then scoop install gloomydumber/kaeru.
    • With Rust: cargo install kaeru --locked builds it.
    • Download the zip from the release page, and put kaeru.exe in any folder on your PATH.
  2. Run kaeru install. To learn about your tabs, kaeru needs two things, and it asks before it adds each one:

    • a line in your PowerShell profile, which tells kaeru about each new tab and keeps track of its folder;
    • a SessionStart hook for each agent you use, Claude Code and Codex, which tells kaeru which conversation runs in which tab. It keeps a copy of each agent's file as it was.

    If you use Codex, it also asks whether the tabs it tracks should start Codex with --no-daemon. Otherwise Codex runs its sessions in a shared background server, which hides which tab a session runs in, so kaeru has to work that out from when and where the session started. Codex's remote control needs that server, so the sessions started this way can't use it.

  3. If you use Codex, start it. It asks about the new kaeru hook: trust it, because Codex runs a new hook only after you trust it. Codex's /hooks lists it too.

  4. Open a new tab and run kaeru doctor. It checks the setup and says what to fix.

Commands

Command What it does
kaeru Shows the tabs that are waiting to come back, and reopens the ones you pick.
kaeru list Prints the tabs that kaeru tracks, one line each: the open ones, and the ones waiting to come back.
kaeru install Sets kaeru up, as Install describes.
kaeru doctor Checks the setup, and says what to fix.
kaeru uninstall Takes out everything that kaeru install added, asking before each change. It can also delete kaeru's notes and options.

kaeru --help lists them too. The line in your profile and the agents' hooks run three more commands for you, so you never need to type them: kaeru init, kaeru shell start and kaeru hook.

Roadmap

kaeru is built in milestones. Each milestone is finished and tested before the next one starts.

Milestone Scope Status
M0 Foundation: project layout, docs and CI done
M1 Windows Terminal and PowerShell, Claude Code and Codex, the picker done
M2 Git Bash (mintty) and bash planned
M3 Warp planned
M4 macOS: Terminal, iTerm2 and Ghostty, with zsh planned
M5 Linux: GNOME Terminal, kitty, WezTerm and Ghostty, with bash, zsh and fish planned

Later: the classic Windows console, more agents (such as Gemini CLI), re-running the command a tab was running, split panes, and more package managers (winget, which is in review, and Homebrew).

Contributing

Please read CONVENTIONS.md first. AGENTS.md lists the build and test commands. It is written for coding agents, but it works just as well for people.

License

kaeru is released under the MIT license.

kaeru is an independent project. It is not affiliated with or endorsed by Anthropic, OpenAI, Microsoft, or the makers of any terminal it supports.