Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# AGENTS.md

## Cursor Cloud specific instructions

### Project overview

Single-file Python CLI tool (`main.py`) that syncs Control D DNS folders with remote JSON block-lists via the Control D REST API. No frontend, no database, no Docker required.

### Runtime

- Requires **Python >= 3.13** (uses modern language features). The VM's system Python is 3.12; `uv python install 3.13` provides the right version and `uv sync` picks it up automatically via `requires-python` in `pyproject.toml`.

Choose a reason for hiding this comment

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

medium

The minimum Python version is specified as 3.13, but the system Python version is 3.12. It might be helpful to provide a command or instructions on how to verify the Python version after installation to ensure the correct version is being used.

- Package manager: **uv** (`uv sync --all-extras` installs runtime + dev deps into `.venv`).

### Common commands

| Task | Command |
|---|---|
| Install/update deps | `uv sync --all-extras` |
| Run linter | `ruff check .` (install via `uv tool install ruff` if not on PATH) |
| Run all tests | `uv run pytest tests/ -v` |
| Run specific test file | `uv run pytest tests/test_fix_env.py -v` |
| Run app (dry-run) | `uv run python main.py --dry-run` |
| Run app (live) | `TOKEN=xxx PROFILE=yyy uv run python main.py` |

### Known issue (as of main branch)

`main.py` has a **pre-existing syntax error at line 1141** (corrupted text: `rgi"rules"1` instead of `rg["rules"]`, plus broken indentation and Unicode characters in nearby f-strings). This blocks:
- Importing the `main` module (and therefore 20 of 22 tests)
- Running `python main.py` at all

Only `tests/test_fix_env.py` (2 tests) currently passes because it imports `fix_env` instead of `main`. This is a codebase bug, not an environment issue.

### Secrets for live runs

A live sync run requires `TOKEN` (Control D API token) and `PROFILE` (profile ID) as environment variables or in a `.env` file. All tests use mocks and do not need these secrets.

Choose a reason for hiding this comment

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

medium

Consider adding a note that these secrets should be treated with care and not committed to version control.

Loading