# csvi

> Terminal CSV editor with vi-style navigation and minimal change tracking for clean diffs

Stars: 188 · Categories: Editor

- Repository: https://github.com/hymkor/csvi
- Website: https://hymkor.github.io/csvi/
- Page: https://www.trmn.sh/tools/csvi

## Install

- Scoop: `scoop install https://raw.githubusercontent.com/hymkor/csvi/master/csvi.json`
- Go Install: `go install github.com/hymkor/csvi/cmd/csvi@latest`
- eget: `eget hymkor/csvi`

## Overview

Csvi is a terminal-based CSV editor that combines vi-style navigation with specialized CSV editing capabilities. It preserves original file formatting including quotes, line endings, encoding, and field separators, only modifying cells that are actually edited. This approach ensures clean diffs and safe edits when working with production CSV data.

The editor uses vi-style keybindings for cursor movement (`h`, `j`, `k`, `l`) and provides Emacs-style editing within cells. It supports common CSV operations like inserting/deleting cells and rows (`i`, `a`, `dd`, `dc`), copy/paste operations (`y`, `p`), and search functionality (`/`, `?`, `n`). Modified cells are visually marked with underlining, and users can undo individual cell changes with `u` to restore original values.

Csvi handles various encodings including UTF-8, UTF-16, and Windows code pages, with automatic detection capabilities. It can read from files or standard input, making it suitable for pipeline operations. The tool opens large files quickly with background loading and provides technical details about the original file format in the status line. It supports flexible field separators (comma, tab, semicolon) and offers color scheme options including light background support and NO_COLOR compliance.

### Installation

```bash
# via Scoop
scoop install https://raw.githubusercontent.com/hymkor/csvi/master/csvi.json
```

```bash
# via Go Install
go install github.com/hymkor/csvi/cmd/csvi@latest
```

```bash
# via eget
eget hymkor/csvi
```

![Csvi terminal CSV editor in action](https://media.trmn.sh/cached/0460989f38d438b464de3ffd7c3613e6349b919123c5339996bec67e26fef56b.gif)

## Alternatives

- [dawn](https://www.trmn.sh/tools/dawn.md): Terminal-based markdown editor with live rendering, math support, and distraction-free writing features (484 stars)
- [durdraw](https://www.trmn.sh/tools/durdraw.md): ASCII, Unicode and ANSI art editor for Unix-like systems with frame-based animation support (1.9k stars)
- [flowcontrol](https://www.trmn.sh/tools/flowcontrol.md): TUI text editor built with Zig, featuring tree-sitter syntax highlighting, LSP support, and multiple keybinding modes (Zig, 2.5k stars)
- [amp](https://www.trmn.sh/tools/amp.md): Vi/Vim-inspired terminal text editor built in Rust with simplified interaction model and modern features. (4.1k stars)
- [Fresh](https://www.trmn.sh/tools/fresh.md): Terminal text editor with VS Code-style keybindings, mouse support, LSP, multi-cursor editing, and a command palette that requires no configuration. (Rust, 9.4k stars)

## Guides

- [Best CSV Tools for the Command Line](https://www.trmn.sh/best/csv-tools): Compare Miller, VisiData, xsv, qo and csvlens for querying, transforming and browsing CSV files from the terminal.

---

Canonical: https://www.trmn.sh/tools/csvi
