{"id":51026946,"url":"https://github.com/gitstq/csvforge-cli","last_synced_at":"2026-06-21T20:02:37.756Z","repository":{"id":361051844,"uuid":"1252897092","full_name":"gitstq/csvforge-cli","owner":"gitstq","description":"📊 CSVForge-CLI - Lightweight Terminal CSV Data Processing Engine | 轻量级终端CSV数据处理引擎","archived":false,"fork":false,"pushed_at":"2026-05-29T01:32:33.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-29T03:20:44.562Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/gitstq.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":"2026-05-29T01:28:20.000Z","updated_at":"2026-05-29T01:32:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gitstq/csvforge-cli","commit_stats":null,"previous_names":["gitstq/csvforge-cli"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gitstq/csvforge-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fcsvforge-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fcsvforge-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fcsvforge-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fcsvforge-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gitstq","download_url":"https://codeload.github.com/gitstq/csvforge-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fcsvforge-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34623906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"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":[],"created_at":"2026-06-21T20:02:37.677Z","updated_at":"2026-06-21T20:02:37.749Z","avatar_url":"https://github.com/gitstq.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📊 CSVForge-CLI\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eLightweight Terminal CSV Data Processing Engine\u003c/b\u003e\u003cbr\u003e\n  \u003ci\u003eZero Dependencies · SQL-like Queries · Multi-Format Conversion\u003c/i\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"./README_zh.md\"\u003e简体中文\u003c/a\u003e |\n  \u003ca href=\"./README_zh_TW.md\"\u003e繁體中文\u003c/a\u003e |\n  \u003cb\u003eEnglish\u003c/b\u003e\n\u003c/p\u003e\n\n---\n\n## 🎉 Introduction\n\n**CSVForge-CLI** is a powerful, zero-dependency terminal toolkit for CSV data processing. Inspired by tools like `jq` for JSON, CSVForge brings SQL-like query capabilities, multi-format conversion, and data transformation utilities directly to your command line.\n\n### Why CSVForge?\n\n- **🔥 Zero Dependencies**: Pure Python standard library, no external packages required\n- **⚡ Lightning Fast**: Optimized for large CSV files with streaming support\n- **🎯 SQL-like Queries**: Filter, sort, and aggregate data with intuitive syntax\n- **🔄 Multi-Format**: Convert between CSV, JSON, Markdown, HTML, and TSV\n- **📊 Data Analytics**: Built-in statistics and schema analysis\n- **🎨 Beautiful Output**: Formatted terminal tables with Unicode box-drawing\n\n---\n\n## ✨ Core Features\n\n### 📖 Data Viewing \u0026 Exploration\n- **Beautiful Table Display**: Unicode box-drawing formatted tables\n- **Head/Tail Support**: Quick preview of first/last N rows\n- **Schema Detection**: Automatic column type detection (numeric, text, date, boolean)\n\n### 🔍 SQL-like Query Engine\n- **SELECT**: Choose specific columns\n- **WHERE**: Filter with conditions (`age \u003e 30`, `name contains \"John\"`)\n- **ORDER BY**: Sort by any column\n- **LIMIT**: Restrict result count\n- **DISTINCT**: Remove duplicate rows\n\n### 📊 Statistics \u0026 Analytics\n- **Column Analysis**: Type detection, unique values, most common values\n- **Numeric Statistics**: Min, max, sum, average for numeric columns\n- **Data Quality**: Empty value detection and reporting\n\n### 🔄 Format Conversion\n- **Export to JSON**: Array of objects format\n- **Export to Markdown**: GitHub-flavored tables\n- **Export to HTML**: Styled HTML tables\n- **Export to TSV**: Tab-separated values\n\n### 🛠️ Data Transformation\n- **Add/Rename/Delete Columns**: Easy schema modifications\n- **Merge Columns**: Combine multiple columns with custom separators\n- **Split Columns**: Break apart delimited values\n\n---\n\n## 🚀 Quick Start\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/gitstq/csvforge-cli.git\ncd csvforge-cli\n\n# Make executable and add to PATH\nchmod +x csvforge.py\nsudo ln -s $(pwd)/csvforge.py /usr/local/bin/csvforge\n\n# Or install via pip\npip install -e .\n```\n\n### Requirements\n\n- **Python**: 3.8 or higher\n- **Dependencies**: None (zero-dependency design)\n\n---\n\n## 📖 Usage Guide\n\n### View CSV Data\n\n```bash\n# Display CSV with formatted table\ncsvforge view data.csv\n\n# Show first 5 rows\ncsvforge head data.csv -n 5\n\n# Show last 5 rows\ncsvforge tail data.csv -n 5\n\n# View without header row\ncsvforge view data.csv --no-header\n```\n\n### Query Data\n\n```bash\n# Filter rows where age \u003e 30\ncsvforge query data.csv -w \"age \u003e 30\"\n\n# Select specific columns\ncsvforge query data.csv -s \"name,email,city\"\n\n# Combined query with sort and limit\ncsvforge query data.csv -w \"salary \u003e 50000\" -o salary -r -l 10\n\n# String contains filter\ncsvforge query data.csv -w \"department contains Engineer\"\n```\n\n### Convert Formats\n\n```bash\n# Convert to JSON\ncsvforge convert data.csv -f json -o output.json\n\n# Convert to Markdown\ncsvforge convert data.csv -f markdown -o output.md\n\n# Convert to HTML\ncsvforge convert data.csv -f html -o output.html\n\n# Convert to TSV\ncsvforge convert data.csv -f tsv -o output.tsv\n```\n\n### Statistics\n\n```bash\n# Show comprehensive statistics\ncsvforge stats data.csv\n\n# Output stats as JSON\ncsvforge stats data.csv --json\n```\n\n### Transform Data\n\n```bash\n# Rename column\ncsvforge transform data.csv --rename \"old_name:new_name\" -o output.csv\n\n# Add new column\ncsvforge transform data.csv --add \"status:active\" -o output.csv\n\n# Delete column\ncsvforge transform data.csv --delete \"unnecessary_column\" -o output.csv\n```\n\n### Schema Information\n\n```bash\n# Show column schema\ncsvforge schema data.csv\n```\n\n### Pipe Support\n\n```bash\n# Read from stdin\ncat data.csv | csvforge view -\n\n# Chain commands\ncat data.csv | csvforge query - -w \"age \u003e 25\" | csvforge convert - -f json\n```\n\n---\n\n## 💡 Design Philosophy\n\n### Zero-Dependency Principle\nCSVForge is built entirely on Python's standard library. This means:\n- **No installation hassles**: Works on any Python 3.8+ system\n- **No version conflicts**: Never worry about dependency updates\n- **Portable**: Easy to deploy in restricted environments\n\n### SQL-like Syntax\nWe believe data manipulation should be intuitive. CSVForge's query syntax mirrors SQL:\n- `WHERE` for filtering\n- `ORDER BY` for sorting\n- `SELECT` for projection\n- `LIMIT` for pagination\n\n### Unix Philosophy\nCSVForge follows the Unix philosophy of doing one thing well:\n- **Composable**: Chain with other CLI tools via pipes\n- **Text-based**: Output is always human-readable\n- **Scriptable**: Easy to integrate into automation workflows\n\n---\n\n## 📦 Roadmap\n\n### v1.1.0 (Planned)\n- [ ] JOIN operations for multiple CSV files\n- [ ] Aggregate functions (GROUP BY)\n- [ ] Regular expression filtering\n- [ ] Column arithmetic operations\n\n### v1.2.0 (Planned)\n- [ ] Interactive TUI mode\n- [ ] Configuration file support\n- [ ] Custom output templates\n- [ ] Batch processing mode\n\n### v2.0.0 (Future)\n- [ ] Plugin system for custom functions\n- [ ] Streaming processing for huge files\n- [ ] Parallel query execution\n- [ ] SQL dialect compatibility layer\n\n---\n\n## 🤝 Contributing\n\nWe welcome contributions! Please follow these guidelines:\n\n1. **Fork** the repository\n2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)\n3. **Commit** your changes (`git commit -m 'feat: add amazing feature'`)\n4. **Push** to the branch (`git push origin feature/amazing-feature`)\n5. **Open** a Pull Request\n\n### Commit Convention\n\nWe follow the [Conventional Commits](https://www.conventionalcommits.org/) specification:\n\n- `feat:` New features\n- `fix:` Bug fixes\n- `docs:` Documentation changes\n- `refactor:` Code refactoring\n- `test:` Test additions/changes\n- `chore:` Build/tooling changes\n\n---\n\n## 📄 License\n\nThis project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.\n\n---\n\n## 🙏 Acknowledgments\n\n- Inspired by the excellent [jq](https://stedolan.github.io/jq/) tool for JSON\n- Built with Python's powerful standard library\n- Thanks to all contributors and users\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eMade with ❤️ by the CSVForge Team\u003c/b\u003e\u003cbr\u003e\n  \u003ca href=\"https://github.com/gitstq/csvforge-cli\"\u003eGitHub\u003c/a\u003e •\n  \u003ca href=\"https://github.com/gitstq/csvforge-cli/issues\"\u003eIssues\u003c/a\u003e •\n  \u003ca href=\"https://github.com/gitstq/csvforge-cli/discussions\"\u003eDiscussions\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitstq%2Fcsvforge-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitstq%2Fcsvforge-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitstq%2Fcsvforge-cli/lists"}