Skip to content

Commit f676516

Browse files
committed
🌱 Genesis
0 parents  commit f676516

File tree

21 files changed

+5016
-0
lines changed

21 files changed

+5016
-0
lines changed

.github/workflows/release.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
name: Build ${{ matrix.target }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
include:
18+
- target: x86_64-apple-darwin
19+
os: macos-13
20+
name: recall-macos-intel
21+
- target: aarch64-apple-darwin
22+
os: macos-14
23+
name: recall-macos-arm64
24+
- target: x86_64-unknown-linux-gnu
25+
os: ubuntu-latest
26+
name: recall-linux-x86_64
27+
- target: aarch64-unknown-linux-gnu
28+
os: ubuntu-24.04-arm
29+
name: recall-linux-arm64
30+
- target: x86_64-pc-windows-msvc
31+
os: windows-latest
32+
name: recall-windows-x86_64
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- name: Install Rust
38+
uses: dtolnay/rust-toolchain@stable
39+
with:
40+
targets: ${{ matrix.target }}
41+
42+
- name: Build
43+
run: cargo build --release --target ${{ matrix.target }}
44+
45+
- name: Package (Unix)
46+
if: matrix.os != 'windows-latest'
47+
run: |
48+
cd target/${{ matrix.target }}/release
49+
tar czf ../../../${{ matrix.name }}.tar.gz recall
50+
cd ../../..
51+
52+
- name: Package (Windows)
53+
if: matrix.os == 'windows-latest'
54+
run: |
55+
cd target/${{ matrix.target }}/release
56+
7z a ../../../${{ matrix.name }}.zip recall.exe
57+
cd ../../..
58+
59+
- name: Upload artifact
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: ${{ matrix.name }}
63+
path: |
64+
${{ matrix.name }}.tar.gz
65+
${{ matrix.name }}.zip
66+
67+
release:
68+
name: Create Release
69+
needs: build
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Download artifacts
73+
uses: actions/download-artifact@v4
74+
with:
75+
path: artifacts
76+
77+
- name: Create Release
78+
uses: softprops/action-gh-release@v2
79+
with:
80+
files: |
81+
artifacts/**/*.tar.gz
82+
artifacts/**/*.zip
83+
generate_release_notes: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

CLAUDE.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# CLAUDE.md
2+
3+
## Purpose
4+
5+
Search and resume past conversations from Claude Code and Codex CLI.
6+
7+
## Principles
8+
9+
- **Delightful** - Made with love, feels good to use
10+
- **Simple, uncluttered, focused** - Two panes, keyboard-driven, no chrome
11+
- **Responsive** - Instant startup via background indexing, sub-100ms search
12+
- **Match-recency matters** - Rank by most recent message containing the match (human memory anchors to recent context)
13+
- **Seamless resume** - Enter execs directly into the CLI, no intermediate steps
14+
15+
## Development
16+
17+
```bash
18+
cargo check # Fast compile check (no binary)
19+
cargo run # Build debug + run
20+
cargo test # Run tests
21+
cargo clippy # Lint
22+
```
23+
24+
To test the TUI end-to-end, use tmux:
25+
```bash
26+
cargo build && tmux new-session -d -s test './target/debug/recall'
27+
tmux send-keys -t test 'search query'
28+
tmux capture-pane -t test -p # See output
29+
tmux kill-session -t test # Cleanup
30+
```
31+
32+
## Install
33+
34+
```bash
35+
cargo install --path .
36+
```
37+
38+
## Architecture
39+
40+
Rust TUI for searching Claude Code and Codex CLI conversation history.
41+
42+
- `src/main.rs` - Entry point, event loop, exec into CLI on resume
43+
- `src/app.rs` - Application state, search logic, background indexing thread
44+
- `src/ui.rs` - Two-pane ratatui rendering, match highlighting
45+
- `src/tui.rs` - Terminal setup/teardown
46+
- `src/theme.rs` - Light/dark theme with auto-detection
47+
- `src/session.rs` - Core types: Session, Message, SearchResult
48+
- `src/parser/` - JSONL parsers for Claude (`~/.claude/projects/`) and Codex (`~/.codex/sessions/`)
49+
- `src/index/` - Tantivy full-text search index, stored in `~/.cache/recall/`
50+
51+
## Key Patterns
52+
53+
- Background indexing: spawns thread on startup, indexes most recent files first, sends progress via mpsc channel
54+
- Unicode-safe string handling: use char indices not byte indices when slicing (see `highlight_matches`, `create_snippet`)
55+
- Search ranking: combines BM25 relevance with recency boost (exponential decay, 7-day half-life)
56+
- Theme detection: queries terminal bg color via crossterm, falls back to COLORFGBG env var
57+
- Event handling: drains all pending events each frame to prevent mouse event flooding
58+
- Contextual status bar: hints adapt to state (e.g., scroll hint only when preview is scrollable)

0 commit comments

Comments
 (0)