Socket
Book a DemoInstallSign in
Socket

csv-tool-cli

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csv-tool-cli

Un outil CLI interactif pour manipuler les fichiers CSV (merge, diff, intersect, duplicates, split)

latest
Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
1
-75%
Maintainers
1
Weekly downloads
 
Created
Source

CSV Tool CLI

An interactive CLI tool to easily manipulate your CSV files.

Installation

npm install -g csv-tool-cli

Usage

Simply run the command:

csv-tool

Features

🔀 Merge

Combine multiple CSV files into a single file.

➖ Diff

Find rows present in the first CSV but absent from the second (based on a key).

∩ Intersect

Find common rows between two CSV files (based on a key).

🔍 Duplicates

Detect and extract duplicates in a CSV file (based on a key).

✂️ Split

Divide a CSV file into multiple smaller files:

  • By desired number of files
  • By maximum number of lines per file

Interface

The tool provides an interactive interface with:

  • Graphical file selector
  • Dropdown menus to choose operations
  • Clear error and success messages
  • Support for relative and absolute paths

Usage Examples

  • Merge files: Combine users1.csv and users2.csv into merged.csv
  • Find differences: Compare two email lists to see which ones are in the first but not the second
  • Detect duplicates: Find duplicate emails in a contact list
  • Split large file: Separate big-data.csv into 10 smaller files

Testing

The repository includes sample CSV files in the test/ directory to help you get started:

  • users1.csv & users2.csv - Sample employee data for testing merge functionality
  • all_users.csv & active_users.csv - For testing diff/intersect operations
  • contacts.csv - Contains duplicate entries for testing duplicate detection
  • sales_data.csv - Large dataset for testing split functionality
  • products.csv & orders.csv - Files with different column structures for testing merge edge cases

See test/README.md for detailed testing instructions and expected results.

Advanced Features

  • Smart merge: Automatically handles CSV files with different column structures
  • Error handling: Comprehensive validation and clear error messages
  • Column validation: Checks if specified keys exist in CSV files
  • Permission checks: Validates file access and write permissions

Requirements

  • Node.js >= 16.0.0

License

MIT

Contributing

Contributions are welcome! Feel free to open an issue or pull request.

Keywords

csv

FAQs

Package last updated on 05 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts