MCPcopy Index your code
hub / github.com/dannysmith/astro-editor

github.com/dannysmith/astro-editor @v1.0.17

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.17 ↗ · + Follow
1,273 symbols 3,031 edges 339 files 144 documented · 11% updated 4d agov1.0.17 · 2026-06-27★ 4785 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Astro Editor

Screenshots of Astro Editor

A native macOS markdown editor for Astro content collections. Clean writing interface with automatic frontmatter editing based on your collection schemas.

https://github.com/user-attachments/assets/dc32dd12-2094-47c4-ab90-620ecd11ba48

Features

Writing Environment

  • Clean markdown/MDX editor with syntax highlighting. Frontmatter and imports are hidden while editing, shown in a dedicated sidebar.
  • Focus mode (highlights current sentence), copyedit mode (highlights parts of speech), and typewriter mode (keeps the cursor centered on screen).
  • Customizable heading colors with separate settings for dark and light themes.
  • Image preview on hover (Option + hover over paths).
  • Comprehensive keyboard shortcuts for formatting, headings, and navigation.
  • Auto-save: saves 2 seconds after you stop typing (configurable) with backup saves every 10 seconds while typing. Crash recovery included.

Frontmatter & Schema Integration

  • Generates editing forms from your Astro collection schemas with proper validation.
  • Supports all Zod types: strings, numbers, dates, booleans, enums, arrays, nested objects, references, and image fields.
  • Image fields provide drag-and-drop with automatic copying to your assets directory using relative paths by default (configurable per project/collection).
  • Field constraints (min/max, character limits) enforced in the UI.

MDX Components

  • Cmd + / opens component builder showing all components in your src/components/mdx/ directory.
  • Supports Astro, React, Vue, and Svelte components.
  • Automatically detects available props and lets you tab through values after insertion.

File Management

  • Collections and files automatically discovered from your content.config.ts.
  • Full support for subdirectories within collections.
  • Files sorted by publication date (configurable field name) with draft indicators.
  • Context menu for rename, duplicate, reveal in Finder, copy path.
  • Command palette (Cmd + P) for quick file switching and command access.

Project Configuration

  • Per-project and per-collection settings for custom directory structures.
  • Configurable field mappings (title, date, draft, description fields).
  • Light/dark theme with system integration.
  • IDE integration (open files/projects in VSCode, Cursor, etc.).

Supported Astro Projects

  • Astro Version: 5.x (may work with 4.x but expect bugs)
  • Content Collections: Must use the glob loader and have a schema defined with defineCollection
  • Configuration: Requires src/content/config.ts or src/content.config.ts

Non-markdown/MDX files in collections are ignored.

Default directory structure (all paths are configurable per project and per collection):

my-astro-site
└── src
    ├── assets/mycollection/      # Images and media
    ├── components/mdx/            # Astro/React/Vue/Svelte components for MDX
    ├── content/mycollection/      # Markdown and MDX files
    └── content.config.ts          # Collection definitions

Installation

Download the latest Release or install with Homebrew:

brew install --cask astro-editor

Other Platforms: Windows (.msi) and Linux (.AppImage, .deb) builds are available from the releases page but are not officially supported yet. Use at your own risk.

Documentation

Disclaimer

Work in progress. Commit your Astro project regularly when using the editor.

Contributing

Bug reports and feature requests are welcome. See the issue tracker.

Project Philosophy:

  • This is a tool for "writer mode", not "coder mode". Features related to git, publishing, deployment, or code editing are out of scope.
  • The UI is intentionally opinionated for simplicity. Customization options are limited to what's needed to work with different Astro project structures.

Pull requests welcome. See CONTRIBUTING.md for development setup.

Roadmap

See the GitHub Project

Credits

Development

See CONTRIBUTING.md and developer docs for setup and architecture details.

Quick start:

pnpm install
pnpm reset:testdata  # Creates test Astro project
pnpm run tauri:dev   # Starts dev server

Development commands:

pnpm run check:all       # Run all checks (TypeScript, Rust, tests)
pnpm run fix:all         # Auto-fix linting/formatting issues
pnpm task:complete <name> # Mark a task as complete (see docs/TASKS.md)

Extension points exported contracts — how you extend this code

ButtonProps (Interface)
(no doc)
test/dummy-astro-project/src/components/mdx/Button.tsx
ButtonProps (Interface)
(no doc)
test/demo-project/src/components/mdx/Button.tsx
BaseComponentProps (Interface)
(no doc)
src/types/common.ts
FileItemProps (Interface)
(no doc)
src/components/layout/FileItem.tsx
RustToastEvent (Interface)
(no doc)
src/lib/rust-toast-bridge.ts
ProjectState (Interface)
(no doc)
src/store/projectStore.ts
FileChangeEvent (Interface)
(no doc)
src/hooks/useFileChangeHandler.ts
HighlightOptions (Interface)
(no doc)
website/src/components/aedemo/highlight.ts

Core symbols most depended-on inside this repo

cn
called by 195
src/lib/utils.ts
renderWithProviders
called by 83
src/test/test-utils.tsx
valueToString
called by 46
src/components/frontmatter/utils.ts
parseIsoDate
called by 37
src/lib/dates.ts
deserializeCompleteSchema
called by 37
src/lib/schema.ts
parse_frontmatter
called by 30
src-tauri/src/commands/files.rs
isImageUrl
called by 29
src/lib/editor/urls/detection.ts
parse_json_schema
called by 28
src-tauri/src/schema_merger.rs

Shape

Function 1,064
Interface 104
Method 54
Class 44
Enum 7

Languages

TypeScript65%
Rust35%

Modules by API surface

src-tauri/src/commands/files.rs112 symbols
src-tauri/src/schema_merger.rs63 symbols
src-tauri/src/commands/mdx_components.rs57 symbols
src-tauri/src/parser.rs54 symbols
src/lib/bindings.ts46 symbols
src-tauri/src/commands/project.rs39 symbols
src-tauri/src/commands/updater.rs27 symbols
src/components/ui/sidebar.tsx25 symbols
src-tauri/src/utils/path.rs18 symbols
src/components/ui/dropdown-menu.tsx15 symbols
src/lib/editor/extensions/copyedit-mode/extension.ts14 symbols
src-tauri/src/commands/ide.rs14 symbols

For agents

$ claude mcp add astro-editor \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page