ca971/dotfiles
GitHub: ca971/dotfiles
这是一个基于 SSOT 架构的企业级 dotfiles 框架,通过 TOML 配置为多种 Shell 和平台生成统一且安全加固的开发环境。
Stars: 0 | Forks: 0
# 🔧 Dotfiles
**跨平台 · 跨 Shell · SSOT 架构 · 安全加固 ·
面向高级用户**
一个精心设计、生产就绪的 dotfiles 框架,基于单一事实来源 (Single Source of Truth) 原则构建,旨在在所有平台和 Shell 上实现最大的一致性、安全性和可维护性。
[](#-cross-shell-support) [](#-cross-platform-support) [](./LICENSE) [](#-integrated-tools) [](#-terminal--editor-management) [](#-performance) [](#-starship-themes) [](#-security) [](#-ssot-architecture) [](https://github.com/ca971/dotfiles)
[功能特性](#-key-features) • [安装](#-installation) • [架构](#-architecture) • [CLI](#-dot-cli) • [工具](#-integrated-tools) • [安全](#-security) • [Wiki](https://github.com/ca971/dotfiles/wiki)
## 📑 目录
[](#-cross-shell-support) [](#-cross-platform-support) [](./LICENSE) [](#-integrated-tools) [](#-terminal--editor-management) [](#-performance) [](#-starship-themes) [](#-security) [](#-ssot-architecture) [](https://github.com/ca971/dotfiles)
[功能特性](#-key-features) • [安装](#-installation) • [架构](#-architecture) • [CLI](#-dot-cli) • [工具](#-integrated-tools) • [安全](#-security) • [Wiki](https://github.com/ca971/dotfiles/wiki)
点击展开
- [💎 企业级优势](#-the-enterprise-edge) - [✨ 核心理念](#-core-philosophy) - [🚀 主要特性](#-key-features) - [🌍 跨平台支持](#-cross-platform-support) - [🐚 跨 Shell 支持](#-cross-shell-support) - [📦 环境需求](#-requirements) - [🔧 安装](#-installation) - [📐 架构](#-architecture) - [🎯 SSOT 架构](#-ssot-architecture) - [🔧 dot CLI](#-dot-cli) - [🎨 Starship 主题](#-starship-themes) - [🛠️ 集成工具](#-integrated-tools) - [🔐 安全性](#-security) - [🔑 SSH 管理](#-ssh-management) - [📝 Git 集成](#-git-integration) - [⚡ 性能](#-performance) - [🧪 测试](#-testing) - [📄 许可证](#-license)| ### 🎯 SSOT 架构 - **TOML → 4 个 Shell**:别名、颜色、图标、高亮 - 生成器将 TOML 转换为 ZSH、Bash、Fish、Nushell - 修改一次 → 重新生成 → 所有 Shell 更新 - `config/tools.d/` 用于特定工具定制 - `ssot/aliases.toml` 用于通用 Shell 别名 | ### 🐚 多 Shell 支持 - **ZSH** — 功能齐全,含 Zinit 插件和补全 - **Bash** — 轻量级,加载共享环境变量 + SSOT 别名 - **Fish** — 原生缩写、FZF 集成 - **Nushell** — 结构化数据、自定义命令 - 通过 `shells/shared/env.sh` 共享环境变量 |
| ### 🔐 安全优先 - 模块化 SSH 配置 (`config.d/`),附带加固默认值 - 动态密钥管理 — 自动发现所有 `id_*` - macOS Keychain 集成 — 静默密码短语 - GPG 集成 — agent、签名、密钥管理 - Git 提交签名(SSH 密钥,兼容 GitHub) - 加密密钥备份 (age/GPG) - `ssh-audit` 安全健康检查 | ### 🛠️ 60+ 工具集成 - 每个工具:`tools/TOOL.zsh` (代码) + `config/tools.d/TOOL.zsh` (配置) - 自动设置:克隆仓库、创建符号链接、生成配置 - 条件加载:未安装工具 = 不加载任何内容 - 无处不在的 FZF 集成 — 交互式选择 - `dot` CLI — 统一管理界面 |
| ### 🎨 Starship 提示符 — 3 个主题 - **Powerline** — 功能齐全,工作站默认 - **Minimal** — 简洁,适用于 SSH/Docker/远程 - **Nerd** — 信息量最大,适用于 VPS/Proxmox/K8s - 基于上下文(SSH、容器、VPS)自动选择 - 运行时切换:`dot theme minimal` | ### 📦 自动克隆配置 - **nvim-enterprise** → `~/.config/nvim` - **wezterm-enterprise** → `~/.config/wezterm` - **ghostty-config** → `~/.config/ghostty` - **git-templates** → `dotfiles/config/git/git-templates` - 每次启动 Shell 时在后台更新 |