Skip to content

xlsama/vellum

Repository files navigation

Vellum

A local-first, Typora-style, Git-friendly Markdown editor (Tauri 2 + React).

CLI: md

安装应用后,可以在终端使用 md 命令快速打开内容:

md README.md          # 打开单个 Markdown 文件
md ./posts            # 打开目录作为 workspace
md screenshot.png     # 打开图片
md                    # 仅启动应用

应用已运行时会复用现有窗口(聚焦并打开新 tab / 切 root),不会启动多实例。

安装到 PATH

打开 Vellum → 设置 → 命令行 → 点「安装」按钮。各平台行为:

  • macOS:在 /usr/local/bin/md 创建符号链接,指向 Vellum.app/Contents/Resources/resources/bin/md。无写权限时会通过 osascript 弹出系统授权对话框。
  • Linux:在 ~/.local/bin/md 创建符号链接。需确保 ~/.local/bin 已加入 PATH。
  • Windows:把 md.cmd 拷到 %LOCALAPPDATA%\Vellum\bin\,并通过 setx 把该目录加入用户 PATH。安装后需重启终端。

卸载

直接删除符号链接 / md.cmd 即可:

# macOS / Linux
rm /usr/local/bin/md          # 或 rm ~/.local/bin/md

# Windows (PowerShell)
del "$env:LOCALAPPDATA\Vellum\bin\md.cmd"

开发

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors