Skip to main content

EgorovSystem

在不同设备之间同步变量、密钥和常用命令的小工具。v1 是端到端加密的:服务器、Cloudflare 和数据库里都只有密文。

from egorovsystem import Egorov

openai_key = Egorov["openai_keys"]
EGO deploy_blog          # 运行保存在服务器上的命令

工作方式

  • 服务器只保存密文。变量的值、函数内容、备注和主密码都不会以明文出现在服务器上。
  • 管理后台在浏览器里加密和解密,主密码从不发给服务器。界面是深色学院风,支持两步验证、审计日志和密钥轮换。
  • 每台设备有自己的令牌,可以限定能读哪些条目,可以随时停用或吊销。
  • 部署推荐用 Cloudflare Tunnel:服务器不开放任何入站端口,egoserver 只监听本机。

细节见 docs/PROTOCOL.md。

快速开始

服务器

在一台 Debian 或 Ubuntu 服务器上:

curl -fsSLO https://raw.githubusercontent.com/FFTYYY/EgorovSystem/main/deploy/install-server.sh
sudo TUNNEL_TOKEN='eyJ...' ENABLE_FIREWALL=1 bash install-server.sh

完整步骤和 Cloudflare 的安全设置见 docs/DEPLOY.md。

客户端

pip install -U egorovsystem

没有 Python 的机器可以用安装脚本,它会通过 uv 自动下载 Python:

sh deploy/install-client.sh                                  # macOS / Linux
powershell -ExecutionPolicy Bypass -File deploy/install-client.ps1   # Windows

然后在后台“设备”页创建令牌,并配置:

export EGOROV_SERVER=egorov.example.com
export EGOROV_PWD='ego1....'
EGO --whoami

不想把令牌放进环境变量时,运行一次 egolocal-run。之后同一台机器上的程序会通过它读取。

用法

写法 作用
Egorov["name"] 读取变量;没有这个变量时返回同名函数
get_variable("name") 读取变量
get_function("name") 返回 {"type", "content", "note"},${变量} 已替换
set_variable("name", "value") 在当前进程里覆盖一个变量,方便测试
EGO name [参数…] 运行函数,参数会传给命令,返回命令的退出码
EGO --show name / --list / --whoami 查看函数内容、列出可读条目、查看本机设备
egolocal-run [--port 11451] 启动本机代理

函数里可以用 ${变量名} 引用变量,客户端在运行前替换。不存在的名字原样保留,所以 ${HOME} 这类 shell 写法不受影响。

python 类型的函数用运行 EGO 的同一个解释器执行。如果脚本带有 PEP 723 依赖声明,并且机器上装了 uv,就用 uv run 执行,依赖会自动安装。

服务器命令

命令 作用
egoserver-init 创建管理员和保险库,打印恢复密钥
egoserver-run 启动服务器,默认 127.0.0.1:7999
egoserver-admin info 查看状态
egoserver-admin backup <目录> --keep 14 备份数据库,数据库本身已加密
egoserver-admin reset-password 用恢复密钥重置主密码
egoserver-admin disable-totp 关闭两步验证
egoserver-admin import-legacy <旧库> 导入 v0 的数据

从旧版升级

见 docs/MIGRATION.md。旧客户端在服务器升级后会收到明确的升级提示。

开发

python -m venv .venv
.venv/bin/pip install -e ".[server,dev]"
.venv/bin/pytest

tests/test_crypto_interop.py 用 Node 运行浏览器端的加密代码,与 Python 实现逐字节比对。没装 Node 时这个测试会跳过。

许可

MIT。管理后台自带的字体使用 SIL Open Font License,许可证随字体文件一起分发。

Metadata

Release files for egorovsystem 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for egorovsystem 1.0.0
File Size Uploaded Provenance Actions
egorovsystem-1.0.0.tar.gz 331.7 kB Without provenance Details for egorovsystem-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for egorovsystem 1.0.0
File Interpreter ABI Platform Actions
egorovsystem-1.0.0-py3-none-any.whl Python 3 none any Details for egorovsystem-1.0.0-py3-none-any.whl

Total release size: 666.9 kB

Release files / egorovsystem-1.0.0.tar.gz

Download URL egorovsystem-1.0.0.tar.gz
Size 331.7 kB
Tags Source
SHA-256 checksum
How to use checksums
18331143080db37fd783f0072109b5ee7ce57a6b56eb635c2438557ad053d951
BLAKE2b-256 checksum
How to use checksums
ba539380b4cab99fd161449bbf1b37ffdaae4ea366b0738578a2c800bec8e682
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / egorovsystem-1.0.0-py3-none-any.whl

Download URL egorovsystem-1.0.0-py3-none-any.whl
Size 335.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c132c5f54faf830bc7d1fa481803a64fb8d3f8d09d7954c5e6ab10004c3d6d68
BLAKE2b-256 checksum
How to use checksums
e6f45a5c10ba41d8a802721c755daa0a681c0c4af989a33862741de074a998f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for egorovsystem 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page