{"id":40008334,"url":"https://github.com/guuzaa/tc","last_synced_at":"2026-01-19T02:30:51.247Z","repository":{"id":256009479,"uuid":"854099923","full_name":"guuzaa/tc","owner":"guuzaa","description":"📊 A simple and efficient token count program written in Rust!","archived":false,"fork":false,"pushed_at":"2024-09-14T13:18:41.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-14T23:37:17.249Z","etag":null,"topics":["rust","tokencounter","unicode-characters","wordcounter"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/guuzaa.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":"2024-09-08T12:16:38.000Z","updated_at":"2024-09-14T22:43:37.000Z","dependencies_parsed_at":"2024-09-09T17:57:14.576Z","dependency_job_id":null,"html_url":"https://github.com/guuzaa/tc","commit_stats":null,"previous_names":["guuzaa/wc.rs","guuzaa/tc"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/guuzaa/tc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guuzaa%2Ftc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guuzaa%2Ftc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guuzaa%2Ftc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guuzaa%2Ftc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guuzaa","download_url":"https://codeload.github.com/guuzaa/tc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guuzaa%2Ftc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28558221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T00:46:33.223Z","status":"online","status_checked_at":"2026-01-19T02:00:08.049Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["rust","tokencounter","unicode-characters","wordcounter"],"created_at":"2026-01-19T02:30:50.624Z","updated_at":"2026-01-19T02:30:51.242Z","avatar_url":"https://github.com/guuzaa.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📊 Token Count (tc) 🦀\n\nA simple and efficient token count program written in Rust! 🚀\n\nEnglish | [简体中文](docs/README-zh-CN.md) | [繁體中文](docs/README-zh-TW.md) | [日本語](docs/README-ja-JP.md) | [한국어](docs/README-ko-KR.md) | [Deutsch](docs/README-de-DE.md)\n\n## 📝 Description\n\nThis Rust implementation of the classic `wc` (word count) command-line tool allows you to count lines, words, characters, and even tokens in text files or from standard input. It's fast, reliable, and supports Unicode! 🌍✨\n\n## 🎯 Features\n\n- Count lines 📏\n- Count words 🔤\n- Count characters (including multi-byte Unicode characters) 🔡\n- Count tokens using various tokenizer models 🔢\n- Process multiple files 📚\n- Read from standard input 🖥️\n- Supports various languages (English, Korean, Japanese, and more!) 🌐\n\n## 🛠️ Installation\n\nThere are two ways to install tc:\n\n### Option 1: Install from source\n\n1. Make sure you have Rust installed on your system. If not, get it from [rust-lang.org](https://www.rust-lang.org/tools/install) 🦀\n\n2. Clone this repository:\n   ```\n   git clone https://github.com/guuzaa/tc.git\n   cd tc\n   ```\n\n3. Build the project:\n   ```\n   cargo build --release\n   ```\n\n4. The executable will be available at `target/release/tc`\n\n### Option 2: Install pre-built binaries\n\n1. Go to the [Releases page](https://github.com/guuzaa/tc/releases) of the tc repository.\n\n2. Download the latest release for your operating system and architecture.\n\n3. Extract the downloaded archive.\n\n4. Move the `tc` executable to a directory in your system's PATH (e.g., `/usr/local/bin` on Unix-like systems).\n\n5. You can now use tc from anywhere in your terminal!\n\n## 🚀 Usage\n\n### Options:\n\n- `-l, --lines`: Show line count 📏\n- `-w, --words`: Show word count 🔤\n- `-c, --chars`: Show character count 🔡\n- `-t, --tokens`: Show token count 🔢\n- `--model \u003cMODEL\u003e`: Choose tokenizer model (default: gpt3)\n\nAvailable models:\n- `gpt3`: r50k_base\n- `edit`: p50k_edit\n- `code`: p50k_base\n- `chatgpt`: cl100k_base\n- `gpt4o`: o200k_base\n\nIf no options are specified, all counts (lines, words, characters, and tokens) will be shown.\n\n### Examples:\n\n1. Count lines, words, and characters in a file:\n   ```\n   tc example.txt\n   ```\n\n2. Count only words in multiple files:\n   ```\n   tc -w file1.txt file2.txt file3.txt\n   ```\n\n3. Count lines and characters from standard input:\n   ```\n   echo \"Hello, World!\" | tc -lc\n   ```\n\n4. Count tokens using the ChatGPT tokenizer:\n   ```\n   tc -t --model chatgpt example.txt\n   ```\n\n5. Count everything in files with different languages:\n   ```\n   tc english.txt korean.txt japanese.txt\n   ```\n\n## 🤝 Contributing\n\nContributions are welcome! Feel free to submit issues or pull requests. 🎉\n\n## 📜 License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. 📄\n\n## 🙏 Acknowledgements\n\n- The Rust community for their amazing tools and support 🦀❤️\n- The original Unix `wc` command for inspiration 🖥️\n- The editor Cursor 🤖\n\nHappy counting! 🎉📊🚀","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguuzaa%2Ftc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguuzaa%2Ftc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguuzaa%2Ftc/lists"}