csbee
(CSV View) is a terminal user interface (TUI) application built with ratatui
that allows users to view and interact with CSV files in a highly intuitive and user-friendly manner. This application provides a powerful way to inspect, filter, query, and order CSV data, all from within your terminal.
- CSV Schema Display: Displays the schema of the CSV file on one side of the interface, providing a clear view of the column names and their respective data types.
- CSV Table View: Shows the contents of the CSV file as a table, allowing for easy navigation and inspection of data.
- Filter Block: Allows users to filter the CSV data based on specific criteria.
- Query Block: Provides SQL-like query capabilities to perform complex data retrieval operations.
- Order By Block: Enables users to sort the CSV data based on specified columns.
-
Clone the Repository:
git clone https://github.com/rhasanm/csbee.git cd csbee
-
Build the Project: Ensure you have Rust and Cargo installed. Then run:
cargo build --release
-
Run the Application:
cargo run --release -- <path_to_csv_file>
To open a CSV file with csbee
, use the following command:
csbee <path_to_csv_file>
F
: Enter Filter mode.Q
: Enter Query mode.O
: Enter Order By mode.T
: Enter Table view mode.S
: Enter Schema view mode.q
: Quit the application.
use
df
as the table name when query with csbee.
Enter
: Submit the query.- Any character: Add character to query input.
Backspace
: Delete character from query input.Left Arrow
: Move cursor left in query input.Right Arrow
: Move cursor right in query input.Esc
: Exit query mode and return to Normal mode.
Enter
: Submit the filter.- Any character: Add character to filter input.
Backspace
: Delete character from filter input.Left Arrow
: Move cursor left in filter input.Right Arrow
: Move cursor right in filter input.Esc
: Exit Filter mode and return to Normal mode.
j
/Down Arrow
: Scroll down in the schema.k
/Up Arrow
: Scroll up in the schema.h
/Left Arrow
: Scroll left in the schema.l
/Right Arrow
: Scroll right in the schema.Esc
: Exit Schema mode and return to Normal mode.
- Tab: Switch between different blocks (Schema, Table, Filter, Query, Order By).
We welcome contributions from the community! If you find a bug or have a feature request, please open an issue on the GitHub repository. To contribute code, fork the repository, create a new branch with a descriptive name, make your changes, and open a pull request.
- Fork the Repository: Click the "Fork" button at the top of the repository page.
- Clone Your Fork:
git clone https://github.com/rhasanm/csbee.git cd csbee
- Create a Branch:
git checkout -b my-feature-branch
- Make Changes: Implement your changes or new features.
- Run Tests: Ensure all tests pass.
cargo test
- Commit and Push:
git add . git commit -m "Description of your changes" git push origin my-feature-branch
- Open a Pull Request: Go to the original repository and open a pull request from your fork.
This project is licensed under the MIT License. See the LICENSE file for details.
- Built with ratatui, a Rust library for building terminal user interfaces.
- Inspired by the need for efficient CSV data inspection and manipulation in terminal environments.
Thank you for using csbee
! If you have any questions or need further assistance, feel free to open an issue on GitHub or contact us at [[email protected]].