← 全部工具

Di-kairos/ghostdraft

热度 65 更新于 开发与构建

View or draft sensitive text leaving no copy in the usual places. macOS, pure Bash, zero deps.

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

📦 Moved: development continues in the paranoid-tools monorepo (ghostdraft/ directory, full history preserved). This repository is archived: its published releases stay downloadable and the installers keep working, but new issues, PRs and releases happen in the monorepo.

English · Русский

ghostdraft

Ephemeral scratchpad for sensitive text — part of the Paranoid Tools ecosystem.

Write or view a seed phrase, password or key so that once you close it, no copy is left in the usual places (~/.history, tmp, recent docs, editor backups/viminfo).

Status: early (v0.1.18). pipe (view without writing to disk) and new (a draft in an open vault / RAM disk → $EDITOR → shred + clean editor traces on exit) are ready, including the optional --clipboard (dangerous, gated behind confirmation + auto-clear).

Install

Checksum-verified install from the release tag — verify-then-run (don't trust, verify). Piping a script into a shell means running code you haven't read, so prefer this:

base=https://github.com/Di-kairos/ghostdraft/releases/latest/download
curl -fsSLO "$base/install.sh"
curl -fsSLO "$base/SHA256SUMS"
curl -fsSLO "$base/SHA256SUMS.sig"
printf '%s\n' 'releases@paranoid-tools namespaces="file" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICb2nz4EliRJIU0ExeF41klE/zlyo7XFY119mfzscn2U' > allowed_signers
ssh-keygen -Y verify -f allowed_signers -I releases@paranoid-tools -n file -s SHA256SUMS.sig < SHA256SUMS &&   # authenticity: Ed25519, pinned key
shasum -a 256 -c SHA256SUMS --ignore-missing &&   # integrity: verifies install.sh
less install.sh &&                               # read it — then run:
bash install.sh                                  # pulls ghostdraft + checksum, verifies, installs

Quick form (if you already trust the source):

curl -fsSL https://github.com/Di-kairos/ghostdraft/releases/latest/download/install.sh | bash

install.sh pulls the binary and SHA256SUMS from the immutable release tag and verifies the hash before installing. Environment variables: GHOSTDRAFTVERSION (pin a specific tag instead of latest), GHOSTDRAFTDEST (install path), GHOSTDRAFTBASEURL (override the source for forks/tests).

Integrity vs authenticity (honest scope). The checksum proves the binary matches the SHA256SUMS from the same release — it catches corruption and stops you running code off the moving main branch. Authenticity comes from the Ed25519 signature over SHA256SUMS: the snippet above and install.sh both verify it against a key pinned in this repo, and the installer fails closed when it can't (see SECURITY.md). Residual risk: one project key signs all five tools — see the ecosystem threat model.

The current public release is v0.1.18 (signed, with install.sh + SHA256SUMS). Pin it for reproducibility with GHOSTDRAFTVERSION=0.1.18 instead of latest.

Usage

ghostdraft new             # ephemeral draft in an open vault / RAM disk
ghostdraft new --clipboard # + copy to clipboard, auto-clear after N s (DANGEROUS, see below)
pbpaste | ghostdraft pipe  # view from the clipboard, write NOTHING to disk
ghostdraft version         # show the version (also -v / --version)
ghostdraft --help          # help (also -h)

Exiting the default editor (vim). new opens vim (with a soft-wrap, no-.viminfo setup) when $EDITOR is unset. It opens ready to type — vim normally starts in normal mode, where letters are commands and your text goes nowhere. To leave it: Ctrl-D saves and exits, Ctrl-X exits without saving. Both work whether you are typing or not — you do not need Esc first, and an always-visible hint line repeats them. Esc → ZZ/ZQ and :wq / :q! still work for those who know vim; F2/F3 are mapped too, but some terminals (e.g. Warp) swallow them before vim sees them. Macro recording is switched off on purpose: a mistyped ZQ used to start it, and the editor then looked frozen.

Language. Messages are English by default. Set STLANG=ru (the ecosystem-shared locale variable, also honored by securetrash) — or a ru system locale — to switch output to Russian.