Skip to content

[Enhancement] Apache Fesod CLI Tool Support #746

@liugddx

Description

@liugddx

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

Summary

Develop a command-line interface tool for Apache Fesod to enable spreadsheet processing without writing code, supporting format conversion, data extraction, and batch operations.

Motivation

Users need a CLI tool to:

  • Convert spreadsheet formats quickly (xlsx ↔ xls ↔ csv ↔ ods)
  • Extract data to JSON/CSV for pipelines
  • Process files in shell scripts and CI/CD
  • Use Fesod without Java programming

Proposed Commands

# Read and output as JSON
fesod read data. xlsx --format json --sheet 0

# Convert formats
fesod convert input.xls output.xlsx

# Write from JSON/CSV
fesod write data. json output.xlsx --input-format json

# Show file info
fesod info data. xlsx

Key Options

  • --format <json|csv|xml>: Output format
  • --sheet <name|index>: Specify sheet
  • --output : Output file path
  • --config : Use config file

Technical Approach

Stack

  • CLI Framework: picocli
  • Build: Maven assembly plugin for executable JAR
  • Java: 8+ compatible

Project Structure

fesod-cli/
├── src/main/java/org/apache/fesod/cli/
│   ├── FesodCli.java
│   ├── commands/
│   │   ├── ReadCommand.java
│   │   ├── WriteCommand.java
│   │   ├── ConvertCommand.java
│   │   └── InfoCommand.java
│   └── formatters/
│       ├── JsonFormatter.java
│       └── CsvFormatter.java
└── pom.xml

Configuration Support

YAML config file (~/.fesod/config.yaml):

defaults:
  output_format: json
  encoding: UTF-8

read:
  auto_trim: true
  ignore_empty_rows: true

Solution

No response

Alternatives

No response

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions