usecli 0.1.82__tar.gz → 0.2.1__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.
- {usecli-0.1.82 → usecli-0.2.1}/PKG-INFO +28 -10
- {usecli-0.1.82 → usecli-0.2.1}/README.md +20 -2
- {usecli-0.1.82 → usecli-0.2.1}/pyproject.toml +15 -18
- {usecli-0.1.82 → usecli-0.2.1}/pyproject.toml.orig +17 -18
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/__init__.py +1 -1
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/bundler/__init__.py +4 -4
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/defaults/base/about_command.py +7 -24
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/defaults/base/inspire_command.py +0 -5
- usecli-0.1.82/src/usecli/cli/commands/defaults/base/internal/fzf_command.py → usecli-0.2.1/src/usecli/cli/commands/defaults/base/internal/interactive_command.py +141 -102
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/defaults/core/utils.py +2 -2
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/init_command.py +160 -24
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/config/colors.py +54 -24
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/base_command.py +28 -4
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/error/handler.py +1 -1
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/exceptions/validation.py +3 -1
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/runtime.py +2 -2
- usecli-0.2.1/src/usecli/cli/core/ui/title.py +252 -0
- usecli-0.2.1/src/usecli/cli/templates/usecli.config.toml.j2 +46 -0
- usecli-0.2.1/src/usecli/cli/utils/interactive/prompt_input.py +143 -0
- usecli-0.2.1/src/usecli/cli/utils/interactive/terminal_menu.py +516 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/entry.py +2 -3
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/progress.py +1 -1
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/shared/config/manager.py +169 -94
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/shared/upgrades/pyproject.py +1 -5
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/ui.py +5 -0
- usecli-0.2.1/src/usecli/usecli.config.toml +44 -0
- usecli-0.1.82/src/usecli/cli/core/ui/title.py +0 -148
- usecli-0.1.82/src/usecli/cli/templates/usecli.config.toml.j2 +0 -21
- usecli-0.1.82/src/usecli/cli/utils/interactive/terminal_menu.py +0 -210
- usecli-0.1.82/src/usecli/usecli.config.toml +0 -14
- {usecli-0.1.82 → usecli-0.2.1}/LICENSE +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/bundler/__main__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/README.md +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/custom/README.md +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/custom/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/defaults/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/defaults/base/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/defaults/base/help_command.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/defaults/base/internal/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/defaults/base/upgrade_command.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/defaults/core/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/defaults/make/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/defaults/make/make_bundle_command.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/defaults/make/make_command.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/commands/defaults/make/make_theme_command.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/config/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/_typer_compat.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/error/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/error/utils.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/exceptions/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/exceptions/base.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/exceptions/config.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/exceptions/usage.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/ui/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/ui/list.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/ui/title.txt +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/validators/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/validators/network.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/validators/numeric.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/validators/path.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/core/validators/string.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/services/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/services/command_service.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/templates/command.py.j2 +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/templates/theme.toml.j2 +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/themes/ayu_dark.toml +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/themes/catppuccin_frappe.toml +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/themes/catppuccin_latte.toml +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/themes/catppuccin_macchiato.toml +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/themes/catppuccin_mocha.toml +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/themes/default.toml +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/themes/dracula.toml +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/themes/gruvbox_dark.toml +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/themes/nord.toml +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/themes/tokyo_night.toml +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/utils/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/cli/utils/interactive/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/menu.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/params.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/shared/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/shared/config/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/shared/config/globals.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/shared/upgrades/__init__.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/shared/upgrades/checker.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/shared/upgrades/discovery.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/shared/upgrades/installer.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/shared/upgrades/service.py +0 -0
- {usecli-0.1.82 → usecli-0.2.1}/src/usecli/shared/upgrades/settings.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: usecli
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: A powerful Python CLI framework for building beautiful, developer-friendly command-line tools.
|
|
5
5
|
Author: Edward Boswell
|
|
6
6
|
Author-email: Edward Boswell <thememium@gmail.com>
|
|
@@ -10,21 +10,21 @@ Classifier: Programming Language :: Python :: 3
|
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Requires-Dist: case-converter>=1.2.0
|
|
13
|
-
Requires-Dist: click>=8.
|
|
14
|
-
Requires-Dist: fzf-bin>=0.74.1
|
|
13
|
+
Requires-Dist: click>=8.5.1
|
|
15
14
|
Requires-Dist: jinja2>=3.1.6
|
|
16
|
-
Requires-Dist:
|
|
15
|
+
Requires-Dist: prompt-toolkit>=3.0.53
|
|
17
16
|
Requires-Dist: rich>=15.0.0
|
|
18
17
|
Requires-Dist: simple-term-menu>=1.6.6
|
|
19
|
-
Requires-Dist:
|
|
20
|
-
Requires-Dist:
|
|
21
|
-
Requires-Dist: pyinstaller>=6.
|
|
22
|
-
Requires-Python: >=3.
|
|
18
|
+
Requires-Dist: typer>=0.29.2
|
|
19
|
+
Requires-Dist: pyfiglet>=1.0.4 ; extra == 'figlet'
|
|
20
|
+
Requires-Dist: pyinstaller>=6.22.3 ; extra == 'pyinstaller'
|
|
21
|
+
Requires-Python: >=3.11
|
|
23
22
|
Project-URL: Homepage, https://github.com/thememium/usecli
|
|
24
23
|
Project-URL: Documentation, https://github.com/thememium/usecli
|
|
25
24
|
Project-URL: Repository, https://github.com/thememium/usecli.git
|
|
26
25
|
Project-URL: Issues, https://github.com/thememium/usecli/issues
|
|
27
26
|
Project-URL: Changelog, https://github.com/thememium/usecli/blob/master/CHANGELOG.md
|
|
27
|
+
Provides-Extra: figlet
|
|
28
28
|
Provides-Extra: pyinstaller
|
|
29
29
|
Description-Content-Type: text/markdown
|
|
30
30
|
|
|
@@ -68,7 +68,7 @@ Description-Content-Type: text/markdown
|
|
|
68
68
|
useCli A powerful Python CLI framework for building beautiful, developer-friendly command-line tools. It gives you:
|
|
69
69
|
|
|
70
70
|
- **Prefix matching** — Type `he` instead of `help`
|
|
71
|
-
- **Interactive mode** —
|
|
71
|
+
- **Interactive mode** — Searchable command picker
|
|
72
72
|
- **Auto-generated help** — Clean, styled output
|
|
73
73
|
- **Command scaffolding** — `make:command` generates boilerplate
|
|
74
74
|
- **UI components** — Prompts, menus, styled console output
|
|
@@ -97,6 +97,18 @@ pip install usecli
|
|
|
97
97
|
usecli init
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
+
### ASCII-art titles (optional)
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
uv add "usecli[figlet]"
|
|
104
|
+
# or: pip install "usecli[figlet]"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The extra installs [pyfiglet](https://github.com/pwaller/pyfiglet). With it,
|
|
108
|
+
`usecli init` offers a figlet font picker and banners are rendered in the
|
|
109
|
+
chosen font. Without it, the picker is skipped and banners print as colored
|
|
110
|
+
text: title and version on one line, description below.
|
|
111
|
+
|
|
100
112
|
### Create a command
|
|
101
113
|
|
|
102
114
|
```sh
|
|
@@ -141,10 +153,16 @@ usecli ma:co # make:command
|
|
|
141
153
|
### Interactive Mode
|
|
142
154
|
|
|
143
155
|
```sh
|
|
144
|
-
usecli --interactive #
|
|
156
|
+
usecli --interactive # Searchable picker for all commands
|
|
145
157
|
usecli -i hello # Run 'hello' command interactively
|
|
146
158
|
```
|
|
147
159
|
|
|
160
|
+
The picker opens in-place with vim-style keys: `j`/`k` or the arrow keys move,
|
|
161
|
+
`/` starts search, and enter runs the highlighted command. `esc` leaves search
|
|
162
|
+
mode but keeps the filter active (normal-mode navigation still works); `ctrl-u`
|
|
163
|
+
clears the filter. Command names, descriptions, the title and the status bar use
|
|
164
|
+
your theme colors; the highlighted row switches to the theme's highlight style.
|
|
165
|
+
|
|
148
166
|
### Command Groups
|
|
149
167
|
|
|
150
168
|
Colon-separated commands group automatically in help:
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
useCli A powerful Python CLI framework for building beautiful, developer-friendly command-line tools. It gives you:
|
|
39
39
|
|
|
40
40
|
- **Prefix matching** — Type `he` instead of `help`
|
|
41
|
-
- **Interactive mode** —
|
|
41
|
+
- **Interactive mode** — Searchable command picker
|
|
42
42
|
- **Auto-generated help** — Clean, styled output
|
|
43
43
|
- **Command scaffolding** — `make:command` generates boilerplate
|
|
44
44
|
- **UI components** — Prompts, menus, styled console output
|
|
@@ -67,6 +67,18 @@ pip install usecli
|
|
|
67
67
|
usecli init
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
+
### ASCII-art titles (optional)
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
uv add "usecli[figlet]"
|
|
74
|
+
# or: pip install "usecli[figlet]"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The extra installs [pyfiglet](https://github.com/pwaller/pyfiglet). With it,
|
|
78
|
+
`usecli init` offers a figlet font picker and banners are rendered in the
|
|
79
|
+
chosen font. Without it, the picker is skipped and banners print as colored
|
|
80
|
+
text: title and version on one line, description below.
|
|
81
|
+
|
|
70
82
|
### Create a command
|
|
71
83
|
|
|
72
84
|
```sh
|
|
@@ -111,10 +123,16 @@ usecli ma:co # make:command
|
|
|
111
123
|
### Interactive Mode
|
|
112
124
|
|
|
113
125
|
```sh
|
|
114
|
-
usecli --interactive #
|
|
126
|
+
usecli --interactive # Searchable picker for all commands
|
|
115
127
|
usecli -i hello # Run 'hello' command interactively
|
|
116
128
|
```
|
|
117
129
|
|
|
130
|
+
The picker opens in-place with vim-style keys: `j`/`k` or the arrow keys move,
|
|
131
|
+
`/` starts search, and enter runs the highlighted command. `esc` leaves search
|
|
132
|
+
mode but keeps the filter active (normal-mode navigation still works); `ctrl-u`
|
|
133
|
+
clears the filter. Command names, descriptions, the title and the status bar use
|
|
134
|
+
your theme colors; the highlighted row switches to the theme's highlight style.
|
|
135
|
+
|
|
118
136
|
### Command Groups
|
|
119
137
|
|
|
120
138
|
Colon-separated commands group automatically in help:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "usecli"
|
|
3
|
-
version = "0.1
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
description = "A powerful Python CLI framework for building beautiful, developer-friendly command-line tools."
|
|
5
5
|
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.
|
|
6
|
+
requires-python = ">=3.11"
|
|
7
7
|
classifiers = [
|
|
8
8
|
"Programming Language :: Python :: 3",
|
|
9
9
|
"Operating System :: OS Independent",
|
|
@@ -11,14 +11,12 @@ classifiers = [
|
|
|
11
11
|
]
|
|
12
12
|
dependencies = [
|
|
13
13
|
"case-converter>=1.2.0",
|
|
14
|
-
"click>=8.
|
|
15
|
-
"fzf-bin>=0.74.1",
|
|
14
|
+
"click>=8.5.1",
|
|
16
15
|
"jinja2>=3.1.6",
|
|
17
|
-
"
|
|
16
|
+
"prompt-toolkit>=3.0.53",
|
|
18
17
|
"rich>=15.0.0",
|
|
19
18
|
"simple-term-menu>=1.6.6",
|
|
20
|
-
"
|
|
21
|
-
"typer>=0.27.0",
|
|
19
|
+
"typer>=0.29.2",
|
|
22
20
|
]
|
|
23
21
|
license = "MIT"
|
|
24
22
|
license-files = ["LICEN[CS]E*"]
|
|
@@ -28,7 +26,8 @@ name = "Edward Boswell"
|
|
|
28
26
|
email = "thememium@gmail.com"
|
|
29
27
|
|
|
30
28
|
[project.optional-dependencies]
|
|
31
|
-
|
|
29
|
+
figlet = ["pyfiglet>=1.0.4"]
|
|
30
|
+
pyinstaller = ["pyinstaller>=6.22.3"]
|
|
32
31
|
|
|
33
32
|
[project.urls]
|
|
34
33
|
Homepage = "https://github.com/thememium/usecli"
|
|
@@ -48,13 +47,14 @@ build-backend = "uv_build"
|
|
|
48
47
|
[dependency-groups]
|
|
49
48
|
dev = [
|
|
50
49
|
"deptry>=0.25.1",
|
|
51
|
-
"isort>=
|
|
52
|
-
"poethepoet>=0.
|
|
53
|
-
"
|
|
54
|
-
"
|
|
50
|
+
"isort>=9.0.2",
|
|
51
|
+
"poethepoet>=0.49.0",
|
|
52
|
+
"pyfiglet>=1.0.4",
|
|
53
|
+
"pyinstaller>=6.22.3",
|
|
54
|
+
"pytest>=9.2.0",
|
|
55
55
|
"pytest-cov>=7.1.0",
|
|
56
|
-
"ruff>=0.
|
|
57
|
-
"ty>=0.0.
|
|
56
|
+
"ruff>=0.17.5",
|
|
57
|
+
"ty>=0.0.107",
|
|
58
58
|
]
|
|
59
59
|
|
|
60
60
|
[tool.deptry]
|
|
@@ -63,11 +63,8 @@ known_first_party = ["usecli"]
|
|
|
63
63
|
[tool.deptry.package_module_name_map]
|
|
64
64
|
case-converter = "caseconverter"
|
|
65
65
|
|
|
66
|
-
[tool.deptry.per_rule_ignores]
|
|
67
|
-
DEP002 = ["fzf-bin"]
|
|
68
|
-
|
|
69
66
|
[tool.poe.tasks]
|
|
70
|
-
dev = "uv run usecli"
|
|
67
|
+
dev = "uv run usecli -i"
|
|
71
68
|
clean-full = "sh -c 'uv run isort . && uv run ruff check . --fix && uv run ruff format . && uv run deptry . && uv run ty check'"
|
|
72
69
|
clean = "sh -c 'uv run isort . && uv run ruff format .'"
|
|
73
70
|
test = "uv run pytest tests/ -v"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "usecli"
|
|
3
|
-
version = "0.1
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
description = "A powerful Python CLI framework for building beautiful, developer-friendly command-line tools."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [{ name = "Edward Boswell", email = "thememium@gmail.com" }]
|
|
7
|
-
requires-python = ">=3.
|
|
7
|
+
requires-python = ">=3.11"
|
|
8
8
|
classifiers = [
|
|
9
9
|
"Programming Language :: Python :: 3",
|
|
10
10
|
"Operating System :: OS Independent",
|
|
@@ -12,20 +12,21 @@ classifiers = [
|
|
|
12
12
|
]
|
|
13
13
|
dependencies = [
|
|
14
14
|
"case-converter>=1.2.0",
|
|
15
|
-
"click>=8.
|
|
16
|
-
"fzf-bin>=0.74.1",
|
|
15
|
+
"click>=8.5.1",
|
|
17
16
|
"jinja2>=3.1.6",
|
|
18
|
-
"
|
|
17
|
+
"prompt-toolkit>=3.0.53",
|
|
19
18
|
"rich>=15.0.0",
|
|
20
19
|
"simple-term-menu>=1.6.6",
|
|
21
|
-
"
|
|
22
|
-
"typer>=0.27.0",
|
|
20
|
+
"typer>=0.29.2",
|
|
23
21
|
]
|
|
24
22
|
license = "MIT"
|
|
25
23
|
license-files = ["LICEN[CS]E*"]
|
|
26
24
|
|
|
27
25
|
[project.optional-dependencies]
|
|
28
|
-
|
|
26
|
+
figlet = ["pyfiglet>=1.0.4"]
|
|
27
|
+
pyinstaller = [
|
|
28
|
+
"pyinstaller>=6.22.3",
|
|
29
|
+
]
|
|
29
30
|
|
|
30
31
|
[project.urls]
|
|
31
32
|
Homepage = "https://github.com/thememium/usecli"
|
|
@@ -45,13 +46,14 @@ build-backend = "uv_build"
|
|
|
45
46
|
[dependency-groups]
|
|
46
47
|
dev = [
|
|
47
48
|
"deptry>=0.25.1",
|
|
48
|
-
"isort>=
|
|
49
|
-
"poethepoet>=0.
|
|
50
|
-
"
|
|
51
|
-
"
|
|
49
|
+
"isort>=9.0.2",
|
|
50
|
+
"poethepoet>=0.49.0",
|
|
51
|
+
"pyfiglet>=1.0.4",
|
|
52
|
+
"pyinstaller>=6.22.3",
|
|
53
|
+
"pytest>=9.2.0",
|
|
52
54
|
"pytest-cov>=7.1.0",
|
|
53
|
-
"ruff>=0.
|
|
54
|
-
"ty>=0.0.
|
|
55
|
+
"ruff>=0.17.5",
|
|
56
|
+
"ty>=0.0.107",
|
|
55
57
|
]
|
|
56
58
|
|
|
57
59
|
[tool.deptry]
|
|
@@ -60,11 +62,8 @@ known_first_party = ["usecli"]
|
|
|
60
62
|
[tool.deptry.package_module_name_map]
|
|
61
63
|
case-converter = "caseconverter"
|
|
62
64
|
|
|
63
|
-
[tool.deptry.per_rule_ignores]
|
|
64
|
-
DEP002 = ["fzf-bin"]
|
|
65
|
-
|
|
66
65
|
[tool.poe.tasks]
|
|
67
|
-
dev = "uv run usecli"
|
|
66
|
+
dev = "uv run usecli -i"
|
|
68
67
|
clean-full = "sh -c 'uv run isort . && uv run ruff check . --fix && uv run ruff format . && uv run deptry . && uv run ty check'"
|
|
69
68
|
clean = "sh -c 'uv run isort . && uv run ruff format .'"
|
|
70
69
|
test = "uv run pytest tests/ -v"
|
|
@@ -572,7 +572,7 @@ def _get_run_app_callback():
|
|
|
572
572
|
raise NonInteractiveError("Interactive mode is unavailable in JSON mode")
|
|
573
573
|
|
|
574
574
|
if interactive_requested:
|
|
575
|
-
from usecli.cli.commands.defaults.base.internal.
|
|
575
|
+
from usecli.cli.commands.defaults.base.internal.interactive_command import (
|
|
576
576
|
run_interactive,
|
|
577
577
|
)
|
|
578
578
|
|
|
@@ -30,6 +30,7 @@ PyInstaller is an optional dependency — install it with
|
|
|
30
30
|
|
|
31
31
|
from __future__ import annotations
|
|
32
32
|
|
|
33
|
+
import importlib.util
|
|
33
34
|
import os
|
|
34
35
|
import sys
|
|
35
36
|
import zipfile
|
|
@@ -100,11 +101,10 @@ def _build_args(
|
|
|
100
101
|
args += ["--distpath", str(distpath)]
|
|
101
102
|
if workpath is not None:
|
|
102
103
|
args += ["--workpath", str(workpath)]
|
|
104
|
+
args += ["--collect-all", "usecli"]
|
|
105
|
+
if importlib.util.find_spec("pyfiglet") is not None:
|
|
106
|
+
args += ["--collect-all", "pyfiglet"]
|
|
103
107
|
args += [
|
|
104
|
-
"--collect-all",
|
|
105
|
-
"usecli",
|
|
106
|
-
"--collect-all",
|
|
107
|
-
"pyfiglet",
|
|
108
108
|
"--add-data",
|
|
109
109
|
f"{data_root}{os.pathsep}{BUNDLE_DATA_DIR}",
|
|
110
110
|
"--paths",
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
import sys
|
|
5
|
+
import tomllib
|
|
5
6
|
from importlib.metadata import PackageNotFoundError
|
|
6
7
|
from pathlib import Path
|
|
7
8
|
|
|
@@ -27,24 +28,6 @@ class _LazyConsole:
|
|
|
27
28
|
console = _LazyConsole()
|
|
28
29
|
|
|
29
30
|
|
|
30
|
-
def _load_toml(text: str):
|
|
31
|
-
if sys.version_info >= (3, 11):
|
|
32
|
-
import tomllib
|
|
33
|
-
else:
|
|
34
|
-
import tomli as tomllib
|
|
35
|
-
|
|
36
|
-
return tomllib.loads(text)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
def _toml_decode_error():
|
|
40
|
-
if sys.version_info >= (3, 11):
|
|
41
|
-
pass
|
|
42
|
-
else:
|
|
43
|
-
pass
|
|
44
|
-
|
|
45
|
-
return _toml_decode_error()
|
|
46
|
-
|
|
47
|
-
|
|
48
31
|
def _get_version() -> str:
|
|
49
32
|
from importlib.metadata import PackageNotFoundError
|
|
50
33
|
from importlib.metadata import version as get_version
|
|
@@ -119,8 +102,8 @@ def _get_dependencies(config) -> list[tuple[str, str | None]]:
|
|
|
119
102
|
return []
|
|
120
103
|
|
|
121
104
|
try:
|
|
122
|
-
data =
|
|
123
|
-
except (
|
|
105
|
+
data = tomllib.loads(pyproject_path.read_text())
|
|
106
|
+
except (tomllib.TOMLDecodeError, OSError):
|
|
124
107
|
return []
|
|
125
108
|
|
|
126
109
|
deps = data.get("project", {}).get("dependencies", [])
|
|
@@ -185,8 +168,8 @@ def _get_project_description(config) -> str | None:
|
|
|
185
168
|
return None
|
|
186
169
|
|
|
187
170
|
try:
|
|
188
|
-
data =
|
|
189
|
-
except (
|
|
171
|
+
data = tomllib.loads(pyproject_path.read_text())
|
|
172
|
+
except (tomllib.TOMLDecodeError, OSError):
|
|
190
173
|
return None
|
|
191
174
|
|
|
192
175
|
description = data.get("project", {}).get("description")
|
|
@@ -233,8 +216,8 @@ def _get_script_commands() -> list[str]:
|
|
|
233
216
|
return []
|
|
234
217
|
|
|
235
218
|
try:
|
|
236
|
-
data =
|
|
237
|
-
except (
|
|
219
|
+
data = tomllib.loads(pyproject_path.read_text())
|
|
220
|
+
except (tomllib.TOMLDecodeError, OSError):
|
|
238
221
|
return []
|
|
239
222
|
|
|
240
223
|
scripts = data.get("project", {}).get("scripts", {})
|
|
@@ -6,16 +6,11 @@ import random
|
|
|
6
6
|
|
|
7
7
|
from usecli.cli.config.colors import COLOR
|
|
8
8
|
from usecli.cli.core.base_command import BaseCommand
|
|
9
|
-
from usecli.shared.config.manager import get_config
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
class InspireCommand(BaseCommand):
|
|
13
12
|
"""Command for displaying random inspirational quotes."""
|
|
14
13
|
|
|
15
|
-
def visible(self) -> bool:
|
|
16
|
-
config = get_config()
|
|
17
|
-
return not config.get("hide_inspire", False)
|
|
18
|
-
|
|
19
14
|
def signature(self) -> str:
|
|
20
15
|
"""Return the command signature."""
|
|
21
16
|
return "inspire"
|