Skip to content

feat(cli): skip __init__.py for config-based adk create - #6754

Open
a2105z wants to merge 1 commit into
google:mainfrom
a2105z:feat/config-create-no-init
Open

feat(cli): skip __init__.py for config-based adk create#6754
a2105z wants to merge 1 commit into
google:mainfrom
a2105z:feat/config-create-no-init

Conversation

@a2105z

@a2105z a2105z commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

adk create --type=config no longer writes an empty __init__.py.

Config agents are loaded from root_agent.yaml (after the Python module/package probes miss root_agent). Existing config samples and the YAML agent-loader fixtures already omit __init__.py, so generated projects now match that layout.

Also updates the config success message and CLI unit expectations.

On the package-resolution note in #6753: an empty __init__.py did not expose root_agent either, so the loader still fell through to YAML. With agents_dir prepended on sys.path, the local agent directory remains the first candidate; this change aligns scaffolding with samples rather than relying on an empty package marker.

Fixes #6753

Test plan

  • Repro before: adk create --type=config emitted .env, .gitignore, __init__.py, root_agent.yaml
  • After: emits .env, .gitignore, root_agent.yaml only
  • uv run pytest tests/unittests/cli/utils/test_cli_create.py -q36 passed
  • Code-type create still generates __init__.py + agent.py

Config agents load from root_agent.yaml, matching existing samples that
omit an empty package marker from generated scaffolding.
@a2105z

a2105z commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Hi @ftnext — follow-up on #6753.

adk create --type=config now matches the existing config samples: .env, .gitignore, and root_agent.yaml only (no empty __init__.py). Ready for review whenever maintainers have a chance.

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 Request] Do not generate __init__.py for config-based agents

2 participants