Metadata-Version: 2.4
Name: markdown-os
Version: 0.1.0
Summary: Developer-focused markdown editor served from a local CLI.
Project-URL: Homepage, https://github.com/elena-cabrera/markdown-os
Project-URL: Repository, https://github.com/elena-cabrera/markdown-os
Project-URL: Issues, https://github.com/elena-cabrera/markdown-os/issues
Author: Elena Cabrera
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: cli,developer-tools,editor,markdown,preview
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Environment :: Web Environment
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Text Editors
Classifier: Topic :: Text Processing :: Markup :: Markdown
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: fastapi>=0.129.0
Requires-Dist: python-multipart>=0.0.22
Requires-Dist: typer>=0.23.1
Requires-Dist: uvicorn[standard]>=0.40.0
Requires-Dist: watchdog>=6.0.0
Requires-Dist: websockets>=16.0
Description-Content-Type: text/markdown

# Markdown-OS

[![PyPI version](https://img.shields.io/pypi/v/markdown-os)](https://pypi.org/project/markdown-os/)

Markdown-OS is a local, developer-focused markdown editor served by FastAPI and launched from a Typer CLI.

## Quick Install

```bash
pip install markdown-os
```

Or install as a global tool with uv:

```bash
uv tool install markdown-os
```

Then run:

```bash
markdown-os open ./notes.md
```

## Read-first workflow

- Files open in `Preview` mode by default for safer browsing.
- Switch to `Edit` when you want to type.
- Switching from `Edit` to `Preview` auto-saves changes when there is no external conflict.
- If the file changed externally and you have unsaved edits, Markdown-OS shows a conflict dialog:
  - `Save My Changes` overwrites disk with your editor content.
  - `Discard My Changes` reloads content from disk.
  - `Cancel` keeps you in edit mode with unsaved changes intact.
- External file changes auto-reload without prompts when safe:
  - always in preview mode
  - in edit mode when there are no unsaved changes

## Install dependencies

```bash
uv sync
```

## Run

```bash
uv run markdown-os open ./notes.md
```

If port `8000` is occupied, Markdown-OS auto-selects the next available port.

## Theme toggle

- The editor detects your system color preference on first load.
- Use the sun/moon toggle in the top-right header to switch between light and dark themes.
- Manual selection is persisted in `localStorage` and restored on reload.

## Interactive task lists

- In `Preview`, markdown task list items (`- [ ]` and `- [x]`) are clickable.
- Clicking a checkbox updates markdown source immediately and auto-saves to disk.
- External-change conflicts use the same `Save My Changes` / `Discard My Changes` / `Cancel` flow.

## Generate a showcase file

```bash
# Create example.md in current directory
uv run markdown-os example

# Create at a custom location
uv run markdown-os example ./docs/showcase.md

# Generate and open immediately
uv run markdown-os example --open
```
