Lists all the Opencode sessions across all folders and lets you fuzzy search. Has columns for title, last message, directory and date.
cargo install --git https://github.com/kasbah/opencode-session-search
nix run github:kasbah/opencode-session-searchOr add to your flake inputs:
inputs.opencode-session-search.url = "github:kasbah/opencode-session-search";Then add it to your packages, e.g. in home.packages or environment.systemPackages:
inputs.opencode-session-search.packages.${system}.defaultopencode-session-search
<F2>to switch between sorting by date or search score.- Prefix searches with
title:,mes:(last message) ordir:(directory) to restrict search to specific columns. - Up/down arrows to select. Press enter to open the session in Opencode:
- If the session belongs to the current folder's project it is resumed directly (
opencode -s <session_id>). - Otherwise a copy is made via
opencode export+opencode importand changed to the current dir (since opencode 1.15.12 sessions are pinned to the directory they were created in). The original session is untouched.
- If the session belongs to the current folder's project it is resumed directly (
- Pass
--cwdto always import a copy of the session into the current directory, even if it belongs to the current folder's project (instead of resuming it in place). - Tested on Linux only for now.
