Query and update version numbers across multiple configuration files.
Project description
vqu
vqu is a command-line tool for querying and updating version numbers across
multiple configuration files in your projects. It allows you to:
- Query version information from .env, JSON, TOML, XML, and YAML configuration files
- Compare versions across different files to ensure consistency
- Update version numbers simultaneously in all configured files with a single command
vqu uses yq syntax to locate and extract
version values from your configuration files. This means you can use powerful
query expressions like .version, .project.version, or
.metadata[0].version to precisely target version fields regardless of file
format or nesting depth.
This is particularly useful for monorepos and projects that maintain version
information across multiple configuration formats. Instead of manually updating
each file, vqu automates the process and validates that all versions are
consistent.
Requirements
System
- yq must be installed on your system.
Python
vqurequires Python 3.10 or later.- Runs on macOS, Windows, and all Linux distributions.
Installation
vqu can be installed using pip:
pip install vqu
YAML File Structure
By default, vqu looks for a .vqu.yaml configuration file in the current
directory. Here's an example of the configuration structure:
projects:
Project_1:
version: 0.1.1
config_files:
- path: proj1/.env
format: dotenv
filters:
- expression: .VERSION
- path: proj1/conf.json
format: json
filters:
- expression: .project.version
Project_2:
version: 0.1.3
config_files:
- path: proj2/conf.yaml
format: yaml
filters:
- expression: .project.version
Schema
Root level:
projects- Object containing one or more project definitions. Keys are arbitrary project names.
Project object:
version(required) - The expected version number for this project (e.g.,"0.1.1").config_files(required) - Array of configuration files to manage for this project.
Configuration file object:
path(required) - Path to the configuration file, relative to the.vqu.yamlfile.format(required) - File format. Supported formats:dotenv,json,toml,xml,yaml.filters(required) - Array of filter objects that extract version values from this file.
Filter object:
expression(required) - A yq query expression that targets a version value in the configuration file (e.g.,.version,.project.version,.[0].version).
Example
If you've downloaded or cloned the repository from GitHub, you can try the example configuration:
vqu -c ./examples/.vqu.yaml
This will output version information for all configured projects with color-coded status:
Color legend:
- 🟢 Version matches the expected project version
- 🟡 Version differs from the expected project version
- 🔴 Value not found or invalid version format
Command line usage
usage: vqu [project] [options]
Query and update version numbers across multiple configuration files.
positional arguments:
project The name of the project to display versions for.
options:
-c PATH, --config PATH
Path to the configuration file (default: .vqu.yaml).
-u, --update Write the version numbers in the configuration files.
-h, --help Show this help message and exit.
-v, --version Show the version and exit.
License
This project is licensed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vqu-0.1.2.tar.gz.
File metadata
- Download URL: vqu-0.1.2.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c57c83a14a2918b55203f1907d84e59b19ac527dcba5cf7cecd40f18bba85138
|
|
| MD5 |
5909ba0da8e196d9be37580192a0c9be
|
|
| BLAKE2b-256 |
22ceb7c9d7890b4ac76bae45a297f83d2e56ee14011815eb5c48502a3f016497
|
Provenance
The following attestation bundles were made for vqu-0.1.2.tar.gz:
Publisher:
release-publish.yml on alexisbg/vqu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vqu-0.1.2.tar.gz -
Subject digest:
c57c83a14a2918b55203f1907d84e59b19ac527dcba5cf7cecd40f18bba85138 - Sigstore transparency entry: 768704335
- Sigstore integration time:
-
Permalink:
alexisbg/vqu@85dc38d507c7c9e9b85fa1ee159fdbf7f9dc1437 -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/alexisbg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-publish.yml@85dc38d507c7c9e9b85fa1ee159fdbf7f9dc1437 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vqu-0.1.2-py3-none-any.whl.
File metadata
- Download URL: vqu-0.1.2-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67427a4d9ad8d44f364668957d4ff84eb0338efc98490eb6eeb359fcdfca7ece
|
|
| MD5 |
97550e6d3448d1bb5168599b636b5e4b
|
|
| BLAKE2b-256 |
fef0309220e77eabb88c4988f3021288ed96434bd5a1b4eeb4a59193e714cd06
|
Provenance
The following attestation bundles were made for vqu-0.1.2-py3-none-any.whl:
Publisher:
release-publish.yml on alexisbg/vqu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vqu-0.1.2-py3-none-any.whl -
Subject digest:
67427a4d9ad8d44f364668957d4ff84eb0338efc98490eb6eeb359fcdfca7ece - Sigstore transparency entry: 768704341
- Sigstore integration time:
-
Permalink:
alexisbg/vqu@85dc38d507c7c9e9b85fa1ee159fdbf7f9dc1437 -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/alexisbg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-publish.yml@85dc38d507c7c9e9b85fa1ee159fdbf7f9dc1437 -
Trigger Event:
push
-
Statement type: