usecli 0.1.21__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.21/LICENSE +21 -0
- usecli-0.1.21/PKG-INFO +228 -0
- usecli-0.1.21/README.md +199 -0
- usecli-0.1.21/pyproject.toml +91 -0
- usecli-0.1.21/src/usecli/__init__.py +206 -0
- usecli-0.1.21/src/usecli/cli/__init__.py +7 -0
- usecli-0.1.21/src/usecli/cli/commands/README.md +0 -0
- usecli-0.1.21/src/usecli/cli/commands/__init__.py +3 -0
- usecli-0.1.21/src/usecli/cli/commands/custom/README.md +1 -0
- usecli-0.1.21/src/usecli/cli/commands/custom/__init__.py +3 -0
- usecli-0.1.21/src/usecli/cli/commands/defaults/__init__.py +3 -0
- usecli-0.1.21/src/usecli/cli/commands/defaults/base/__init__.py +3 -0
- usecli-0.1.21/src/usecli/cli/commands/defaults/base/about_command.py +162 -0
- usecli-0.1.21/src/usecli/cli/commands/defaults/base/help_command.py +22 -0
- usecli-0.1.21/src/usecli/cli/commands/defaults/base/inspire_command.py +52 -0
- usecli-0.1.21/src/usecli/cli/commands/defaults/base/internal/__init__.py +0 -0
- usecli-0.1.21/src/usecli/cli/commands/defaults/base/internal/fzf_command.py +527 -0
- usecli-0.1.21/src/usecli/cli/commands/defaults/core/__init__.py +3 -0
- usecli-0.1.21/src/usecli/cli/commands/defaults/core/utils.py +194 -0
- usecli-0.1.21/src/usecli/cli/commands/defaults/make/__init__.py +3 -0
- usecli-0.1.21/src/usecli/cli/commands/defaults/make/make_command.py +75 -0
- usecli-0.1.21/src/usecli/cli/commands/defaults/make/make_theme_command.py +124 -0
- usecli-0.1.21/src/usecli/cli/commands/init_command.py +612 -0
- usecli-0.1.21/src/usecli/cli/config/__init__.py +3 -0
- usecli-0.1.21/src/usecli/cli/config/colors.py +395 -0
- usecli-0.1.21/src/usecli/cli/core/__init__.py +66 -0
- usecli-0.1.21/src/usecli/cli/core/base_command.py +378 -0
- usecli-0.1.21/src/usecli/cli/core/error/__init__.py +12 -0
- usecli-0.1.21/src/usecli/cli/core/error/handler.py +117 -0
- usecli-0.1.21/src/usecli/cli/core/error/utils.py +49 -0
- usecli-0.1.21/src/usecli/cli/core/exceptions/__init__.py +16 -0
- usecli-0.1.21/src/usecli/cli/core/exceptions/base.py +55 -0
- usecli-0.1.21/src/usecli/cli/core/exceptions/config.py +63 -0
- usecli-0.1.21/src/usecli/cli/core/exceptions/usage.py +68 -0
- usecli-0.1.21/src/usecli/cli/core/exceptions/validation.py +69 -0
- usecli-0.1.21/src/usecli/cli/core/skill_generator.py +153 -0
- usecli-0.1.21/src/usecli/cli/core/ui/__init__.py +16 -0
- usecli-0.1.21/src/usecli/cli/core/ui/list.py +217 -0
- usecli-0.1.21/src/usecli/cli/core/ui/title.py +145 -0
- usecli-0.1.21/src/usecli/cli/core/validators/__init__.py +28 -0
- usecli-0.1.21/src/usecli/cli/core/validators/network.py +80 -0
- usecli-0.1.21/src/usecli/cli/core/validators/numeric.py +31 -0
- usecli-0.1.21/src/usecli/cli/core/validators/path.py +71 -0
- usecli-0.1.21/src/usecli/cli/core/validators/string.py +54 -0
- usecli-0.1.21/src/usecli/cli/services/__init__.py +3 -0
- usecli-0.1.21/src/usecli/cli/services/command_service.py +110 -0
- usecli-0.1.21/src/usecli/cli/templates/command.py.j2 +58 -0
- usecli-0.1.21/src/usecli/cli/templates/theme.toml.j2 +29 -0
- usecli-0.1.21/src/usecli/cli/templates/usecli.toml.j2 +13 -0
- usecli-0.1.21/src/usecli/cli/themes/ayu_dark.toml +29 -0
- usecli-0.1.21/src/usecli/cli/themes/catppuccin_frappe.toml +29 -0
- usecli-0.1.21/src/usecli/cli/themes/catppuccin_latte.toml +29 -0
- usecli-0.1.21/src/usecli/cli/themes/catppuccin_macchiato.toml +29 -0
- usecli-0.1.21/src/usecli/cli/themes/catppuccin_mocha.toml +29 -0
- usecli-0.1.21/src/usecli/cli/themes/default.toml +29 -0
- usecli-0.1.21/src/usecli/cli/themes/tokyo_night.toml +29 -0
- usecli-0.1.21/src/usecli/cli/utils/__init__.py +5 -0
- usecli-0.1.21/src/usecli/cli/utils/interactive/__init__.py +5 -0
- usecli-0.1.21/src/usecli/cli/utils/interactive/terminal_menu.py +205 -0
- usecli-0.1.21/src/usecli/menu.py +68 -0
- usecli-0.1.21/src/usecli/params.py +120 -0
- usecli-0.1.21/src/usecli/shared/__init__.py +3 -0
- usecli-0.1.21/src/usecli/shared/config/__init__.py +5 -0
- usecli-0.1.21/src/usecli/shared/config/globals.py +19 -0
- usecli-0.1.21/src/usecli/shared/config/manager.py +321 -0
- usecli-0.1.21/src/usecli/ui.py +92 -0
usecli-0.1.21/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Edward Boswell
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
usecli-0.1.21/PKG-INFO
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: usecli
|
|
3
|
+
Version: 0.1.21
|
|
4
|
+
Summary: A powerful Python CLI framework for building beautiful, developer-friendly command-line tools.
|
|
5
|
+
Author: Edward Boswell
|
|
6
|
+
Author-email: Edward Boswell <thememium@gmail.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Requires-Dist: case-converter>=1.2.0
|
|
13
|
+
Requires-Dist: click>=8.3.1
|
|
14
|
+
Requires-Dist: fzf-bin>=0.67.0
|
|
15
|
+
Requires-Dist: jinja2>=3.1.6
|
|
16
|
+
Requires-Dist: pyfiglet>=1.0.4
|
|
17
|
+
Requires-Dist: pyyaml>=6.0.2
|
|
18
|
+
Requires-Dist: rich>=14.3.1
|
|
19
|
+
Requires-Dist: simple-term-menu>=1.6.6
|
|
20
|
+
Requires-Dist: tomli>=2.4.0
|
|
21
|
+
Requires-Dist: typer>=0.21.1
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Project-URL: Homepage, https://github.com/thememium/usecli
|
|
24
|
+
Project-URL: Documentation, https://github.com/thememium/usecli
|
|
25
|
+
Project-URL: Repository, https://github.com/thememium/usecli.git
|
|
26
|
+
Project-URL: Issues, https://github.com/thememium/usecli/issues
|
|
27
|
+
Project-URL: Changelog, https://github.com/thememium/usecli/blob/master/CHANGELOG.md
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
<a name="readme-top"></a>
|
|
31
|
+
|
|
32
|
+
<div align="center">
|
|
33
|
+
<a href="https://github.com/thememium/usecli">
|
|
34
|
+
<img src="https://raw.githubusercontent.com/thememium/usecli/refs/heads/master/docs/images/usecli-logo-dark-bg.png" alt="useCli" width="360" height="162">
|
|
35
|
+
</a>
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<a href="#table-of-contents"><strong>Explore the Documentation »</strong></a>
|
|
39
|
+
<br />
|
|
40
|
+
<a href="https://github.com/thememium/usecli/issues">Report Bug</a>
|
|
41
|
+
·
|
|
42
|
+
<a href="https://github.com/thememium/usecli/issues">Request Feature</a>
|
|
43
|
+
</p>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<!-- TABLE OF CONTENTS -->
|
|
47
|
+
|
|
48
|
+
<a name="table-of-contents"></a>
|
|
49
|
+
|
|
50
|
+
<details>
|
|
51
|
+
<summary>Table of Contents</summary>
|
|
52
|
+
<ol>
|
|
53
|
+
<li><a href="#about">About</a></li>
|
|
54
|
+
<li><a href="#quick-start">Quick Start</a></li>
|
|
55
|
+
<li><a href="#usage">Usage</a></li>
|
|
56
|
+
<li><a href="#development">Development</a></li>
|
|
57
|
+
<li><a href="#contributing">Contributing</a></li>
|
|
58
|
+
<li><a href="#license">License</a></li>
|
|
59
|
+
</ol>
|
|
60
|
+
</details>
|
|
61
|
+
|
|
62
|
+
<!-- ABOUT -->
|
|
63
|
+
|
|
64
|
+
## About
|
|
65
|
+
|
|
66
|
+
useCli is a CLI framework for Python. It gives you:
|
|
67
|
+
|
|
68
|
+
- **Prefix matching** — Type `he` instead of `help`
|
|
69
|
+
- **Interactive mode** — Fuzzy finder for commands
|
|
70
|
+
- **Auto-generated help** — Clean, styled output
|
|
71
|
+
- **Command scaffolding** — `make:command` generates boilerplate
|
|
72
|
+
- **UI components** — Prompts, menus, styled console output
|
|
73
|
+
|
|
74
|
+
Built on Typer and Click.
|
|
75
|
+
|
|
76
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
77
|
+
|
|
78
|
+
<!-- QUICK START -->
|
|
79
|
+
|
|
80
|
+
## Quick Start
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
# Install
|
|
84
|
+
uv add "usecli @ git+https://github.com/thememium/usecli.git"
|
|
85
|
+
|
|
86
|
+
# Initialize
|
|
87
|
+
usecli init
|
|
88
|
+
|
|
89
|
+
# Create a command
|
|
90
|
+
usecli make:command hello
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Your new command is ready in the commands directory:
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
class HelloCommand(BaseCommand):
|
|
97
|
+
def signature(self) -> str:
|
|
98
|
+
return "hello"
|
|
99
|
+
|
|
100
|
+
def description(self) -> str:
|
|
101
|
+
return "Say hello"
|
|
102
|
+
|
|
103
|
+
def handle(self, name: str = Argument(..., help="Your name")) -> None:
|
|
104
|
+
console.print(f"Hello, {name}!")
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Run it:
|
|
108
|
+
|
|
109
|
+
```sh
|
|
110
|
+
usecli hello world
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
114
|
+
|
|
115
|
+
<!-- USAGE -->
|
|
116
|
+
|
|
117
|
+
## Usage
|
|
118
|
+
|
|
119
|
+
### Prefix Matching
|
|
120
|
+
|
|
121
|
+
Type partial command names:
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
usecli he # help
|
|
125
|
+
usecli ma:co # make:command
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Interactive Mode
|
|
129
|
+
|
|
130
|
+
```sh
|
|
131
|
+
usecli --interactive # Fuzzy finder for all commands
|
|
132
|
+
usecli -i hello # Run 'hello' command interactively
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Command Groups
|
|
136
|
+
|
|
137
|
+
Colon-separated commands group automatically in help:
|
|
138
|
+
|
|
139
|
+
```python
|
|
140
|
+
def signature(self) -> str:
|
|
141
|
+
return "db:migrate"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Displays as:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
db:
|
|
148
|
+
migrate Run migrations
|
|
149
|
+
backup Backup database
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Space-separated signatures create nested subcommands:
|
|
153
|
+
|
|
154
|
+
```python
|
|
155
|
+
def signature(self) -> str:
|
|
156
|
+
return "spec show" # usecli spec show
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### UI Components
|
|
160
|
+
|
|
161
|
+
```python
|
|
162
|
+
from usecli import console, Prompt, Confirm, Menu
|
|
163
|
+
|
|
164
|
+
console.print("[green]Done![/green]")
|
|
165
|
+
name = Prompt.ask("Enter name")
|
|
166
|
+
ok = Confirm.ask("Continue?")
|
|
167
|
+
choice = Menu(["A", "B", "C"]).show()
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Available Commands
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
about Show app info
|
|
174
|
+
help Show help
|
|
175
|
+
init Initialize usecli
|
|
176
|
+
inspire Random quote
|
|
177
|
+
make:command Create new command
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Hiding Built-in Commands
|
|
181
|
+
|
|
182
|
+
```toml
|
|
183
|
+
[tool.usecli]
|
|
184
|
+
hide_init = true
|
|
185
|
+
hide_inspire = true
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
189
|
+
|
|
190
|
+
<!-- DEVELOPMENT -->
|
|
191
|
+
|
|
192
|
+
## Development
|
|
193
|
+
|
|
194
|
+
See the [Development Guide](docs/development.md) for setup, testing, and architecture details.
|
|
195
|
+
|
|
196
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
197
|
+
|
|
198
|
+
<!-- CONTRIBUTING -->
|
|
199
|
+
|
|
200
|
+
## Contributing
|
|
201
|
+
|
|
202
|
+
Read the [Contributing Guide](.github/contributing.md).
|
|
203
|
+
|
|
204
|
+
Quick workflow:
|
|
205
|
+
|
|
206
|
+
1. Fork and branch: `git checkout -b feature/name`
|
|
207
|
+
2. Make changes
|
|
208
|
+
3. Run checks: `uv run poe clean-full`
|
|
209
|
+
4. Commit and push
|
|
210
|
+
5. Open a Pull Request
|
|
211
|
+
|
|
212
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
213
|
+
|
|
214
|
+
<!-- LICENSE -->
|
|
215
|
+
|
|
216
|
+
## License
|
|
217
|
+
|
|
218
|
+
MIT. See `LICENSE`.
|
|
219
|
+
|
|
220
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
<div align="center">
|
|
225
|
+
<p>
|
|
226
|
+
<sub>Built by <a href="https://github.com/thememium">thememium</a></sub>
|
|
227
|
+
</p>
|
|
228
|
+
</div>
|
usecli-0.1.21/README.md
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
<a name="readme-top"></a>
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
<a href="https://github.com/thememium/usecli">
|
|
5
|
+
<img src="https://raw.githubusercontent.com/thememium/usecli/refs/heads/master/docs/images/usecli-logo-dark-bg.png" alt="useCli" width="360" height="162">
|
|
6
|
+
</a>
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="#table-of-contents"><strong>Explore the Documentation »</strong></a>
|
|
10
|
+
<br />
|
|
11
|
+
<a href="https://github.com/thememium/usecli/issues">Report Bug</a>
|
|
12
|
+
·
|
|
13
|
+
<a href="https://github.com/thememium/usecli/issues">Request Feature</a>
|
|
14
|
+
</p>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<!-- TABLE OF CONTENTS -->
|
|
18
|
+
|
|
19
|
+
<a name="table-of-contents"></a>
|
|
20
|
+
|
|
21
|
+
<details>
|
|
22
|
+
<summary>Table of Contents</summary>
|
|
23
|
+
<ol>
|
|
24
|
+
<li><a href="#about">About</a></li>
|
|
25
|
+
<li><a href="#quick-start">Quick Start</a></li>
|
|
26
|
+
<li><a href="#usage">Usage</a></li>
|
|
27
|
+
<li><a href="#development">Development</a></li>
|
|
28
|
+
<li><a href="#contributing">Contributing</a></li>
|
|
29
|
+
<li><a href="#license">License</a></li>
|
|
30
|
+
</ol>
|
|
31
|
+
</details>
|
|
32
|
+
|
|
33
|
+
<!-- ABOUT -->
|
|
34
|
+
|
|
35
|
+
## About
|
|
36
|
+
|
|
37
|
+
useCli is a CLI framework for Python. It gives you:
|
|
38
|
+
|
|
39
|
+
- **Prefix matching** — Type `he` instead of `help`
|
|
40
|
+
- **Interactive mode** — Fuzzy finder for commands
|
|
41
|
+
- **Auto-generated help** — Clean, styled output
|
|
42
|
+
- **Command scaffolding** — `make:command` generates boilerplate
|
|
43
|
+
- **UI components** — Prompts, menus, styled console output
|
|
44
|
+
|
|
45
|
+
Built on Typer and Click.
|
|
46
|
+
|
|
47
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
48
|
+
|
|
49
|
+
<!-- QUICK START -->
|
|
50
|
+
|
|
51
|
+
## Quick Start
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
# Install
|
|
55
|
+
uv add "usecli @ git+https://github.com/thememium/usecli.git"
|
|
56
|
+
|
|
57
|
+
# Initialize
|
|
58
|
+
usecli init
|
|
59
|
+
|
|
60
|
+
# Create a command
|
|
61
|
+
usecli make:command hello
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Your new command is ready in the commands directory:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
class HelloCommand(BaseCommand):
|
|
68
|
+
def signature(self) -> str:
|
|
69
|
+
return "hello"
|
|
70
|
+
|
|
71
|
+
def description(self) -> str:
|
|
72
|
+
return "Say hello"
|
|
73
|
+
|
|
74
|
+
def handle(self, name: str = Argument(..., help="Your name")) -> None:
|
|
75
|
+
console.print(f"Hello, {name}!")
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Run it:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
usecli hello world
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
85
|
+
|
|
86
|
+
<!-- USAGE -->
|
|
87
|
+
|
|
88
|
+
## Usage
|
|
89
|
+
|
|
90
|
+
### Prefix Matching
|
|
91
|
+
|
|
92
|
+
Type partial command names:
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
usecli he # help
|
|
96
|
+
usecli ma:co # make:command
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Interactive Mode
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
usecli --interactive # Fuzzy finder for all commands
|
|
103
|
+
usecli -i hello # Run 'hello' command interactively
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Command Groups
|
|
107
|
+
|
|
108
|
+
Colon-separated commands group automatically in help:
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
def signature(self) -> str:
|
|
112
|
+
return "db:migrate"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Displays as:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
db:
|
|
119
|
+
migrate Run migrations
|
|
120
|
+
backup Backup database
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Space-separated signatures create nested subcommands:
|
|
124
|
+
|
|
125
|
+
```python
|
|
126
|
+
def signature(self) -> str:
|
|
127
|
+
return "spec show" # usecli spec show
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### UI Components
|
|
131
|
+
|
|
132
|
+
```python
|
|
133
|
+
from usecli import console, Prompt, Confirm, Menu
|
|
134
|
+
|
|
135
|
+
console.print("[green]Done![/green]")
|
|
136
|
+
name = Prompt.ask("Enter name")
|
|
137
|
+
ok = Confirm.ask("Continue?")
|
|
138
|
+
choice = Menu(["A", "B", "C"]).show()
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Available Commands
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
about Show app info
|
|
145
|
+
help Show help
|
|
146
|
+
init Initialize usecli
|
|
147
|
+
inspire Random quote
|
|
148
|
+
make:command Create new command
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Hiding Built-in Commands
|
|
152
|
+
|
|
153
|
+
```toml
|
|
154
|
+
[tool.usecli]
|
|
155
|
+
hide_init = true
|
|
156
|
+
hide_inspire = true
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
160
|
+
|
|
161
|
+
<!-- DEVELOPMENT -->
|
|
162
|
+
|
|
163
|
+
## Development
|
|
164
|
+
|
|
165
|
+
See the [Development Guide](docs/development.md) for setup, testing, and architecture details.
|
|
166
|
+
|
|
167
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
168
|
+
|
|
169
|
+
<!-- CONTRIBUTING -->
|
|
170
|
+
|
|
171
|
+
## Contributing
|
|
172
|
+
|
|
173
|
+
Read the [Contributing Guide](.github/contributing.md).
|
|
174
|
+
|
|
175
|
+
Quick workflow:
|
|
176
|
+
|
|
177
|
+
1. Fork and branch: `git checkout -b feature/name`
|
|
178
|
+
2. Make changes
|
|
179
|
+
3. Run checks: `uv run poe clean-full`
|
|
180
|
+
4. Commit and push
|
|
181
|
+
5. Open a Pull Request
|
|
182
|
+
|
|
183
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
184
|
+
|
|
185
|
+
<!-- LICENSE -->
|
|
186
|
+
|
|
187
|
+
## License
|
|
188
|
+
|
|
189
|
+
MIT. See `LICENSE`.
|
|
190
|
+
|
|
191
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
<div align="center">
|
|
196
|
+
<p>
|
|
197
|
+
<sub>Built by <a href="https://github.com/thememium">thememium</a></sub>
|
|
198
|
+
</p>
|
|
199
|
+
</div>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "usecli"
|
|
3
|
+
version = "0.1.21"
|
|
4
|
+
description = "A powerful Python CLI framework for building beautiful, developer-friendly command-line tools."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [{ name = "Edward Boswell", email = "thememium@gmail.com" }]
|
|
7
|
+
requires-python = ">=3.10"
|
|
8
|
+
classifiers = [
|
|
9
|
+
"Programming Language :: Python :: 3",
|
|
10
|
+
"Operating System :: OS Independent",
|
|
11
|
+
"Intended Audience :: Developers",
|
|
12
|
+
]
|
|
13
|
+
dependencies = [
|
|
14
|
+
"case-converter>=1.2.0",
|
|
15
|
+
"click>=8.3.1",
|
|
16
|
+
"fzf-bin>=0.67.0",
|
|
17
|
+
"jinja2>=3.1.6",
|
|
18
|
+
"pyfiglet>=1.0.4",
|
|
19
|
+
"pyyaml>=6.0.2",
|
|
20
|
+
"rich>=14.3.1",
|
|
21
|
+
"simple-term-menu>=1.6.6",
|
|
22
|
+
"tomli>=2.4.0",
|
|
23
|
+
"typer>=0.21.1",
|
|
24
|
+
]
|
|
25
|
+
license = "MIT"
|
|
26
|
+
license-files = ["LICEN[CS]E*"]
|
|
27
|
+
|
|
28
|
+
[project.urls]
|
|
29
|
+
Homepage = "https://github.com/thememium/usecli"
|
|
30
|
+
Documentation = "https://github.com/thememium/usecli"
|
|
31
|
+
Repository = "https://github.com/thememium/usecli.git"
|
|
32
|
+
Issues = "https://github.com/thememium/usecli/issues"
|
|
33
|
+
Changelog = "https://github.com/thememium/usecli/blob/master/CHANGELOG.md"
|
|
34
|
+
|
|
35
|
+
[project.scripts]
|
|
36
|
+
usecli = "usecli:main"
|
|
37
|
+
|
|
38
|
+
[build-system]
|
|
39
|
+
requires = ["uv_build>=0.10.2,<0.11.0"]
|
|
40
|
+
build-backend = "uv_build"
|
|
41
|
+
|
|
42
|
+
[dependency-groups]
|
|
43
|
+
dev = [
|
|
44
|
+
"deptry>=0.24.0",
|
|
45
|
+
"isort>=7.0.0",
|
|
46
|
+
"poethepoet>=0.41.0",
|
|
47
|
+
"pytest>=9.0.2",
|
|
48
|
+
"ruff>=0.15.1",
|
|
49
|
+
"ty>=0.0.17",
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
[tool.deptry]
|
|
53
|
+
known_first_party = ["usecli"]
|
|
54
|
+
|
|
55
|
+
[tool.deptry.package_module_name_map]
|
|
56
|
+
case-converter = "caseconverter"
|
|
57
|
+
|
|
58
|
+
[tool.deptry.per_rule_ignores]
|
|
59
|
+
DEP002 = ["fzf-bin"]
|
|
60
|
+
|
|
61
|
+
[tool.poe.tasks]
|
|
62
|
+
dev = "uv run usecli"
|
|
63
|
+
clean-full = "sh -c 'uv run isort . && uv run ruff check . && uv run ruff format . && uv run deptry . && uv run ty check'"
|
|
64
|
+
clean = "sh -c 'uv run isort . && uv run ruff format .'"
|
|
65
|
+
test = "uv run pytest tests/ -v"
|
|
66
|
+
sort = "uv run isort ."
|
|
67
|
+
lint = "uv run ruff check ."
|
|
68
|
+
format = "uv run ruff format ."
|
|
69
|
+
deptry = "uv deptry ."
|
|
70
|
+
typecheck = "uv run ty check"
|
|
71
|
+
build = "uv build --no-sources"
|
|
72
|
+
release = "bash scripts/release.sh"
|
|
73
|
+
|
|
74
|
+
[tool.ty]
|
|
75
|
+
|
|
76
|
+
[tool.ty.src]
|
|
77
|
+
include = ["src", "tests"]
|
|
78
|
+
exclude = ["**/__pycache__", "**/.venv"]
|
|
79
|
+
|
|
80
|
+
[tool.ty.rules]
|
|
81
|
+
# Ty uses rule = "level" format (error, warn, ignore)
|
|
82
|
+
# See all rules at: https://docs.astral.sh/ty/reference/rules/
|
|
83
|
+
|
|
84
|
+
[tool.usecli]
|
|
85
|
+
theme = "default"
|
|
86
|
+
commands_dir = "src/usecli/cli/commands/custom"
|
|
87
|
+
templates_dir = "src/usecli/cli/templates"
|
|
88
|
+
themes_dir = "src/usecli/cli/themes"
|
|
89
|
+
hide_init = false
|
|
90
|
+
hide_inspire = false
|
|
91
|
+
hide_make_command = false
|