vexy-lines-cli 1.0.2__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.
@@ -0,0 +1,211 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # MkDocs output
75
+ docs/
76
+
77
+ # PyBuilder
78
+ .pybuilder/
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+
84
+ # IPython
85
+ profile_default/
86
+ ipython_config.py
87
+
88
+ # pyenv
89
+ # For a library or package, you might want to ignore these files since the code is
90
+ # intended to run in multiple environments; otherwise, check them in:
91
+ # .python-version
92
+
93
+ # pipenv
94
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
96
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
97
+ # install all needed dependencies.
98
+ #Pipfile.lock
99
+
100
+ # UV
101
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
102
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
103
+ # commonly ignored for libraries.
104
+ #uv.lock
105
+
106
+ # poetry
107
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
108
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
109
+ # commonly ignored for libraries.
110
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
111
+ #poetry.lock
112
+ #poetry.toml
113
+
114
+ # pdm
115
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
116
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
117
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
118
+ #pdm.lock
119
+ #pdm.toml
120
+ .pdm-python
121
+ .pdm-build/
122
+
123
+ # pixi
124
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
125
+ #pixi.lock
126
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
127
+ # in the .venv directory. It is recommended not to include this directory in version control.
128
+ .pixi
129
+
130
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
131
+ __pypackages__/
132
+
133
+ # Celery stuff
134
+ celerybeat-schedule
135
+ celerybeat.pid
136
+
137
+ # SageMath parsed files
138
+ *.sage.py
139
+
140
+ # Environments
141
+ .env
142
+ .envrc
143
+ .venv
144
+ env/
145
+ venv/
146
+ ENV/
147
+ env.bak/
148
+ venv.bak/
149
+
150
+ # Spyder project settings
151
+ .spyderproject
152
+ .spyproject
153
+
154
+ # Rope project settings
155
+ .ropeproject
156
+
157
+ # mkdocs documentation
158
+ /site
159
+
160
+ # mypy
161
+ .mypy_cache/
162
+ .dmypy.json
163
+ dmypy.json
164
+
165
+ # Pyre type checker
166
+ .pyre/
167
+
168
+ # pytype static type analyzer
169
+ .pytype/
170
+
171
+ # Cython debug symbols
172
+ cython_debug/
173
+
174
+ # PyCharm
175
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
176
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
177
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
178
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
179
+ #.idea/
180
+
181
+ # Abstra
182
+ # Abstra is an AI-powered process automation framework.
183
+ # Ignore directories containing user credentials, local state, and settings.
184
+ # Learn more at https://abstra.io/docs
185
+ .abstra/
186
+
187
+ # Visual Studio Code
188
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
189
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
190
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
191
+ # you could uncomment the following to ignore the entire vscode folder
192
+ # .vscode/
193
+
194
+ # Ruff stuff:
195
+ .ruff_cache/
196
+
197
+ # PyPI configuration file
198
+ .pypirc
199
+
200
+ # Cursor
201
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
202
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
203
+ # refer to https://docs.cursor.com/context/ignore-files
204
+ .cursorignore
205
+ .cursorindexingignore
206
+
207
+ # Marimo
208
+ marimo/_static/
209
+ marimo/_lsp/
210
+ __marimo__/
211
+ _version.py
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,173 @@
1
+ Metadata-Version: 2.4
2
+ Name: vexy-lines-cli
3
+ Version: 1.0.2
4
+ Summary: CLI tool and MCP passthrough server for Vexy Lines
5
+ Project-URL: Documentation, https://github.com/vexyart/vexy-lines/tree/main/vexy-lines-cli#readme
6
+ Project-URL: Issues, https://github.com/vexyart/vexy-lines/issues
7
+ Project-URL: Source, https://github.com/vexyart/vexy-lines/tree/main/vexy-lines-cli
8
+ Author-email: "Fontlab Ltd." <opensource@vexy.art>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: cli,creative-tools,mcp,vector-art,vexy-lines
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: Implementation :: CPython
22
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
23
+ Classifier: Topic :: Multimedia :: Graphics
24
+ Classifier: Typing :: Typed
25
+ Requires-Python: >=3.10
26
+ Requires-Dist: fire>=0.6.0
27
+ Requires-Dist: loguru>=0.7.2
28
+ Requires-Dist: vexy-lines-apy>=0.1.0
29
+ Description-Content-Type: text/markdown
30
+
31
+ # vexy-lines-cli
32
+
33
+ Command-line interface and MCP passthrough server for [Vexy Lines](https://vexy.art) — the macOS vector art app.
34
+
35
+ Parse `.lines` files, batch export to PDF/SVG, apply styles to images and video, and connect Claude Desktop or Cursor directly to the Vexy Lines MCP API.
36
+
37
+ ## Install
38
+
39
+ ```bash
40
+ pip install vexy-lines-cli
41
+ ```
42
+
43
+ Requires Python 3.10+. Pulls in `vexy-lines-apy` (MCP client, style engine) and `vexy-lines-py` (parser) automatically.
44
+
45
+ For video processing: `pip install vexy-lines-run[video]`. For the GUI: `pip install vexy-lines-run`.
46
+
47
+ ## Quick start
48
+
49
+ ```bash
50
+ # Inspect a file without opening the app
51
+ vexy-lines info artwork.lines
52
+
53
+ # Show the layer/group/fill tree
54
+ vexy-lines file-tree artwork.lines
55
+
56
+ # Export a folder of .lines files to PDF (auto-launches the app)
57
+ vexy-lines export ./my-art/ --format pdf
58
+
59
+ # Apply a style template to a folder of photos
60
+ vexy-lines style-transfer --style template.lines --input-dir ./photos/ --output-dir ./out/
61
+
62
+ # Check MCP connectivity
63
+ vexy-lines mcp-status
64
+ ```
65
+
66
+ Running `vexy-lines` with no arguments launches the GUI (requires `vexy-lines-run`).
67
+
68
+ ## Subcommand reference
69
+
70
+ ### Parser — no app required
71
+
72
+ | Command | What it does |
73
+ |---|---|
74
+ | `info <file>` | Show caption, DPI, dimensions, layer/fill counts |
75
+ | `file-tree <file>` | Print the layer/group/fill hierarchy |
76
+ | `extract-source <file>` | Save the embedded source image to disk |
77
+ | `extract-preview <file>` | Save the embedded preview image to disk |
78
+ | `batch-convert` | Extract preview or source images from a directory of `.lines` files |
79
+
80
+ All parser commands accept `--json-output` for machine-readable output.
81
+
82
+ ```bash
83
+ vexy-lines info artwork.lines --json-output
84
+ vexy-lines batch-convert --input-dir ./art/ --output-dir ./thumbs/ --what preview --format jpg
85
+ ```
86
+
87
+ ### Export — auto-launches app
88
+
89
+ Uses dialog-less export: injects settings into macOS preferences, triggers `File > Export`, then restores original prefs. Input can be a single file or a directory.
90
+
91
+ ```bash
92
+ vexy-lines export ./art/ --format svg --output ./svg-out/
93
+ vexy-lines export artwork.lines --format pdf --dry-run # preview without exporting
94
+ vexy-lines export ./art/ --force --timeout-multiplier 2
95
+ ```
96
+
97
+ Options: `--format` (`pdf`/`svg`), `--force`, `--dry-run`, `--timeout-multiplier` (0.1–10.0), `--max-retries` (0–10), `--say-summary`.
98
+
99
+ ### Style — app must be running
100
+
101
+ ```bash
102
+ # Single style across all images
103
+ vexy-lines style-transfer --style look.lines --input-dir ./frames/ --format svg
104
+
105
+ # Interpolate between two styles across the sequence
106
+ vexy-lines style-transfer --style start.lines --end-style end.lines \
107
+ --input-dir ./frames/ --output-dir ./out/
108
+
109
+ # Apply style to video
110
+ vexy-lines style-video --style look.lines --input clip.mp4 --output result.mp4
111
+ ```
112
+
113
+ ### MCP — app must be running
114
+
115
+ Direct JSON-RPC calls to the Vexy Lines embedded server (`localhost:47384`).
116
+
117
+ | Command | What it does |
118
+ |---|---|
119
+ | `mcp-status` | Check if the MCP server is reachable |
120
+ | `tree` | Print the live document layer tree |
121
+ | `new-document` | Create a new document |
122
+ | `open <file>` | Open a `.lines` file |
123
+ | `add-fill <layer-id> <fill-type>` | Add a fill to a layer |
124
+ | `render` | Trigger a full render |
125
+
126
+ ```bash
127
+ vexy-lines mcp-status
128
+ vexy-lines tree --json-output
129
+ vexy-lines new-document --width 210 --height 297 --dpi 300
130
+ vexy-lines add-fill 42 linear --color "#ff0000"
131
+ ```
132
+
133
+ All MCP commands accept `--host` and `--port` (defaults: `127.0.0.1:47384`).
134
+
135
+ ### Bridge and GUI
136
+
137
+ | Command | What it does |
138
+ |---|---|
139
+ | `mcp-serve` | Start the stdio-to-TCP bridge (same as running `vexy-lines-mcp`) |
140
+ | `gui` | Launch the Vexy Lines GUI (requires `vexy-lines-run`) |
141
+
142
+ ## MCP server setup
143
+
144
+ `vexy-lines-mcp` bridges Claude Desktop and Cursor to the Vexy Lines TCP server. It reads newline-delimited JSON-RPC from stdin, forwards over TCP, and writes responses to stdout.
145
+
146
+ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
147
+
148
+ ```json
149
+ {
150
+ "mcpServers": {
151
+ "vexy-lines": {
152
+ "command": "vexy-lines-mcp"
153
+ }
154
+ }
155
+ }
156
+ ```
157
+
158
+ For Cursor, add the same block under `mcp.servers` in `.cursor/mcp.json`.
159
+
160
+ The bridge auto-launches the Vexy Lines app on first connection. Pass `--no-launch` to disable:
161
+
162
+ ```bash
163
+ vexy-lines mcp-serve --no-launch
164
+ vexy-lines mcp-serve --host 127.0.0.1 --port 47384
165
+ ```
166
+
167
+ ## Full documentation
168
+
169
+ [Read the docs](https://vexyart.github.io/vexy-lines/vexy-lines-cli/) for the complete CLI reference, export pipeline internals, and more examples.
170
+
171
+ ## License
172
+
173
+ MIT
@@ -0,0 +1,143 @@
1
+ # vexy-lines-cli
2
+
3
+ Command-line interface and MCP passthrough server for [Vexy Lines](https://vexy.art) — the macOS vector art app.
4
+
5
+ Parse `.lines` files, batch export to PDF/SVG, apply styles to images and video, and connect Claude Desktop or Cursor directly to the Vexy Lines MCP API.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pip install vexy-lines-cli
11
+ ```
12
+
13
+ Requires Python 3.10+. Pulls in `vexy-lines-apy` (MCP client, style engine) and `vexy-lines-py` (parser) automatically.
14
+
15
+ For video processing: `pip install vexy-lines-run[video]`. For the GUI: `pip install vexy-lines-run`.
16
+
17
+ ## Quick start
18
+
19
+ ```bash
20
+ # Inspect a file without opening the app
21
+ vexy-lines info artwork.lines
22
+
23
+ # Show the layer/group/fill tree
24
+ vexy-lines file-tree artwork.lines
25
+
26
+ # Export a folder of .lines files to PDF (auto-launches the app)
27
+ vexy-lines export ./my-art/ --format pdf
28
+
29
+ # Apply a style template to a folder of photos
30
+ vexy-lines style-transfer --style template.lines --input-dir ./photos/ --output-dir ./out/
31
+
32
+ # Check MCP connectivity
33
+ vexy-lines mcp-status
34
+ ```
35
+
36
+ Running `vexy-lines` with no arguments launches the GUI (requires `vexy-lines-run`).
37
+
38
+ ## Subcommand reference
39
+
40
+ ### Parser — no app required
41
+
42
+ | Command | What it does |
43
+ |---|---|
44
+ | `info <file>` | Show caption, DPI, dimensions, layer/fill counts |
45
+ | `file-tree <file>` | Print the layer/group/fill hierarchy |
46
+ | `extract-source <file>` | Save the embedded source image to disk |
47
+ | `extract-preview <file>` | Save the embedded preview image to disk |
48
+ | `batch-convert` | Extract preview or source images from a directory of `.lines` files |
49
+
50
+ All parser commands accept `--json-output` for machine-readable output.
51
+
52
+ ```bash
53
+ vexy-lines info artwork.lines --json-output
54
+ vexy-lines batch-convert --input-dir ./art/ --output-dir ./thumbs/ --what preview --format jpg
55
+ ```
56
+
57
+ ### Export — auto-launches app
58
+
59
+ Uses dialog-less export: injects settings into macOS preferences, triggers `File > Export`, then restores original prefs. Input can be a single file or a directory.
60
+
61
+ ```bash
62
+ vexy-lines export ./art/ --format svg --output ./svg-out/
63
+ vexy-lines export artwork.lines --format pdf --dry-run # preview without exporting
64
+ vexy-lines export ./art/ --force --timeout-multiplier 2
65
+ ```
66
+
67
+ Options: `--format` (`pdf`/`svg`), `--force`, `--dry-run`, `--timeout-multiplier` (0.1–10.0), `--max-retries` (0–10), `--say-summary`.
68
+
69
+ ### Style — app must be running
70
+
71
+ ```bash
72
+ # Single style across all images
73
+ vexy-lines style-transfer --style look.lines --input-dir ./frames/ --format svg
74
+
75
+ # Interpolate between two styles across the sequence
76
+ vexy-lines style-transfer --style start.lines --end-style end.lines \
77
+ --input-dir ./frames/ --output-dir ./out/
78
+
79
+ # Apply style to video
80
+ vexy-lines style-video --style look.lines --input clip.mp4 --output result.mp4
81
+ ```
82
+
83
+ ### MCP — app must be running
84
+
85
+ Direct JSON-RPC calls to the Vexy Lines embedded server (`localhost:47384`).
86
+
87
+ | Command | What it does |
88
+ |---|---|
89
+ | `mcp-status` | Check if the MCP server is reachable |
90
+ | `tree` | Print the live document layer tree |
91
+ | `new-document` | Create a new document |
92
+ | `open <file>` | Open a `.lines` file |
93
+ | `add-fill <layer-id> <fill-type>` | Add a fill to a layer |
94
+ | `render` | Trigger a full render |
95
+
96
+ ```bash
97
+ vexy-lines mcp-status
98
+ vexy-lines tree --json-output
99
+ vexy-lines new-document --width 210 --height 297 --dpi 300
100
+ vexy-lines add-fill 42 linear --color "#ff0000"
101
+ ```
102
+
103
+ All MCP commands accept `--host` and `--port` (defaults: `127.0.0.1:47384`).
104
+
105
+ ### Bridge and GUI
106
+
107
+ | Command | What it does |
108
+ |---|---|
109
+ | `mcp-serve` | Start the stdio-to-TCP bridge (same as running `vexy-lines-mcp`) |
110
+ | `gui` | Launch the Vexy Lines GUI (requires `vexy-lines-run`) |
111
+
112
+ ## MCP server setup
113
+
114
+ `vexy-lines-mcp` bridges Claude Desktop and Cursor to the Vexy Lines TCP server. It reads newline-delimited JSON-RPC from stdin, forwards over TCP, and writes responses to stdout.
115
+
116
+ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
117
+
118
+ ```json
119
+ {
120
+ "mcpServers": {
121
+ "vexy-lines": {
122
+ "command": "vexy-lines-mcp"
123
+ }
124
+ }
125
+ }
126
+ ```
127
+
128
+ For Cursor, add the same block under `mcp.servers` in `.cursor/mcp.json`.
129
+
130
+ The bridge auto-launches the Vexy Lines app on first connection. Pass `--no-launch` to disable:
131
+
132
+ ```bash
133
+ vexy-lines mcp-serve --no-launch
134
+ vexy-lines mcp-serve --host 127.0.0.1 --port 47384
135
+ ```
136
+
137
+ ## Full documentation
138
+
139
+ [Read the docs](https://vexyart.github.io/vexy-lines/vexy-lines-cli/) for the complete CLI reference, export pipeline internals, and more examples.
140
+
141
+ ## License
142
+
143
+ MIT
@@ -0,0 +1,226 @@
1
+ # this_file: pyproject.toml
2
+ # =============================================================================
3
+ # VEXY-LINES-CLI PACKAGE CONFIGURATION
4
+ # CLI tool and MCP passthrough server for Vexy Lines.
5
+ # =============================================================================
6
+
7
+ # -----------------------------------------------------------------------------
8
+ # PROJECT METADATA
9
+ # -----------------------------------------------------------------------------
10
+ [project]
11
+ name = "vexy-lines-cli"
12
+ description = "CLI tool and MCP passthrough server for Vexy Lines"
13
+ readme = "README.md"
14
+ requires-python = ">=3.10"
15
+ keywords = [
16
+ "vexy-lines",
17
+ "vector-art",
18
+ "cli",
19
+ "mcp",
20
+ "creative-tools",
21
+ ]
22
+ dynamic = ["version"]
23
+
24
+ classifiers = [
25
+ "Development Status :: 4 - Beta",
26
+ "Programming Language :: Python",
27
+ "Programming Language :: Python :: 3.10",
28
+ "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
30
+ "Programming Language :: Python :: 3.13",
31
+ "Programming Language :: Python :: Implementation :: CPython",
32
+ "Programming Language :: Python :: Implementation :: PyPy",
33
+ "Operating System :: OS Independent",
34
+ "License :: OSI Approved :: MIT License",
35
+ "Intended Audience :: Developers",
36
+ "Topic :: Multimedia :: Graphics",
37
+ "Typing :: Typed",
38
+ ]
39
+
40
+ dependencies = [
41
+ "vexy-lines-apy>=0.1.0",
42
+ "fire>=0.6.0",
43
+ "loguru>=0.7.2",
44
+ ]
45
+
46
+ [[project.authors]]
47
+ name = "Fontlab Ltd."
48
+ email = "opensource@vexy.art"
49
+
50
+ [project.license]
51
+ text = "MIT"
52
+
53
+ [project.urls]
54
+ Documentation = "https://github.com/vexyart/vexy-lines/tree/main/vexy-lines-cli#readme"
55
+ Issues = "https://github.com/vexyart/vexy-lines/issues"
56
+ Source = "https://github.com/vexyart/vexy-lines/tree/main/vexy-lines-cli"
57
+
58
+ [project.scripts]
59
+ vexy-lines = "vexy_lines_cli.__main__:main"
60
+ vexy-lines-mcp = "vexy_lines_cli.mcp_server:main"
61
+
62
+ # -----------------------------------------------------------------------------
63
+ # BUILD SYSTEM
64
+ # -----------------------------------------------------------------------------
65
+ [build-system]
66
+ requires = [
67
+ "hatchling>=1.27.0",
68
+ "hatch-vcs>=0.4.0",
69
+ ]
70
+ build-backend = "hatchling.build"
71
+
72
+ # -----------------------------------------------------------------------------
73
+ # HATCH BUILD
74
+ # -----------------------------------------------------------------------------
75
+ [tool.hatch.build]
76
+ include = [
77
+ "src/vexy_lines_cli/py.typed",
78
+ ]
79
+ exclude = ["**/__pycache__", "**/.pytest_cache", "**/.mypy_cache"]
80
+
81
+ [tool.hatch.build.targets.wheel]
82
+ packages = ["src/vexy_lines_cli"]
83
+ reproducible = true
84
+
85
+ [tool.hatch.build.hooks.vcs]
86
+ version-file = "src/vexy_lines_cli/_version.py"
87
+
88
+ [tool.hatch.version]
89
+ source = "vcs"
90
+ fallback-version = "0.1.0"
91
+
92
+ [tool.hatch.metadata]
93
+ allow-direct-references = true
94
+
95
+ # -----------------------------------------------------------------------------
96
+ # HATCH ENVIRONMENTS
97
+ # -----------------------------------------------------------------------------
98
+ [tool.hatch.envs.default]
99
+ dependencies = [
100
+ "ruff>=0.9.7",
101
+ "mypy>=1.15.0",
102
+ "pytest>=8.3.4",
103
+ "pytest-cov>=6.0.0",
104
+ "mkdocs>=1.6",
105
+ "mkdocs-materialx>=2.0",
106
+ ]
107
+
108
+ [tool.hatch.envs.default.scripts]
109
+ test = "pytest {args:tests}"
110
+ test-cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src/vexy_lines_cli --cov=tests {args:tests}"
111
+ type-check = "mypy src/vexy_lines_cli tests"
112
+ lint = ["ruff check src/vexy_lines_cli tests", "ruff format --check --respect-gitignore src/vexy_lines_cli tests"]
113
+ fmt = ["ruff format --respect-gitignore src/vexy_lines_cli tests", "ruff check --fix src/vexy_lines_cli tests"]
114
+
115
+ [[tool.hatch.envs.all.matrix]]
116
+ python = ["3.10", "3.11", "3.12", "3.13"]
117
+
118
+ [tool.hatch.envs.lint]
119
+ detached = true
120
+ dependencies = [
121
+ "ruff>=0.9.7",
122
+ "mypy>=1.15.0",
123
+ ]
124
+
125
+ [tool.hatch.envs.lint.scripts]
126
+ typing = "mypy --install-types --non-interactive {args:src/vexy_lines_cli tests}"
127
+ style = ["ruff check {args:.}", "ruff format --check --respect-gitignore {args:.}"]
128
+ fmt = ["ruff format --respect-gitignore {args:.}", "ruff check --fix {args:.}"]
129
+
130
+ [tool.hatch.envs.test]
131
+ dependencies = [
132
+ "pytest>=8.3.4",
133
+ "pytest-cov>=6.0.0",
134
+ ]
135
+
136
+ [tool.hatch.envs.test.scripts]
137
+ test = "python -m pytest {args:tests}"
138
+ test-cov = "python -m pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src/vexy_lines_cli --cov=tests {args:tests}"
139
+
140
+ # -----------------------------------------------------------------------------
141
+ # COVERAGE
142
+ # -----------------------------------------------------------------------------
143
+ [tool.coverage.paths]
144
+ vexy_lines_cli = ["src/vexy_lines_cli", "*/vexy-lines-cli/src/vexy_lines_cli"]
145
+ tests = ["tests", "*/vexy-lines-cli/tests"]
146
+
147
+ [tool.coverage.report]
148
+ exclude_lines = [
149
+ "no cov",
150
+ "if __name__ == .__main__.:",
151
+ "if TYPE_CHECKING:",
152
+ "pass",
153
+ "raise NotImplementedError",
154
+ ]
155
+
156
+ [tool.coverage.run]
157
+ source_pkgs = ["vexy_lines_cli", "tests"]
158
+ branch = true
159
+ parallel = true
160
+
161
+ # -----------------------------------------------------------------------------
162
+ # MYPY
163
+ # -----------------------------------------------------------------------------
164
+ [tool.mypy]
165
+ python_version = "3.10"
166
+ strict = true
167
+ warn_return_any = true
168
+ warn_unused_configs = true
169
+ disallow_untyped_defs = true
170
+ disallow_incomplete_defs = true
171
+ check_untyped_defs = true
172
+ disallow_untyped_decorators = true
173
+ no_implicit_optional = true
174
+ warn_redundant_casts = true
175
+ warn_unused_ignores = true
176
+ warn_no_return = true
177
+ warn_unreachable = true
178
+
179
+ [[tool.mypy.overrides]]
180
+ module = ["tests.*"]
181
+ disallow_untyped_defs = false
182
+ disallow_incomplete_defs = false
183
+
184
+ # -----------------------------------------------------------------------------
185
+ # PYTEST
186
+ # -----------------------------------------------------------------------------
187
+ [tool.pytest.ini_options]
188
+ addopts = "-v --durations=10 --tb=short"
189
+ console_output_style = "progress"
190
+ filterwarnings = ["ignore::DeprecationWarning"]
191
+ log_cli = true
192
+ log_cli_level = "INFO"
193
+ norecursedirs = [".*", "build", "dist", "venv", "__pycache__", "*.egg-info"]
194
+ python_classes = ["Test*"]
195
+ python_files = ["test_*.py"]
196
+ python_functions = ["test_*"]
197
+ testpaths = ["tests"]
198
+
199
+ # -----------------------------------------------------------------------------
200
+ # RUFF
201
+ # -----------------------------------------------------------------------------
202
+ [tool.ruff]
203
+ target-version = "py310"
204
+ line-length = 120
205
+
206
+ [tool.ruff.lint]
207
+ select = [
208
+ "A", "ARG", "ASYNC", "B", "C", "DTZ", "E", "EM", "F", "FBT", "I", "ICN",
209
+ "ISC", "LOG", "N", "PLC", "PLE", "PLR", "PLW", "PT", "PTH", "PYI", "RET",
210
+ "RSE", "RUF", "S", "SIM", "T", "TCH", "TID", "UP", "W", "YTT",
211
+ ]
212
+ ignore = [
213
+ "B027", "C901", "FBT003", "PLR0911", "PLR0912", "PLR0913", "PLR0915",
214
+ "PLR1714", "PLW0603", "PT013", "PTH123", "PYI056", "S105", "S106",
215
+ "S107", "S110", "SIM102",
216
+ ]
217
+ unfixable = ["F401"]
218
+
219
+ [tool.ruff.lint.isort]
220
+ known-first-party = ["vexy_lines_cli", "vexy_lines_api", "vexy_lines"]
221
+
222
+ [tool.ruff.lint.flake8-tidy-imports]
223
+ ban-relative-imports = "all"
224
+
225
+ [tool.ruff.lint.per-file-ignores]
226
+ "tests/**/*" = ["PLR2004", "S101", "TID252"]
@@ -0,0 +1,24 @@
1
+ # file generated by vcs-versioning
2
+ # don't change, don't track in version control
3
+ from __future__ import annotations
4
+
5
+ __all__ = [
6
+ "__version__",
7
+ "__version_tuple__",
8
+ "version",
9
+ "version_tuple",
10
+ "__commit_id__",
11
+ "commit_id",
12
+ ]
13
+
14
+ version: str
15
+ __version__: str
16
+ __version_tuple__: tuple[int | str, ...]
17
+ version_tuple: tuple[int | str, ...]
18
+ commit_id: str | None
19
+ __commit_id__: str | None
20
+
21
+ __version__ = version = '1.0.2'
22
+ __version_tuple__ = version_tuple = (1, 0, 2)
23
+
24
+ __commit_id__ = commit_id = None
File without changes