gora-cli 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
@@ -0,0 +1,282 @@
1
+ Metadata-Version: 2.4
2
+ Name: gora-cli
3
+ Version: 0.1.2
4
+ Summary: Local CLI chat history index for Codex, Claude Code, and Pi.
5
+ Classifier: Environment :: Console
6
+ Classifier: Intended Audience :: Developers
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.13
9
+ Classifier: Topic :: Software Development
10
+ Classifier: Topic :: Terminals
11
+ Requires-Python: >=3.13
12
+ Description-Content-Type: text/markdown
13
+
14
+ <p align="center">
15
+ <img src="images/gora-header.png" alt="Gora header" width="100%">
16
+ </p>
17
+
18
+ # gora
19
+
20
+ Local memory for coding-agent chats.
21
+
22
+ `gora` indexes chat history from Codex, Claude Code, and Pi into one local
23
+ SQLite archive. Use it when you need to remember what you asked a model, what a
24
+ coding agent changed, which repo a conversation belonged to, or which harness
25
+ and model were used.
26
+
27
+ ## Why
28
+
29
+ Coding-agent history is spread across different local folders. Some harnesses
30
+ also prune or rewrite old logs. `gora` gives you one place to search them.
31
+
32
+ Common uses:
33
+
34
+ - Find an old debugging session by keyword.
35
+ - Check what a coding agent did in a repo last week.
36
+ - Recover a command, error, plan, or explanation from a past chat.
37
+ - See tool calls and command output inline with the chat transcript.
38
+ - Search across Codex, Claude Code, and Pi at the same time.
39
+ - Filter history by harness, repo, role, or model.
40
+
41
+ ## Supported History
42
+
43
+ `gora` reads local history files from:
44
+
45
+ ```text
46
+ Codex ~/.codex/sessions/**/*.jsonl
47
+ Claude Code ~/.claude/projects/**/*.jsonl
48
+ Pi ~/.pi/agent/sessions/**/*.jsonl
49
+ ```
50
+
51
+ No cloud service is required. The index stays on your machine.
52
+
53
+ ## Install
54
+
55
+ ```bash
56
+ uv tool install gora-cli
57
+ gora
58
+ ```
59
+
60
+ The PyPI package is `gora-cli`. The installed command is `gora`.
61
+
62
+ Install directly from GitHub:
63
+
64
+ ```bash
65
+ uv tool install git+https://github.com/mertdeveci5/gora
66
+ ```
67
+
68
+ For local development:
69
+
70
+ ```bash
71
+ git clone <repo-url>
72
+ cd gora
73
+ uv tool install --editable .
74
+ ```
75
+
76
+ ## Quick Start
77
+
78
+ 1. Check what Gora can see:
79
+
80
+ ```bash
81
+ gora doctor
82
+ ```
83
+
84
+ 2. Import local history:
85
+
86
+ ```bash
87
+ gora import
88
+ ```
89
+
90
+ 3. Open the terminal UI:
91
+
92
+ ```bash
93
+ gora
94
+ ```
95
+
96
+ 4. Search from the CLI:
97
+
98
+ ```bash
99
+ gora search "render deploy"
100
+ gora search "ctx7 login" --provider codex
101
+ gora search "database migration" --model "model-from-gora-models"
102
+ ```
103
+
104
+ 5. Show a full transcript:
105
+
106
+ ```bash
107
+ gora show codex:<session-id>
108
+ ```
109
+
110
+ ## Terminal UI
111
+
112
+ Run:
113
+
114
+ ```bash
115
+ gora
116
+ ```
117
+
118
+ The interactive UI is a Bubble Tea app built with Bubbles components. Gora
119
+ builds a cached local helper from the bundled Go source on first launch when Go
120
+ is available. For a prebuilt local helper:
121
+
122
+ ```bash
123
+ go -C gora/go_tui build -o ../../dist/gora-tui .
124
+ GORA_TUI_BIN=dist/gora-tui gora
125
+ ```
126
+
127
+ Controls:
128
+
129
+ ```text
130
+ Type search chats
131
+ Tab move focus between search, filters, and results
132
+ Ctrl-F open the filter editor
133
+ Enter open the selected chat or edit focused filters
134
+ Click Filters open the filter editor
135
+ Space select or clear a filter option in the filter editor
136
+ 1/H 2/R 3/M 4/O jump between filter editor steps
137
+ Enter select a filter option and move to the next filter step
138
+ Up/Down move through results or filter options
139
+ M export the selected chat as Markdown from results/transcript
140
+ T export the selected chat as plain text from results/transcript
141
+ Left/Esc return from transcript or apply filters and go back
142
+ Ctrl-U clear search or all filters in the filter editor
143
+ Esc clear search, clear active filters, or quit
144
+ ```
145
+
146
+ The filter editor supports multi-select harnesses, repos, and models. For
147
+ example, select Claude Code and two repos to show only Claude Code sessions from
148
+ those repos.
149
+
150
+ Exports are written to `~/Downloads/gora-exports` and keep the transcript in a
151
+ portable Markdown or plain-text file.
152
+
153
+ ## CLI Commands
154
+
155
+ ```bash
156
+ gora doctor
157
+ gora import
158
+ gora harnesses
159
+ gora repos
160
+ gora models
161
+ gora recent
162
+ gora list --limit 20
163
+ gora search "query"
164
+ gora show <session>
165
+ ```
166
+
167
+ Filters:
168
+
169
+ ```bash
170
+ gora list --provider codex
171
+ gora list --cwd tlmc
172
+ gora list --model "model-from-gora-models"
173
+ gora list --include-children
174
+ gora search "auth bug" --provider claude --model "model-from-gora-models"
175
+ gora search "review output" --include-children
176
+ gora show <session> --role user --role assistant
177
+ ```
178
+
179
+ Most list-style commands print numbered results and a quick command for the top
180
+ result.
181
+
182
+ Example:
183
+
184
+ ```bash
185
+ gora models
186
+ ```
187
+
188
+ ```text
189
+ 1. Model: gpt-5.4
190
+ Provider: openai
191
+ Chats: 460
192
+ Messages: 43079
193
+
194
+ 2. Model: gpt-5.3-codex
195
+ Provider: openai
196
+ Chats: 333
197
+ Messages: 14585
198
+
199
+ Quick command:
200
+ gora search "<query>" --model gpt-5.4
201
+ ```
202
+
203
+ Useful one-shot commands:
204
+
205
+ ```bash
206
+ gora harnesses
207
+ gora repos --limit 10
208
+ gora models --limit 10
209
+ gora recent --provider codex --limit 5
210
+ gora search "migration bug" --cwd tlmc
211
+ gora search "auth bug" --model "model-from-gora-models"
212
+ gora show claude:<session-id>
213
+ ```
214
+
215
+ ## Import Behavior
216
+
217
+ `gora import` is archive-oriented.
218
+
219
+ Once a chat is imported, Gora keeps it searchable even if the original harness
220
+ later deletes, prunes, or rewrites its local log file. Refreshing a changed
221
+ source file merges in new messages but does not delete messages already in the
222
+ archive.
223
+
224
+ Tool calls and tool-result output are imported by default so transcripts show
225
+ what the agent actually ran. Gora redacts common token shapes before storing
226
+ message text.
227
+
228
+ Codex can create child rollout files for subagents and review tasks. Gora stores
229
+ those records with their parent thread metadata, but normal list, recent, repos,
230
+ search, and TUI views show root user chats by default. Use `--include-children`
231
+ on CLI list and search style commands when you want to inspect child rollout
232
+ records too.
233
+
234
+ ## Models
235
+
236
+ Gora does not use a fixed model-name list.
237
+
238
+ It extracts model metadata from each harness's logged structure:
239
+
240
+ ```text
241
+ Codex turn context model metadata
242
+ Claude Code assistant message model metadata
243
+ Pi model change records and message metadata
244
+ ```
245
+
246
+ List indexed models:
247
+
248
+ ```bash
249
+ gora models
250
+ ```
251
+
252
+ Filter by an indexed model:
253
+
254
+ ```bash
255
+ gora search "cache bug" --model gpt-5.5
256
+ ```
257
+
258
+ ## Data Location
259
+
260
+ Default index path:
261
+
262
+ ```text
263
+ macOS ~/Library/Application Support/gora/history.sqlite
264
+ Linux ~/.local/share/gora/history.sqlite
265
+ ```
266
+
267
+ Use another path:
268
+
269
+ ```bash
270
+ GORA_DB=/path/to/history.sqlite gora import
271
+ gora --db /path/to/history.sqlite search "query"
272
+ ```
273
+
274
+ The default data directory is created with owner-only permissions.
275
+
276
+ ## Development
277
+
278
+ ```bash
279
+ uv run python -m unittest
280
+ uv run python -m compileall gora tests main.py
281
+ uv build
282
+ ```
@@ -0,0 +1,269 @@
1
+ <p align="center">
2
+ <img src="images/gora-header.png" alt="Gora header" width="100%">
3
+ </p>
4
+
5
+ # gora
6
+
7
+ Local memory for coding-agent chats.
8
+
9
+ `gora` indexes chat history from Codex, Claude Code, and Pi into one local
10
+ SQLite archive. Use it when you need to remember what you asked a model, what a
11
+ coding agent changed, which repo a conversation belonged to, or which harness
12
+ and model were used.
13
+
14
+ ## Why
15
+
16
+ Coding-agent history is spread across different local folders. Some harnesses
17
+ also prune or rewrite old logs. `gora` gives you one place to search them.
18
+
19
+ Common uses:
20
+
21
+ - Find an old debugging session by keyword.
22
+ - Check what a coding agent did in a repo last week.
23
+ - Recover a command, error, plan, or explanation from a past chat.
24
+ - See tool calls and command output inline with the chat transcript.
25
+ - Search across Codex, Claude Code, and Pi at the same time.
26
+ - Filter history by harness, repo, role, or model.
27
+
28
+ ## Supported History
29
+
30
+ `gora` reads local history files from:
31
+
32
+ ```text
33
+ Codex ~/.codex/sessions/**/*.jsonl
34
+ Claude Code ~/.claude/projects/**/*.jsonl
35
+ Pi ~/.pi/agent/sessions/**/*.jsonl
36
+ ```
37
+
38
+ No cloud service is required. The index stays on your machine.
39
+
40
+ ## Install
41
+
42
+ ```bash
43
+ uv tool install gora-cli
44
+ gora
45
+ ```
46
+
47
+ The PyPI package is `gora-cli`. The installed command is `gora`.
48
+
49
+ Install directly from GitHub:
50
+
51
+ ```bash
52
+ uv tool install git+https://github.com/mertdeveci5/gora
53
+ ```
54
+
55
+ For local development:
56
+
57
+ ```bash
58
+ git clone <repo-url>
59
+ cd gora
60
+ uv tool install --editable .
61
+ ```
62
+
63
+ ## Quick Start
64
+
65
+ 1. Check what Gora can see:
66
+
67
+ ```bash
68
+ gora doctor
69
+ ```
70
+
71
+ 2. Import local history:
72
+
73
+ ```bash
74
+ gora import
75
+ ```
76
+
77
+ 3. Open the terminal UI:
78
+
79
+ ```bash
80
+ gora
81
+ ```
82
+
83
+ 4. Search from the CLI:
84
+
85
+ ```bash
86
+ gora search "render deploy"
87
+ gora search "ctx7 login" --provider codex
88
+ gora search "database migration" --model "model-from-gora-models"
89
+ ```
90
+
91
+ 5. Show a full transcript:
92
+
93
+ ```bash
94
+ gora show codex:<session-id>
95
+ ```
96
+
97
+ ## Terminal UI
98
+
99
+ Run:
100
+
101
+ ```bash
102
+ gora
103
+ ```
104
+
105
+ The interactive UI is a Bubble Tea app built with Bubbles components. Gora
106
+ builds a cached local helper from the bundled Go source on first launch when Go
107
+ is available. For a prebuilt local helper:
108
+
109
+ ```bash
110
+ go -C gora/go_tui build -o ../../dist/gora-tui .
111
+ GORA_TUI_BIN=dist/gora-tui gora
112
+ ```
113
+
114
+ Controls:
115
+
116
+ ```text
117
+ Type search chats
118
+ Tab move focus between search, filters, and results
119
+ Ctrl-F open the filter editor
120
+ Enter open the selected chat or edit focused filters
121
+ Click Filters open the filter editor
122
+ Space select or clear a filter option in the filter editor
123
+ 1/H 2/R 3/M 4/O jump between filter editor steps
124
+ Enter select a filter option and move to the next filter step
125
+ Up/Down move through results or filter options
126
+ M export the selected chat as Markdown from results/transcript
127
+ T export the selected chat as plain text from results/transcript
128
+ Left/Esc return from transcript or apply filters and go back
129
+ Ctrl-U clear search or all filters in the filter editor
130
+ Esc clear search, clear active filters, or quit
131
+ ```
132
+
133
+ The filter editor supports multi-select harnesses, repos, and models. For
134
+ example, select Claude Code and two repos to show only Claude Code sessions from
135
+ those repos.
136
+
137
+ Exports are written to `~/Downloads/gora-exports` and keep the transcript in a
138
+ portable Markdown or plain-text file.
139
+
140
+ ## CLI Commands
141
+
142
+ ```bash
143
+ gora doctor
144
+ gora import
145
+ gora harnesses
146
+ gora repos
147
+ gora models
148
+ gora recent
149
+ gora list --limit 20
150
+ gora search "query"
151
+ gora show <session>
152
+ ```
153
+
154
+ Filters:
155
+
156
+ ```bash
157
+ gora list --provider codex
158
+ gora list --cwd tlmc
159
+ gora list --model "model-from-gora-models"
160
+ gora list --include-children
161
+ gora search "auth bug" --provider claude --model "model-from-gora-models"
162
+ gora search "review output" --include-children
163
+ gora show <session> --role user --role assistant
164
+ ```
165
+
166
+ Most list-style commands print numbered results and a quick command for the top
167
+ result.
168
+
169
+ Example:
170
+
171
+ ```bash
172
+ gora models
173
+ ```
174
+
175
+ ```text
176
+ 1. Model: gpt-5.4
177
+ Provider: openai
178
+ Chats: 460
179
+ Messages: 43079
180
+
181
+ 2. Model: gpt-5.3-codex
182
+ Provider: openai
183
+ Chats: 333
184
+ Messages: 14585
185
+
186
+ Quick command:
187
+ gora search "<query>" --model gpt-5.4
188
+ ```
189
+
190
+ Useful one-shot commands:
191
+
192
+ ```bash
193
+ gora harnesses
194
+ gora repos --limit 10
195
+ gora models --limit 10
196
+ gora recent --provider codex --limit 5
197
+ gora search "migration bug" --cwd tlmc
198
+ gora search "auth bug" --model "model-from-gora-models"
199
+ gora show claude:<session-id>
200
+ ```
201
+
202
+ ## Import Behavior
203
+
204
+ `gora import` is archive-oriented.
205
+
206
+ Once a chat is imported, Gora keeps it searchable even if the original harness
207
+ later deletes, prunes, or rewrites its local log file. Refreshing a changed
208
+ source file merges in new messages but does not delete messages already in the
209
+ archive.
210
+
211
+ Tool calls and tool-result output are imported by default so transcripts show
212
+ what the agent actually ran. Gora redacts common token shapes before storing
213
+ message text.
214
+
215
+ Codex can create child rollout files for subagents and review tasks. Gora stores
216
+ those records with their parent thread metadata, but normal list, recent, repos,
217
+ search, and TUI views show root user chats by default. Use `--include-children`
218
+ on CLI list and search style commands when you want to inspect child rollout
219
+ records too.
220
+
221
+ ## Models
222
+
223
+ Gora does not use a fixed model-name list.
224
+
225
+ It extracts model metadata from each harness's logged structure:
226
+
227
+ ```text
228
+ Codex turn context model metadata
229
+ Claude Code assistant message model metadata
230
+ Pi model change records and message metadata
231
+ ```
232
+
233
+ List indexed models:
234
+
235
+ ```bash
236
+ gora models
237
+ ```
238
+
239
+ Filter by an indexed model:
240
+
241
+ ```bash
242
+ gora search "cache bug" --model gpt-5.5
243
+ ```
244
+
245
+ ## Data Location
246
+
247
+ Default index path:
248
+
249
+ ```text
250
+ macOS ~/Library/Application Support/gora/history.sqlite
251
+ Linux ~/.local/share/gora/history.sqlite
252
+ ```
253
+
254
+ Use another path:
255
+
256
+ ```bash
257
+ GORA_DB=/path/to/history.sqlite gora import
258
+ gora --db /path/to/history.sqlite search "query"
259
+ ```
260
+
261
+ The default data directory is created with owner-only permissions.
262
+
263
+ ## Development
264
+
265
+ ```bash
266
+ uv run python -m unittest
267
+ uv run python -m compileall gora tests main.py
268
+ uv build
269
+ ```
@@ -0,0 +1,5 @@
1
+ """Gora indexes local coding-agent chat histories."""
2
+
3
+ __all__ = ["__version__"]
4
+
5
+ __version__ = "0.1.2"
@@ -0,0 +1,13 @@
1
+ from pathlib import Path
2
+ import sys
3
+
4
+
5
+ if __package__:
6
+ from .cli import main
7
+ else: # Supports `python gora` style execution.
8
+ sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
9
+ from gora.cli import main
10
+
11
+
12
+ if __name__ == "__main__":
13
+ raise SystemExit(main())