pretty-mod 0.1.2__tar.gz → 0.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.
Files changed (42) hide show
  1. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/Cargo.lock +1 -1
  2. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/Cargo.toml +1 -1
  3. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/PKG-INFO +113 -72
  4. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/README.md +112 -71
  5. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/RELEASE_NOTES.md +72 -0
  6. pretty_mod-0.2.0/src/config.rs +219 -0
  7. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/src/explorer.rs +8 -2
  8. pretty_mod-0.2.0/src/lib.rs +132 -0
  9. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/src/module_info.rs +80 -20
  10. pretty_mod-0.2.0/src/signature.rs +369 -0
  11. pretty_mod-0.2.0/src/stdlib.rs +35 -0
  12. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/src/tree_formatter.rs +63 -19
  13. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/src/utils.rs +33 -38
  14. pretty_mod-0.2.0/tests/conftest.py +7 -0
  15. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/tests/test_cli.py +5 -21
  16. pretty_mod-0.2.0/tests/test_double_colon.py +19 -0
  17. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/tests/test_explorer.py +7 -8
  18. pretty_mod-0.1.2/src/lib.rs +0 -106
  19. pretty_mod-0.1.2/src/signature.rs +0 -150
  20. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/.github/workflows/CI.yml +0 -0
  21. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/.github/workflows/tests.yml +0 -0
  22. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/.gitignore +0 -0
  23. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/.pre-commit-config.yaml +0 -0
  24. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/CLAUDE.md +0 -0
  25. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/LICENSE +0 -0
  26. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/examples/0_hello.py +0 -0
  27. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/examples/1_tree.py +0 -0
  28. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/examples/2_sig.py +0 -0
  29. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/justfile +0 -0
  30. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/pyproject.toml +0 -0
  31. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/python/pretty_mod/__init__.py +0 -0
  32. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/python/pretty_mod/_pretty_mod.pyi +0 -0
  33. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/python/pretty_mod/cli.py +0 -0
  34. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/python/pretty_mod/explorer.py +0 -0
  35. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/python/pretty_mod/py.typed +0 -0
  36. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/scripts/compare_local.py +0 -0
  37. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/scripts/compare_versions.py +0 -0
  38. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/scripts/perf_test.py +0 -0
  39. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/scripts/profile.py +0 -0
  40. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/src/package_downloader.rs +0 -0
  41. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/tests/__init__.py +0 -0
  42. {pretty_mod-0.1.2 → pretty_mod-0.2.0}/uv.lock +0 -0
@@ -1017,7 +1017,7 @@ dependencies = [
1017
1017
 
1018
1018
  [[package]]
1019
1019
  name = "pretty-mod"
1020
- version = "0.1.2"
1020
+ version = "0.2.0"
1021
1021
  dependencies = [
1022
1022
  "flate2",
1023
1023
  "pyo3",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "pretty-mod"
3
- version = "0.1.2"
3
+ version = "0.2.0"
4
4
  edition = "2021"
5
5
 
6
6
  [lib]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pretty-mod
3
- Version: 0.1.2
3
+ Version: 0.2.0
4
4
  License-File: LICENSE
5
5
  Summary: A python module tree explorer for LLMs (and humans)
6
6
  Author-email: zzstoatzz <thrast36@gmail.com>
@@ -15,6 +15,9 @@ a python module tree explorer for LLMs (and humans)
15
15
  > [!IMPORTANT]
16
16
  > for all versions `>=0.1.0`, wheels for different operating systems are built via `maturin` and published to pypi, install `<0.1.0` for a pure python version
17
17
 
18
+ > [!NOTE]
19
+ > Starting from v0.2.0, output includes colors by default. Use `PRETTY_MOD_NO_COLOR=1` to disable.
20
+
18
21
  ```bash
19
22
  # Explore module structure
20
23
  » uvx pretty-mod tree json
@@ -32,57 +35,85 @@ a python module tree explorer for LLMs (and humans)
32
35
  └── 📦 tool
33
36
  └── ⚡ functions: main
34
37
 
35
- # Inspect function signatures
36
- » uvx pretty-mod sig json:dumps
37
- 📎 dumps
38
- ├── Parameters:
39
- ├── obj
40
- ├── *
41
- ├── skipkeys=False
42
- ├── ensure_ascii=True
43
- ├── check_circular=True
44
- ├── allow_nan=True
45
- ├── cls=None
46
- ├── indent=None
47
- ├── separators=None
48
- ├── default=None
49
- ├── sort_keys=False
50
- └── **kw
51
-
52
- # Auto-download packages from PyPI (no install needed!)
53
- » uvx pretty-mod tree requests --quiet
54
- 📦 requests
55
- ├── 📜 __all__: delete, get, head, options, patch, post, put, request
56
- ├── ⚡ functions: check_compatibility, delete, get, head, options, patch, post, put, request
57
- ├── 🔷 classes: ConnectTimeout, ConnectionError, DependencyWarning, FileModeWarning, HTTPError, JSONDecodeError, NullHandler, PreparedRequest, ReadTimeout, Request, RequestException, RequestsDependencyWarning, Response, Session, Timeout, TooManyRedirects, URLRequired
58
- ├── 📌 constants: __author__, __author_email__, __build__, __cake__, __copyright__, __description__, __license__, __title__, __url__, codes
59
- ├── 📦 adapters
60
- ├── 🔷 classes: BaseAdapter, HTTPAdapter
61
- │ └── 📌 constants: DEFAULT_POOL_TIMEOUT, DEFAULT_POOLBLOCK, DEFAULT_POOLSIZE, DEFAULT_RETRIES
62
- ├── 📦 api
63
- └── ⚡ functions: delete, get, head, options, patch, post, put, request
64
- ├── 📦 auth
65
- │ └── 🔷 classes: AuthBase, HTTPBasicAuth, HTTPDigestAuth, HTTPProxyAuth
66
- ├── 📦 certs
67
- ├── 📦 compat
68
- ├── 📦 cookies
69
- ├── 📦 exceptions
70
- ├── 📦 help
71
- ├── 📦 hooks
72
- ├── 📦 models
73
- ├── 📦 sessions
74
- ├── 📦 status_codes
75
- ├── 📦 structures
76
- └── 📦 utils
38
+ # Inspect function signatures (even if the package is not installed)
39
+ » uv run pretty-mod sig fastmcp:FastMCP --quiet
40
+ 📎 FastMCP
41
+ ├── Parameters:
42
+ ├── self
43
+ ├── name: str | None=None
44
+ ├── instructions: str | None=None
45
+ ├── auth: OAuthProvider | None=None
46
+ ├── lifespan: Callable[[FastMCP[LifespanResultT]], AbstractAsyncContextManager[LifespanResultT]] | None=None
47
+ ├── tool_serializer: Callable[[Any], str] | None=None
48
+ ├── cache_expiration_seconds: float | None=None
49
+ ├── on_duplicate_tools: DuplicateBehavior | None=None
50
+ ├── on_duplicate_resources: DuplicateBehavior | None=None
51
+ ├── on_duplicate_prompts: DuplicateBehavior | None=None
52
+ ├── resource_prefix_format: Literal['protocol', 'path'] | None=None
53
+ ├── mask_error_details: bool | None=None
54
+ ├── tools: list[Tool | Callable[..., Any]] | None=None
55
+ ├── dependencies: list[str] | None=None
56
+ ├── include_tags: set[str] | None=None
57
+ ├── exclude_tags: set[str] | None=None
58
+ ├── log_level: str | None=None
59
+ ├── debug: bool | None=None
60
+ ├── host: str | None=None
61
+ ├── port: int | None=None
62
+ ├── sse_path: str | None=None
63
+ ├── message_path: str | None=None
64
+ ├── streamable_http_path: str | None=None
65
+ ├── json_response: bool | None=None
66
+ └── stateless_http: bool | None=None
77
67
  ```
78
68
 
79
- ## Installation
69
+ ## installation
80
70
 
81
71
  ```bash
82
72
  uv add pretty-mod
83
73
  ```
84
74
 
85
- ## Usage
75
+
76
+ ## cli
77
+
78
+ `pretty-mod` includes a command-line interface for shell-based exploration:
79
+
80
+ > [!IMPORTANT]
81
+ > all commands below can be run ephemerally with `uvx`, e.g. `uvx pretty-mod tree json`
82
+
83
+ ```bash
84
+ # Explore module structure
85
+ pretty-mod tree json
86
+
87
+ # Go deeper into the tree with --depth
88
+ pretty-mod tree requests --depth 3
89
+
90
+ # Display function signatures
91
+ pretty-mod sig json:loads
92
+ pretty-mod sig os.path:join
93
+
94
+ # Explore packages even without having them installed
95
+ pretty-mod tree django
96
+ pretty-mod tree flask --depth 1
97
+
98
+ # Use --quiet to suppress download messages
99
+ pretty-mod tree requests --quiet
100
+
101
+ # Version specifiers - explore specific versions
102
+ pretty-mod tree toml@0.10.2
103
+ pretty-mod sig toml@0.10.2:loads
104
+
105
+ # Submodules with version specifiers (correct syntax)
106
+ pretty-mod tree prefect.server@2.10.0 # ✅ Works
107
+ pretty-mod tree prefect@2.10.0.server # ❌ Invalid - version must come last
108
+
109
+ # Package name differs from module name
110
+ pretty-mod tree pydocket::docket # PyPI package 'pydocket' contains module 'docket'
111
+ pretty-mod tree pillow::PIL # PyPI package 'pillow' contains module 'PIL'
112
+ pretty-mod tree pillow::PIL@10.0.0 # Specific version of pillow
113
+ pretty-mod sig pillow::PIL.Image:open # Works with signatures too
114
+ ```
115
+
116
+ ## python sdk
86
117
 
87
118
  ```python
88
119
  from pretty_mod import display_tree
@@ -134,45 +165,55 @@ print(display_signature("json:loads"))
134
165
  ```
135
166
  </details>
136
167
 
137
- ## CLI
168
+ ## customization
138
169
 
139
- Pretty-mod includes a command-line interface for quick exploration:
170
+ pretty-mod supports extensive customization through environment variables:
140
171
 
141
- > [!IMPORTANT]
142
- > all commands below can be run ephemerally with `uvx`, e.g. `uvx pretty-mod tree json`
172
+ ### display characters
143
173
 
144
174
  ```bash
145
- # Explore module structure
146
- pretty-mod tree json
147
-
148
- # Go deeper into the tree with --depth
149
- pretty-mod tree requests --depth 3
150
-
151
- # Display function signatures
152
- pretty-mod sig json:loads
153
- pretty-mod sig os.path:join
175
+ # Use ASCII-only mode for terminals without Unicode support
176
+ PRETTY_MOD_ASCII=1 pretty-mod tree json
154
177
 
155
- # Explore packages even without having them installed
156
- pretty-mod tree django
157
- pretty-mod tree flask --depth 1
178
+ # Customize individual icons
179
+ PRETTY_MOD_MODULE_ICON="[M]" pretty-mod tree json
180
+ PRETTY_MOD_FUNCTION_ICON="fn" pretty-mod tree json
181
+ PRETTY_MOD_CLASS_ICON="cls" pretty-mod tree json
182
+ ```
158
183
 
159
- # Use --quiet to suppress download messages
160
- pretty-mod tree requests --quiet
184
+ ### colors
161
185
 
162
- # Version specifiers - explore specific versions
163
- pretty-mod tree toml@0.10.2
164
- pretty-mod sig toml@0.10.2:loads
186
+ pretty-mod uses an earth-tone color scheme by default:
165
187
 
166
- # Submodules with version specifiers (correct syntax)
167
- pretty-mod tree prefect.server@2.10.0 # ✅ Works
168
- pretty-mod tree prefect@2.10.0.server # ❌ Invalid - version must come last
188
+ ```bash
189
+ # Disable colors entirely
190
+ PRETTY_MOD_NO_COLOR=1 pretty-mod tree json
191
+ # or use the standard NO_COLOR environment variable
192
+ NO_COLOR=1 pretty-mod tree json
193
+
194
+ # Override specific colors with hex values
195
+ PRETTY_MOD_MODULE_COLOR="#FF6B6B" pretty-mod tree json
196
+ PRETTY_MOD_FUNCTION_COLOR="#4ECDC4" pretty-mod tree json
169
197
  ```
170
198
 
171
- ## Examples
199
+ available color environment variables:
200
+ - `PRETTY_MOD_MODULE_COLOR` - Modules/packages (default: #8B7355)
201
+ - `PRETTY_MOD_FUNCTION_COLOR` - Functions (default: #6B8E23)
202
+ - `PRETTY_MOD_CLASS_COLOR` - Classes (default: #4682B4)
203
+ - `PRETTY_MOD_CONSTANT_COLOR` - Constants (default: #BC8F8F)
204
+ - `PRETTY_MOD_EXPORTS_COLOR` - __all__ exports (default: #9370DB)
205
+ - `PRETTY_MOD_SIGNATURE_COLOR` - Signatures (default: #5F9EA0)
206
+ - `PRETTY_MOD_TREE_COLOR` - Tree structure lines (default: #696969)
207
+ - `PRETTY_MOD_PARAM_COLOR` - Parameter names (default: #708090)
208
+ - `PRETTY_MOD_TYPE_COLOR` - Type annotations (default: #778899)
209
+ - `PRETTY_MOD_DEFAULT_COLOR` - Default values (default: #8FBC8F)
210
+ - `PRETTY_MOD_WARNING_COLOR` - Warning messages (default: #DAA520)
211
+
212
+ ## examples
172
213
 
173
- See the [`examples/`](examples/) directory for more detailed usage patterns and advanced features.
214
+ see the [`examples/`](examples/) directory for more detailed usage patterns and advanced features.
174
215
 
175
- ## Development
216
+ ## development
176
217
 
177
218
  ```bash
178
219
  gh repo clone zzstoatzz/pretty-mod && cd pretty-mod
@@ -5,6 +5,9 @@ a python module tree explorer for LLMs (and humans)
5
5
  > [!IMPORTANT]
6
6
  > for all versions `>=0.1.0`, wheels for different operating systems are built via `maturin` and published to pypi, install `<0.1.0` for a pure python version
7
7
 
8
+ > [!NOTE]
9
+ > Starting from v0.2.0, output includes colors by default. Use `PRETTY_MOD_NO_COLOR=1` to disable.
10
+
8
11
  ```bash
9
12
  # Explore module structure
10
13
  » uvx pretty-mod tree json
@@ -22,57 +25,85 @@ a python module tree explorer for LLMs (and humans)
22
25
  └── 📦 tool
23
26
  └── ⚡ functions: main
24
27
 
25
- # Inspect function signatures
26
- » uvx pretty-mod sig json:dumps
27
- 📎 dumps
28
- ├── Parameters:
29
- ├── obj
30
- ├── *
31
- ├── skipkeys=False
32
- ├── ensure_ascii=True
33
- ├── check_circular=True
34
- ├── allow_nan=True
35
- ├── cls=None
36
- ├── indent=None
37
- ├── separators=None
38
- ├── default=None
39
- ├── sort_keys=False
40
- └── **kw
41
-
42
- # Auto-download packages from PyPI (no install needed!)
43
- » uvx pretty-mod tree requests --quiet
44
- 📦 requests
45
- ├── 📜 __all__: delete, get, head, options, patch, post, put, request
46
- ├── ⚡ functions: check_compatibility, delete, get, head, options, patch, post, put, request
47
- ├── 🔷 classes: ConnectTimeout, ConnectionError, DependencyWarning, FileModeWarning, HTTPError, JSONDecodeError, NullHandler, PreparedRequest, ReadTimeout, Request, RequestException, RequestsDependencyWarning, Response, Session, Timeout, TooManyRedirects, URLRequired
48
- ├── 📌 constants: __author__, __author_email__, __build__, __cake__, __copyright__, __description__, __license__, __title__, __url__, codes
49
- ├── 📦 adapters
50
- ├── 🔷 classes: BaseAdapter, HTTPAdapter
51
- │ └── 📌 constants: DEFAULT_POOL_TIMEOUT, DEFAULT_POOLBLOCK, DEFAULT_POOLSIZE, DEFAULT_RETRIES
52
- ├── 📦 api
53
- └── ⚡ functions: delete, get, head, options, patch, post, put, request
54
- ├── 📦 auth
55
- │ └── 🔷 classes: AuthBase, HTTPBasicAuth, HTTPDigestAuth, HTTPProxyAuth
56
- ├── 📦 certs
57
- ├── 📦 compat
58
- ├── 📦 cookies
59
- ├── 📦 exceptions
60
- ├── 📦 help
61
- ├── 📦 hooks
62
- ├── 📦 models
63
- ├── 📦 sessions
64
- ├── 📦 status_codes
65
- ├── 📦 structures
66
- └── 📦 utils
28
+ # Inspect function signatures (even if the package is not installed)
29
+ » uv run pretty-mod sig fastmcp:FastMCP --quiet
30
+ 📎 FastMCP
31
+ ├── Parameters:
32
+ ├── self
33
+ ├── name: str | None=None
34
+ ├── instructions: str | None=None
35
+ ├── auth: OAuthProvider | None=None
36
+ ├── lifespan: Callable[[FastMCP[LifespanResultT]], AbstractAsyncContextManager[LifespanResultT]] | None=None
37
+ ├── tool_serializer: Callable[[Any], str] | None=None
38
+ ├── cache_expiration_seconds: float | None=None
39
+ ├── on_duplicate_tools: DuplicateBehavior | None=None
40
+ ├── on_duplicate_resources: DuplicateBehavior | None=None
41
+ ├── on_duplicate_prompts: DuplicateBehavior | None=None
42
+ ├── resource_prefix_format: Literal['protocol', 'path'] | None=None
43
+ ├── mask_error_details: bool | None=None
44
+ ├── tools: list[Tool | Callable[..., Any]] | None=None
45
+ ├── dependencies: list[str] | None=None
46
+ ├── include_tags: set[str] | None=None
47
+ ├── exclude_tags: set[str] | None=None
48
+ ├── log_level: str | None=None
49
+ ├── debug: bool | None=None
50
+ ├── host: str | None=None
51
+ ├── port: int | None=None
52
+ ├── sse_path: str | None=None
53
+ ├── message_path: str | None=None
54
+ ├── streamable_http_path: str | None=None
55
+ ├── json_response: bool | None=None
56
+ └── stateless_http: bool | None=None
67
57
  ```
68
58
 
69
- ## Installation
59
+ ## installation
70
60
 
71
61
  ```bash
72
62
  uv add pretty-mod
73
63
  ```
74
64
 
75
- ## Usage
65
+
66
+ ## cli
67
+
68
+ `pretty-mod` includes a command-line interface for shell-based exploration:
69
+
70
+ > [!IMPORTANT]
71
+ > all commands below can be run ephemerally with `uvx`, e.g. `uvx pretty-mod tree json`
72
+
73
+ ```bash
74
+ # Explore module structure
75
+ pretty-mod tree json
76
+
77
+ # Go deeper into the tree with --depth
78
+ pretty-mod tree requests --depth 3
79
+
80
+ # Display function signatures
81
+ pretty-mod sig json:loads
82
+ pretty-mod sig os.path:join
83
+
84
+ # Explore packages even without having them installed
85
+ pretty-mod tree django
86
+ pretty-mod tree flask --depth 1
87
+
88
+ # Use --quiet to suppress download messages
89
+ pretty-mod tree requests --quiet
90
+
91
+ # Version specifiers - explore specific versions
92
+ pretty-mod tree toml@0.10.2
93
+ pretty-mod sig toml@0.10.2:loads
94
+
95
+ # Submodules with version specifiers (correct syntax)
96
+ pretty-mod tree prefect.server@2.10.0 # ✅ Works
97
+ pretty-mod tree prefect@2.10.0.server # ❌ Invalid - version must come last
98
+
99
+ # Package name differs from module name
100
+ pretty-mod tree pydocket::docket # PyPI package 'pydocket' contains module 'docket'
101
+ pretty-mod tree pillow::PIL # PyPI package 'pillow' contains module 'PIL'
102
+ pretty-mod tree pillow::PIL@10.0.0 # Specific version of pillow
103
+ pretty-mod sig pillow::PIL.Image:open # Works with signatures too
104
+ ```
105
+
106
+ ## python sdk
76
107
 
77
108
  ```python
78
109
  from pretty_mod import display_tree
@@ -124,45 +155,55 @@ print(display_signature("json:loads"))
124
155
  ```
125
156
  </details>
126
157
 
127
- ## CLI
158
+ ## customization
128
159
 
129
- Pretty-mod includes a command-line interface for quick exploration:
160
+ pretty-mod supports extensive customization through environment variables:
130
161
 
131
- > [!IMPORTANT]
132
- > all commands below can be run ephemerally with `uvx`, e.g. `uvx pretty-mod tree json`
162
+ ### display characters
133
163
 
134
164
  ```bash
135
- # Explore module structure
136
- pretty-mod tree json
137
-
138
- # Go deeper into the tree with --depth
139
- pretty-mod tree requests --depth 3
140
-
141
- # Display function signatures
142
- pretty-mod sig json:loads
143
- pretty-mod sig os.path:join
165
+ # Use ASCII-only mode for terminals without Unicode support
166
+ PRETTY_MOD_ASCII=1 pretty-mod tree json
144
167
 
145
- # Explore packages even without having them installed
146
- pretty-mod tree django
147
- pretty-mod tree flask --depth 1
168
+ # Customize individual icons
169
+ PRETTY_MOD_MODULE_ICON="[M]" pretty-mod tree json
170
+ PRETTY_MOD_FUNCTION_ICON="fn" pretty-mod tree json
171
+ PRETTY_MOD_CLASS_ICON="cls" pretty-mod tree json
172
+ ```
148
173
 
149
- # Use --quiet to suppress download messages
150
- pretty-mod tree requests --quiet
174
+ ### colors
151
175
 
152
- # Version specifiers - explore specific versions
153
- pretty-mod tree toml@0.10.2
154
- pretty-mod sig toml@0.10.2:loads
176
+ pretty-mod uses an earth-tone color scheme by default:
155
177
 
156
- # Submodules with version specifiers (correct syntax)
157
- pretty-mod tree prefect.server@2.10.0 # ✅ Works
158
- pretty-mod tree prefect@2.10.0.server # ❌ Invalid - version must come last
178
+ ```bash
179
+ # Disable colors entirely
180
+ PRETTY_MOD_NO_COLOR=1 pretty-mod tree json
181
+ # or use the standard NO_COLOR environment variable
182
+ NO_COLOR=1 pretty-mod tree json
183
+
184
+ # Override specific colors with hex values
185
+ PRETTY_MOD_MODULE_COLOR="#FF6B6B" pretty-mod tree json
186
+ PRETTY_MOD_FUNCTION_COLOR="#4ECDC4" pretty-mod tree json
159
187
  ```
160
188
 
161
- ## Examples
189
+ available color environment variables:
190
+ - `PRETTY_MOD_MODULE_COLOR` - Modules/packages (default: #8B7355)
191
+ - `PRETTY_MOD_FUNCTION_COLOR` - Functions (default: #6B8E23)
192
+ - `PRETTY_MOD_CLASS_COLOR` - Classes (default: #4682B4)
193
+ - `PRETTY_MOD_CONSTANT_COLOR` - Constants (default: #BC8F8F)
194
+ - `PRETTY_MOD_EXPORTS_COLOR` - __all__ exports (default: #9370DB)
195
+ - `PRETTY_MOD_SIGNATURE_COLOR` - Signatures (default: #5F9EA0)
196
+ - `PRETTY_MOD_TREE_COLOR` - Tree structure lines (default: #696969)
197
+ - `PRETTY_MOD_PARAM_COLOR` - Parameter names (default: #708090)
198
+ - `PRETTY_MOD_TYPE_COLOR` - Type annotations (default: #778899)
199
+ - `PRETTY_MOD_DEFAULT_COLOR` - Default values (default: #8FBC8F)
200
+ - `PRETTY_MOD_WARNING_COLOR` - Warning messages (default: #DAA520)
201
+
202
+ ## examples
162
203
 
163
- See the [`examples/`](examples/) directory for more detailed usage patterns and advanced features.
204
+ see the [`examples/`](examples/) directory for more detailed usage patterns and advanced features.
164
205
 
165
- ## Development
206
+ ## development
166
207
 
167
208
  ```bash
168
209
  gh repo clone zzstoatzz/pretty-mod && cd pretty-mod
@@ -1,3 +1,75 @@
1
+ # Release Notes - v0.2.0
2
+
3
+ ## 🎨 Customizable Display & Colors + Enhanced Signature Support
4
+
5
+ This release introduces customizable display characters, color output, full type annotation support in signatures, and a new double-colon syntax for handling packages where the PyPI name differs from the module name.
6
+
7
+ ### 🚨 Breaking Changes
8
+ - **Color output by default**: Tree and signature displays now include ANSI color codes
9
+ - **Minor version bump**: Due to visual output changes, this is a minor version release
10
+
11
+ ### ✨ New Features
12
+
13
+ - **🔗 Double-colon syntax**: Handle packages where PyPI name differs from module name
14
+ - `pretty-mod tree pydocket::docket` - Download 'pydocket' package, explore 'docket' module
15
+ - `pretty-mod tree pillow::PIL` - Download 'pillow' package, explore 'PIL' module
16
+ - Works with version specifiers: `pretty-mod tree pillow::PIL@10.0.0`
17
+ - Works with signatures: `pretty-mod sig pillow::PIL.Image:open`
18
+
19
+ - **📝 Full Type Annotation Support**: Signatures now display complete type information
20
+ - Union types: `str | None`
21
+ - Generic types: `list[Tool | Callable[..., Any]]`
22
+ - Literal types: `Literal['protocol', 'path']`
23
+ - Complex nested types properly rendered from AST
24
+
25
+ - **🎨 Color Support**: Earth-tone/pastel color scheme
26
+ - Modules: Saddle brown (#8B7355)
27
+ - Functions: Olive drab (#6B8E23)
28
+ - Classes: Steel blue (#4682B4)
29
+ - Constants: Rosy brown (#BC8F8F)
30
+ - Warning messages: Goldenrod (#DAA520)
31
+ - And more subtle colors for parameters, types, and tree structures
32
+
33
+ - **🔧 Customizable Display Characters**: Configure via environment variables
34
+ - `PRETTY_MOD_MODULE_ICON`: Icon for modules (default: 📦)
35
+ - `PRETTY_MOD_FUNCTION_ICON`: Icon for functions (default: ⚡)
36
+ - `PRETTY_MOD_CLASS_ICON`: Icon for classes (default: 🔷)
37
+ - `PRETTY_MOD_CONSTANT_ICON`: Icon for constants (default: 📌)
38
+ - `PRETTY_MOD_EXPORTS_ICON`: Icon for __all__ exports (default: 📜)
39
+ - `PRETTY_MOD_SIGNATURE_ICON`: Icon for signatures (default: 📎)
40
+
41
+ - **🖥️ ASCII Mode**: For terminals without Unicode support
42
+ ```bash
43
+ PRETTY_MOD_ASCII=1 pretty-mod tree json
44
+ ```
45
+
46
+ - **🚫 Disable Colors**: For clean output or piping
47
+ ```bash
48
+ PRETTY_MOD_NO_COLOR=1 pretty-mod tree json
49
+ # or use the standard NO_COLOR environment variable
50
+ ```
51
+
52
+ - **🎯 Custom Colors**: Override any color with hex values
53
+ ```bash
54
+ PRETTY_MOD_MODULE_COLOR=#FF6B6B pretty-mod tree json
55
+ ```
56
+
57
+ ### 🏗️ Technical Improvements
58
+
59
+ - **Configuration system**: Centralized configuration module with environment variable support
60
+ - **Color rendering**: ANSI 24-bit true color support with automatic hex-to-RGB conversion
61
+ - **Consistent styling**: Both tree and signature displays use the same configuration system
62
+ - **Enhanced AST parsing**: Better handling of complex type annotations and expressions
63
+ - **Code organization**: Consolidated signature parsing logic for better maintainability
64
+
65
+ ### 🐛 Bug Fixes
66
+
67
+ - **Stdlib module handling**: Built-in modules no longer trigger PyPI download attempts
68
+ - **Signature discovery**: Improved recursive search for symbols exported in `__all__`
69
+ - **Download messages**: Colored warning messages for better visibility
70
+
71
+ ---
72
+
1
73
  # Release Notes - v0.1.2
2
74
 
3
75
  ## 🔧 Code Quality Improvements