npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

csvkit-cli

v1.0.1

Published

A zero-dependency CLI for working with CSV files. Convert, filter, sort, slice, and analyze CSV data from your terminal.

Downloads

19

Readme

csvkit-cli

A zero-dependency CLI for working with CSV files. Convert, filter, sort, slice, and analyze CSV data from your terminal.

Install

npm install -g csvkit-cli

Commands

csvkit json <file.csv>

Convert a CSV file to JSON (array of objects).

csvkit json data.csv
# [{"name":"Alice","age":"30"},{"name":"Bob","age":"25"}]

csvkit json data.csv > output.json

csvkit json2csv <file.json>

Convert a JSON array of objects to CSV.

csvkit json2csv data.json
# name,age
# Alice,30
# Bob,25

csvkit json2csv data.json > output.csv

csvkit columns <file.csv>

List the column names in a CSV file.

csvkit columns data.csv
# name
# age
# city

csvkit head <file.csv> [n]

Show the first n rows (default 10). Outputs as formatted CSV.

csvkit head data.csv
csvkit head data.csv 5

csvkit count <file.csv>

Count the number of data rows (excludes header).

csvkit count data.csv
# 1542

csvkit sort <file.csv> <column> [--desc]

Sort rows by a column. Detects numeric values automatically.

csvkit sort data.csv age
csvkit sort data.csv age --desc

csvkit filter <file.csv> <column> <value>

Filter rows where a column equals a given value.

csvkit filter data.csv city "New York"
csvkit filter data.csv active true

csvkit pick <file.csv> <col1,col2,...>

Select specific columns from a CSV file.

csvkit pick data.csv name,age
csvkit pick data.csv "first name,last name,email"

csvkit stats <file.csv> <column>

Show basic statistics for a numeric column: min, max, mean, median, sum, and count.

csvkit stats data.csv age
# count:  100
# min:    18
# max:    65
# sum:    3842
# mean:   38.42
# median: 37

csvkit unique <file.csv> <column>

List unique values in a column.

csvkit unique data.csv city
# New York
# Los Angeles
# Chicago

Piping

All commands output to stdout, so you can pipe them into other tools:

csvkit filter data.csv status active | csvkit sort - name | csvkit pick - name,email
csvkit json data.csv | jq '.[0]'
csvkit json2csv data.json | csvkit count -

Use - as the filename to read from stdin.

CSV Parsing

The built-in parser handles:

  • Quoted fields containing commas: "New York, NY"
  • Escaped quotes: "She said ""hello"""
  • Newlines inside quoted fields
  • Mixed quoted and unquoted fields

Requirements

Node.js >= 14.0.0. No dependencies.

License

MIT