{"id":44416133,"url":"https://github.com/leeguooooo/paste","last_synced_at":"2026-05-13T03:01:02.573Z","repository":{"id":337966051,"uuid":"1155907638","full_name":"leeguooooo/paste","owner":"leeguooooo","description":"Open-source, free Paste.app alternative. Local-first macOS clipboard manager + optional Cloudflare sync.","archived":false,"fork":false,"pushed_at":"2026-05-13T01:31:42.000Z","size":6687,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-13T02:35:09.756Z","etag":null,"topics":["clipboard-history","clipboard-manager","cloudflare-pages","cloudflare-workers","d1","electron","local-first","macos","open-source","paste-alternative","pwa"],"latest_commit_sha":null,"homepage":"https://app.misonote.com/paste","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leeguooooo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["leeguooooo"],"custom":["https://github.com/leeguooooo/paste/blob/main/.github/wechatpay.JPG","https://github.com/leeguooooo/paste/blob/main/.github/alipay.JPG"]}},"created_at":"2026-02-12T03:21:19.000Z","updated_at":"2026-05-13T01:31:43.000Z","dependencies_parsed_at":"2026-02-12T16:03:43.954Z","dependency_job_id":null,"html_url":"https://github.com/leeguooooo/paste","commit_stats":null,"previous_names":["leeguooooo/paste"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/leeguooooo/paste","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leeguooooo%2Fpaste","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leeguooooo%2Fpaste/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leeguooooo%2Fpaste/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leeguooooo%2Fpaste/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leeguooooo","download_url":"https://codeload.github.com/leeguooooo/paste/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leeguooooo%2Fpaste/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32965783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"online","status_checked_at":"2026-05-13T02:00:07.132Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clipboard-history","clipboard-manager","cloudflare-pages","cloudflare-workers","d1","electron","local-first","macos","open-source","paste-alternative","pwa"],"created_at":"2026-02-12T08:26:01.153Z","updated_at":"2026-05-13T03:01:02.567Z","avatar_url":"https://github.com/leeguooooo.png","language":"TypeScript","funding_links":["https://github.com/sponsors/leeguooooo","https://github.com/leeguooooo/paste/blob/main/.github/wechatpay.JPG","https://github.com/leeguooooo/paste/blob/main/.github/alipay.JPG"],"categories":[],"sub_categories":[],"readme":"# Pastyx\n\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/leeguooooo?logo=github)](https://github.com/sponsors/leeguooooo)\n\nOpen-source, free clipboard utility toolkit.\n\n中文提示：这是一个独立的开源工具，用于剪贴板历史、截图和录屏。\n免费可用、代码透明，还支持按需自建同步服务。\n我们与官方无隶属关系。\n我们不是 pasteapp，不是 paste 的盗版，且是专注开源的 Pastyx。\nEnglish note: This is an independent open-source project. We are not pasteapp, not a pirated copy of Paste, and we are Pastyx, focused on open-source development.\n\nPastyx is a local-first clipboard toolkit for macOS (clipboard history, screenshot, and screen recording), with an optional Cloudflare backend for cross-device sync.\n\n- macOS: tray app, no main window, quick panel\n- Local-first: no URL required; empty URL means local-only (no remote sync)\n- Optional sync: Cloudflare Workers + D1 (and R2 later for large blobs)\n\n## Quick Start\n\n1. Download the latest build from GitHub Releases (macOS `x64` / `arm64`).\n2. Open app, use the global hotkey to show the quick panel.\n3. Optional: configure `API Base` to enable cross-device sync.\n\n## macOS Notes\n\n- Auto-paste requires **Accessibility** permission (because we simulate `Cmd+V`).\n  - Dev mode: enable Accessibility for `Electron`.\n- Release build: enable Accessibility for `Pastyx`.\n- Builds are **unsigned / not notarized** for now.\n  - `v0.1.3+` adds a minimal ad-hoc signature to avoid the common “App is damaged” error.\n  - For a polished distribution, add Apple Developer ID signing + notarization.\n\n## Screenshot\n\n\u003cimg width=\"3560\" height=\"2336\" alt=\"CleanShot 2026-02-12 at 15 31 49@2x\" src=\"https://github.com/user-attachments/assets/30fa4f63-c7d8-454a-a7a2-fb2989e1646d\" /\u003e\n\n## Architecture\n\n```mermaid\ngraph TD\n  subgraph Clients\n    Mac[\"macOS Tray App (Electron, local-first)\"]\n    Web[\"Web / PWA (Cloudflare Pages)\"]\n    IOS[\"iOS (planned)\"]\n  end\n\n  subgraph Cloudflare\n    API[\"Workers API (/v1/*)\"]\n    D1[(\"D1 (metadata + small payloads)\")]\n    KV[(\"KV (cache)\")]\n    R2[(\"R2 (large blobs, planned)\")]\n  end\n\n  Mac --\u003e|optional sync| API\n  Web --\u003e API\n  IOS --\u003e API\n\n  API --\u003e D1\n  API -. optional .-\u003e KV\n  API -. planned .-\u003e R2\n```\n\n```mermaid\nflowchart LR\n  C[\"Clipboard Change\"] --\u003e P[\"Build Payload (text/link/html/image)\"]\n  P --\u003e D{\"apiBase configured?\"}\n\n  D -- \"No\" --\u003e L[\"Local JSON DB (retention + keep favorites)\"]\n  D -- \"Yes\" --\u003e R[\"Remote API (Workers + D1)\"]\n\n  L --\u003e UI[\"Quick Clip UI\"]\n  R --\u003e UI\n\n  UI --\u003e Copy[\"Copy back to clipboard, hide, and auto-paste\"]\n```\n\n## Keywords / 关键词\n\nThese are here for discovery (GitHub + search engines):\n\n- clipboard alternative\n- independent clipboard toolkit alternative\n- open clip toolkit\n- open source clipboard manager\n- clipboard history\n- clipboard manager macOS\n- clipboard sync\n- snippets\n- tag/favorite/search clipboard\n- PWA clipboard manager\n- Cloudflare Workers clipboard\n\n中文关键词：\n\n- 开源工具替代方案\n- 剪贴板管理器\n- 剪贴板历史\n- macOS 剪贴板工具\n- 多设备同步\n- 标签 / 收藏 / 搜索\n- 开源剪贴板工具\n- Open toolkit\n- 破解类工具替代方案\n- 第三方替代品说明（非官方）\n\n## Features\n\n- Types: `text` / `link` / `html` / `image`\n- macOS:\n- Tray app; Quick panel (no main window)\n  - Select a clip to copy, hide, and auto-paste back to your previous app\n  - Local-first retention: `30d` / `180d` / `365d` / `forever` (favorites are kept)\n- Sync (optional): Cloudflare Workers + D1\n  - Search, favorites, tags\n  - Multi-device sync via `clientUpdatedAt` (LWW)\n\n## Repo Structure\n\n```txt\napps/\n  api/          # Cloudflare Worker API\n  web/          # Cloudflare Pages frontend\n  macos/        # Electron macOS desktop app (clipboard, screenshot, recording)\npackages/\n  shared/       # Shared types/contracts\ndocs/\n  architecture.md\n  todo-roadmap.md\n```\n\n## Local Development\n\nCreate D1 once:\n\n```bash\ncd apps/api\nwrangler d1 create paste-db\n# Fill database_id back into apps/api/wrangler.toml\nwrangler d1 migrations apply paste-db --local\ncd ../..\n```\n\nOptional KV cache:\n\n```toml\n# apps/api/wrangler.toml\n[[kv_namespaces]]\nbinding = \"CACHE\"\nid = \"\u003cyour-kv-namespace-id\u003e\"\n```\n\nCloudflare SSO auth (Web):\n\n```toml\n[vars]\n# Recommended production mode.\nAUTH_MODE = \"sso\"\nSSO_ISSUER = \"https://account.misonote.com\"\nSSO_CLIENT_ID = \"misonote-paste-web\"\n# Optional tenant entitlement check:\n# SSO_ENTITLEMENT_TENANT_ID = \"tenant-misonote\"\n# SSO_REQUIRED_ENTITLEMENT_KEY = \"membership.all_apps\"\n\n# Legacy header mode on/off. Keep \"0\" in production.\nALLOW_HEADER_IDENTITY = \"0\"\n```\n\nWeb app env (optional, recommended to set explicitly):\n\n```bash\n# apps/web/.env.local\nVITE_SSO_ISSUER=https://account.misonote.com\nVITE_SSO_CLIENT_ID=misonote-paste-web\n# Fixed callback allowlist path used by web:\n# https://app.misonote.com/paste/auth/callback\n# https://paste.misonote.com/auth/callback\n```\n\nApp portal subpath build (`https://app.misonote.com/paste`):\n\n```bash\n# apps/web subpath config\nPASTE_SITE_URL=https://app.misonote.com/paste\nVITE_PORTAL_HOME_URL=/\nVITE_BASE_PATH=/paste/\nVITE_API_BASE=/paste/v1\nVITE_SSO_REDIRECT_PATH=/paste/auth/callback\nVITE_SSO_POST_AUTH_PATH=/paste/\n```\n\nBuild command for portal subpath:\n\n```bash\ncd apps/web\nnpm run build:app-subpath\n```\n\nClient split (recommended):\n\n- Web: `misonote-paste-web`\n- macOS: `misonote-paste-macos`\n- Do not reuse one `client_id` across web and desktop loopback callbacks.\n\nRun dev:\n\n```bash\nnpm install\nnpm run dev:api\nnpm run dev:web\nnpm run dev:macos\n```\n\nAPI smoke test:\n\n```bash\nnpm run test:api:smoke\n```\n\n## Sync Setup (macOS)\n\nBy default `API Base` is empty, so the app is **local-only**.\n\nTo enable sync, set `API Base` to one of:\n\n- `https://app.misonote.com/paste/v1` (portal proxy route)\n- `https://pasteapi.misonote.com/v1` (direct Worker domain)\n\nThen keep `User ID` consistent across devices.\n\nDesktop SSO env (optional):\n\n```bash\n# apps/macos/.env.local\nPASTE_SSO_ISSUER=https://account.misonote.com\nPASTE_SSO_CLIENT_ID=misonote-paste-macos\n```\n\n## API\n\nWeb auth endpoints:\n\n- `POST /v1/auth/sso/token` (exchange authorization code/refresh token with SSO issuer)\n- `GET /v1/auth/me` (current session)\n- `POST /v1/auth/logout` (clear local auth state/cookies)\n\nIdentity for business APIs:\n\n- Web (signed-in): `Authorization: Bearer \u003cSSO access token\u003e` + `x-device-id`\n- Legacy mode only: `x-user-id` + `x-device-id` headers\n\nEndpoints:\n\n- `GET /v1/health`\n- `GET /v1/clips` (supports `q`, `tag`, `favorite`, `cursor`, `limit`, `lite=1`)\n- `GET /v1/clips/:id`\n- `POST /v1/clips`\n- `PATCH /v1/clips/:id`\n- `DELETE /v1/clips/:id` (soft delete)\n- `GET /v1/tags`\n- `POST /v1/tags`\n- `DELETE /v1/tags/:id`\n- `GET /v1/sync/pull?since=...\u0026limit=...`\n- `POST /v1/sync/push` (LWW by `clientUpdatedAt`)\n\nNotes:\n\n- `lite=1` makes list responses omit heavy fields (HTML/image) for faster browsing.\n- Images currently use `imageDataUrl` stored in D1 (max ~1_500_000 chars). Larger blobs will move to R2.\n\nExample:\n\n```bash\ncurl -X POST http://127.0.0.1:8787/v1/clips \\\n  -H 'content-type: application/json' \\\n  -H 'x-user-id: u_demo' \\\n  -H 'x-device-id: mac_01' \\\n  -d '{\n    \"type\":\"text\",\n    \"content\":\"hello paste\",\n    \"tags\":[\"work\",\"snippet\"],\n    \"isFavorite\":true\n  }'\n```\n\n## Deploy\n\n```bash\nnpm run deploy\n# same as:\nnpm run deploy:prod\n# or deploy individually:\nnpm run deploy:api\nnpm run deploy:web\nnpm run deploy:landing\n```\n\nFor forks: `apps/api/wrangler.toml` includes `misonote.com` routes. Replace them with your own domain/routes (or remove `routes` to use `*.workers.dev`).\n\n## Docs\n\n- Architecture: `docs/architecture.md`\n- Roadmap: `docs/todo-roadmap.md`\n- API contract: `docs/api-contract.md`\n- Frontend handoff: `docs/frontend-handoff.md`\n- macOS roadmap: `docs/macos-roadmap.md`\n\n## Trademark Note\n\nThis project is an independent, open-source toolkit. 我们与官方无隶属关系。\nWe are not affiliated with any official clipboard vendor.\n\n## Support / 赞助开发\n\n开源不易。如果这个项目对你有帮助，欢迎 Star 或赞助支持作者继续维护。\n\n- GitHub Sponsors: https://github.com/sponsors/leeguooooo\n- 微信 / 支付宝赞赏码见下方\n\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/leeguooooo?style=for-the-badge\u0026logo=github)](https://github.com/sponsors/leeguooooo)\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\".github/wechatpay.JPG\" alt=\"微信赞赏码\" width=\"300\" /\u003e\n  \u003cimg src=\".github/alipay.JPG\" alt=\"支付宝收款码\" width=\"300\" /\u003e\n\u003c/div\u003e\n\n## Release\n\nThis repo uses GitHub Releases.\n\n- Tag format: `vX.Y.Z` (example: `v0.1.8`)\n- GitHub Actions will build:\n  - macOS Intel (x64): `.dmg` + `.zip`\n  - macOS Apple Silicon (arm64): `.dmg` + `.zip`\n  - Windows (x64): installer `.exe` + `.zip`\n- Auto-update metadata (for `electron-updater`): `latest*.yml` + `*.blockmap`\n\nCreate a release:\n\n```bash\ngit tag -a v0.1.9 -m \"v0.1.9\"\ngit push origin v0.1.9\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleeguooooo%2Fpaste","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleeguooooo%2Fpaste","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleeguooooo%2Fpaste/lists"}