Skip to content

fix: keep --ai as a supported init alias#2637

Open
puneetdixit200 wants to merge 1 commit into
github:mainfrom
puneetdixit200:codex/keep-ai-alias
Open

fix: keep --ai as a supported init alias#2637
puneetdixit200 wants to merge 1 commit into
github:mainfrom
puneetdixit200:codex/keep-ai-alias

Conversation

@puneetdixit200
Copy link
Copy Markdown

Summary

  • keep specify init --ai <key> as a supported short alias instead of warning about removal
  • remove the --ai deprecation panel while preserving mutual exclusion with --integration
  • document --ai alongside --integration in the core reference and README

Closes #2636.

Verification

  • .venv/bin/python -m pytest tests/integrations/test_cli.py -q -> 69 passed
  • .venv/bin/python -m pytest tests/test_agent_config_consistency.py -q -> 26 passed

AI-assisted work

This patch was prepared with AI assistance and manually reviewed. I added the no-deprecation regression expectation first, observed it fail on the existing warning, then reran the affected tests after the implementation change.

Copilot AI review requested due to automatic review settings May 20, 2026 06:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR updates the CLI behavior and documentation so the legacy --ai flag no longer emits a deprecation warning and is treated as a short alias for selecting an integration.

Changes:

  • Remove the --ai deprecation warning panel from specify init.
  • Update integration tests to assert no deprecation warning is printed for --ai.
  • Update docs/README to document --ai as a short alias for --integration.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
tests/integrations/test_cli.py Updates expectations to ensure --ai no longer prints a deprecation warning.
src/specify_cli/init.py Removes deprecation-warning construction/printing and related import; updates --integration help text.
docs/reference/core.md Documents --ai as a short alias and adds an example.
README.md Documents --ai as a short alias and adds an example usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

preset: str = typer.Option(None, "--preset", help="Install a preset during initialization (by preset ID)"),
branch_numbering: str = typer.Option(None, "--branch-numbering", help="Branch numbering strategy: 'sequential' (001, 002, …, 1000, … — expands past 999 automatically) or 'timestamp' (YYYYMMDD-HHMMSS)"),
integration: str = typer.Option(None, "--integration", help="Use the new integration system (e.g. --integration copilot). Mutually exclusive with --ai."),
integration: str = typer.Option(None, "--integration", help="Coding agent integration to use (e.g. --integration copilot). Mutually exclusive with --ai."),
Comment on lines +142 to +143
assert "Deprecation Warning" not in normalized_output
assert "no longer be available" not in normalized_output
Comment thread docs/reference/core.md
| Option | Description |
| ------------------------ | ------------------------------------------------------------------------ |
| `--integration <key>` | AI coding agent integration to use (e.g. `copilot`, `claude`, `gemini`). See the [Integrations reference](integrations.md) for all available keys |
| `--ai <key>` | Short alias for choosing the same coding agent integration during init |
Comment thread docs/reference/core.md
Use `<project_name>` to create a new directory, or `--here` (or `.`) to initialize in the current directory. If the directory already has files, use `--force` to merge without confirmation.

When `--integration` is omitted, interactive terminals prompt you to choose an integration. Non-interactive sessions, such as CI or piped runs, default to GitHub Copilot; pass `--integration <key>` to choose a different integration explicitly.
When `--integration` and `--ai` are omitted, interactive terminals prompt you to choose an integration. Non-interactive sessions, such as CI or piped runs, default to GitHub Copilot; pass `--integration <key>` or the shorter `--ai <key>` alias to choose a different integration explicitly.
@puneetdixit200 puneetdixit200 marked this pull request as ready for review May 20, 2026 07:01
@puneetdixit200 puneetdixit200 requested a review from mnriem as a code owner May 20, 2026 07:01
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.

[Feature]: don't depreciate --ai in favor of --integration .. keep both! ai is so much easier to type!

2 participants