Lutra/README.md
danny 9fa6028335 M1.6: tabs and CodeMirror editor
- Editor area with tab bar, CodeMirror 6 view, close question and notices
  (ui/src/components/editor/, ui/src/stores/editor.ts), mounted in App.vue;
  the project tree opens files through the editor store.
- BufferSync: local edits to buffer.edit against the confirmed version,
  one call in flight, resync on stale_version or newer bufferChanged with
  rebase of unsent changes; EngineText maps CodeMirror positions to engine
  UTF-16 offsets for CRLF text.
- Save, save all and close from engine default shortcuts via listCommands.
- Dirty marker, Save / Don't Save / Cancel, non-blocking notice when a
  dirty file changes or disappears on disk.
- Vitest: keystroke bursts with stale versions and remote edits (LF and
  CRLF), mapping, store and component tests against a fake engine.
- Progress docs: Editor core 8% (est.), depth ~1.4%, G2, ui-parity tabs,
  M1 row, architecture, README status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 18:26:32 +02:00

80 lines
4.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 align="center">🦦 Lutra</h1>
<p align="center">
<b>An otterly perfect IDE.</b>
</p>
<p align="center">
A fast, open-source, clean-room PHP IDE in the spirit of the PhpStorm workflow.
Rust core, Vue interface, native on macOS, Windows and Linux.
</p>
<p align="center">
<img alt="Status: pre-alpha" src="https://img.shields.io/badge/status-pre--alpha-8a6a4f">
<img alt="Core in Rust" src="https://img.shields.io/badge/core-Rust-b83a24?logo=rust&logoColor=white">
<img alt="UI in Vue" src="https://img.shields.io/badge/UI-Vue%203-42b883?logo=vuedotjs&logoColor=white">
<img alt="Runs on macOS, Windows and Linux" src="https://img.shields.io/badge/runs%20on-macOS%20%C2%B7%20Windows%20%C2%B7%20Linux-555555">
<img alt="MCP server for agents" src="https://img.shields.io/badge/agents-MCP%20server-555555">
<img alt="License: MIT OR Apache-2.0" src="https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-555555">
</p>
> *Lutra* is the Latin name of the otter. Sea otters are among the few animals that use tools:
> they crack shells open with a stone. Lutra is that stone for your PHP code.
## Why Lutra
- **Familiar.** Project view, tool windows, Search Everywhere-style navigation, Go to Class, Find Usages, refactorings: the workflow PHP developers already know.
- **Fast.** A Rust core with an incremental index, search off the UI thread and a lightweight Tauri shell.
- **Robust.** No panics in shipped code, a crash-recovery journal for unsaved buffers, property-tested protocols.
- **Open.** MIT OR Apache-2.0, no account, no telemetry.
- **Agent-native.** Every action is a command that a JSON control channel and an MCP server expose, so Claude and other agents can work in the IDE the way a person does.
- **PHP-first.** Symfony, Laravel, Shopware and WordPress support are on the roadmap from the start.
## Quick start
> The foundation (M0) is built: `cargo xtask dev` opens an empty themed window and `cargo xtask ci` runs the quality gate. The `lutra` command below is the target of milestone M3.
```sh
git clone <repo-url> lutra
cd lutra
cargo xtask dev # desktop app in development mode
cargo xtask dev -- --control 7979 . # + JSON control channel
cargo xtask ci # fmt, clippy, tests, layers, assets, clean-room, frontend checks
```
### The `lutra` command
```sh
lutra . # open the current folder as a project
lutra src/Kernel.php:42 # open a file at a line
lutra diff a.php b.php # open the diff viewer
lutra --wait FILE # wait until the tab is closed (git config core.editor "lutra --wait")
lutra mcp # MCP server on stdio
lutra perf # check the performance budgets
```
### Use it from Claude Code
```sh
claude mcp add lutra -- lutra mcp
```
## Status
**Pre-alpha (2026-10-15): M1 in progress.** You can open a folder, browse it in the project tree with live updates from disk, and edit and save files in tabs (plain text for now); syntax highlighting and PHP features come next. The MVP (M1–M3) is estimated at about 190 agent hours. [**ROADMAP.md**](ROADMAP.md) has the stage and what's next,
[`docs/target-app-parity.md`](docs/target-app-parity.md) the parity assessment and [`docs/gaps.md`](docs/gaps.md) the ranked work list.
**First target (MVP, M1–M3):** open a project, project tree, tabs, editor with highlighting, find in files,
go to definition, completion and diagnostics via a language server, command palette, integrated terminal,
the `lutra` CLI, light and dark themes.
Agent and contributor rules (clean-room, asset policy, no panics, quality gates) are in [`AGENTS.md`](AGENTS.md).
Every bundled asset is listed with its licence in [`ASSETS.md`](ASSETS.md).
## License
Lutra is dual-licensed under [MIT](LICENSE-MIT) or [Apache-2.0](LICENSE-APACHE), at your option.
Copyright (c) 2026 Daniel Diekert and the Lutra contributors. Required notices are in [NOTICE](NOTICE).
<sub>PhpStorm, IntelliJ IDEA and JetBrains are trademarks or registered trademarks of JetBrains s.r.o. Lutra is an independent, open-source project and is not affiliated with, sponsored by or endorsed by JetBrains s.r.o.; these names are used only to describe the workflows it is compatible with.</sub>