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

From PyPI (Recommended)

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mysetuptool-1.1.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mysetuptool-1.1.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file mysetuptool-1.1.0.tar.gz.

File metadata

  • Download URL: mysetuptool-1.1.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for mysetuptool-1.1.0.tar.gz
Algorithm Hash digest
SHA256 97353194b090a76759eda5c118f38bafd5b4f4e76e38f9654b9bf741cc1ce7a6
MD5 797e07cfddc95b741c23b7dde6287857
BLAKE2b-256 7c27756240de2748f5cfa1038fa785c08767f11421d3331570b41f99d37e9f12

See more details on using hashes here.

File details

Details for the file mysetuptool-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: mysetuptool-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for mysetuptool-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d439ca3758dec439bcfd2ef2ad26b3f0c2662b97caef23c19882a7b9220484f
MD5 597ff31a02d623f384bf1094829dadae
BLAKE2b-256 094a2c7e2a148a9be111755a40ef04457e315cc16417c04c216acbf14507d3f3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 files

1.0.0

2 files

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