|
| 1 | +# Configuration Guide |
| 2 | + |
| 3 | +This guide covers the configuration options available in the AI-Native Python cookiecutter template. |
| 4 | + |
| 5 | +[← Back to Documentation Index](index.md) |
| 6 | + |
| 7 | +## Cookiecutter Variables |
| 8 | + |
| 9 | +When generating a new project, you'll be prompted for the following configuration options: |
| 10 | + |
| 11 | +### Basic Project Information |
| 12 | + |
| 13 | +| Variable | Description | Default | Example | |
| 14 | +| --------------------------- | -------------------------------- | -------------- | --------------------------- | |
| 15 | +| `project_name` | Human-readable project name | (required) | "My Awesome Project" | |
| 16 | +| `project_slug` | Python package name (snake_case) | Auto-generated | "my_awesome_project" | |
| 17 | +| `project_short_description` | Brief project description | (required) | "A tool for awesome things" | |
| 18 | + |
| 19 | +### Organization Details |
| 20 | + |
| 21 | +| Variable | Description | Default | Example | |
| 22 | +| ------------------------------- | ------------------------------- | ---------- | ----------- | |
| 23 | +| `company_name` | Your organization's name | (required) | "Acme Corp" | |
| 24 | +| `company_domain` | Your organization's domain | (required) | "acme.com" | |
| 25 | +| `github_org` | GitHub organization or username | (required) | "acme-corp" | |
| 26 | +| `project_owner_github_username` | Project owner's GitHub username | (required) | "johndoe" | |
| 27 | + |
| 28 | +### Technical Options |
| 29 | + |
| 30 | +| Variable | Description | Default | Options | |
| 31 | +| ---------------- | ---------------------------- | ------- | ----------------------------- | |
| 32 | +| `python_version` | Minimum Python version | "3.13" | "3.11", "3.12", "3.13" | |
| 33 | +| `dockerhub` | Enable Docker Hub publishing | "no" | "yes", "no" | |
| 34 | +| `public` | Make repository public | "yes" | "yes", "no" | |
| 35 | +| `license` | Project license | "NONE" | "NONE", "MIT", "BSD-3-Clause" | |
| 36 | + |
| 37 | +## Post-Generation Configuration |
| 38 | + |
| 39 | +After your project is generated, you are able to make any changes you'd like. Here are some common modifications: |
| 40 | + |
| 41 | +### Environment Variables |
| 42 | + |
| 43 | +Create or modify the `.envrc` file in your project root: |
| 44 | + |
| 45 | +```bash |
| 46 | +# API Keys |
| 47 | +export ZENABLE_API_KEY="your-api-key-here" |
| 48 | + |
| 49 | +# Development settings |
| 50 | +export PYTHONPATH="${PWD}/src:${PYTHONPATH}" |
| 51 | +export UV_PYTHON_PREFERENCE="only-system" |
| 52 | +``` |
| 53 | + |
| 54 | +### Task Configuration |
| 55 | + |
| 56 | +The `Taskfile.yml` in your project defines common development tasks. You can customize anything you'd like, such as: |
| 57 | + |
| 58 | +- Python versions |
| 59 | +- Linting and cleanup tasks |
| 60 | +- Build configurations |
| 61 | + |
| 62 | +Example task customization: |
| 63 | + |
| 64 | +```yaml |
| 65 | +vars: |
| 66 | + IMAGE_NAME: "abc123" # Change the name of the docker image |
| 67 | + PYTHON_VERSION: "3.13" # Change default Python version |
| 68 | +``` |
| 69 | +
|
| 70 | +### Pre-commit Hooks |
| 71 | +
|
| 72 | +For detailed information about pre-commit hooks configuration and available hooks, see the [Hooks Guide](hooks.md#pre-commit-hooks). |
| 73 | +
|
| 74 | +#### Docker Hub Secrets |
| 75 | +
|
| 76 | +If you enabled Docker Hub publishing: |
| 77 | +
|
| 78 | +- `DOCKERHUB_USERNAME` |
| 79 | +- `DOCKERHUB_PAT` |
| 80 | + |
| 81 | +A reminder to set this is also printed after project generation if you answered "yes" to the docker hub question. |
0 commit comments