Conversation
Command-line handling now uses Swift Argument Parser. The command (`localization`) lives in the new ACKLocalizationCommands library so other tools can embed it, the executable only marks it as @main. ACKLocalization.run() now rethrows instead of calling exit(1), so an embedding tool is not terminated on failure.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The documented embedding example lacks a required ArgumentParser import and the central throwing behavior needs regression coverage.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Exposes localization CLI handling as an embeddable Swift Argument Parser command while keeping core logic parser-independent.
Changes:
- Adds the
ACKLocalizationCommandslibrary and executable entry point. - Makes
ACKLocalization.run()rethrow errors instead of exiting. - Adds Swift Argument Parser and updates documentation.
| File | Description |
|---|---|
Sources/ACKLocalizationCore/ACKLocalization.swift |
Introduces the throwing execution contract. |
Sources/ACKLocalizationCommands/ACKLocalizationCommand.swift |
Defines the embeddable command. |
Sources/ACKLocalization/main.swift |
Removes the previous entry point. |
Sources/ACKLocalization/ACKLocalizationCommand+Main.swift |
Marks the command as executable entry point. |
Package.swift |
Adds the command library and parser dependency. |
Package.resolved |
Pins Swift Argument Parser 1.8.2. |
CHANGELOG.md |
Documents the API and CLI changes. |
.claude/CLAUDE.md |
Updates architecture guidance. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Cool! |
komkovla
approved these changes
Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
This prepares the ground for an
authcommand that calls thegcloudtool to update authorization (Application Default Credentials) used to access the spreadsheet. Such a command needs a proper command-line interface, so command-line handling now uses Swift Argument Parser. The command is also exposed as a library so other tools can embed it (e.g. as a subcommand).Changes
ACKLocalizationCommands(new library target + product) — publicACKLocalizationCommand: AsyncParsableCommandwith command namelocalization; instantiatesACKLocalizationand runs itACKLocalization(executable) —main.swiftreplaced by@main extension ACKLocalizationCommand { }, the target now depends only onACKLocalizationCommandsACKLocalizationCore—ACKLocalization.run()is nowasync throws; instead of callingexit(1)it displays the error and rethrows it, so an embedding tool is not terminated on failure.ACKLocalizationCoreitself does not depend on ArgumentParserswift-argument-parser(from1.8.2)Behavior
0/1) — verified on a real project with ADC auth--helpis now available64(previously silently ignored)Breaking change for library consumers
ACKLocalization.run()now throws, callers needtry.Embedding