Skip to content

feat(demo): add new CLI demo covering all supported file formats#2114

Merged
cherkanovart merged 3 commits into
mainfrom
feat/new-cli-demo
Jun 16, 2026
Merged

feat(demo): add new CLI demo covering all supported file formats#2114
cherkanovart merged 3 commits into
mainfrom
feat/new-cli-demo

Conversation

@cherkanovart

@cherkanovart cherkanovart commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Adds a runnable demo for the new @lingo.dev/cli under demo/new-cli/, alongside the existing compiler demos.

What's inside

  • .lingo/config.json with one files[] entry per supported format (no org/engine binding, so users run lingo link to connect their own).
  • content/en/ sources covering every format: JSON, JSONC, Markdown, MDX, Markdoc, OpenAPI YAML, each exercising a format-specific option (lockedKeys, preservedKeys, translateFrontmatterFields, translateComponentProps).
  • content/de|fr|es/ sample output plus .lingo/lock.json, matching the old CLI demo pattern (committed translations).
  • README.md: get via degit, then login -> link -> push --estimate (preview cost) -> push -> pull.

Verified

Ran the full flow end to end against a real engine on @lingo.dev/cli@1.7.0: push submitted the async run, pull wrote 18 target files, translations are real (lockedKeys honored), and push --estimate returns a per-locale cost breakdown.

No changeset: @lingo.dev/demo-new-cli is private, nothing published.

Summary by CodeRabbit

  • New Features

    • Added a new demo CLI project showcasing end-to-end localization across English, German, Spanish, and French.
    • Includes locale configuration and a pinned translation lock, plus sample content covering app strings, settings, documentation, and OpenAPI API specs.
  • Documentation

    • Added a complete demo README with the expected folder structure, supported file formats, and step-by-step CLI commands (login/link/push/pull) to get started quickly.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 933f9411-35fa-4a76-806d-9ea03104c659

📥 Commits

Reviewing files that changed from the base of the PR and between 7c0a61c and 4182b6d.

📒 Files selected for processing (1)
  • .changeset/cute-mice-smash.md
✅ Files skipped from review due to trivial changes (1)
  • .changeset/cute-mice-smash.md

📝 Walkthrough

Walkthrough

A new demo/new-cli project is added containing an npm package manifest, a Lingo CLI configuration with per-file translation rules, a SHA-256 lock file, a README, English source content in six formats (JSON, JSONC, Markdown, MDX, Markdoc, OpenAPI YAML), and translated outputs for German, Spanish, and French.

Changes

new-cli Demo Project

Layer / File(s) Summary
Project scaffold and CLI configuration
demo/new-cli/package.json, demo/new-cli/.lingo/config.json, demo/new-cli/.lingo/lock.json, demo/new-cli/README.md, .changeset/cute-mice-smash.md
package.json registers the private @lingo.dev/demo-new-cli package. config.json sets en as source locale with de, fr, es as targets, and configures per-file rules: key locking (meta.version in app.json), key preservation (featureFlags in settings.jsonc), frontmatter-only translation (guide.md, changelog.mdoc), component-prop translation (landing.mdx), and yaml-openapi format for api.yaml. lock.json pins SHA-256 checksums for all 18 translated output files. README documents the demo structure and CLI commands. Changeset marks this as a demo-only addition.
English source content
demo/new-cli/content/en/app.json, demo/new-cli/content/en/settings.jsonc, demo/new-cli/content/en/guide.md, demo/new-cli/content/en/landing.mdx, demo/new-cli/content/en/changelog.mdoc, demo/new-cli/content/en/api.yaml
Adds the six English source files that exercise each supported format: app.json with nav/CTA strings and meta.version; settings.jsonc with translatable labels and preserved boolean featureFlags; guide.md with frontmatter and getting-started body; landing.mdx with Hero and Callout components demonstrating translateComponentProps; changelog.mdoc with Markdoc callout and versioned entries; api.yaml as an OpenAPI 3.0.3 spec for /products.
Translated locale outputs (de, es, fr)
demo/new-cli/content/de/*, demo/new-cli/content/es/*, demo/new-cli/content/fr/*
Adds all 18 translated content files (6 per locale) for German, Spanish, and French. Each mirrors the English source structure: app.json with locale nav/CTA copy and identical meta.version; settings.jsonc with translated labels and unchanged featureFlags booleans; guide.md with translated frontmatter and body; landing.mdx with translated Hero/Callout props; changelog.mdoc with translated version entries; api.yaml with locale-specific descriptions on the same two GET endpoints.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

community

Suggested reviewers

  • sumitsaurabh927

Poem

🐇 Hop, hop, across languages three,
De, es, and fr — all translated with glee!
A config locks keys, a lock pins the hash,
Six formats translated in one speedy dash.
The bunny says: push, then pull, and you're done! 🌍

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description deviates from the template structure; it lacks a summary sentence, missing testing section with checkboxes, no visuals section, and incomplete checklist items. Restructure the description to match the template: add a one-sentence summary, include testing section with checkboxes for validation, add visuals section if applicable, and complete the checklist with proper checkbox format.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a new CLI demo covering all supported file formats.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/new-cli-demo

Comment @coderabbitai help to get the list of available commands and usage tips.

@cherkanovart cherkanovart merged commit 11938a8 into main Jun 16, 2026
7 of 9 checks passed
@cherkanovart cherkanovart deleted the feat/new-cli-demo branch June 16, 2026 15:55
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.

2 participants