Skip to content
프로젝트

소개

⛰️ Your clipboard and its history on all your devices: a Mac menu-bar app, a daemon for Linux and Windows, iPhone Shortcuts, and a self-hosted relay that keeps no copies

생산성 및 자동화

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+2
in 15 days
+2
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

midgard midgard Go Reference visitors

English | 中文

A flight's details, copied on a Mac, show up at the top of Midgard's menu bar window, pass the server sealed, and arrive on an iPhone

midgard keeps your clipboard the same on all your devices: copy on one, paste on another, and find what you copied yesterday on any of them. Turn a copy or a file into a link to share. Your copies are encrypted end to end: the server passes them between your devices and cannot read them. It runs on a server you own, for the people you let sign in, on macOS, Linux and Windows, and on phones through the web page.

How it works

flowchart LR
    subgraph you["Your computers: where copies live"]
        A["Laptop<br/>midgard · history"]
        B["Desktop<br/>midgard · history"]
    end
    subgraph other["Other ways in"]
        W["Web page · phone"]
        C["mg · agents"]
    end
    R["Your midgard server<br/>relays and orders sealed copies,<br/>keeps none, reads none"]
    A <-->|sealed| R
    B <-->|sealed| R
    W <-->|sealed| R
    C <-->|sealed| R
  • Your copies stay on your devices. Each device keeps the history, the same list in the same order on every one.
  • The server keeps none of them. It passes each copy from one of your devices to the others, numbering them so every device agrees on the order, and holds a copy in memory only until each device has it: one that was off gets it when it comes back.
  • The server cannot read them. Your devices encrypt every copy with a key they share, which the first of them makes; you give it to each other one by pairing, with a code or a QR.
  • Only you see your clipboard. Everyone signs in through auth.latere.ai, the server lets in the people on its allowlist, and each reaches only their own.

How midgard works explains it in full: what is kept where, what happens while a device is away or the server restarts, and what the server can see.

What it looks like

The Mac app's history window: copies from this Mac, an iPhone and a Linux desktop, and the newest shown whole

Midgard's window in the Mac's menu bar: recent copies to put back The web page on an iPhone: the clipboard and the history, encrypted

On a Mac, midgard lives in the menu bar, and its window has the whole history. On a phone, or in any browser, the web page does the same, and encrypts as the apps do.

Quick start

1. The server. On a machine with a public address:

$ cp config.example.yml config.yml   # set domain
$ cp .env.template .env              # set AUTH_ALLOWED_PRINCIPALS: who may sign in
$ make build && make up              # or run: mg server

docker-compose.yml joins an existing traefik network; see Installation to put midgard behind your own reverse proxy.

2. A Mac. Download the app from your server's web page, Download for Mac (for changkun.de's, here), or build it with make mac. It asks for your server, signs you in, and lives in the menu bar: recent copies to put back, the history in a window, Ctrl+Option+S to share the clipboard at a link. It replaces mg daemon on a Mac; see the Midgard app.

3. Linux, Windows, or a Mac without the app. Download mg from the releases (or go install changkun.de/x/midgard@latest, which names it midgard), then put this in ~/.config/midgard/config.yml on Linux, ~/Library/Application Support/midgard/config.yml on macOS, or %AppData%\midgard\config.yml on Windows:

domain: example.com   # or http://your-server:8456
$ mg login            # sign in through auth.latere.ai, once
$ mg daemon install   # as yourself, no sudo
$ mg daemon start
$ mg status
server status: OK
daemon status: OK

If another of your devices connected first, pair this one with it: show a code on that one (the Mac app's Settings, Encryption, or mg pair), then mg pair <code> here. See Pairing a Device.

A device that cannot open a browser to sign in can use an app token instead: mg server token add <name> --owner <you> on the server (see Usage).

Now copy something on one device and paste it on another. mg share turns the clipboard, or a file, into a link; see Usage.

Docs

Contributes

Easiest way to contribute is to provide feedback! I would love to hear what you like and what you think is missing. Issue and PRs are also welcome.

Acknowledgment

The author of this project would like to thank Wen Yang and Quancheng Rao for their inspiring discussion and testing in the early stage of the midgard.

License

Copyright 2020-2021 Changkun Ou. All rights reserved.

관련 프로젝트 살펴보기

불러오는 중…