Skip to content

Support customizable pyproject.toml during project creation #779

@acere

Description

@acere

Description

When running agentcore create in corporate/enterprise environments that require proxy configurations or custom PyPI indexes, the generated pyproject.toml does not include the necessary settings for uv sync to succeed. The Python environment setup step fails because uv cannot reach the default package index or requires additional configuration (e.g., proxy settings, custom index URLs, trusted hosts) that cannot be injected before the install runs.

Use Case

Organizations behind corporate proxies or using private PyPI registries need to configure pyproject.toml with settings such as:

  • Custom [[tool.uv.index]] entries pointing to internal PyPI mirrors
  • Proxy configuration
  • Trusted host declarations
  • Additional source repositories

Currently, agentcore create generates a fixed pyproject.toml and immediately runs uv sync, with no opportunity to customize the file beforehand. This causes the Python environment setup to fail in restricted network environments.

Proposed Solution

Add support for one or more of the following:

  1. A --pyproject-extras flag (or config file option) that merges user-provided TOML settings into the generated pyproject.toml before uv sync executes.
  2. A --skip-install flag (shared with the npm install skip) that creates the project scaffolding without running uv sync, allowing users to modify pyproject.toml before installing manually.
  3. A --uv-index-url flag to specify a custom package index URL that gets written into the generated pyproject.toml.
  4. Support for a user-level or project-level config file (e.g., .agentcorerc) where Python-specific registry and proxy constraints can be defined.

Acceptance Criteria

  • Running agentcore create --skip-install generates the full project scaffolding without executing uv sync.
  • The CLI outputs a clear message indicating that Python dependency installation was skipped and must be done manually.
  • Running agentcore create --uv-index-url <url> (or equivalent syntax) configures the generated pyproject.toml with the provided index URL before uv sync runs.
  • User-provided TOML settings are correctly merged into the generated pyproject.toml without overwriting template defaults.
  • New flags are documented in agentcore create --help.
  • Existing behavior (no flags) remains unchanged — uv sync still runs by default.
  • The feature works across supported platforms (Windows, macOS, Linux).

Additional Context

This is a common blocker for enterprise teams operating behind corporate proxies or restricted networks. Combined with a --skip-install flag (also requested for package.json customization), this would significantly improve the onboarding experience for enterprise users.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions