Metadata-Version: 2.4
Name: mysetuptool
Version: 1.1.0
Summary: Cross-platform environment setup automation tool for Windows, Linux and macOS
Author-email: Frank Wang <frankwang98@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/frankwang98/mysetuptool
Project-URL: Repository, https://github.com/frankwang98/mysetuptool
Project-URL: Issues, https://github.com/frankwang98/mysetuptool/issues
Keywords: automation,system,devops,environment,setup,cross-platform
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28.0
Provides-Extra: dev
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Requires-Dist: pytest>=7.0.0; extra == "dev"
Dynamic: license-file

# Cross-Platform Automation Tool

![Status](https://img.shields.io/badge/status-学习项目-yellow)
![Python Version](https://img.shields.io/pypi/pyversions/mysetuptool)](https://pypi.org/project/mysetuptool/)
![License](https://img.shields.io/pypi/l/mysetuptool)](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)

```bash
pip install mysetuptool
```

### From Source

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

## Usage

```bash
# 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

```bash
# 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](https://www.ansible.com/) | 幂等、声明式、可批量管理上千台机器、playbook 可版本化 | 本地单台、不可复用、每次跑都是新进程 |
| **Dotfile 同步** | [chezmoi](https://www.chezmoi.io/) / [stow](https://www.gnu.org/software/stow/) | 跨机器同步、模板化、加密、与 git 集成 | 配置写死在代码里，多机不可复用 |
| **开发环境** | [devenv](https://devenv.sh/) / [nix-shell](https://nixos.org/) / [devbox](https://www.jetpack.io/devbox) | 声明式、可复现、跨平台、版本锁 | 不管依赖，假设你机器上啥都有 |
| **包管理器统一** | [homebrew](https://brew.sh/) / [winget](https://learn.microsoft.com/en-us/windows/package-manager/) / [apt](https://wiki.debian.org/Apt) | 本身就是系统级、有官方源、社区维护 | 包了一层菜单，比直接敲 `brew install` 慢 |
| **CLI 加速** | [fzf](https://github.com/junegunn/fzf) / [tldr](https://github.com/tldr-pages/tldr) / [navi](https://github.com/denisidoro/navi) | 通用、加速所有命令、有 fuzzy 搜索 | 只覆盖这 5 个菜单项，其他命令管不到 |
| **配置镜像** | `pip config set` / `npm config set` | 单行命令、无需安装 | 是仅有的差异化功能，但也只是把 2 行 shell 包装成菜单 |

### 它的真实定位

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

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

如果只是想加速日常操作，**更好的做法是**：

```bash
# ~/.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](LICENSE) for details.

## Author

Frank Wang
