PlainMote CLI v0.4.5
在終端機中檢視、編輯和上傳資源。編輯時使用你自己的編輯器(Zed、VS Code、Vim 等),關閉後自動上傳為新版本。
安裝
macOS / Linux
$ curl -fsSL https://plainmote.link/cli/zh | sh
Windows (PowerShell)
> irm https://plainmote.link/cli/zh.ps1 | iex
安裝指令碼會識別處理器架構,校驗 SHA-256 後安裝到目前使用者目錄,不需要系統管理員權限。
其他系統與手動下載
先檢視指令碼再安裝
$ curl -fsSL https://plainmote.link/cli/zh | less
手動下載
macOS arm645.82 MiB
macOS amd646.24 MiB
Linux amd646.15 MiB
Linux arm645.75 MiB
Windows amd646.40 MiB
Windows arm645.85 MiB
這些檔案沒有經過程式碼簽署:在 macOS 上透過瀏覽器下載後,需先執行 xattr -d com.apple.quarantine plainmote;在 Windows 上需在 SmartScreen 提示中確認。使用安裝指令不受影響。校驗和: checksums.txt
開始使用
- plainmote login
- 在瀏覽器中確認後登入這台裝置
- plainmote ls [關鍵字] [--tag <標籤>] [--decrypt]
- 列出資源
- plainmote edit <資源>
- 用你的編輯器開啟,關閉後上傳為新版本
- plainmote cat <資源>
- 輸出內容
- plainmote push <檔案> [--to <資源>] [--tag <標籤>] [--encrypt]
- 上傳為新資源,或作為既有資源的新版本;檔案為 - 時讀取標準輸入
- plainmote tag <資源> <標籤>…
- 為資源加上標籤
- plainmote untag <資源> <標籤>…
- 移除資源的標籤
- plainmote tags
- 列出帳號的所有標籤
- plainmote share <檔案> [--ttl 1d] [--encrypt]
- 建立快速分享並輸出連結,到期前保存在我的資源中
- plainmote config
- 檢視設定;用 config language zh|en|auto 或 config editor <命令> 修改
- plainmote logout
- 撤銷並刪除這台裝置上的登入
小提示
如需指定 plainmote edit 使用的編輯器,可在 shell 設定檔(如 ~/.zshrc、~/.bashrc)中設定環境變數 EDITOR:
$ export EDITOR="code"
Windows 下可在 PowerShell 中為目前使用者設定環境變數 EDITOR,重新開啟終端機後生效:
> [Environment]::SetEnvironmentVariable("EDITOR", "code", "User")
若同時設定了 $VISUAL,則優先使用 $VISUAL。VS Code、Zed、Sublime Text 等圖形介面編輯器無需加上 --wait 參數,命令列會自動加上。如需僅為 PlainMote 指定編輯器,可執行 plainmote config editor <命令>,該設定優先於上述兩個環境變數。
端對端加密資源在本機解密和加密。開啟加密資源的命令每次都會詢問主密碼,也可從環境變數 PLAINMOTE_MASTER_PASSWORD 讀取;命令列不儲存主密碼。ls 加上 --decrypt 才顯示其名稱;push --encrypt 和 share --encrypt 新建加密的資源或快速分享。