WIP: Terminal CSV Explorer for Large Files
Ninjask is a work-in-progress terminal-based CSV viewer designed for efficiently exploring large CSV datasets (millions of rows) using Polars for DataFrame operations.
- Fast navigation with virtual scrolling (only visible rows rendered)
- Zero-copy slicing for instant DataFrame operations
- In-terminal UI (TUI) with column selection, sorting, and regex search
- Handles malformed CSVs gracefully
Ninjask currently loads the entire DataFrame in memory using Polars' eager API. This can be memory exhausting for very large CSVs (buy more ram lol). Operations like filtering and searching are done through the Lazy API to avoid unnecessary intermediate steps with multiples filters and searches enabled.
You'll need a fairly recent Rust installation to build Ninjask (1.70.0 or newer recommended).
Quick install:
# Install Rust via rustup (official installer)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shAfter installation, restart your terminal or run:
source $HOME/.cargo/envVerify your installation:
rustc --versionFor more details or Windows installation, visit rust-lang.org/tools/install.
To compile on Windows you'll also need to install Visual Studio C++ toolkit.
- Clone the repository and enter the project directory:
git clone https://github.com/waldh4ri/ninjask.git
cd ninjask - Build in release mode for best performance:
cargo build --release
./target/release/ninjask -f data.csvYou can generate a dummy 100k lines data.csv like this:
./target/release/ninjask --test-f, --file <PATH>: CSV file to load (default: data.csv)-d, --delimiter <SEP>: Delimiter character (auto-detected if not specified)- Examples:
,,;,tab,|
- Examples:
--test: Generate dummy data.csv file if it doesn't exist--low-memory: Use Polars' low-memory mode for large CSV files--no-header: Treat first row as data (no header row)-h, --help: Show this help message
j/kor↑/↓: Navigate rowsh/lor←/→: Navigate columns/: Search data (regex)s: Sort by selected columnc: Column visibility pickert: Time filterv: Value filterq: Quit
This tool is experimental and under active development. Performance and features may change.
- Provide a responsive, interactive terminal UI to quickly get a glance at a CSV
- Explore Polars and Rust for high-performance data handling
- Polars - Lightning-fast DataFrame library for Rust and Python
- Ratatui - Rust library for building rich terminal user interfaces
MIT