243 字
1 分钟
开发中自用环境配置工具
开发中一些环境配置工具
Python
使用
uv进行管理
Linux/MacOS 安装
curl -LsSf https://astral.sh/uv/install.sh | shWindows 安装
scoop install uv # 如果安装了 scoopwinget install --id astral-sh.uv -e通过 pipx 安装
pipx install uv | pip install uv安装特定版本 python
uv python listuv python install 3.11uv 基本使用
# 创建 venv 环境uv venv .venv # uv venv <name>source .venv/Script/activate # 激活虚拟环境
# 创建 python 项目uv init
# 添加 python 项目需要的包# uv add 可以导出对应 requirements.txtuv add <package_name>uv pip install <package_name>
# 清理包# uv remove 可以移除所有的依赖包uv remove <package_name>uv pip uninstall <package_name>
# 清理环境uv clean # 删除当前目录内容uv cache clean # 清理 cache 目录
# 同步其余项目环境uv sync # 类似 pip install -r requirements.txt
# 运行 python 文件uv run example.pyNodeJS
使用 fnm+pnpm 进行管理
fnm 安装
curl -fsSL https://fnm.vercel.app/install | bash# 如果 shell 是 zsh、bash 和 fishcurl -fsSL https://raw.githubusercontent.com/Schniz/fnm/refs/heads/master/.ci/install.sh | sh -fnm 使用
fnm install --ltspnpm 安装
curl -fsSL https://get.pnpm.io/install.sh | sh -