{"id":29910331,"url":"https://github.com/zdyxry/tokui","last_synced_at":"2026-01-20T08:06:23.105Z","repository":{"id":299166741,"uuid":"1002242901","full_name":"zdyxry/tokui","owner":"zdyxry","description":"An interactive TUI for visualizing code statistics from tokei.","archived":false,"fork":false,"pushed_at":"2025-07-02T08:09:18.000Z","size":1796,"stargazers_count":30,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-14T22:54:25.131Z","etag":null,"topics":["bubbletea","cloc","statistics","tokei","tui","visualization"],"latest_commit_sha":null,"homepage":"","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/zdyxry.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-15T03:11:54.000Z","updated_at":"2025-12-29T17:49:47.000Z","dependencies_parsed_at":"2025-06-15T04:32:29.592Z","dependency_job_id":"079f7236-90ac-4596-95dd-eadeed18d227","html_url":"https://github.com/zdyxry/tokui","commit_stats":null,"previous_names":["zdyxry/tokui"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/zdyxry/tokui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdyxry%2Ftokui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdyxry%2Ftokui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdyxry%2Ftokui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdyxry%2Ftokui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zdyxry","download_url":"https://codeload.github.com/zdyxry/tokui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdyxry%2Ftokui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28598875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bubbletea","cloc","statistics","tokei","tui","visualization"],"created_at":"2025-08-02T01:02:26.310Z","updated_at":"2026-01-20T08:06:23.099Z","avatar_url":"https://github.com/zdyxry.png","language":"Go","funding_links":[],"categories":["\u003ca name=\"programming\"\u003e\u003c/a\u003eProgramming","Table of Contents"],"sub_categories":[],"readme":"# 📊 Tokui\n\n[![Build](https://github.com/zdyxry/tokui/actions/workflows/build.yml/badge.svg)](https://github.com/zdyxry/tokui/actions/workflows/build.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/zdyxry/tokui)](https://goreportcard.com/report/github.com/zdyxry/tokui)\n\n**Tokui** is a high-performance, cross-platform command-line tool for visualizing and exploring your code statistics. It integrates with the powerful code statistics engine [tokei](https://github.com/XAMPPRocky/tokei) to present code line count metrics through a responsive, keyboard-driven Terminal User Interface (TUI), helping you to quickly analyze code composition and understand your project's structure.\n\n\u003e **Project Origin**\n\u003e\n\u003e This project is a fork of the excellent disk space analyzer [noxdir](https://github.com/crumbyte/noxdir), and was heavily modified and refactored by a **Large Language Model (LLM)**, transforming its functionality from a disk analyzer into a code statistics visualizer.\n\n## 📸 Previews\n\n![Demo](./assets/demo.gif)\n\n## ✨ Features\n\n- **Interactive Terminal UI**: Navigate through your project's directory structure with ease using your keyboard.\n- **Deep Tokei Integration**: Leverages the powerful analysis capabilities of `tokei` for accurate code statistics.\n- **Detailed Data Analysis**: Displays lines of code, comments, blanks, and total lines, categorized by language.\n- **File Preview**: Press `Enter` on any file to instantly preview its contents in a scrollable overlay window.\n- **Visual Charts**: Toggle a pie chart with `Ctrl+w` to intuitively visualize the proportion of each language.\n- **Dynamic Filtering and Searching**:\n  - Quickly search by file name (`/`).\n  - Filter statistics by a specific language (`Tab`), or select multiple languages for combined filtering (`Ctrl+L`).\n  - Flexible language selection overlay: Press `Ctrl+L` to open a multi-select menu for languages.\n- **High-Performance \u0026 Lightweight**: Written in Go, it compiles to a single, installation-free binary.\n- **Privacy-Focused**: Runs entirely locally. No telemetry or data uploads, ever.\n\n\n#### Main View\nA clean table showing code statistics for files and subdirectories in the current path.\n```\n┌─ 📊 Code Statistics ───────────────────────────────────────────────────────┐\n│  ICON  NAME                    LANGUAGES        CODE      TOTAL         %  │\n│  📂    internal                Go, ...          15,021    18,345    65.3%  │\n│  💻    main.go                 Go               850       1,010     3.6%   │\n│  📜    README.md               Markdown         120       150       0.5%   │\n│  ...                                                                       │\n└────────────────────────────────────────────────────────────────────────────┘\n```\n\n#### Language Selection Overlay (`Ctrl+L`)\nQuickly select one or more languages for combined filtering.\nUse `Space` to toggle selection, `Enter` to confirm, and `Esc` to cancel.\n\n```\n┌──────────── Select Languages ────────────────┐\n│ Space: toggle, Enter: confirm, Esc: cancel   │\n│ →  [x] Go                                    │\n│    [ ] Python                                │\n│    [x] Markdown                              │\n│ ...                                          │\n└──────────────────────────────────────────────┘\n```\n\n#### Language Distribution Chart (`Ctrl+w`)\nVisually represents the distribution of programming languages in the project.\n```\n┌───────────────────────────────────────────────┐\n│                  Language Distribution        │\n│    ███████                                    │\n│  ███████████     █ Go: 18,500 lines           │\n│  ███████████     █ YAML: 2,300 lines          │\n│    ███████       █ Markdown: 450 lines        │\n│      ███         ...                          │\n└───────────────────────────────────────────────┘\n```\n\n#### File Preview (`Enter` on files)\nInstantly preview file contents in a scrollable overlay window.\n```\n┌──────────────────── File Preview: main.go ─────────────────────────┐\n│                                                                    │\n│  package main                                                      │\n│                                                                    │\n│  import (                                                          │\n│      \"fmt\"                                                         │\n│      \"os\"                                                          │\n│  )                                                                 │\n│                                                                    │\n│  func main() {                                                     │\n│      fmt.Println(\"Hello, World!\")                                  │\n│  }                                                                 │\n│                                                                    │\n│  Press 'q' to close, ↑/↓/j/k to scroll, PgUp/PgDn for page   15/23 │\n└────────────────────────────────────────────────────────────────────┘\n```\n\n## ⚠️ Prerequisites\n\n**Tokui has a strong dependency on `tokei`**. Before using, please ensure you have `tokei` installed and added to your system's `PATH` environment variable.\n\n- **Install `tokei`**: [https://github.com/XAMPPRocky/tokei#installation](https://github.com/XAMPPRocky/tokei#installation)\n\n## 📦 Installation\n\n#### Pre-compiled Binaries\nYou can download the latest pre-compiled version from the [Releases](https://github.com/zdyxry/tokui/releases) page. Unzip the file and it's ready to use—no extra installation required.\n\n#### Build from Source (Go 1.24+ required)\n```bash\n# Clone the repository\ngit clone https://github.com/zdyxry/tokui.git\ncd tokui\n\n# Build\nmake build\n\n# Run\n./bin/tokui\n```\n\n## 🛠️ Usage\n\nTokui supports two modes of operation:\n\n#### 1. Direct Mode (Recommended)\nIn this mode, Tokui will automatically call the `tokei` command to analyze the specified directory.\n\n```bash\n# Analyze the current directory\ntokui\n\n# Analyze a specific directory\ntokui /path/to/your/project\n```\n\n#### 2. Pipe Mode\nYou can first run `tokei` manually and pipe its `json` output to `tokui`. This is useful when you need to use more complex arguments for `tokei`.\n\n```bash\n# Analyze the current directory\ntokei -o json . | tokui\n\n# Analyze a specific directory and exclude node_modules\ntokei -o json --exclude node_modules . | tokui\n```\n\n### CLI Arguments\n\nTokui currently supports the following command-line flags:\n\n```\nUsage:\n  tokui [directory] [flags]\n\nFlags:\n  -r, --root string   Specify the root directory to analyze. Defaults to the current directory \".\".\n                      Example: tokui --root=\"/path/to/project\"\n\n  -h, --help          Show help information\n```\n\n## ⌨️ Keybindings\n\n| Key                 | Action                                                              |\n| ------------------- | ------------------------------------------------------------------- |\n| `↑` / `k`           | Move cursor up                                                      |\n| `↓` / `j`           | Move cursor down                                                    |\n| `Enter`             | Enter selected directory / Preview file content                     |\n| `e`                 | Open file in editor                                                 |\n| `Backspace`         | Go back to the parent directory                                     |\n| `Tab`               | Cycle through language filters (All, Go, Python, ...)               |\n| `Ctrl`+`L`          | Open multi-language selection overlay (multi-select language filter) |\n| `/`                 | Activate/input file name filter (press `Esc` to exit filter mode)   |\n| `Ctrl`+`w`          | Show/hide language distribution pie chart                           |\n| `?`                 | Show/hide full help                                                 |\n| `q` / `Ctrl`+`c`    | Quit the application / Close file preview                           |\n\n### File Preview Mode\n\nWhen previewing a file, additional keyboard shortcuts are available:\n\n| Key                 | Action                                                              |\n| ------------------- | ------------------------------------------------------------------- |\n| `↑` / `k`           | Scroll up                                                           |\n| `↓` / `j`           | Scroll down                                                         |\n| `PgUp`              | Page up                                                             |\n| `PgDn`              | Page down                                                           |\n| `q` / `Esc`         | Close file preview and return to directory view                     |\n\n## 🤝 Contributing\n\nPull Requests are welcome! If you'd like to add new features or report bugs, please open an issue first to discuss your ideas.\n\n## 📝 License\n\nMIT © [crumbyte](https://github.com/crumbyte), [zdyxry](https://github.com/zdyxry)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdyxry%2Ftokui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzdyxry%2Ftokui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdyxry%2Ftokui/lists"}