A Terminal UI tool for selecting and exporting Sourcegraph Cody AI chat logs to Markdown.
cody-scribe allows you to easily convert your Cody AI chat logs from JSON format to readable Markdown files. The interactive Terminal UI provides powerful filtering, search, and customization options.
-
Clone this repository:
git clone https://github.com/Biggy1606/cody-scribe
-
Navigate to the directory:
cd cody-scribe
-
Make sure you have Node.js installed, then run:
node ./cody-scribe.js
Basic usage:
node cody-scribe.js path/to/your/chats.json
With options:
node cody-scribe.js --output=exported_chats.md path/to/your/chats.json
-r, --remove-empty
: Remove empty chats from the JSON file (creates a backup)-o, --output FILE
: Specify output markdown file (default: input-filename.md)-h, --help
: Display help message
- Interactive TUI: Navigate through your chats with an easy-to-use interface
- Powerful Filtering: Filter chats by keyword or date
- Pagination: Browse through large chat collections with ease
- Search: Find specific content across all chats
- Export Customization: Include/exclude timestamps and model information
- Smart Code Block Handling: Preserves file paths in code blocks
- Thinking Process Options: Remove, fold, or keep AI thinking process sections
-
Start the tool:
node cody-scribe.js cody_chats.json
-
Navigate the interface:
- Use
n
andp
to navigate between pages - Use
f
to filter by keyword - Use
d
to filter by date - Use
s
to search for specific content - Use
e
to toggle showing empty chats
- Use
-
Select chats for export:
- Enter specific chat numbers separated by commas (e.g.,
1,3,5
) - Or use
all
to select all filtered chats
- Enter specific chat numbers separated by commas (e.g.,
-
Customize your export:
- Choose whether to include timestamps and model information
- Select how to handle thinking process sections
- Provide a custom filename if desired
-
View your exported Markdown file:
cat exported_chats.md
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - Copyright (c) 2025 Igor Barcik & Contributors