Skip to content

Repository Tools

小树 edited this page Aug 2, 2026 · 1 revision

Repository Tools

CLI and GUI applications are repository tools, not modules in the published library. Installing APICORE_Python does not install commands or GUI dependencies.

Setup

git clone https://github.com/SRON-org/APICORE_Python.git
cd APICORE_Python
uv sync

CLI Validator

uv run python tools/cli.py path/to/config.api.yaml
uv run python tools/cli.py path/to/config.api.json --version v1
uv run python tools/cli.py path/to/config.api.toml --version 2.1
uv run python tools/cli.py file-with-custom-extension --format json

Exit code 0 means validation succeeded. Exit code 1 means file access, decoding, or schema validation failed. Argparse uses exit code 2 for invalid command arguments.

Desktop Validator

uv run python tools/gui.py

On Windows, launch without a console window after uv sync:

.\.venv\Scripts\pythonw.exe .\tools\gui.py

Some Linux distributions require Tkinter separately:

sudo apt install python3-tk

The GUI supports JSON, YAML, YML, and TOML files, recursively scans selected folders, displays parsed fields, masks secret parameter values, and labels run handlers as high risk. It does not call APIs or execute handlers.

Migration From Installed Commands

Previous command Repository tool
apicore-validate config.api.yaml uv run python tools/cli.py config.api.yaml
apicore-gui uv run python tools/gui.py

Clone this wiki locally