Skip to content

Commit d7ea73b

Browse files
author
semantic-release
committed
chore(release): bump version to 0.11.1
1 parent 899ab2d commit d7ea73b

3 files changed

Lines changed: 60 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,64 @@
11
# CHANGELOG
22

33

4+
## v0.11.1 (2026-03-14)
5+
6+
### Bug Fixes
7+
8+
- **cli**: Format nested values as YAML and add --json flag to get
9+
([#32](https://github.com/cdds-ab/vaultctl/pull/32),
10+
[`899ab2d`](https://github.com/cdds-ab/vaultctl/commit/899ab2df0ac1566497c51abc9c24b115989e632c))
11+
12+
## Problem
13+
14+
`vaultctl get` on structured entries (dicts, lists) outputs Python `repr()` format — single quotes,
15+
no indentation, not parseable by `jq` or other tools. Example:
16+
17+
``` Type: secretText
18+
19+
domains: [{'name': 'docker build hosts', 'credentials': [{'type': 'x509ClientCert', ...
20+
21+
```
22+
23+
This makes credentialStore entries with 50+ nested credentials completely unreadable.
24+
25+
## Solution
26+
27+
### 1. Human-readable output: YAML formatting
28+
29+
Added `_format_value()` helper (`cli.py:35-46`) that formats nested values: - **Strings**: returned
30+
as-is (no change to existing behavior) - **Dicts/Lists**: formatted as YAML via
31+
`yaml.dump(default_flow_style=False)` - **Other types**: converted via `str()`
32+
33+
The `get` command now calls `_format_value(value[f])` instead of directly printing `value[f]`, so
34+
nested structures render as readable YAML with proper indentation.
35+
36+
### 2. Machine-readable output: `--json` flag
37+
38+
New `--json` flag on the `get` command outputs the value as JSON:
39+
40+
```bash vaultctl get vault_jenkins_credentials --json | jq '.global.credentials | length' ```
41+
42+
Works with `--field` too:
43+
44+
```bash vaultctl get db_creds --field username --json ```
45+
46+
Uses `json.dumps(indent=2, ensure_ascii=False)` for readable JSON that pipes cleanly to `jq`.
47+
48+
### Files changed
49+
50+
- `src/vaultctl/cli.py`: - Added `_format_value()` helper (lines 35-46) - Added `--json` /
51+
`output_json` option to `get` command - Changed dict field output from `value[f]` to
52+
`_format_value(value[f])` - JSON output path for both full value and `--field` access
53+
54+
## Test plan - [ ] `vaultctl get <dict-key>` shows readable YAML (not Python repr) - [ ] `vaultctl
55+
get <dict-key> --json | jq .` parses correctly - [ ] `vaultctl get <string-key>` unchanged (plain
56+
string output) - [ ] `vaultctl get <dict-key> --field username` unchanged - [ ] All 298 existing
57+
tests pass
58+
59+
Co-authored-by: Fred Thiele <8555720+f3rdy@users.noreply.github.com>
60+
61+
462
## v0.11.0 (2026-03-14)
563

664
### Features

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "vaultctl"
3-
version = "0.11.0"
3+
version = "0.11.1"
44
description = "Generalized Ansible Vault management CLI"
55
readme = "README.md"
66
authors = [

‎src/vaultctl/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""vaultctl — Generalized Ansible Vault management CLI."""
22

3-
__version__ = "0.11.0"
3+
__version__ = "0.11.1"

0 commit comments

Comments
 (0)