Skip to content

Copier update (Claude CLI)#81

Merged
ejfine merged 10 commits intomainfrom
claude
Oct 9, 2025
Merged

Copier update (Claude CLI)#81
ejfine merged 10 commits intomainfrom
claude

Conversation

@ejfine
Copy link
Contributor

@ejfine ejfine commented Oct 9, 2025

Pull in upstream template changes to allow the template to ask about using claude CLI

Summary by CodeRabbit

  • New Features

    • Optional Claude CLI/code support in Dev Container with configurable toggle and API key.
    • New flag to allow tooling to install Python when generating lock files.
  • Chores

    • Upgraded dev container features, editor extensions, and tooling versions.
    • Pre-commit now skips SVG formatting.
    • Dependency version templating adjusted.
    • Git ignore rules changed to track pytest/mypy caches.
  • Documentation

    • README and contributing docs updated for the new flag and minor wording/typo fixes.
  • Tests

    • Added test data for the new Claude option.

@ejfine ejfine requested a review from Copilot October 9, 2025 13:39
@ejfine ejfine self-assigned this Oct 9, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 9, 2025

Caution

Review failed

The pull request is closed.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

This PR adds an optional install_claude_cli template option and test data, introduces an --allow-uv-to-install-python flag changing UV Python preference behavior, bumps multiple devcontainer/tooling/runtime versions, updates devcontainer templates to optionally include Claude CLI/extensions and ANTHROPIC_API_KEY, adjusts pre-commit SVG exclusions, removes pytest/mypy cache ignores, and fixes small typos/capitalization.

Changes

Cohort / File(s) Summary
Devcontainer & tooling scripts
\.devcontainer/devcontainer.json, \.devcontainer/install-ci-tooling.py, template/.devcontainer/devcontainer.json.jinja, template/.devcontainer/install-ci-tooling.py.jinja, template/.devcontainer/docker-compose.yml.jinja
Bump aws-cli/node/VS Code extension versions; add optional Claude Code feature and ANTHROPIC_API_KEY when install_claude_cli is enabled; add --allow-uv-to-install-python flag and adjust UV env var logic (UV_PYTHON always set; UV_PYTHON_PREFERENCE=only-system when flag not provided).
Copier template, answers & tests
.copier-answers.yml, copier.yml, tests/copier_data/*
Add boolean question install_claude_cli (default no) and add corresponding values to test data files (data1.yamldata4.yaml).
Runtime/version constants & frontend template
extensions/context.py, pyproject.toml, template/frontend/package.json.jinja
Update numerous version constants (uv, pnpm, pyright, pydantic, typescript, nuxt/ui, nuxt test utils, etc.); add vue_eslint_parser_version variable and reference it in frontend template; bump pyright in pyproject.toml.
Pre-commit, gitignore, lints & typos
.pre-commit-config.yaml, template/.pre-commit-config.yaml.jinja, .gitignore, template/.gitignore, ruff-test.toml, template/ruff-test.toml, _typos.toml, template/_typos.toml
Exclude .*\.svg from EOF and XML formatter hooks; remove .pytest_cache/ and .mypy_cache/ ignore entries; minor typo/comment and capitalization fixes.
Docs
README.md, CONTRIBUTING.md, template/CONTRIBUTING.md
Update README example to include --allow-uv-to-install-python; fix capitalization of “GitHub” in contributing docs.
Project metadata
.copier-answers.yml
Bump internal commit/version from v0.0.74v0.0.75 and add install_claude_cli: false in answers file.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant Script as install-ci-tooling.py
  participant UV as UV
  participant SysPy as System Python

  Dev->>Script: run setup [--allow-uv-to-install-python?]
  Script->>UV: set UV_PYTHON = requested_version
  alt --allow-uv-to-install-python not set
    Script->>UV: set UV_PYTHON_PREFERENCE = "only-system"
    UV->>SysPy: use system Python
  else --allow-uv-to-install-python set
    Script-->>UV: do not set preference
    UV->>UV: may install newer Python if needed
  end
  UV->>Script: complete installs
Loading
sequenceDiagram
  autonumber
  actor User as Template User
  participant Copier as Template Renderer
  participant DevContTpl as Devcontainer Template
  participant VSCode as VS Code
  participant Claude as Claude CLI/Extension

  User->>Copier: render with install_claude_cli = true/false
  Copier->>DevContTpl: generate files (conditional blocks)
  alt install_claude_cli == true
    DevContTpl->>VSCode: include anthropic.claude-code extension
    DevContTpl->>DevContTpl: include claude-code feature
    DevContTpl->>DevContTpl: add ANTHROPIC_API_KEY env entry
  else
    DevContTpl-->>VSCode: skip Claude additions
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

A rabbit taps its terminal with cheer,
Flags hop in: UV can fetch Python near.
Devcontainers bloom, extensions in queue,
Claude waits politely—toggle true or false, too.
Cache doors opened, typos nibbled through. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description does not follow the repository’s template headings and omits required sections such as “Link to Issue,” “Why is this change necessary,” and testing details, making it incomplete. Update the description to include the template’s section headings and provide details for each, including issue link, rationale, implementation details, side effects, and test plan.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly summarizes the main update to the Copier template for integrating Claude CLI support and is concise and specific to the key change.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7eef0d5 and 60cb91c.

📒 Files selected for processing (3)
  • .copier-answers.yml (1 hunks)
  • extensions/context.py (3 hunks)
  • template/.devcontainer/docker-compose.yml.jinja (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link

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

This PR pulls in upstream template changes to integrate Claude CLI installation support into the copier template. The template now includes a new configuration option install_claude_cli that allows users to optionally install the Claude CLI tool in their development environment.

  • Added new install_claude_cli configuration option to the copier template
  • Integrated Claude CLI devcontainer feature and VS Code extension when enabled
  • Updated various dependency versions and fixed minor spelling/capitalization issues

Reviewed Changes

Copilot reviewed 24 out of 26 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
copier.yml Added new install_claude_cli boolean configuration option
tests/copier_data/*.yaml Updated test data files to include the new install_claude_cli setting
template/.devcontainer/*.jinja Configured Claude CLI devcontainer feature and environment variables when enabled
extensions/context.py Updated various dependency versions for Python and Node.js packages
template/.gitignore Removed cache directories from gitignore
Multiple files Fixed spelling errors and updated GitHub capitalization
Comments suppressed due to low confidence (2)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

- AWS_PROFILE=localstack
- AWS_DEFAULT_REGION={% endraw %}{{ aws_region_for_stack if (aws_region_for_stack is defined and aws_region_for_stack != "") else "us-east-1" }}{% raw %}
- AWS_DEFAULT_REGION={% endraw %}{{ aws_region_for_stack if (aws_region_for_stack is defined and aws_region_for_stack != "") else "us-east-1" }}{% raw %}{% endraw %}{% if install_claude_cli %}{% raw %}
- ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}{% endraw %}{% endif %}{% raw %}
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

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

Invalid YAML syntax: environment variable should use '=' not ':' for assignment. Change 'ANTHROPIC_API_KEY:' to 'ANTHROPIC_API_KEY='.

Suggested change
- ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}{% endraw %}{% endif %}{% raw %}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}{% endraw %}{% endif %}{% raw %}

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 320a5cc and 7eef0d5.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (25)
  • .copier-answers.yml (1 hunks)
  • .devcontainer/devcontainer.json (3 hunks)
  • .devcontainer/install-ci-tooling.py (2 hunks)
  • .gitignore (0 hunks)
  • .pre-commit-config.yaml (2 hunks)
  • CONTRIBUTING.md (1 hunks)
  • README.md (1 hunks)
  • _typos.toml (1 hunks)
  • copier.yml (1 hunks)
  • extensions/context.py (4 hunks)
  • pyproject.toml (1 hunks)
  • ruff-test.toml (1 hunks)
  • template/.devcontainer/devcontainer.json.jinja (4 hunks)
  • template/.devcontainer/docker-compose.yml.jinja (1 hunks)
  • template/.devcontainer/install-ci-tooling.py.jinja (1 hunks)
  • template/.gitignore (0 hunks)
  • template/.pre-commit-config.yaml.jinja (2 hunks)
  • template/CONTRIBUTING.md (1 hunks)
  • template/_typos.toml (1 hunks)
  • template/frontend/package.json.jinja (1 hunks)
  • template/ruff-test.toml (1 hunks)
  • tests/copier_data/data1.yaml (1 hunks)
  • tests/copier_data/data2.yaml (1 hunks)
  • tests/copier_data/data3.yaml (1 hunks)
  • tests/copier_data/data4.yaml (1 hunks)
💤 Files with no reviewable changes (2)
  • template/.gitignore
  • .gitignore
🧰 Additional context used
🧬 Code graph analysis (1)
.devcontainer/install-ci-tooling.py (2)
template/.devcontainer/manual-setup-deps.py (1)
  • main (59-128)
.devcontainer/manual-setup-deps.py (1)
  • main (59-128)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: lint-matrix (ubuntu-24.04, 3.13.2, --data-file tests/copier_data/data3.yaml)
  • GitHub Check: lint-matrix (ubuntu-24.04, 3.13.2, --data-file tests/copier_data/data4.yaml)
  • GitHub Check: lint-matrix (ubuntu-24.04, 3.13.2, --data-file tests/copier_data/data2.yaml)
  • GitHub Check: lint-matrix (ubuntu-24.04, 3.13.2, --data-file tests/copier_data/data1.yaml)
  • GitHub Check: lint-matrix (ubuntu-24.04, 3.12.7, --data-file tests/copier_data/data4.yaml)
  • GitHub Check: lint-matrix (ubuntu-24.04, 3.12.7, --data-file tests/copier_data/data3.yaml)
  • GitHub Check: lint-matrix (ubuntu-24.04, 3.12.7, --data-file tests/copier_data/data2.yaml)
  • GitHub Check: lint-matrix (ubuntu-24.04, 3.12.7, --data-file tests/copier_data/data1.yaml)
🔇 Additional comments (20)
.copier-answers.yml (1)

2-2: LGTM! Configuration update aligns with PR objectives.

The version bump and new install_claude_cli: false flag are consistent with the PR's goal of adding Claude CLI integration support to the template.

Also applies to: 6-6

_typos.toml (1)

24-24: LGTM! Typo correction in comment.

The correction from "mispell" to "misspell" improves documentation accuracy.

template/ruff-test.toml (1)

15-15: LGTM! Grammar correction in comment.

The apostrophe addition ("tests don't") improves readability.

template/CONTRIBUTING.md (1)

30-30: LGTM! Proper brand capitalization.

The corrections to "GitHub Codespace" and "GitHub web console" align with GitHub's official branding guidelines.

template/.pre-commit-config.yaml.jinja (1)

77-77: LGTM! Appropriate SVG file exclusions.

Excluding SVG files from end-of-file-fixer and xml-formatter hooks prevents unintended modifications to these often auto-generated or asset files. The exclusion pattern .*\.svg is correctly formatted.

Also applies to: 151-151

template/_typos.toml (1)

26-26: LGTM! Consistent typo correction.

The correction from "mispell" to "misspell" matches the same fix in the root _typos.toml file, maintaining consistency across the codebase.

CONTRIBUTING.md (1)

30-30: LGTM! Consistent brand capitalization.

The corrections match those in template/CONTRIBUTING.md, ensuring consistent GitHub branding across all documentation.

.pre-commit-config.yaml (1)

77-77: LGTM! Consistent SVG exclusions.

The SVG exclusion patterns match those in template/.pre-commit-config.yaml.jinja, ensuring consistent behavior across the template and generated projects.

Also applies to: 152-152

pyproject.toml (1)

12-12: LGTM!

Standard dependency version bump for pyright.

copier.yml (1)

14-17: LGTM!

The new install_claude_cli question follows the established pattern and has appropriate defaults.

tests/copier_data/data1.yaml (1)

6-6: LGTM!

Test data correctly includes the new install_claude_cli flag with value false.

tests/copier_data/data4.yaml (1)

6-6: LGTM!

Test data correctly includes the new install_claude_cli flag with value true, providing complementary test coverage.

tests/copier_data/data3.yaml (1)

6-6: LGTM!

Test data correctly includes the new install_claude_cli flag.

tests/copier_data/data2.yaml (1)

6-6: LGTM!

Test data correctly includes the new install_claude_cli flag with value true.

ruff-test.toml (1)

15-15: LGTM!

Grammatical correction improves comment clarity.

template/.devcontainer/install-ci-tooling.py.jinja (2)

39-44: LGTM!

The new --allow-uv-to-install-python flag is well-defined with clear help text and appropriate defaults.


51-53: LGTM!

The UV environment configuration logic is correct:

  • UV_PYTHON is always set to ensure version consistency
  • UV_PYTHON_PREFERENCE is set to "only-system" by default, restricting UV to pre-installed Python versions
  • When --allow-uv-to-install-python is provided, the preference is not set, allowing UV to install Python dynamically

This conservative default prevents unexpected Python installations while providing flexibility when needed.

template/frontend/package.json.jinja (1)

66-66: LGTM!

Good refactor to use a template variable for version management, consistent with other dependencies in this file. The variable is properly defined in extensions/context.py.

.devcontainer/install-ci-tooling.py (2)

39-44: LGTM!

The new --allow-uv-to-install-python flag is well-implemented. The help text clearly explains its purpose, and the flag appropriately controls whether UV can install new Python versions dynamically.


51-53: LGTM!

The UV environment setup logic is correct:

  • UV_PYTHON is always set to the requested version
  • UV_PYTHON_PREFERENCE="only-system" is only set when the flag is NOT provided, constraining UV to system Python
  • When the flag IS provided, UV can install new Python versions as needed

This aligns with the documented behavior in README.md.

@ejfine ejfine merged commit 47e2af3 into main Oct 9, 2025
2 of 3 checks passed
@ejfine ejfine deleted the claude branch October 9, 2025 13:56
@coderabbitai coderabbitai bot mentioned this pull request Oct 27, 2025
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