{"id":18053806,"url":"https://github.com/hymkor/csvi","last_synced_at":"2026-01-18T09:42:53.822Z","repository":{"id":45494102,"uuid":"217722956","full_name":"hymkor/csvi","owner":"hymkor","description":"Terminal CSV Editor","archived":false,"fork":false,"pushed_at":"2024-10-20T09:21:11.000Z","size":614,"stargazers_count":38,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T22:52:56.048Z","etag":null,"topics":["csv","cui","go","golang"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/hymkor/csvi","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hymkor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-26T14:44:22.000Z","updated_at":"2025-03-09T17:26:10.000Z","dependencies_parsed_at":"2023-02-04T22:30:57.769Z","dependency_job_id":"a1235613-d6ba-4f73-b680-7adb85edbbec","html_url":"https://github.com/hymkor/csvi","commit_stats":{"total_commits":90,"total_committers":1,"mean_commits":90.0,"dds":0.0,"last_synced_commit":"791a72ddc972a82ea8bb2a6b74fe4d7c9605dbcd"},"previous_names":["zetamatta/csview","hymkor/csvi","hymkor/csview"],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hymkor%2Fcsvi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hymkor%2Fcsvi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hymkor%2Fcsvi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hymkor%2Fcsvi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hymkor","download_url":"https://codeload.github.com/hymkor/csvi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248312172,"owners_count":21082638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","cui","go","golang"],"created_at":"2024-10-31T00:08:07.310Z","updated_at":"2026-01-18T09:42:53.809Z","avatar_url":"https://github.com/hymkor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\"CSVI\" - Terminal CSV Editor\r\n============================\r\n\r\n\u003c!-- pwsh -Command \"badges.ps1\" | --\u003e\r\n[![Go Test](https://github.com/hymkor/csvi/actions/workflows/go.yml/badge.svg)](https://github.com/hymkor/csvi/actions/workflows/go.yml)\r\n[![License](https://img.shields.io/badge/License-MIT-red)](https://github.com/hymkor/csvi/blob/master/LICENSE)\r\n[![Go Reference](https://pkg.go.dev/badge/github.com/hymkor/csvi.svg)](https://pkg.go.dev/github.com/hymkor/csvi)\r\n\u003c!-- --\u003e\r\n\r\n( **\\\u003cEnglish\\\u003e** / [\\\u003cJapanese\\\u003e](./README_ja.md) )\r\n\r\n**CSVI** is a terminal-based CSV editor for UNIX-like systems and Windows.\r\n\r\n## Key Features\r\n\r\n- **Minimal changes on save**  \r\n  CSVI keeps the original formatting for every unmodified cell: quotes, line endings (LF/CRLF), BOM, encoding, and field/record separators.  \r\n  Only actual edits are saved—making it ideal for clean diffs and safe edits to production data.\r\n\r\n- **vi-style and Emacs-style keybindings**  \r\n  Move the cursor like in vi, and edit cells like in Emacs.\r\n\r\n- **Reads from both file and standard input**  \r\n  You can pipe CSV data into CSVI or open a file directly.\r\n\r\n- **Fast startup and background loading**  \r\n  Opens large files quickly without blocking the interface.\r\n\r\n- **Visual feedback for edits**  \r\n  Modified cells are underlined.  \r\n  Press `u` to undo a cell's change and restore its original value.\r\n\r\n- **Shows original format details**  \r\n  The bottom line of the screen shows technical info: quoting, encoding, field separators, and more—just as they appeared in the original file.\r\n\r\n- **Flexible encoding support**  \r\n  - UTF-8 (default)  \r\n  - UTF-16  \r\n  - Current Windows code page (auto-detected)  \r\n  - Any encoding from the [IANA registry] using `-iana NAME`\r\n\r\n- **Color scheme options**\r\n  - Default colors assume a dark background.\r\n  - Use `-rv` for light backgrounds, or set `NO_COLOR` to disable color output (https://no-color.org/ )\r\n\r\n[IANA registry]: http://www.iana.org/assignments/character-sets/character-sets.xhtml\r\n\r\n![image](./csvi.gif)\r\n\r\n[Video](https://www.youtube.com/watch?v=_cxBQKpfUds) by [@emisjerry](https://github.com/emisjerry)\r\n\r\nInstall\r\n-------\r\n\r\n### Manual Installation\r\n\r\nDownload the binary package from [Releases](https://github.com/hymkor/csvi/releases) and extract the executable.\r\n\r\n\u003e \u0026#9888;\u0026#65039; Note: The macOS build is experimental and not yet tested.\r\n\u003e Please let us know if you encounter any issues!\r\n\r\n\u003c!-- pwsh -Command \"readme-install.ps1\" | --\u003e\r\n\r\n### Use \"go install\" (requires Go toolchain)\r\n\r\n```\r\ngo install github.com/hymkor/csvi/cmd/csvi@latest\r\n```\r\n\r\nBecause `go install` introduces the executable into `$HOME/go/bin` or `$GOPATH/bin`, you need to add this directory to your $PATH to execute `csvi`.\r\n\r\n### Use [eget] installer (cross-platform)\"\r\n\r\n```\r\ncd (YOUR-BIN-DIRECTORY)\r\neget hymkor/csvi\r\n```\r\n\r\n[eget]: https://github.com/zyedidia/eget\r\n\r\n### Use [scoop]-installer (Windows only)\r\n\r\n```\r\nscoop install https://raw.githubusercontent.com/hymkor/csvi/master/csvi.json\r\n```\r\n\r\nor\r\n\r\n```\r\nscoop bucket add hymkor https://github.com/hymkor/scoop-bucket\r\nscoop install csvi\r\n```\r\n\r\n[scoop]: https://scoop.sh/\r\n\u003c!-- --\u003e\r\n\r\nUsage\r\n-----\r\n\r\n```\r\n$ csvi {options} FILENAME(...)\r\n```\r\n\r\nor\r\n\r\n```\r\n$ cat FILENAME | csvi {options}\r\n```\r\n\r\nNote: When reading from standard input, saving commands like `w` write to `-` (standard output) by default.\r\n\r\nOptions\r\n\r\n* `-help` this help\r\n* `-h int` the number of fixed header lines\r\n* `-c` use Comma as field-separator (default when suffix is `.csv`)\r\n* `-t` use TAB as field-separator (default when suffix is not `.csv`)\r\n* `-semicolon` use Semicolon as field-separator\r\n* `-iana string` [IANA-registered-name] to decode/encode NonUTF8 text\r\n* `-16be` Force read/write as UTF-16BE\r\n* `-16le` Force read/write as UTF-16LE\r\n* `-auto string` auto pilot (for testcode)\r\n* `-nonutf8` do not judge as UTF-8\r\n* `-w widths` set the widths of cells (e.g., `-w 14,0:10,1:20` to set the first column to 10 characters wide, the second column to 20 characters wide, and all others to 14 characters wide)\r\n* `-fixcol` forbid insertion or deletion of cells (disables `i`, `a`, and some of `d`-prefixed deletion commands)\r\n* `-p` Protect the header line\r\n* `-readonly` Read Only Mode\r\n* `-rv` Enable reverse-video display (invert foreground and background colors)\r\n* `-ofs string` String used as the separator between cells in the output\r\n\r\n[IANA-registered-name]: https://www.iana.org/assignments/character-sets/character-sets.xhtml\r\n\r\nKey-binding\r\n-----------\r\n\r\n* Move Cursor\r\n    * `h`, `←`, `Shift`+`TAB` (move cursor left)\r\n    * `j`, `Ctrl`+`N`, `↓`, `Enter` (move cursor down)\r\n    * `k`, `Ctrl`+`P`, `↑` (move cursor up)\r\n    * `l`, `→`, `TAB` (move cursor right)\r\n    * `\u003c`, `gg` (move to the beginning of file)\r\n    * `\u003e`,`G` (move to the end of file)\r\n    * `0`, `^`, `Ctrl`+`A` (move to the beginning of the current line)\r\n    * `$`,`Ctrl`+`E` (move to the end of the current line)\r\n    * `PgUp`, `Ctrl`+`B` (move up one page)\r\n    * `PgDn`, `Ctrl`+`F` (move down one page)\r\n* Search\r\n    * `/` (search forward for a partial match)\r\n    * `?` (search backward for a partial match)\r\n    * `n` (repeat the previous search forward)\r\n    * `N` (repeat the previous search backward)\r\n    * `*` (search forward for the next cell that exactly matches the current one)\r\n    * `#` (search backward for the previous cell that exactly matches the current one)\r\n* Edit\r\n    * `i` (insert a new cell before the current one)\r\n    * `a` (append a new cell after the current one)\r\n    * `r` (replace the current cell)\r\n    * `x` (clear the current cell)\r\n    * `dl`, `d`+`SPACE`, `d`+`TAB`, `dv` (delete cell and shift cells on the right)\r\n    * `dd`, `dr`, `D` (delete the current line)\r\n    * `dc`, `d|` (delete the current column)\r\n    * `w` (write to a file or STDOUT(`'-'`))\r\n    * `o` (append a new line after the current one)\r\n    * `O` (insert a new line before the current one)\r\n    * `\"` (enclose or remove double quotations if possible)\r\n    * `u` (restore the original value of the current cell)\r\n    * `yl`, `y`+`SPACE`, `y`+`TAB`, `yv` (copy the values of the current cell to kill-buffer)\r\n    * `yy`, `yr`, `Y` (copy the values of the current row to kill-buffer)\r\n    * `yc`, `y|` (copy the values of the current column to kill-buffer)\r\n    * `p` (paste the values of kill-buffer after the current cell, row or column)\r\n    * `P` (paste the values of kill-buffer before the current cell, row or column)\r\n    * `ALT`+`p`, `ESC`+`p` (overwrite the current cell/row/column with the content of the kill-buffer)\r\n* Display settings\r\n    * `L` (reload the file using a specified encoding)\r\n    * `Ctrl`+`L` (Repaint)\r\n    * `]` (widen the column at the cursor)\r\n    * `[` (narrow the column at the cursor)\r\n* Quit: `q` or `ESC`+`q`\r\n\r\nEnvironment Variables\r\n---------------------\r\n\r\n### NO\\_COLOR\r\n\r\nIf the environment variable `NO_COLOR` is set to any value with at least one character,\r\ncsvi disables colored output.\r\nThis follows the standard proposed by [NO\\_COLOR](https://no-color.org).\r\n\r\n### RUNEWIDTH\\_EASTASIAN\r\n\r\nSpecifies the display width for Unicode characters classified as ambiguous width.\r\n\r\n* Double-width: `set RUNEWIDTH_EASTASIAN=1`\r\n* Single-width: `set RUNEWIDTH_EASTASIAN=0` (any non-`1` value with at least one character is also valid)\r\n\r\n### COLORFGBG\r\n\r\nWhen the environment variable is defined in the form `(FG);(BG)` and the foreground `(FG)` is less than the background `(BG)`,\r\ncsvi automatically uses color settings suitable for light backgrounds (equivalent to the `-rv` option).\r\n\r\ncsvi normally uses the terminal's default colors via the escape sequences `ESC[39m` and `ESC[49m`.\r\nThus, the `(FG);(BG)` values are **not** directly applied; they are only used to determine whether gray background lines should be adjusted toward light or dark shades.\r\n\r\n### GOREADLINESKK\r\n\r\nWhen the environment variable `GOREADLINESKK` specifies dictionary files,\r\nthe built-in SKK[^SKK] Kana-to-Kanji conversion via [go-readline-skk] is enabled.\r\n\r\n* **Windows**\r\n\r\n  * `set GOREADLINESKK=SYSTEMJISYOPATH1;SYSTEMJISYOPATH2...;user=USERJISYOPATH`\r\n  * Example:\r\n    `set GOREADLINESKK=~/Share/Etc/SKK-JISYO.L;~/Share/Etc/SKK-JISYO.emoji;user=~/.go-skk-jisyo`\r\n* **Linux**\r\n\r\n  * `export GOREADLINESKK=SYSTEMJISYOPATH1:SYSTEMJISYOPATH2...:user=USERJISYOPATH`\r\n\r\n(Note: `~` is automatically expanded to `%USERPROFILE%` on Windows, even in `cmd.exe`.)\r\n\r\n[^SKK]: Simple Kana to Kanji conversion program. One of the Japanese input method editors.\r\n\r\n[go-readline-skk]: https://github.com/nyaosorg/go-readline-skk\r\n\r\nUse as a Go package\r\n-------------------\r\n\r\n```examples/example.go\r\npackage main\r\n\r\nimport (\r\n    \"fmt\"\r\n    \"os\"\r\n    \"strings\"\r\n\r\n    \"github.com/mattn/go-colorable\"\r\n\r\n    \"github.com/hymkor/csvi\"\r\n    \"github.com/hymkor/csvi/uncsv\"\r\n)\r\n\r\nfunc main() {\r\n    source := `A,B,C,D\r\n\"A1\",\"B1\",\"C1\",\"D1\"\r\n\"A2\",\"B2\",\"C2\",\"D2\"`\r\n\r\n    cfg := \u0026csvi.Config{\r\n        Mode: \u0026uncsv.Mode{Comma: ','},\r\n    }\r\n\r\n    result, err := cfg.Edit(strings.NewReader(source), colorable.NewColorableStdout())\r\n\r\n    if err != nil {\r\n        fmt.Fprintln(os.Stderr, err.Error())\r\n        os.Exit(1)\r\n    }\r\n\r\n    // // env GOEXPERIMENT=rangefunc go run example\r\n    // for row := range result.Each {\r\n    //     os.Stdout.Write(row.Rebuild(cfg.Mode))\r\n    // }\r\n    result.Each(func(row *uncsv.Row) bool {\r\n        os.Stdout.Write(row.Rebuild(cfg.Mode))\r\n        return true\r\n    })\r\n}\r\n```\r\n\r\nRelease Note\r\n------------\r\n\r\n- [English](./release_note_en.md)\r\n- [Japanese](./release_note_ja.md)\r\n\r\nAcknowledgements\r\n----------------\r\n\r\n- [sergeevabc (Aleksandr Sergeev)](https://github.com/sergeevabc)\r\n- [kevin-gwyrdh (Kevin)](https://github.com/kevin-gwyrdh)\r\n- [emisjerry (emisjerry)](https://github.com/emisjerry)\r\n- [rinodrops (Rino)](https://github.com/rinodrops)\r\n- [toolleeo](https://github.com/toolleeo)\r\n- [wumfi](https://github.com/wumfi)\r\n- [presianbg (Presian Yankulov)](https://github.com/presianbg)\r\n\r\nAuthor\r\n------\r\n\r\n- [hymkor (HAYAMA Kaoru)](https://github.com/hymkor)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhymkor%2Fcsvi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhymkor%2Fcsvi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhymkor%2Fcsvi/lists"}