Repository: https://github.com/loveucifer/aomi
Language: Go
License: MIT
Command-line tool that converts between any data formats with intelligent schema detection and zero configuration.
Converts between JSON, CSV, YAML, XML, TOML, and more with automatic format detection and smart field mapping.
aomi input.json output.csv # JSON to CSV
aomi data.csv config.yaml # CSV to YAML
aomi api.xml data.json # XML to JSON
aomi --format yaml < input.json # Pipe with format- Auto-detection: Recognizes input format automatically
- Smart mapping: Handles nested structures intelligently (flattens nested objects like address.city to address_city)
- Batch processing: Convert multiple files at once
- Schema inference: Creates optimal output structure
- Validation: Ensures data integrity during conversion
- Streaming: Handles large files without memory issues
- Zero configuration: Works out of the box
go install github.com/loveucifer/aomi@latestaomi input.json output.csv # Convert JSON to CSV
aomi data.yaml output.xml # Convert YAML to XMLaomi --to csv input.json # Specify target format
aomi --to yaml data.json # JSON to YAMLcat data.json | aomi --to csv # Pipe JSON to CSV
curl api.json | aomi --to yaml > config.yaml # API to YAMLaomi --batch input/ output/ --to json # Convert all filesaomi --validate data.json # Just detect formataomi --pretty data.json output.json # Formatted output- JSON - JavaScript Object Notation
- CSV - Comma-Separated Values
- YAML - YAML Ain't Markup Language
- XML - eXtensible Markup Language
- TOML - Tom's Obvious, Minimal Language
# Input: users.json
{
"users": [
{"name": "Alice", "age": 30},
{"name": "Bob", "age": 25}
]
}
# Command
aomi users.json users.csv
# Output: users.csv
name,age
Alice,30
Bob,25# Input: data.csv
name,age,city
Alice,30,NYC
Bob,25,SF
# Command
aomi data.csv data.json
# Output: data.json
[
{"name": "Alice", "age": 30, "city": "NYC"},
{"name": "Bob", "age": 25, "city": "SF"}
]# Input: user.json
{
"name": "John Doe",
"age": 35,
"address": {
"street": "123 Main St",
"city": "Anytown",
"zipcode": "12345"
},
"hobbies": ["reading", "swimming", "coding"]
}
# Command
aomi user.json user.csv
# Output: user.csv (nested objects are flattened)
hobbies,address_city,address_zipcode,address_street,name,age
"[reading, swimming, coding]",Anytown,12345,"123 Main St",John Doe,35- Fixed CSV writer delimiter issue where uninitialized delimiter was set to null character, causing empty output
- Enhanced CSV writer to properly flatten nested JSON objects for CSV conversion
- Added support for flattening nested structures like {"address": {"city": "NYC"}} to address_city=NYC in CSV output
- Initial release with support for JSON, CSV, YAML, XML, and TOML conversion
- Automatic format detection
- Batch processing support
Input Data → Format Detection → Parsing → Internal Document → Conversion → Format Writing → Output
- Format Detection: Automatic format detection using pattern matching
- Parsers: Format-specific parsers to convert to internal representation
- Internal Document: Universal document model for all formats
- Converters: Smart conversion between different structures
- Writers: Format-specific writers to generate output
aomi/
├── cmd/aomi/main.go # CLI entry point
├── pkg/
│ ├── detector/ # Format detection
│ ├── parsers/ # Input format parsers
│ ├── converters/ # Core conversion logic
│ ├── writers/ # Output format writers
│ └── schema/ # Schema inference
├── examples/ # Sample files
├── tests/ # Test files
└── README.md
git clone https://github.com/loveucifer/aomi.git
cd aomi
go build -o aomi ./cmd/aomi/
# Or to install globally:
go install ./cmd/aomi/# Run all package tests
go test ./...
# Run specific tests
go test ./pkg/writers/
go test ./pkg/parsers/# Build and run directly
go run ./cmd/aomi/main.go input.json output.csv
# Build the binary
go build -o aomi ./cmd/aomi/
./aomi input.json output.csvMIT License - see LICENSE file for details.
See CONTRIBUTING.md for details on how to contribute to this project.