{"id":50430547,"url":"https://github.com/xynrin/linux-tool","last_synced_at":"2026-05-31T14:01:39.411Z","repository":{"id":339122139,"uuid":"1117645255","full_name":"Xynrin/linux-tool","owner":"Xynrin","description":"Linux工具集是一个开源的实用工具包，旨在为Linux用户提供便捷的系统管理和安全防护功能。通过简洁的一键安装脚本，您可以快速部署各种实用工具，提升Linux系统的便利性和安全性。","archived":false,"fork":false,"pushed_at":"2026-05-01T10:22:46.000Z","size":3164,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-01T11:33:09.491Z","etag":null,"topics":["gplv3","linux","shell","shell-script","tools"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xynrin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-16T15:55:43.000Z","updated_at":"2026-05-01T10:22:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Xynrin/linux-tool","commit_stats":null,"previous_names":["silentbyte-111/linux-tool","xynrin-111/linux-tool","xynrin/linux-tool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Xynrin/linux-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xynrin%2Flinux-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xynrin%2Flinux-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xynrin%2Flinux-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xynrin%2Flinux-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xynrin","download_url":"https://codeload.github.com/Xynrin/linux-tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xynrin%2Flinux-tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33733754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gplv3","linux","shell","shell-script","tools"],"created_at":"2026-05-31T14:01:38.570Z","updated_at":"2026-05-31T14:01:39.400Z","avatar_url":"https://github.com/Xynrin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\n# Linux Tool\n![logo](assets/logo.jpg)\n中文名：Linux 工具集\n\n让 Linux 折腾更简单。\n\nMake Linux tinkering easier.\n\nLinux Tool 是一个本地 Linux 终端工具中心。它使用 Bash + fzf 组织脚本工具，启动后自动扫描工具目录，并在右侧预览中展示工具说明、版本、作者、依赖、危险等级和文件路径。\n\n当前版本：`0.4.3`\n\n## 彩色 Logo\n\nLinux Tool 启动时会显示 `linux-tool` 彩色 Logo。程序会优先尝试使用 `npx oh-my-logo@latest \"linux-tool\" fire --filled` 生成效果；如果系统没有 `npx`、网络不可用或 oh-my-logo 执行失败，会自动降级到 `assets/logo.txt` 中的静态 ANSI Logo，不会影响程序启动。\n\nLogo 灵感来自 [oh-my-logo](https://github.com/nekomeowww/oh-my-logo)。\n\n## 功能特点\n\n- Bash + fzf TUI，本地终端内运行。\n- 自动扫描 `tool/*.sh`，新增工具不需要修改主菜单。\n- 右侧预览展示工具元信息、危险等级和文件路径。\n- 支持本地工具、云端工具索引、按需安装和本地移除。\n- 云端工具下载前和危险工具运行前要求阅读并同意免责声明。\n- 支持 `linux-tool` 与兼容命令 `linuxtool`。\n- 支持版本显示、启动静默检查更新、手动更新和更新失败回滚。\n- 日志写入 `~/.local/state/linux-tool/linux-tool.log`。\n- 兼容 apt / dnf / pacman / zypper 的依赖提示，不绑定单一发行版。\n\n## 安装方式\n\n```bash\ngit clone https://github.com/Xynrin/linux-tool.git\ncd linux-tool\nbash install.sh\n```\n\n安装后路径：\n\n```text\n主程序：~/.local/bin/linux-tool\n兼容命令：~/.local/bin/linuxtool\n应用目录：~/.local/share/linux-tool/app\n工具目录：~/.local/share/linux-tool/tool\n日志文件：~/.local/state/linux-tool/linux-tool.log\n```\n\n如果 `~/.local/bin` 不在 `PATH` 中，安装脚本会给出提示：\n\n```bash\nexport PATH=\"$HOME/.local/bin:$PATH\"\n```\n\n安装脚本默认安装到当前用户目录，不需要 root。即使误用 `sudo bash install.sh`，脚本也会尽量识别真实的 `SUDO_USER`，避免安装到 `/root`。\n\n## 卸载方式\n\n```bash\nbash uninstall.sh\n```\n\n卸载会删除：\n\n```text\n~/.local/bin/linux-tool\n~/.local/bin/linuxtool\n~/.local/share/linux-tool\n```\n\n卸载时会询问是否删除日志目录 `~/.local/state/linux-tool`。\n\n## 使用方式\n\n```bash\nlinux-tool\nlinux-tool --help\nlinux-tool --version\nlinux-tool update\nlinux-tool list\nlinux-tool list --local\nlinux-tool list --cloud\nlinux-tool run \u003ctool-id\u003e\nlinux-tool preview \u003ctool-id\u003e\nlinux-tool logs\n```\n\n兼容命令：\n\n```bash\nlinuxtool\nlinuxtool --version\n```\n\n## fzf 交互截图占位\n\n```text\n┌──────────────────────────────────────────────────────────────────────┐\n│ linux-tool                                                           │\n│ Linux Tool Center 0.4.3 | Xynrin/linux-tool@main                    │\n│ Enter 运行/安装  Ctrl+U 更新  Ctrl+R 刷新  Ctrl+I 信息  Esc 退出     │\n├──────────────────────────────┬───────────────────────────────────────┤\n│ [安全防护] fuck_rm           │ 工具名称：危险命令防护                │\n│ [云盘工具] cloundNAS         │ 工具 ID：fuck_rm                      │\n│ [系统工具] tool              │ 版本：0.1.0                           │\n└──────────────────────────────┴───────────────────────────────────────┘\n```\n\n## 工具元信息规范\n\n每个工具脚本建议使用统一注释头：\n\n```bash\n#!/usr/bin/env bash\n# LT_ID=fuck_rm\n# LT_NAME=危险命令防护\n# LT_CATEGORY=安全防护\n# LT_DESC=防止误执行 rm/dd/mkfs 等危险命令\n# LT_VERSION=0.1.0\n# LT_AUTHOR=Xynrin\n# LT_DEPS=bash,coreutils\n# LT_DANGEROUS=true\n```\n\n字段说明：\n\n- `LT_ID`：工具唯一 ID，建议只使用字母、数字、点、下划线和短横线。\n- `LT_NAME`：工具显示名称。\n- `LT_CATEGORY`：工具分类。\n- `LT_DESC`：工具描述。\n- `LT_VERSION`：工具自身版本；缺失时显示 `unknown`。\n- `LT_AUTHOR`：作者；缺失时显示 `unknown`。\n- `LT_DEPS`：依赖列表。\n- `LT_DANGEROUS`：是否危险操作，`true` 时运行前必须阅读并同意免责声明。\n\n如果工具没有元信息头，Linux Tool 会自动使用文件名作为工具 ID 和名称。\n\n## 如何添加新工具\n\n把脚本放入工具目录即可：\n\n```bash\ncp example.sh ~/.local/share/linux-tool/tool/example.sh\nchmod +x ~/.local/share/linux-tool/tool/example.sh\nlinux-tool\n```\n\n重点：新增工具只需要放入 `tool/` 目录，并添加 `LT_*` 元信息头，Linux Tool 会自动识别，不需要手动修改 Bash 菜单。\n\n仓库内也提供了 `tool/example.sh` 作为示例。\n\n## 更新方式\n\n启动 `linux-tool` 时会静默检查远程 `VERSION`：\n\n- 当前版本等于远程版本：不提示，只写入 INFO 日志。\n- 网络失败：不阻断启动。\n- 发现新版本：询问是否更新；更新成功后自动重新运行 `linux-tool`。\n\n主动更新：\n\n```bash\nlinux-tool update\n```\n\n如果已经是最新版本，会显示：\n\n```text\n当前已经是最新版本。\n当前版本：0.4.3\n最新版本：0.4.3\n```\n\n更新策略：\n\n- 如果当前应用目录是 git clone 工作区，优先使用 `git pull --ff-only`。\n- 普通安装会通过 GitHub main 分支压缩包下载并替换应用文件。\n- 更新前会备份当前安装目录。\n- 更新失败会回滚，不应破坏原安装目录。\n- fzf 中按 `Ctrl+U` 更新成功后会用 `exec` 替换旧进程并重新启动，避免旧 Bash 进程继续使用旧 `lib/*.sh`。\n\nGitee 镜像更新方式：预留中。国内网络环境访问 GitHub 可能需要代理或镜像源。\n\n## 项目结构\n\n```text\nlinux-tool/\n├── bin/\n│   └── linux-tool\n├── lib/\n│   ├── common.sh\n│   ├── ui.sh\n│   ├── logo.sh\n│   ├── tool_loader.sh\n│   ├── preview.sh\n│   ├── update.sh\n│   ├── version.sh\n│   ├── logger.sh\n│   └── safety.sh\n├── tool/\n│   ├── cloundNAS.sh\n│   ├── fuck_rm.sh\n│   ├── tool.sh\n│   └── example.sh\n├── assets/\n│   └── logo.txt\n├── install.sh\n├── uninstall.sh\n├── VERSION\n├── CHANGELOG.md\n├── README.md\n├── LICENSE\n└── .gitignore\n```\n\n## Roadmap\n\n- 完善 Gitee 镜像更新通道。\n- 为工具增加更细粒度的权限和依赖检查。\n- 增加工具评分、标签和搜索增强。\n- 增加导入/导出本地工具清单。\n- 补充自动化测试和 shellcheck CI。\n\n## 贡献方式\n\n欢迎提交 Issue 和 Pull Request。新增工具时请尽量：\n\n- 放入 `tool/` 目录。\n- 添加 `LT_*` 元信息头。\n- 避免强制 root，确实需要时清晰提示。\n- 对危险操作设置 `LT_DANGEROUS=true`。\n- 保持脚本可读，并尽量通过 `shellcheck`。\n\n## License\n\n本项目采用 GPL-v3 许可证，详见 [LICENSE](./LICENSE)。\n\n## 免责声明\n\n本项目按“现状”提供，不做任何明示或暗示保证。部分工具可能修改系统配置、安装软件、删除文件或执行高风险操作。请在运行前阅读工具说明和源码，并自行承担使用风险。\n\n请不要在生产环境或关键系统上运行你不了解的工具。对于因使用本项目造成的数据丢失、系统故障、业务中断或其他损失，作者和贡献者不承担责任。\n\n![Alt]( https://repobeats.axiom.co/api/embed/cebab1791784bcad5f5bd332a82d494350803c53.svg \"Repobeats 分析图像\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxynrin%2Flinux-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxynrin%2Flinux-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxynrin%2Flinux-tool/lists"}