Skip to main content

Cross-Platform Automation Tool

Status Python Version](https://pypi.org/project/mysetuptool/) License](LICENSE)

⚠️ 学习项目 — 练手作品,把 3 个平台脚本合并成单文件 CLI 的练习。不建议作为日常工具依赖。

A cross-platform automation toolkit for Windows, Linux (Ubuntu/Debian), and macOS.

Supported Platforms

Platform Status
Ubuntu/Debian ✅
macOS ✅
Windows ✅

Installation

pip install mysetuptool

From Source

git clone https://github.com/frankwang98/mysetuptool.git
cd mysetuptool
pip install -e .

Usage

# After installation, run:
mysetuptool

The tool auto-detects your OS and shows a menu:

========================================
  Environment Setup Tool
  Platform: macOS
========================================

=== Main Menu ===
1. System Info
2. System Update
3. Docker
4. Mirror Config
5. Network Tools
q. Quit

Features

Menu What it does
System Info OS, uptime, CPU cores, disk usage
System Update apt update (Linux) / opens Software Update (mac) / message (Windows)
Docker Install, start/stop, list containers/images, prune
Mirror Config Configure pip/npm mirrors (tsinghua, aliyun, douban, taobao)
Network Tools Show IP, ping host

Project Structure

mysetuptool/
├── src/
│   └── mysetuptool/
│       ├── __init__.py
│       └── tool.py          # Single-file implementation, OS auto-detected at runtime
├── pyproject.toml
├── README.md
└── LICENSE

Development

# Install in editable mode
pip install -e .

# Run from source
mysetuptool
# or
python -m mysetuptool

# Build and publish
python -m build
python -m twine upload dist/*

和同类工具的差距

本工具的功能都能用现成工具更好地完成,没有自己的护城河。下表说明它和主流方案的对比:

类别 代表工具 它们做对了什么 mysetuptool 的差距
远程自动化 Ansible 幂等、声明式、可批量管理上千台机器、playbook 可版本化 本地单台、不可复用、每次跑都是新进程
Dotfile 同步 chezmoi / stow 跨机器同步、模板化、加密、与 git 集成 配置写死在代码里,多机不可复用
开发环境 devenv / nix-shell / devbox 声明式、可复现、跨平台、版本锁 不管依赖,假设你机器上啥都有
包管理器统一 homebrew / winget / apt 本身就是系统级、有官方源、社区维护 包了一层菜单,比直接敲 brew install 慢
CLI 加速 fzf / tldr / navi 通用、加速所有命令、有 fuzzy 搜索 只覆盖这 5 个菜单项,其他命令管不到
配置镜像 pip config set / npm config set 单行命令、无需安装 是仅有的差异化功能,但也只是把 2 行 shell 包装成菜单

它的真实定位

把它当Python 实战练习而不是工具:

  • 学 argparse / subprocess / 跨平台分支
  • 学 pip 包结构、pyproject.toml 打包发布
  • 学交互式 CLI 模式(菜单循环 + 输入校验)

如果只是想加速日常操作,更好的做法是:

# ~/.zshrc 里加 alias 即可
alias ip="ipconfig getifaddr en0 || ip addr"
alias ping="ping -c 4"
alias mypip="pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple"

# 或者用 chezmoi 管理这些 alias 跨机器同步

License

MIT License - see LICENSE for details.

Author

Frank Wang

Metadata

Release files for mysetuptool 1.1.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 mysetuptool 1.1.0
File Size Uploaded Provenance
mysetuptool-1.1.0.tar.gz 11.0 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 20.0 kB

Release files / mysetuptool-1.1.0.tar.gz

Download URL mysetuptool-1.1.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
97353194b090a76759eda5c118f38bafd5b4f4e76e38f9654b9bf741cc1ce7a6
BLAKE2b-256 checksum
How to use checksums
7c27756240de2748f5cfa1038fa785c08767f11421d3331570b41f99d37e9f12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.17

Release files / mysetuptool-1.1.0-py3-none-any.whl

Download URL mysetuptool-1.1.0-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d439ca3758dec439bcfd2ef2ad26b3f0c2662b97caef23c19882a7b9220484f
BLAKE2b-256 checksum
How to use checksums
094a2c7e2a148a9be111755a40ef04457e315cc16417c04c216acbf14507d3f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.17

Security for mysetuptool 1.1.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.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files No provenance

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