Skip to content

json2csv

by official

Data

Convert JSON to CSV format

data json csv conversion
# json2csv

Convert JSON to CSV format

## Installation

This is a CmdForge tool. Install it from the registry:

```bash
cmdforge install json2csv
```

## Usage

Use `json2csv` as a Unix pipe command:

```bash
# Convert JSON array to CSV
echo '[{"name":"Alice","age":30},{"name":"Bob","age":25}]' | json2csv

# Convert JSON from a file
cat data.json | json2csv

# Pipe to file
echo '[{"id":1,"value":"test"}]' | json2csv > output.csv
```

## Arguments

This tool has no configurable arguments.

## How It Works

1. **AI Conversion Step**: The input JSON is sent to the `opencode-deepseek` provider, which analyzes the structure and converts it to properly formatted CSV output with headers.

The tool automatically detects JSON structure (arrays of objects, nested data) and produces CSV with appropriate column headers.

## Dependencies

None

No reviews yet.

Issues

No issues reported for this tool.