Skip to content

feat(cli): add init and config show - #8

Merged
UltiPro merged 2 commits into
mainfrom
feat/project-config
Nov 12, 2026
Merged

UltiPro merged 2 commits into
mainfrom
feat/project-config

Conversation

@UltiPro

@UltiPro UltiPro commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the first step of the local workflow, a project: miniops init creates one and miniops config show prints its configuration. miniops.toml is validated with pydantic, which becomes a runtime dependency.

  • miniops init writes miniops.toml in the current directory. The project is named after the directory unless --name is given. It refuses a directory that is already a project or lies inside one, so a project cannot be nested by accident.
  • init also adds .miniops/ to .gitignore, so the local state (database, artifacts) cannot be committed by mistake. The file is appended to as bytes: existing lines keep their line endings (LF or CRLF) and an existing .miniops entry is not duplicated.
  • miniops config show prints the root, name and default target of the project that the current directory belongs to. The project is found in the directory or the nearest parent.
  • config/project.py: pydantic models for miniops.toml. An unknown key is an error, because it is almost always a typo, and errors name the file, the key and the problem (new ConfigError). default_target accepts only local, the one target that exists so far.
  • The console script and python -m miniops now run miniops.cli:main, which turns a MiniopsError into Error: ... on stderr with exit code 1 instead of a traceback.
  • New runtime dependency pydantic>=2.5.3. uv.lock moves typer from 0.28.0 to 0.29.1: it was held back only because 0.29 depends on pydantic. typer>=0.27 in pyproject.toml is unchanged.

Checklist

  • PR title follows Conventional Commits (e.g. feat(registry): ...)
  • Larger or architectural changes were discussed in an issue first
  • Tests added or updated (if applicable)
  • No OS-specific assumptions (paths, shell commands, file encodings); works on Linux, macOS and Windows
  • Documentation updated (n/a: the README describes the current release and the planned interface, and both stay accurate until these commands are released)
  • CHANGELOG.md updated under "Unreleased"

@UltiPro
UltiPro merged commit fb293c6 into main Nov 12, 2026
16 checks passed
@UltiPro
UltiPro deleted the feat/project-config branch November 12, 2026 00:07
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.

1 participant