keepassxc-cli 1.1.0__tar.gz → 1.2.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.
Potentially problematic release.
This version of keepassxc-cli might be problematic. Click here for more details.
- {keepassxc_cli-1.1.0/keepassxc_cli.egg-info → keepassxc_cli-1.2.0}/PKG-INFO +10 -4
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/README.md +8 -2
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli/commands/add.py +0 -2
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli/commands/mkdir.py +5 -3
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0/keepassxc_cli.egg-info}/PKG-INFO +10 -4
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli.egg-info/requires.txt +1 -1
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/pyproject.toml +1 -1
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/tests/test_commands.py +12 -6
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/.github/workflows/auto-merge-dependabot.yml +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/.github/workflows/auto-release.yml +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/.github/workflows/lint_and_test.yml +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/.github/workflows/pypi.yml +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/.gitignore +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/CLAUDE.md +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/LICENSE +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli/__init__.py +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli/__main__.py +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli/commands/__init__.py +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli/commands/clip.py +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli/commands/edit.py +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli/commands/lock.py +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli/commands/rm.py +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli/commands/setup.py +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli/commands/show.py +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli/commands/status.py +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli/commands/totp.py +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli/config.py +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli/output.py +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli.egg-info/SOURCES.txt +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli.egg-info/dependency_links.txt +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli.egg-info/entry_points.txt +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/keepassxc_cli.egg-info/top_level.txt +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/setup.cfg +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/tests/conftest.py +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/tests/test_config.py +0 -0
- {keepassxc_cli-1.1.0 → keepassxc_cli-1.2.0}/tests/test_output.py +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: keepassxc-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.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.1.0
|
|
10
10
|
Requires-Dist: pyperclip==1.8.0
|
|
11
11
|
Provides-Extra: dev
|
|
12
12
|
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
@@ -121,11 +121,15 @@ keepassxc-cli clip totp https://github.com
|
|
|
121
121
|
#### `add` — Add a new entry
|
|
122
122
|
|
|
123
123
|
```bash
|
|
124
|
-
keepassxc-cli add --url https://example.com --username user@example.com --title "Example"
|
|
125
124
|
# Password is prompted securely if --password is not given
|
|
125
|
+
keepassxc-cli add --url https://example.com --username user@example.com
|
|
126
126
|
keepassxc-cli add --url https://example.com --username user --password mypass
|
|
127
|
+
# Place the entry in a specific group by UUID
|
|
128
|
+
keepassxc-cli add --url https://example.com --username user --group-uuid <group-uuid>
|
|
127
129
|
```
|
|
128
130
|
|
|
131
|
+
> **Note**: The entry title is always derived from the URL hostname by KeePassXC. The protocol has no field to set a custom title.
|
|
132
|
+
|
|
129
133
|
#### `edit` — Edit an entry
|
|
130
134
|
|
|
131
135
|
```bash
|
|
@@ -154,9 +158,11 @@ keepassxc-cli lock
|
|
|
154
158
|
|
|
155
159
|
```bash
|
|
156
160
|
keepassxc-cli mkdir "Work"
|
|
157
|
-
keepassxc-cli mkdir "Projects"
|
|
161
|
+
keepassxc-cli mkdir "Work/Projects" # create Projects inside Work
|
|
158
162
|
```
|
|
159
163
|
|
|
164
|
+
Use `/`-separated paths to create nested groups. KeePassXC creates any missing path segments automatically.
|
|
165
|
+
|
|
160
166
|
## Configuration
|
|
161
167
|
|
|
162
168
|
### CLI config (`~/.keepassxc/cli.json`)
|
|
@@ -106,11 +106,15 @@ keepassxc-cli clip totp https://github.com
|
|
|
106
106
|
#### `add` — Add a new entry
|
|
107
107
|
|
|
108
108
|
```bash
|
|
109
|
-
keepassxc-cli add --url https://example.com --username user@example.com --title "Example"
|
|
110
109
|
# Password is prompted securely if --password is not given
|
|
110
|
+
keepassxc-cli add --url https://example.com --username user@example.com
|
|
111
111
|
keepassxc-cli add --url https://example.com --username user --password mypass
|
|
112
|
+
# Place the entry in a specific group by UUID
|
|
113
|
+
keepassxc-cli add --url https://example.com --username user --group-uuid <group-uuid>
|
|
112
114
|
```
|
|
113
115
|
|
|
116
|
+
> **Note**: The entry title is always derived from the URL hostname by KeePassXC. The protocol has no field to set a custom title.
|
|
117
|
+
|
|
114
118
|
#### `edit` — Edit an entry
|
|
115
119
|
|
|
116
120
|
```bash
|
|
@@ -139,9 +143,11 @@ keepassxc-cli lock
|
|
|
139
143
|
|
|
140
144
|
```bash
|
|
141
145
|
keepassxc-cli mkdir "Work"
|
|
142
|
-
keepassxc-cli mkdir "Projects"
|
|
146
|
+
keepassxc-cli mkdir "Work/Projects" # create Projects inside Work
|
|
143
147
|
```
|
|
144
148
|
|
|
149
|
+
Use `/`-separated paths to create nested groups. KeePassXC creates any missing path segments automatically.
|
|
150
|
+
|
|
145
151
|
## Configuration
|
|
146
152
|
|
|
147
153
|
### CLI config (`~/.keepassxc/cli.json`)
|
|
@@ -15,7 +15,6 @@ def add_parser(subparsers: argparse._SubParsersAction) -> None:
|
|
|
15
15
|
p.add_argument("--url", required=True, help="Entry URL")
|
|
16
16
|
p.add_argument("--username", required=True, help="Username")
|
|
17
17
|
p.add_argument("--password", default=None, help="Password (prompted if omitted)")
|
|
18
|
-
p.add_argument("--title", default="", help="Entry title")
|
|
19
18
|
p.add_argument("--group-uuid", default="", help="Target group UUID")
|
|
20
19
|
p.set_defaults(func=run)
|
|
21
20
|
|
|
@@ -37,7 +36,6 @@ def run(
|
|
|
37
36
|
url=args.url,
|
|
38
37
|
username=args.username,
|
|
39
38
|
password=password,
|
|
40
|
-
title=args.title,
|
|
41
39
|
group_uuid=args.group_uuid,
|
|
42
40
|
)
|
|
43
41
|
if success:
|
|
@@ -11,8 +11,10 @@ from keepassxc_cli.config import CliConfig
|
|
|
11
11
|
|
|
12
12
|
def add_parser(subparsers: argparse._SubParsersAction) -> None:
|
|
13
13
|
p = subparsers.add_parser("mkdir", help="Create a new group")
|
|
14
|
-
p.add_argument(
|
|
15
|
-
|
|
14
|
+
p.add_argument(
|
|
15
|
+
"name",
|
|
16
|
+
help="Group name or path. Use '/' to create nested groups (e.g. 'Work/Projects').",
|
|
17
|
+
)
|
|
16
18
|
p.set_defaults(func=run)
|
|
17
19
|
|
|
18
20
|
|
|
@@ -25,7 +27,7 @@ def run(
|
|
|
25
27
|
*,
|
|
26
28
|
fmt: str = "table",
|
|
27
29
|
) -> int:
|
|
28
|
-
group = client.create_group(args.name
|
|
30
|
+
group = client.create_group(args.name)
|
|
29
31
|
if group is None:
|
|
30
32
|
print("Failed to create group.", file=sys.stderr)
|
|
31
33
|
return 1
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: keepassxc-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.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.1.0
|
|
10
10
|
Requires-Dist: pyperclip==1.8.0
|
|
11
11
|
Provides-Extra: dev
|
|
12
12
|
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
@@ -121,11 +121,15 @@ keepassxc-cli clip totp https://github.com
|
|
|
121
121
|
#### `add` — Add a new entry
|
|
122
122
|
|
|
123
123
|
```bash
|
|
124
|
-
keepassxc-cli add --url https://example.com --username user@example.com --title "Example"
|
|
125
124
|
# Password is prompted securely if --password is not given
|
|
125
|
+
keepassxc-cli add --url https://example.com --username user@example.com
|
|
126
126
|
keepassxc-cli add --url https://example.com --username user --password mypass
|
|
127
|
+
# Place the entry in a specific group by UUID
|
|
128
|
+
keepassxc-cli add --url https://example.com --username user --group-uuid <group-uuid>
|
|
127
129
|
```
|
|
128
130
|
|
|
131
|
+
> **Note**: The entry title is always derived from the URL hostname by KeePassXC. The protocol has no field to set a custom title.
|
|
132
|
+
|
|
129
133
|
#### `edit` — Edit an entry
|
|
130
134
|
|
|
131
135
|
```bash
|
|
@@ -154,9 +158,11 @@ keepassxc-cli lock
|
|
|
154
158
|
|
|
155
159
|
```bash
|
|
156
160
|
keepassxc-cli mkdir "Work"
|
|
157
|
-
keepassxc-cli mkdir "Projects"
|
|
161
|
+
keepassxc-cli mkdir "Work/Projects" # create Projects inside Work
|
|
158
162
|
```
|
|
159
163
|
|
|
164
|
+
Use `/`-separated paths to create nested groups. KeePassXC creates any missing path segments automatically.
|
|
165
|
+
|
|
160
166
|
## Configuration
|
|
161
167
|
|
|
162
168
|
### CLI config (`~/.keepassxc/cli.json`)
|
|
@@ -38,11 +38,9 @@ def make_args(**kwargs) -> argparse.Namespace:
|
|
|
38
38
|
"url": "https://example.com",
|
|
39
39
|
"username": "user",
|
|
40
40
|
"password": "pass",
|
|
41
|
-
"title": "Example",
|
|
42
41
|
"group_uuid": "",
|
|
43
42
|
"uuid": "abcdef12-0000-0000-0000-000000000000",
|
|
44
43
|
"name": "NewGroup",
|
|
45
|
-
"parent_uuid": "",
|
|
46
44
|
}
|
|
47
45
|
defaults.update(kwargs)
|
|
48
46
|
return argparse.Namespace(**defaults)
|
|
@@ -142,7 +140,7 @@ class TestShowCommand:
|
|
|
142
140
|
class TestAddCommand:
|
|
143
141
|
def test_success(self, mock_client, cli_config, browser_config, browser_config_path, capsys):
|
|
144
142
|
mock_client.set_login.return_value = True
|
|
145
|
-
args = make_args(url="https://example.com", username="u", password="p",
|
|
143
|
+
args = make_args(url="https://example.com", username="u", password="p", group_uuid="")
|
|
146
144
|
rc = add.run(mock_client, args, cli_config, browser_config, browser_config_path)
|
|
147
145
|
assert rc == 0
|
|
148
146
|
mock_client.set_login.assert_called_once()
|
|
@@ -150,7 +148,7 @@ class TestAddCommand:
|
|
|
150
148
|
|
|
151
149
|
def test_failure(self, mock_client, cli_config, browser_config, browser_config_path, capsys):
|
|
152
150
|
mock_client.set_login.return_value = False
|
|
153
|
-
args = make_args(url="https://example.com", username="u", password="p",
|
|
151
|
+
args = make_args(url="https://example.com", username="u", password="p", group_uuid="")
|
|
154
152
|
rc = add.run(mock_client, args, cli_config, browser_config, browser_config_path)
|
|
155
153
|
assert rc == 1
|
|
156
154
|
|
|
@@ -270,14 +268,22 @@ class TestMkdirCommand:
|
|
|
270
268
|
def test_success(self, mock_client, cli_config, browser_config, browser_config_path, capsys, mock_group):
|
|
271
269
|
new_group = mock_group(uuid="new-uuid", name="MyGroup")
|
|
272
270
|
mock_client.create_group.return_value = new_group
|
|
273
|
-
args = make_args(name="MyGroup"
|
|
271
|
+
args = make_args(name="MyGroup")
|
|
274
272
|
rc = mkdir.run(mock_client, args, cli_config, browser_config, browser_config_path)
|
|
275
273
|
assert rc == 0
|
|
276
274
|
out = capsys.readouterr().out
|
|
277
275
|
assert "MyGroup" in out
|
|
278
276
|
|
|
277
|
+
def test_path_syntax(self, mock_client, cli_config, browser_config, browser_config_path, capsys, mock_group):
|
|
278
|
+
new_group = mock_group(uuid="new-uuid", name="Projects")
|
|
279
|
+
mock_client.create_group.return_value = new_group
|
|
280
|
+
args = make_args(name="Work/Projects")
|
|
281
|
+
rc = mkdir.run(mock_client, args, cli_config, browser_config, browser_config_path)
|
|
282
|
+
assert rc == 0
|
|
283
|
+
mock_client.create_group.assert_called_once_with("Work/Projects")
|
|
284
|
+
|
|
279
285
|
def test_failure(self, mock_client, cli_config, browser_config, browser_config_path, capsys):
|
|
280
286
|
mock_client.create_group.return_value = None
|
|
281
|
-
args = make_args(name="MyGroup"
|
|
287
|
+
args = make_args(name="MyGroup")
|
|
282
288
|
rc = mkdir.run(mock_client, args, cli_config, browser_config, browser_config_path)
|
|
283
289
|
assert rc == 1
|
|
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
|