Skip to content

Chore-cli-required#13

Merged
ioncakephper merged 2 commits intomainfrom
chore-cli-required
Dec 8, 2025
Merged

Chore-cli-required#13
ioncakephper merged 2 commits intomainfrom
chore-cli-required

Conversation

@ioncakephper
Copy link
Copy Markdown
Owner

The example CLI definitions in EXAMPLES.md and examples/cli-schema.definition.yml have been updated to include the mandatory top-level cli object. All previously root-level properties, such as command, description, version, arguments, and options, are now correctly nested under this cli key.

Additionally, the README.md has been updated under the 'Schema Reference' section to explicitly state that all CLI definitions must be nested under a top-level cli object. These changes ensure that all provided examples and documentation align with the latest schema requirements, which mandate the cli property at the root of every CLI definition.

BREAKING CHANGE: This commit introduces breaking changes.

Added the `"required": ["cli"]` keyword to the root of `cli.schema.json`. This change explicitly enforces that every CLI definition must include a top-level `cli` object. This strengthens the schema's validation, ensuring that all instances properly define the core CLI structure and preventing partially defined configurations. As a consequence, any existing `cli.schema.json` instance that previously omitted the top-level `cli` property (even if semantically incomplete) will now fail validation, thus requiring all instances to conform to this stricter rule. A comma was also added for correct JSON syntax before the new `required` property.

BREAKING CHANGE: This commit introduces breaking changes.
…bject

The example CLI definitions in `EXAMPLES.md` and `examples/cli-schema.definition.yml` have been updated to include the mandatory top-level `cli` object. All previously root-level properties, such as `command`, `description`, `version`, `arguments`, and `options`, are now correctly nested under this `cli` key.

Additionally, the `README.md` has been updated under the 'Schema Reference' section to explicitly state that all CLI definitions must be nested under a top-level `cli` object. These changes ensure that all provided examples and documentation align with the latest schema requirements, which mandate the `cli` property at the root of every CLI definition.

BREAKING CHANGE: This commit introduces breaking changes.
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @ioncakephper, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant structural change to how CLI definitions are managed by enforcing a mandatory top-level cli object. This standardization aims to improve consistency and clarity across all definitions, with corresponding updates to examples and documentation to guide users through the new schema requirement.

Highlights

  • Mandatory cli Object: CLI definitions now require a top-level cli object, under which all command properties (like command, description, version, arguments, options) must be nested.
  • Updated Examples: The example CLI definitions in EXAMPLES.md and examples/cli-schema.definition.yml have been updated to conform to the new schema.
  • Documentation Update: README.md has been modified to explicitly state the new requirement for the top-level cli object in the 'Schema Reference' section.
  • Schema Enforcement: The schema/cli.schema.json file has been updated to formally enforce the presence of the cli object at the root.
  • Breaking Change: This update introduces a breaking change, requiring existing CLI definitions to be adjusted.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@ioncakephper ioncakephper merged commit 0ef86b6 into main Dec 8, 2025
2 checks passed
@ioncakephper ioncakephper deleted the chore-cli-required branch December 8, 2025 12:07
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly enforces the mandatory top-level cli object by updating the JSON schema and relevant documentation. This is a great step towards standardizing the CLI definitions. However, I've noticed that in the process of updating the examples in EXAMPLES.md and examples/cli-schema.definition.yml, some properties were carried over that are inconsistent with the schema. Specifically, command is used instead of the required name, version is used while not being defined in the schema, and alias is used for options instead of short. These inconsistencies will lead to validation errors and should be addressed to ensure the examples are accurate and useful.

Comment on lines +4 to +6
command: cli-schema
description: Canonical JSON Schema for declarative CLI definitions
version: '1.0.6'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The properties command and version are not valid under the cli object according to schema/cli.schema.json. The schema requires a name property and does not define a version property at this level. This will cause validation to fail. Please use name instead of command and remove the version property to align with the schema.

  name: cli-schema
  description: Canonical JSON Schema for declarative CLI definitions

Comment on lines +24 to +26
command: cli-schema
description: Canonical JSON Schema for declarative CLI definitions
version: '1.0.6'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The properties command and version used here do not align with the cli.schema.json. According to the schema, the root cli object should have a name property (which is required), not command. Additionally, the version property is not defined in the schema for the cli object. To maintain consistency with the schema and other examples in this file, you should use name and remove version.

Suggested change
command: cli-schema
description: Canonical JSON Schema for declarative CLI definitions
version: '1.0.6'
name: cli-schema
description: Canonical JSON Schema for declarative CLI definitions

Comment on lines +21 to +28
- name: help
alias: h
description: display help for command
type: boolean
- name: version
alias: V
description: output the version number
type: boolean
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The alias property is not valid for an option definition. According to schema/cli.schema.json, you should use short for the single-letter alias of an option. The alias property is valid for commands, but not for options. This is also inconsistent with the corresponding example in EXAMPLES.md.

    - name: help
      short: h
      description: display help for command
      type: boolean
    - name: version
      short: V
      description: output the version number
      type: boolean

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