Skip to content

feat: add convert command for JSON/YAML format conversion#31

Merged
syucream merged 1 commit intomainfrom
feat/convert-command
Apr 11, 2026
Merged

feat: add convert command for JSON/YAML format conversion#31
syucream merged 1 commit intomainfrom
feat/convert-command

Conversation

@syucream
Copy link
Copy Markdown
Contributor

@syucream syucream commented Apr 11, 2026

Summary

  • Add convert command for converting workflow files between JSON and YAML formats
  • Local-only operation (no n8n server connection required)
  • Supports --ids and --tags filtering, --dry-run, and --keep options
  • JSON to YAML: code externalization (_subfiles/) + description.md generation
  • YAML to JSON: resolves !include directives and cleans up _subfiles/ directories

Changes

  • src/convert/converter.ts — core conversion logic
  • src/cli/commands/convert.ts — CLI command registration
  • src/index.ts — register the new command
  • tests/convert/converter.test.ts — tests (12 cases)
  • README.md — add command documentation
  • CONTRIBUTING.md — add convert/ to project structure
  • .claude/skills/n8n-cli/SKILL.md — add convert section to operations guide + resolve merge conflicts

Test plan

  • bun test tests/convert/converter.test.ts — all 12 tests pass
  • bun test — all 662 existing tests pass
  • bun run build — build succeeds
  • ./n8n-cli convert --help — help output verified

🤖 Generated with Claude Code

@syucream syucream force-pushed the feat/convert-command branch 2 times, most recently from d672a18 to 383de37 Compare April 11, 2026 12:02
Add a local-only convert command that converts workflow files between
JSON and YAML formats. Supports --ids filtering, --tags filtering,
--dry-run, --keep, and externalize threshold configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ryo Okubo <syucream1031@gmail.com>
@syucream syucream force-pushed the feat/convert-command branch from 383de37 to a02ae85 Compare April 11, 2026 12:06
@syucream syucream merged commit 2d46dc8 into main Apr 11, 2026
5 checks passed
@syucream syucream deleted the feat/convert-command branch April 11, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant