Metadata-Version: 2.4
Name: larkvs
Version: 0.1.4
Summary: A visual debugging tool for Lark grammars, VS Code-style desktop IDE.
Author-email: 2229066748@qq.com
Maintainer: Eagle'sBaby
Maintainer-email: 2229066748@qq.com
License: Apache Licence 2.0
Keywords: python,lark,ui
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: PyQt6>6.4
Requires-Dist: lark>=1.1.0
Requires-Dist: qtawesome
Requires-Dist: fastmcp<3,>2
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: keywords
Dynamic: license
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Lark Visual Studio

A visual debugging tool for Lark grammars, VS Code-style desktop IDE.

## Features

- **Grammar Editing** — Lark syntax highlighting, code completion, color configuration (`#RRGGBB` inline/block)
- **Parse Tree Visualization** — Tree/text dual view, node color mapping, click-to-locate source
- **Execution Engine** — Write and run Transformer/Visitor code, variable monitor, safe sandbox
- **Compile & Run Pipeline** — Compile (F6) parse only; Run (F5) parse + compile + execute
- **Project Management** — `.larkvs` project directories, recent projects, import/export `.plark`
- **Theme System** — Light/dark real-time switching
- **Settings System** — General/Appearance/Editor/Shortcuts/Interpreter, global and project-level
- **MCP Integration** — Claude Code can read/write grammar, trigger compile/run via MCP
- **Built-in Examples** — Arithmetic, JSON, CSV, lexical analysis, Lua interpreter, and more

## Installation

```bash
pip install larkvs
```

## Usage

```bash
# Launch GUI (default)
larkvs

# Open a project file
larkvs -f <path/to/project>/.larkvs

# Start MCP Server (stdio transport)
larkvs -m

# Show help
larkvs -h
```

| Flag | Description |
|------|-------------|
| `-m`, `--mcp` | Start MCP Server (stdio) for AI clients like Claude Code |
| `-f`, `--file` <path> | Open the specified `.larkvs` project file |
| `-h` | Show help and exit |

## Shortcuts

| Shortcut | Action |
|----------|--------|
| F6 | Compile (parse only) |
| F5 | Run (compile + execute) |
| Ctrl+, | Open settings |
| Ctrl+Shift+F | Global search |
| Double Shift | Search dialog |

## Project Structure

```
main.py            Main window + entry point
common.py          Base components (CodeEditor, Icons, StatusBar)
panels.py          Feature panels (grammar editor, test input, parse result, console)
execution.py       Execution engine (ExecutionPanel, VariableMonitor, ProblemPanel)
workspace.py       Workspace (ActivityBar, TabWorkspace, BottomPanel, search dialog)
workers.py         Background threads (ParseWorker, ExecutionWorker)
highlighters.py    Syntax highlighters
colorparser.py     Color configuration parser
colorpicker.py     Color picker popup
completer.py       Code completion
home.py            Home page (recent project buttons)
projectio.py       Project file I/O
settings.py        Settings dialog
settingsmgr.py     Settings manager
settingsui.py      Settings UI components
theme.py           Theme/examples/templates
xml_tree_canvas.py XML tree visualization
claude_helper.py   Claude Code integration
mcp_ipc.py         MCP TCP server
mcp_server.py      MCP standalone server
mcp_tools.py       MCP method constants
```
