A lightweight, interactive TUI (Text User Interface) viewer for JSON Lines (.jsonl) files with syntax highlighting and folding capabilities.
- 🚀 Fast and lightweight JSON Lines file viewer
- 🎨 Syntax highlighting for different JSON elements
- 📂 Collapsible JSON structures
- ⌨️ Vim-style navigation
↔️ Horizontal and vertical scrolling- 🖥️ Full-screen terminal interface
- 🔍 Easy navigation between JSON records
# Clone the repository
git clone https://github.com/guru4elephant/json-viewer.git
cd json-viewer
# Install dependencies
pip install -r requirements.txt
python3 setup.py install
- click
- prompt_toolkit
jv sample.jsonl
Key | Action |
---|---|
↑ /↓ |
Navigate between JSON records |
j /k |
Scroll up/down one line |
f /b |
Page down/up |
PageUp /PageDown |
Scroll page up/down |
Ctrl+F /Ctrl+B |
Alternative page up/down |
← /→ |
Scroll horizontally |
Enter |
Toggle fold/unfold JSON structure |
q |
Quit the viewer |
- 🔵 Cyan: Keys
- 🟢 Green: Strings
- 🟡 Yellow: Numbers
- 🟣 Purple: Boolean values
- 🔴 Red: Null values
- ⚪ White: Braces and commas
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with prompt_toolkit
- Inspired by the need for a simple, efficient JSONL file viewer
Dongdaxiang - @guru4elephant
If you found this project helpful, please give it a ⭐️!