aps

command module
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: MIT Imports: 10 Imported by: 0

README

aps — Agent Pick Session

CI codecov Go Report Card Latest Release pkg.go.dev Go Version

AI coding agents accumulate dozens of sessions across many projects. aps cuts through the noise: fuzzy-match by title, directory, or session ID, preview recent messages and the working tree side-by-side, then press Enter to resume exactly where you left off. Pure Go TUI — no daemon, no config.

Screenshots

Interactive mode — fuzzy search with three-pane preview

aps interactive mode

List mode — scriptable table output

aps list mode

Install

Homebrew (macOS / Linux):

brew install gadflysu/tap/aps

Go tools:

go install github.com/gadflysu/aps@latest   # latest release
go install github.com/gadflysu/aps@master   # build from master source

GitHub Releases: download a pre-built binary from the Releases page.

Build from source:

git clone https://github.com/gadflysu/aps.git
cd aps
go install .

Usage

aps                   # Interactive picker (Claude sessions, cwd filter)
aps -l .              # List mode, filter by current directory
aps -l scripts        # List mode, substring filter
aps -r -l foo         # Recursive: looser substring match
aps -c                # Claude Code only
aps -o                # Opencode only
aps -a                # Both clients combined
aps -n                # No-launch: print target directory
aps -nv               # No-launch verbose: print full launch command
aps -d                # Danger mode (--dangerously-skip-permissions)
aps --claude-cmd ccaws   # Override Claude Code binary (supports shell aliases)
aps --opencode-cmd oc    # Override Opencode binary
aps --debug-log /tmp/aps.log   # Write debug log to file
Interactive mode keys
Key Action
Type Fuzzy filter by title, directory, ID, or time
/ or k / j Move cursor
Space Toggle three-pane preview
Tab Cycle preview focus (RECENT MESSAGES ↔ DIRECTORY)
j / k Scroll focused preview pane
Enter Launch session
Esc / q / Ctrl+C Quit

Dependencies

Package Purpose
charmbracelet/bubbletea TUI framework
charmbracelet/bubbles Text input and scrollable viewport components
charm.land/lipgloss/v2 Terminal styling
charmbracelet/x/term TTY detection and terminal width query
fsnotify/fsnotify Cross-platform filesystem event watcher
sahilm/fuzzy Fuzzy matching
modernc.org/sqlite Pure-Go SQLite driver (no cgo)

Data Sources

Agent Location Format
Claude Code ~/.claude/projects/*/*.jsonl JSONL
Opencode ~/.local/share/opencode/opencode.db SQLite

Default agent is Claude Code. Use -o / -a to include Opencode.

Contributing

Bug reports and pull requests are welcome. See CONTRIBUTING.md for the full workflow. Please open an issue first to discuss any significant change before submitting a PR.

License

MIT © gadflysu

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package cmd parses command-line flags and dispatches to the appropriate mode.
Package cmd parses command-line flags and dispatches to the appropriate mode.
Package dbg provides a simple file-based debug logger for aps.
Package dbg provides a simple file-based debug logger for aps.
Package display formats sessions for list-mode output using lipgloss and ANSI 16-color palette.
Package display formats sessions for list-mode output using lipgloss and ANSI 16-color palette.
Package filter implements three-tier path matching: exact, symlink, and substring.
Package filter implements three-tier path matching: exact, symlink, and substring.
Package launcher replaces the current process with the selected Claude or Opencode session via syscall.Exec.
Package launcher replaces the current process with the selected Claude or Opencode session via syscall.Exec.
Package picker provides the bubbletea TUI for fuzzy-filtering and previewing sessions.
Package picker provides the bubbletea TUI for fuzzy-filtering and previewing sessions.
Package preview renders the three-pane preview (SESSION INFO / RECENT MESSAGES / DIRECTORY) shown inside the picker.
Package preview renders the three-pane preview (SESSION INFO / RECENT MESSAGES / DIRECTORY) shown inside the picker.
Package source loads and normalises Claude and Opencode sessions; detects active sessions via PID/lsof.
Package source loads and normalises Claude and Opencode sessions; detects active sessions via PID/lsof.
Package watcher watches ~/.claude/projects/ for JSONL changes via fsnotify and emits reload signals.
Package watcher watches ~/.claude/projects/ for JSONL changes via fsnotify and emits reload signals.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL