kiro-cli-history 0.2.0__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.
- kiro_cli_history-0.2.0/LICENSE +21 -0
- kiro_cli_history-0.2.0/LICENSES/CC0-1.0.txt +121 -0
- kiro_cli_history-0.2.0/LICENSES/MIT.txt +21 -0
- kiro_cli_history-0.2.0/PKG-INFO +178 -0
- kiro_cli_history-0.2.0/README.md +153 -0
- kiro_cli_history-0.2.0/kiro_cli_history/__init__.py +8 -0
- kiro_cli_history-0.2.0/kiro_cli_history/config.py +68 -0
- kiro_cli_history-0.2.0/kiro_cli_history/main.py +773 -0
- kiro_cli_history-0.2.0/pyproject.toml +87 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Prabhu G
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
Creative Commons Legal Code
|
|
2
|
+
|
|
3
|
+
CC0 1.0 Universal
|
|
4
|
+
|
|
5
|
+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
|
6
|
+
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
|
7
|
+
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
|
8
|
+
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
|
9
|
+
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
|
10
|
+
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
|
11
|
+
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
|
12
|
+
HEREUNDER.
|
|
13
|
+
|
|
14
|
+
Statement of Purpose
|
|
15
|
+
|
|
16
|
+
The laws of most jurisdictions throughout the world automatically confer
|
|
17
|
+
exclusive Copyright and Related Rights (defined below) upon the creator
|
|
18
|
+
and subsequent owner(s) (each and all, an "owner") of an original work of
|
|
19
|
+
authorship and/or a database (each, a "Work").
|
|
20
|
+
|
|
21
|
+
Certain owners wish to permanently relinquish those rights to a Work for
|
|
22
|
+
the purpose of contributing to a commons of creative, cultural and
|
|
23
|
+
scientific works ("Commons") that the public can reliably and without fear
|
|
24
|
+
of later claims of infringement build upon, modify, incorporate in other
|
|
25
|
+
works, reuse and redistribute as freely as possible in any form whatsoever
|
|
26
|
+
and for any purposes, including without limitation commercial purposes.
|
|
27
|
+
These owners may contribute to the Commons to promote the ideal of a free
|
|
28
|
+
culture and the further production of creative, cultural and scientific
|
|
29
|
+
works, or to gain reputation or greater distribution for their Work in
|
|
30
|
+
part through the use and efforts of others.
|
|
31
|
+
|
|
32
|
+
For these and/or other purposes and motivations, and without any
|
|
33
|
+
expectation of additional consideration or compensation, the person
|
|
34
|
+
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
|
35
|
+
is an owner of Copyright and Related Rights in the Work, voluntarily
|
|
36
|
+
elects to apply CC0 to the Work and publicly distribute the Work under its
|
|
37
|
+
terms, with knowledge of his or her Copyright and Related Rights in the
|
|
38
|
+
Work and the meaning and intended legal effect of CC0 on those rights.
|
|
39
|
+
|
|
40
|
+
1. Copyright and Related Rights. A Work made available under CC0 may be
|
|
41
|
+
protected by copyright and related or neighboring rights ("Copyright and
|
|
42
|
+
Related Rights"). Copyright and Related Rights include, but are not
|
|
43
|
+
limited to, the following:
|
|
44
|
+
|
|
45
|
+
i. the right to reproduce, adapt, distribute, perform, display,
|
|
46
|
+
communicate, and translate a Work;
|
|
47
|
+
ii. moral rights retained by the original author(s) and/or performer(s);
|
|
48
|
+
iii. publicity and privacy rights pertaining to a person's image or
|
|
49
|
+
likeness depicted in a Work;
|
|
50
|
+
iv. rights protecting against unfair competition in regards to a Work,
|
|
51
|
+
subject to the limitations in paragraph 4(a), below;
|
|
52
|
+
v. rights protecting the extraction, dissemination, use and reuse of data
|
|
53
|
+
in a Work;
|
|
54
|
+
vi. database rights (such as those arising under Directive 96/9/EC of the
|
|
55
|
+
European Parliament and of the Council of 11 March 1996 on the legal
|
|
56
|
+
protection of databases, and under any national implementation
|
|
57
|
+
thereof, including any amended or successor version of such
|
|
58
|
+
directive); and
|
|
59
|
+
vii. other similar, equivalent or corresponding rights throughout the
|
|
60
|
+
world based on applicable law or treaty, and any national
|
|
61
|
+
implementations thereof.
|
|
62
|
+
|
|
63
|
+
2. Waiver. To the greatest extent permitted by, but not in contravention
|
|
64
|
+
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
|
65
|
+
irrevocably and unconditionally waives, abandons, and surrenders all of
|
|
66
|
+
Affirmer's Copyright and Related Rights and associated claims and causes
|
|
67
|
+
of action, whether now known or unknown (including existing as well as
|
|
68
|
+
future claims and causes of action), in the Work (i) in all territories
|
|
69
|
+
worldwide, (ii) for the maximum duration provided by applicable law or
|
|
70
|
+
treaty (including future time extensions), (iii) in any current or future
|
|
71
|
+
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
|
72
|
+
including without limitation commercial, advertising or promotional
|
|
73
|
+
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
|
74
|
+
member of the public at large and to the detriment of Affirmer's heirs and
|
|
75
|
+
successors, fully intending that such Waiver shall not be subject to
|
|
76
|
+
revocation, rescission, cancellation, termination, or any other legal or
|
|
77
|
+
equitable action to disrupt the quiet enjoyment of the Work by the public
|
|
78
|
+
as contemplated by Affirmer's express Statement of Purpose.
|
|
79
|
+
|
|
80
|
+
3. Public License Fallback. Should any part of the Waiver for any reason
|
|
81
|
+
be judged legally invalid or ineffective under applicable law, then the
|
|
82
|
+
Waiver shall be preserved to the maximum extent permitted taking into
|
|
83
|
+
account Affirmer's express Statement of Purpose. In addition, to the
|
|
84
|
+
extent the Waiver is so judged Affirmer hereby grants to each affected
|
|
85
|
+
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
|
86
|
+
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
|
87
|
+
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
|
88
|
+
maximum duration provided by applicable law or treaty (including future
|
|
89
|
+
time extensions), (iii) in any current or future medium and for any number
|
|
90
|
+
of copies, and (iv) for any purpose whatsoever, including without
|
|
91
|
+
limitation commercial, advertising or promotional purposes (the
|
|
92
|
+
"License"). The License shall be deemed effective as of the date CC0 was
|
|
93
|
+
applied by Affirmer to the Work. Should any part of the License for any
|
|
94
|
+
reason be judged legally invalid or ineffective under applicable law, such
|
|
95
|
+
partial invalidity or ineffectiveness shall not invalidate the remainder
|
|
96
|
+
of the License, and in such case Affirmer hereby affirms that he or she
|
|
97
|
+
will not (i) exercise any of his or her remaining Copyright and Related
|
|
98
|
+
Rights in the Work or (ii) assert any associated claims and causes of
|
|
99
|
+
action with respect to the Work, in either case contrary to Affirmer's
|
|
100
|
+
express Statement of Purpose.
|
|
101
|
+
|
|
102
|
+
4. Limitations and Disclaimers.
|
|
103
|
+
|
|
104
|
+
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
|
105
|
+
surrendered, licensed or otherwise affected by this document.
|
|
106
|
+
b. Affirmer offers the Work as-is and makes no representations or
|
|
107
|
+
warranties of any kind concerning the Work, express, implied,
|
|
108
|
+
statutory or otherwise, including without limitation warranties of
|
|
109
|
+
title, merchantability, fitness for a particular purpose, non
|
|
110
|
+
infringement, or the absence of latent or other defects, accuracy, or
|
|
111
|
+
the present or absence of errors, whether or not discoverable, all to
|
|
112
|
+
the greatest extent permissible under applicable law.
|
|
113
|
+
c. Affirmer disclaims responsibility for clearing rights of other persons
|
|
114
|
+
that may apply to the Work or any use thereof, including without
|
|
115
|
+
limitation any person's Copyright and Related Rights in the Work.
|
|
116
|
+
Further, Affirmer disclaims responsibility for obtaining any necessary
|
|
117
|
+
consents, permissions or other rights required for any use of the
|
|
118
|
+
Work.
|
|
119
|
+
d. Affirmer understands and acknowledges that Creative Commons is not a
|
|
120
|
+
party to this document and has no duty or obligation with respect to
|
|
121
|
+
this CC0 or use of the Work.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Prabhu G
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kiro-cli-history
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: A terminal UI for fuzzy-searching, browsing, and resuming Kiro CLI conversations
|
|
5
|
+
Keywords: kiro,kiro-cli,tui,history
|
|
6
|
+
Author: Prabhu G
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
License-File: LICENSES/CC0-1.0.txt
|
|
10
|
+
License-File: LICENSES/MIT.txt
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Topic :: Software Development
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Requires-Dist: textual>=0.60.0,<7
|
|
19
|
+
Requires-Dist: rich>=13.7.0,<15
|
|
20
|
+
Requires-Dist: platformdirs>=4.0.0,<5
|
|
21
|
+
Requires-Python: >=3.10, <4
|
|
22
|
+
Project-URL: Repository, https://github.com/mxmehl/kiro-cli-history
|
|
23
|
+
Project-URL: Changelog, https://github.com/mxmehl/kiro-cli-history/blob/main/CHANGELOG.md
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
<!--
|
|
27
|
+
SPDX-License-Identifier: MIT
|
|
28
|
+
SPDX-FileCopyrightText: 2026 Prabhu G <gangprab@amazon.com>
|
|
29
|
+
SPDX-FileCopyrightText: 2026 Max Mehl <https://mehl.mx>
|
|
30
|
+
-->
|
|
31
|
+
|
|
32
|
+
# kiro-cli-history
|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
A terminal UI for fuzzy-searching, browsing, and resuming [Kiro CLI](https://kiro.dev/docs/cli/) conversations.
|
|
37
|
+
|
|
38
|
+
## The problem
|
|
39
|
+
|
|
40
|
+
Kiro CLI has great built-in [conversation persistence](https://kiro.dev/docs/cli/chat/#conversation-persistence) — it saves your sessions and lets you resume them with `--resume` and `--resume-picker`. However, these are scoped to the directory where the session was started. If you work across many projects and directories, finding a specific past conversation means remembering which folder you were in at the time.
|
|
41
|
+
|
|
42
|
+
`kiro-cli-history` complements Kiro CLI's native persistence by adding **global fuzzy search across all sessions** — regardless of which directory they were started in. It searches the full content of every message exchanged, not just session titles.
|
|
43
|
+
|
|
44
|
+
## What it offers
|
|
45
|
+
|
|
46
|
+
- **Global search** — find conversations across all directories, not just the current one
|
|
47
|
+
- **Full-text fuzzy search** — searches every message you and Kiro exchanged, not just titles
|
|
48
|
+
- **Conversation preview** — read through the full exchange with markdown rendering before deciding to resume
|
|
49
|
+
- **One-key resume** — press `Ctrl+R` to jump into Kiro CLI and continue the conversation
|
|
50
|
+
- **Copy to clipboard** — press `Ctrl+Y` to copy an entire conversation
|
|
51
|
+
- **All session formats** — reads all three Kiro CLI storage versions (v1 SQLite, v2 SQLite, v3 JSONL), covering both `--classic` and new TUI modes
|
|
52
|
+
|
|
53
|
+
## Read-only
|
|
54
|
+
|
|
55
|
+
This tool **never writes to or modifies** your Kiro CLI session data. It only reads from:
|
|
56
|
+
- `~/.kiro/sessions/cli/` (JSONL sessions)
|
|
57
|
+
- `~/Library/Application Support/kiro-cli/data.sqlite3` (SQLite sessions, opened in read-only mode)
|
|
58
|
+
|
|
59
|
+
## Install
|
|
60
|
+
|
|
61
|
+
Requires at least Python 3.10.
|
|
62
|
+
|
|
63
|
+
With [pipx](https://pipx.pypa.io/):
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pipx install kiro-cli-history
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
With [uv](https://docs.astral.sh/uv/):
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
uv tool install kiro-cli-history
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
With pip:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pip3 install kiro-cli-history
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Usage
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
kiro-cli-history
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Run it from anywhere. It searches globally.
|
|
88
|
+
|
|
89
|
+
### Keyboard shortcuts
|
|
90
|
+
|
|
91
|
+
| Key | Action |
|
|
92
|
+
|-----|--------|
|
|
93
|
+
| `/` | Focus search bar |
|
|
94
|
+
| `j` / `k` or arrows | Navigate sessions |
|
|
95
|
+
| `Ctrl+R` | Resume the highlighted session in Kiro CLI |
|
|
96
|
+
| `Ctrl+Y` | Copy conversation to clipboard |
|
|
97
|
+
| `Ctrl+F` | Focus search bar |
|
|
98
|
+
| `Esc` | Clear search / Quit |
|
|
99
|
+
| `Ctrl+C` | Quit |
|
|
100
|
+
|
|
101
|
+
### Searching
|
|
102
|
+
|
|
103
|
+
Type in the search bar to fuzzy-search across:
|
|
104
|
+
- Session titles
|
|
105
|
+
- Working directories
|
|
106
|
+
- Full conversation content (every message exchanged)
|
|
107
|
+
|
|
108
|
+
Search is case-insensitive and covers all session formats.
|
|
109
|
+
|
|
110
|
+
### Text selection
|
|
111
|
+
|
|
112
|
+
Hold **Option (Alt)** while dragging to select text from the preview pane. Or press **Ctrl+Y** to copy the full conversation to clipboard.
|
|
113
|
+
|
|
114
|
+
### Configuration
|
|
115
|
+
|
|
116
|
+
Settings are stored in a JSON file managed via the `config` subcommand — no need to edit it by hand.
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
kiro-cli-history config show # print all settings and the config file path
|
|
120
|
+
kiro-cli-history config get scroll_top
|
|
121
|
+
kiro-cli-history config set scroll_top true
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Available settings:
|
|
125
|
+
|
|
126
|
+
| Key | Default | Description |
|
|
127
|
+
|-----|---------|--------------|
|
|
128
|
+
| `scroll_top` | `false` | Show the start of a conversation in the preview pane instead of jumping to the most recent messages |
|
|
129
|
+
|
|
130
|
+
The config file lives at the platform's standard config location (e.g. `~/Library/Application Support/kiro-cli-history/config.json` on macOS).
|
|
131
|
+
|
|
132
|
+
## How it works
|
|
133
|
+
|
|
134
|
+
Kiro CLI stores conversations in three formats depending on the version and mode:
|
|
135
|
+
|
|
136
|
+
| Format | Location | Used by |
|
|
137
|
+
|--------|----------|---------|
|
|
138
|
+
| v3 (JSONL) | `~/.kiro/sessions/cli/*.json` + `*.jsonl` | `kiro-cli --classic` |
|
|
139
|
+
| v2 (SQLite) | `~/Library/Application Support/kiro-cli/data.sqlite3` | New TUI mode (`kiro-cli`) |
|
|
140
|
+
| v1 (SQLite) | Same database, `conversations` table | Legacy |
|
|
141
|
+
|
|
142
|
+
`kiro-cli-history` reads all three and presents them in a unified view. Each session shows:
|
|
143
|
+
- **Title** — first message or auto-generated title
|
|
144
|
+
- **Directory** — where the session was started
|
|
145
|
+
- **Date** — last activity (e.g., "7 Apr 2026")
|
|
146
|
+
- **Message count** — total exchanges
|
|
147
|
+
- **Duration** — elapsed time
|
|
148
|
+
- **Credit usage** — total credits spent on the session (JSONL/v3 sessions only — older SQLite sessions don't record this)
|
|
149
|
+
|
|
150
|
+
## How this complements Kiro CLI
|
|
151
|
+
|
|
152
|
+
Kiro CLI's native `--resume` and `--resume-picker` work well when you know which directory a session was started in. `kiro-cli-history` is a companion tool for when you need to find a conversation but don't remember where it happened — it gives you a global view with full-text search.
|
|
153
|
+
|
|
154
|
+
| | `--resume-picker` (native) | `kiro-cli-history` |
|
|
155
|
+
|---|---|---|
|
|
156
|
+
| Scope | Current directory | All directories |
|
|
157
|
+
| Search | Browse by title | Full-text across all messages |
|
|
158
|
+
| Preview | Title + message count | Full conversation with markdown |
|
|
159
|
+
|
|
160
|
+
## Platform
|
|
161
|
+
|
|
162
|
+
Currently mainly macOS (uses `pbcopy` for clipboard, macOS-specific paths).
|
|
163
|
+
|
|
164
|
+
Community PRs for Linux/Windows support are welcome.
|
|
165
|
+
|
|
166
|
+
## Contributing
|
|
167
|
+
|
|
168
|
+
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for the development setup and quality checks. Commits to the default branch follow [Conventional Commits](https://www.conventionalcommits.org/), and releases are automated with [release-please](https://github.com/googleapis/release-please) — see [CHANGELOG.md](CHANGELOG.md) for the release history.
|
|
169
|
+
|
|
170
|
+
## Credits
|
|
171
|
+
|
|
172
|
+
Inspired by [raine/claude-history](https://github.com/raine/claude-history) — an excellent fuzzy-search tool for Claude Code conversations. If you use Claude Code, check that out.
|
|
173
|
+
|
|
174
|
+
Forked from [prabhu-g/kiro-cli-history](https://github.com/prabhugr/kiro-cli-history) — thanks to Prabhu for the initial implementation!
|
|
175
|
+
|
|
176
|
+
## License
|
|
177
|
+
|
|
178
|
+
MIT
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPDX-License-Identifier: MIT
|
|
3
|
+
SPDX-FileCopyrightText: 2026 Prabhu G <gangprab@amazon.com>
|
|
4
|
+
SPDX-FileCopyrightText: 2026 Max Mehl <https://mehl.mx>
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# kiro-cli-history
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
A terminal UI for fuzzy-searching, browsing, and resuming [Kiro CLI](https://kiro.dev/docs/cli/) conversations.
|
|
12
|
+
|
|
13
|
+
## The problem
|
|
14
|
+
|
|
15
|
+
Kiro CLI has great built-in [conversation persistence](https://kiro.dev/docs/cli/chat/#conversation-persistence) — it saves your sessions and lets you resume them with `--resume` and `--resume-picker`. However, these are scoped to the directory where the session was started. If you work across many projects and directories, finding a specific past conversation means remembering which folder you were in at the time.
|
|
16
|
+
|
|
17
|
+
`kiro-cli-history` complements Kiro CLI's native persistence by adding **global fuzzy search across all sessions** — regardless of which directory they were started in. It searches the full content of every message exchanged, not just session titles.
|
|
18
|
+
|
|
19
|
+
## What it offers
|
|
20
|
+
|
|
21
|
+
- **Global search** — find conversations across all directories, not just the current one
|
|
22
|
+
- **Full-text fuzzy search** — searches every message you and Kiro exchanged, not just titles
|
|
23
|
+
- **Conversation preview** — read through the full exchange with markdown rendering before deciding to resume
|
|
24
|
+
- **One-key resume** — press `Ctrl+R` to jump into Kiro CLI and continue the conversation
|
|
25
|
+
- **Copy to clipboard** — press `Ctrl+Y` to copy an entire conversation
|
|
26
|
+
- **All session formats** — reads all three Kiro CLI storage versions (v1 SQLite, v2 SQLite, v3 JSONL), covering both `--classic` and new TUI modes
|
|
27
|
+
|
|
28
|
+
## Read-only
|
|
29
|
+
|
|
30
|
+
This tool **never writes to or modifies** your Kiro CLI session data. It only reads from:
|
|
31
|
+
- `~/.kiro/sessions/cli/` (JSONL sessions)
|
|
32
|
+
- `~/Library/Application Support/kiro-cli/data.sqlite3` (SQLite sessions, opened in read-only mode)
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
Requires at least Python 3.10.
|
|
37
|
+
|
|
38
|
+
With [pipx](https://pipx.pypa.io/):
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pipx install kiro-cli-history
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
With [uv](https://docs.astral.sh/uv/):
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
uv tool install kiro-cli-history
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
With pip:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip3 install kiro-cli-history
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Usage
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
kiro-cli-history
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Run it from anywhere. It searches globally.
|
|
63
|
+
|
|
64
|
+
### Keyboard shortcuts
|
|
65
|
+
|
|
66
|
+
| Key | Action |
|
|
67
|
+
|-----|--------|
|
|
68
|
+
| `/` | Focus search bar |
|
|
69
|
+
| `j` / `k` or arrows | Navigate sessions |
|
|
70
|
+
| `Ctrl+R` | Resume the highlighted session in Kiro CLI |
|
|
71
|
+
| `Ctrl+Y` | Copy conversation to clipboard |
|
|
72
|
+
| `Ctrl+F` | Focus search bar |
|
|
73
|
+
| `Esc` | Clear search / Quit |
|
|
74
|
+
| `Ctrl+C` | Quit |
|
|
75
|
+
|
|
76
|
+
### Searching
|
|
77
|
+
|
|
78
|
+
Type in the search bar to fuzzy-search across:
|
|
79
|
+
- Session titles
|
|
80
|
+
- Working directories
|
|
81
|
+
- Full conversation content (every message exchanged)
|
|
82
|
+
|
|
83
|
+
Search is case-insensitive and covers all session formats.
|
|
84
|
+
|
|
85
|
+
### Text selection
|
|
86
|
+
|
|
87
|
+
Hold **Option (Alt)** while dragging to select text from the preview pane. Or press **Ctrl+Y** to copy the full conversation to clipboard.
|
|
88
|
+
|
|
89
|
+
### Configuration
|
|
90
|
+
|
|
91
|
+
Settings are stored in a JSON file managed via the `config` subcommand — no need to edit it by hand.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
kiro-cli-history config show # print all settings and the config file path
|
|
95
|
+
kiro-cli-history config get scroll_top
|
|
96
|
+
kiro-cli-history config set scroll_top true
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Available settings:
|
|
100
|
+
|
|
101
|
+
| Key | Default | Description |
|
|
102
|
+
|-----|---------|--------------|
|
|
103
|
+
| `scroll_top` | `false` | Show the start of a conversation in the preview pane instead of jumping to the most recent messages |
|
|
104
|
+
|
|
105
|
+
The config file lives at the platform's standard config location (e.g. `~/Library/Application Support/kiro-cli-history/config.json` on macOS).
|
|
106
|
+
|
|
107
|
+
## How it works
|
|
108
|
+
|
|
109
|
+
Kiro CLI stores conversations in three formats depending on the version and mode:
|
|
110
|
+
|
|
111
|
+
| Format | Location | Used by |
|
|
112
|
+
|--------|----------|---------|
|
|
113
|
+
| v3 (JSONL) | `~/.kiro/sessions/cli/*.json` + `*.jsonl` | `kiro-cli --classic` |
|
|
114
|
+
| v2 (SQLite) | `~/Library/Application Support/kiro-cli/data.sqlite3` | New TUI mode (`kiro-cli`) |
|
|
115
|
+
| v1 (SQLite) | Same database, `conversations` table | Legacy |
|
|
116
|
+
|
|
117
|
+
`kiro-cli-history` reads all three and presents them in a unified view. Each session shows:
|
|
118
|
+
- **Title** — first message or auto-generated title
|
|
119
|
+
- **Directory** — where the session was started
|
|
120
|
+
- **Date** — last activity (e.g., "7 Apr 2026")
|
|
121
|
+
- **Message count** — total exchanges
|
|
122
|
+
- **Duration** — elapsed time
|
|
123
|
+
- **Credit usage** — total credits spent on the session (JSONL/v3 sessions only — older SQLite sessions don't record this)
|
|
124
|
+
|
|
125
|
+
## How this complements Kiro CLI
|
|
126
|
+
|
|
127
|
+
Kiro CLI's native `--resume` and `--resume-picker` work well when you know which directory a session was started in. `kiro-cli-history` is a companion tool for when you need to find a conversation but don't remember where it happened — it gives you a global view with full-text search.
|
|
128
|
+
|
|
129
|
+
| | `--resume-picker` (native) | `kiro-cli-history` |
|
|
130
|
+
|---|---|---|
|
|
131
|
+
| Scope | Current directory | All directories |
|
|
132
|
+
| Search | Browse by title | Full-text across all messages |
|
|
133
|
+
| Preview | Title + message count | Full conversation with markdown |
|
|
134
|
+
|
|
135
|
+
## Platform
|
|
136
|
+
|
|
137
|
+
Currently mainly macOS (uses `pbcopy` for clipboard, macOS-specific paths).
|
|
138
|
+
|
|
139
|
+
Community PRs for Linux/Windows support are welcome.
|
|
140
|
+
|
|
141
|
+
## Contributing
|
|
142
|
+
|
|
143
|
+
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for the development setup and quality checks. Commits to the default branch follow [Conventional Commits](https://www.conventionalcommits.org/), and releases are automated with [release-please](https://github.com/googleapis/release-please) — see [CHANGELOG.md](CHANGELOG.md) for the release history.
|
|
144
|
+
|
|
145
|
+
## Credits
|
|
146
|
+
|
|
147
|
+
Inspired by [raine/claude-history](https://github.com/raine/claude-history) — an excellent fuzzy-search tool for Claude Code conversations. If you use Claude Code, check that out.
|
|
148
|
+
|
|
149
|
+
Forked from [prabhu-g/kiro-cli-history](https://github.com/prabhugr/kiro-cli-history) — thanks to Prabhu for the initial implementation!
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
|
|
153
|
+
MIT
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""User configuration: a small JSON file under the platform's config directory."""
|
|
2
|
+
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
# SPDX-FileCopyrightText: 2026 Max Mehl <https://mehl.mx>
|
|
5
|
+
|
|
6
|
+
import json
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
from platformdirs import user_config_dir
|
|
10
|
+
|
|
11
|
+
APP_NAME = "kiro-cli-history"
|
|
12
|
+
|
|
13
|
+
# The type of any value a config key can hold.
|
|
14
|
+
ConfigValue = bool | int | str
|
|
15
|
+
|
|
16
|
+
# Known settings and their defaults. Keys are validated against this on `set`.
|
|
17
|
+
DEFAULTS: dict[str, ConfigValue] = {
|
|
18
|
+
"scroll_top": False,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def get_config_path() -> Path:
|
|
23
|
+
"""Return the path to the user's config.json, creating its directory if needed."""
|
|
24
|
+
config_dir = Path(user_config_dir(APP_NAME))
|
|
25
|
+
config_dir.mkdir(parents=True, exist_ok=True)
|
|
26
|
+
return config_dir / "config.json"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def load_config() -> dict[str, ConfigValue]:
|
|
30
|
+
"""Load the user config, merged over defaults. Falls back to defaults if invalid."""
|
|
31
|
+
path = get_config_path()
|
|
32
|
+
if not path.exists():
|
|
33
|
+
return dict(DEFAULTS)
|
|
34
|
+
try:
|
|
35
|
+
with path.open() as f:
|
|
36
|
+
data = json.load(f)
|
|
37
|
+
except (json.JSONDecodeError, OSError, ValueError):
|
|
38
|
+
return dict(DEFAULTS)
|
|
39
|
+
if not isinstance(data, dict):
|
|
40
|
+
return dict(DEFAULTS)
|
|
41
|
+
return {**DEFAULTS, **data}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def save_config(config: dict[str, ConfigValue]) -> None:
|
|
45
|
+
"""Write the config dict to disk as JSON."""
|
|
46
|
+
path = get_config_path()
|
|
47
|
+
with path.open("w") as f:
|
|
48
|
+
json.dump(config, f, indent=2, sort_keys=True)
|
|
49
|
+
f.write("\n")
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def coerce_value(key: str, raw_value: str) -> ConfigValue:
|
|
53
|
+
"""Coerce a CLI-provided string value to match the type of the key's default."""
|
|
54
|
+
if key not in DEFAULTS:
|
|
55
|
+
msg = f"Unknown config key: {key!r}. Known keys: {', '.join(sorted(DEFAULTS))}"
|
|
56
|
+
raise ValueError(msg)
|
|
57
|
+
default = DEFAULTS[key]
|
|
58
|
+
if isinstance(default, bool):
|
|
59
|
+
lowered = raw_value.strip().lower()
|
|
60
|
+
if lowered in ("1", "true", "yes", "on"):
|
|
61
|
+
return True
|
|
62
|
+
if lowered in ("0", "false", "no", "off"):
|
|
63
|
+
return False
|
|
64
|
+
msg = f"Invalid boolean value for {key!r}: {raw_value!r}"
|
|
65
|
+
raise ValueError(msg)
|
|
66
|
+
if isinstance(default, int):
|
|
67
|
+
return int(raw_value)
|
|
68
|
+
return raw_value
|