keepassxc-cli 1.4.0__tar.gz → 1.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/CLAUDE.md +17 -9
- {keepassxc_cli-1.4.0/keepassxc_cli.egg-info → keepassxc_cli-1.5.0}/PKG-INFO +8 -5
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/README.md +6 -3
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/config.py +12 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0/keepassxc_cli.egg-info}/PKG-INFO +8 -5
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli.egg-info/requires.txt +1 -1
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/pyproject.toml +7 -1
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/.github/workflows/auto-merge-dependabot.yml +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/.github/workflows/auto-release.yml +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/.github/workflows/lint_and_test.yml +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/.github/workflows/pypi.yml +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/.gitignore +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/LICENSE +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/__init__.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/__main__.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/commands/__init__.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/commands/add.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/commands/clip.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/commands/edit.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/commands/group_uuid.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/commands/lock.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/commands/mkdir.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/commands/rm.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/commands/setup.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/commands/show.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/commands/status.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/commands/totp.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/commands/version.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli/output.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli.egg-info/SOURCES.txt +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli.egg-info/dependency_links.txt +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli.egg-info/entry_points.txt +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/keepassxc_cli.egg-info/top_level.txt +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/setup.cfg +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/tests/conftest.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/tests/test_commands.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/tests/test_config.py +0 -0
- {keepassxc_cli-1.4.0 → keepassxc_cli-1.5.0}/tests/test_output.py +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# keepassxc-cli - Claude Code Instructions
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Project Purpose
|
|
3
|
+
## Project Overview
|
|
6
4
|
|
|
7
5
|
`keepassxc-cli` is a Python command-line tool that communicates with a running KeePassXC instance using the KeePassXC Browser Extension protocol (native messaging over a Unix socket). It enables terminal users to interact with KeePassXC — adding, editing, and deleting entries — while leveraging KeePassXC's biometric (TouchID/fingerprint) unlock support.
|
|
8
6
|
|
|
9
|
-
##
|
|
7
|
+
## Architecture
|
|
8
|
+
|
|
9
|
+
### Package Structure
|
|
10
10
|
|
|
11
11
|
```
|
|
12
12
|
keepassxc_cli/
|
|
@@ -34,7 +34,7 @@ tests/
|
|
|
34
34
|
└── test_commands.py # command run() function tests with mocked BrowserClient
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
### Dependencies
|
|
38
38
|
|
|
39
39
|
This package depends on `keepassxc-browser-api` (local package at `../mietzen-keepassxc-browser-api/`), which provides:
|
|
40
40
|
|
|
@@ -73,10 +73,9 @@ def run(
|
|
|
73
73
|
) -> int:
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
##
|
|
76
|
+
## Commands
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
# Create venv and install
|
|
80
79
|
python3 -m venv .venv
|
|
81
80
|
source .venv/bin/activate
|
|
82
81
|
pip install ../mietzen-keepassxc-browser-api/ # local dependency
|
|
@@ -84,13 +83,15 @@ pip install -e ".[dev]"
|
|
|
84
83
|
|
|
85
84
|
# Run tests
|
|
86
85
|
pytest --tb=short -q
|
|
86
|
+
|
|
87
|
+
# Run tests with coverage
|
|
87
88
|
pytest --cov=keepassxc_cli --cov-report=term-missing
|
|
88
89
|
|
|
89
90
|
# Lint
|
|
90
91
|
ruff check --ignore=E501 --exclude=__init__.py ./keepassxc_cli
|
|
91
92
|
```
|
|
92
93
|
|
|
93
|
-
##
|
|
94
|
+
## Conventions
|
|
94
95
|
|
|
95
96
|
- **`from __future__ import annotations`** must be the first line of every `.py` source file.
|
|
96
97
|
- **Ruff**: `ruff check --ignore=E501 --exclude=__init__.py ./keepassxc_cli`
|
|
@@ -122,3 +123,10 @@ ruff check --ignore=E501 --exclude=__init__.py ./keepassxc_cli
|
|
|
122
123
|
## Output Formats
|
|
123
124
|
|
|
124
125
|
Two formats are supported: `table` (default) and `json`. The `-j / --json` flag on individual subcommands or `default_format` in `cli.json` controls the default.
|
|
126
|
+
|
|
127
|
+
## CI
|
|
128
|
+
|
|
129
|
+
- `lint_and_test.yml` — Unit tests + ruff lint across Python 3.10–3.14
|
|
130
|
+
- `pypi.yml` — Build & publish on release, then dispatch to homebrew-tap to update the formula
|
|
131
|
+
- `auto-release.yml` — Auto-create patch release on dependabot merge
|
|
132
|
+
- `auto-merge-dependabot.yml` — Auto-merge dependabot PRs
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: keepassxc-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: CLI for KeePassXC using the browser extension protocol with biometric unlock
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Requires-Python: >=3.10
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
License-File: LICENSE
|
|
9
|
-
Requires-Dist: keepassxc-browser-api==1.
|
|
9
|
+
Requires-Dist: keepassxc-browser-api==1.4.0
|
|
10
10
|
Requires-Dist: pyperclip==1.8.0
|
|
11
11
|
Provides-Extra: dev
|
|
12
12
|
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
13
13
|
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
14
14
|
Dynamic: license-file
|
|
15
15
|
|
|
16
|
-
#
|
|
16
|
+
# KeepassXC CLI
|
|
17
17
|
|
|
18
18
|
A command-line interface for [KeePassXC](https://keepassxc.org/) that communicates via the browser extension protocol, supporting biometric (TouchID/fingerprint) unlock on supported platforms.
|
|
19
19
|
|
|
@@ -35,7 +35,7 @@ A command-line interface for [KeePassXC](https://keepassxc.org/) that communicat
|
|
|
35
35
|
2. A KeePassXC database must be open (or KeePassXC must be running with auto-open configured).
|
|
36
36
|
3. Python ≥ 3.10
|
|
37
37
|
|
|
38
|
-
##
|
|
38
|
+
## Install
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
41
|
pipx install keepassxc-cli
|
|
@@ -252,7 +252,10 @@ pip install -e ".[dev]"
|
|
|
252
252
|
# Run tests
|
|
253
253
|
pytest --tb=short -q
|
|
254
254
|
|
|
255
|
-
# Run
|
|
255
|
+
# Run tests with coverage
|
|
256
|
+
pytest --cov=keepassxc_cli --cov-report=term-missing
|
|
257
|
+
|
|
258
|
+
# Lint
|
|
256
259
|
ruff check --ignore=E501 --exclude=__init__.py ./keepassxc_cli
|
|
257
260
|
```
|
|
258
261
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# KeepassXC CLI
|
|
2
2
|
|
|
3
3
|
A command-line interface for [KeePassXC](https://keepassxc.org/) that communicates via the browser extension protocol, supporting biometric (TouchID/fingerprint) unlock on supported platforms.
|
|
4
4
|
|
|
@@ -20,7 +20,7 @@ A command-line interface for [KeePassXC](https://keepassxc.org/) that communicat
|
|
|
20
20
|
2. A KeePassXC database must be open (or KeePassXC must be running with auto-open configured).
|
|
21
21
|
3. Python ≥ 3.10
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Install
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
pipx install keepassxc-cli
|
|
@@ -237,7 +237,10 @@ pip install -e ".[dev]"
|
|
|
237
237
|
# Run tests
|
|
238
238
|
pytest --tb=short -q
|
|
239
239
|
|
|
240
|
-
# Run
|
|
240
|
+
# Run tests with coverage
|
|
241
|
+
pytest --cov=keepassxc_cli --cov-report=term-missing
|
|
242
|
+
|
|
243
|
+
# Lint
|
|
241
244
|
ruff check --ignore=E501 --exclude=__init__.py ./keepassxc_cli
|
|
242
245
|
```
|
|
243
246
|
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
+
import logging
|
|
4
5
|
import os
|
|
6
|
+
import stat
|
|
5
7
|
from dataclasses import dataclass, field
|
|
6
8
|
from pathlib import Path
|
|
7
9
|
|
|
8
10
|
DEFAULT_BROWSER_API_CONFIG_PATH = str(Path.home() / ".keepassxc" / "browser-api.json")
|
|
9
11
|
DEFAULT_CLI_CONFIG_PATH = Path.home() / ".keepassxc" / "cli.json"
|
|
10
12
|
|
|
13
|
+
logger = logging.getLogger(__name__)
|
|
14
|
+
|
|
11
15
|
|
|
12
16
|
@dataclass
|
|
13
17
|
class CliConfig:
|
|
@@ -32,6 +36,7 @@ class CliConfig:
|
|
|
32
36
|
def save(self, path: Path | str) -> None:
|
|
33
37
|
path = Path(path)
|
|
34
38
|
path.parent.mkdir(parents=True, exist_ok=True)
|
|
39
|
+
os.chmod(str(path.parent), stat.S_IRWXU)
|
|
35
40
|
data = json.dumps(self.to_dict(), indent=2)
|
|
36
41
|
# Write with restricted permissions (0o600)
|
|
37
42
|
fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600)
|
|
@@ -45,6 +50,13 @@ class CliConfig:
|
|
|
45
50
|
path = Path(path)
|
|
46
51
|
if not path.exists():
|
|
47
52
|
return cls()
|
|
53
|
+
mode = path.stat().st_mode
|
|
54
|
+
if mode & 0o077:
|
|
55
|
+
logger.warning(
|
|
56
|
+
"Config file %s has insecure permissions %o; expected 0600. "
|
|
57
|
+
"Fix with: chmod 600 %s",
|
|
58
|
+
path, mode & 0o777, path,
|
|
59
|
+
)
|
|
48
60
|
with open(path) as f:
|
|
49
61
|
d = json.load(f)
|
|
50
62
|
return cls.from_dict(d)
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: keepassxc-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: CLI for KeePassXC using the browser extension protocol with biometric unlock
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Requires-Python: >=3.10
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
License-File: LICENSE
|
|
9
|
-
Requires-Dist: keepassxc-browser-api==1.
|
|
9
|
+
Requires-Dist: keepassxc-browser-api==1.4.0
|
|
10
10
|
Requires-Dist: pyperclip==1.8.0
|
|
11
11
|
Provides-Extra: dev
|
|
12
12
|
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
13
13
|
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
14
14
|
Dynamic: license-file
|
|
15
15
|
|
|
16
|
-
#
|
|
16
|
+
# KeepassXC CLI
|
|
17
17
|
|
|
18
18
|
A command-line interface for [KeePassXC](https://keepassxc.org/) that communicates via the browser extension protocol, supporting biometric (TouchID/fingerprint) unlock on supported platforms.
|
|
19
19
|
|
|
@@ -35,7 +35,7 @@ A command-line interface for [KeePassXC](https://keepassxc.org/) that communicat
|
|
|
35
35
|
2. A KeePassXC database must be open (or KeePassXC must be running with auto-open configured).
|
|
36
36
|
3. Python ≥ 3.10
|
|
37
37
|
|
|
38
|
-
##
|
|
38
|
+
## Install
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
41
|
pipx install keepassxc-cli
|
|
@@ -252,7 +252,10 @@ pip install -e ".[dev]"
|
|
|
252
252
|
# Run tests
|
|
253
253
|
pytest --tb=short -q
|
|
254
254
|
|
|
255
|
-
# Run
|
|
255
|
+
# Run tests with coverage
|
|
256
|
+
pytest --cov=keepassxc_cli --cov-report=term-missing
|
|
257
|
+
|
|
258
|
+
# Lint
|
|
256
259
|
ruff check --ignore=E501 --exclude=__init__.py ./keepassxc_cli
|
|
257
260
|
```
|
|
258
261
|
|
|
@@ -10,7 +10,7 @@ readme = "README.md"
|
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
11
|
license = "MIT"
|
|
12
12
|
dependencies = [
|
|
13
|
-
"keepassxc-browser-api==1.
|
|
13
|
+
"keepassxc-browser-api==1.4.0",
|
|
14
14
|
"pyperclip==1.8.0",
|
|
15
15
|
]
|
|
16
16
|
|
|
@@ -32,3 +32,9 @@ local_scheme = "no-local-version"
|
|
|
32
32
|
|
|
33
33
|
[tool.pytest.ini_options]
|
|
34
34
|
testpaths = ["tests"]
|
|
35
|
+
|
|
36
|
+
[tool.ruff]
|
|
37
|
+
exclude = ["**/__init__.py"]
|
|
38
|
+
|
|
39
|
+
[tool.ruff.lint]
|
|
40
|
+
ignore = ["E501"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|