Skip to main content

Shell-GPT 自动安装和配置工具:对接 SiliconFlow API,全程国内镜像,专为教学场景设计

Project description

auto-shell-gpt

Shell-GPT 自动安装和配置工具,专门为国内教学场景优化。

接入 SiliconFlow 的 LLM API,全程走国内镜像源,在严格白名单网络下也能装上。

特性

  • 🐍 Portable Python 3.12 — 从国内大学镜像(USTC/NJU/TUNA/SJTU/BFSU/HFUT)下载独立 Python,绕开系统 Python 版本不兼容
  • 🌐 多源 PyPI failover — 8 个国内 PyPI 镜像自动按速度排序,挂一个自动切下一个
  • 🧠 真实模型可用性检测 — 并发 ping 候选模型,只保留实际能调用的
  • 🎯 白名单模型 — 9 个 SiliconFlow 免费模型(DeepSeek-V4-Flash、Qwen3.6、GLM-4.5、Step-3.5 等)
  • 🔒 安全 — 配置文件自动 chmod 600,API key 不会被同机器其他用户读到
  • 🧹 一键卸载 — 完全恢复安装前状态,不留痕

快速开始(第一次安装)

pip install --no-warn-script-location -i https://repo.huaweicloud.com/repository/pypi/simple auto-shell-gpt && \
  export PATH="$HOME/.local/bin:$PATH" && \
  auto-shell-gpt --auto --key sk-YOUR_SILICONFLOW_KEY

三步 && 串联:静默装包 → 临时给当前 shell 的 PATH 加上 ~/.local/bin → 直接跑 auto-shell-gpt

为什么需要 export PATH:pip --user 把 CLI 入口装到 ~/.local/bin/,但新建账号第一次登录时这个目录还不存在,所以 .profile 跳过了把它加进 PATH 的判断。export 那一步在当前 shell临时补上,跑完之后 v1.12.0 的脚本会自动把这行 export 持久化到 ~/.bashrc,下次新开终端就再也不用这一步

之后任何时候(新 shell 直接短命令)

sgpt --code 'solve fizz buzz problem using python'
sgpt --shell '帮我生成10个file开头的文件'

# 切模型 / 重设 key / 查看配置
auto-shell-gpt

# 完全卸载
auto-shell-gpt --uninstall

会清理:~/.config/shell_gpt//tmp/chat_cache_*/tmp/cache_*~/.cache/shell_gpt~/.local/share/sgpt-portable-python/~/.local/bin/sgpt

注册获取 API key

新用户用以下链接注册可获得双倍免费额度:

🔗 https://cloud.siliconflow.cn/i/pnTWTpiB

详细文档 & 源码

https://github.com/JohnnyChen1113/biotrainee

License

MIT

Project details


Download files

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

Source Distribution

auto_shell_gpt-1.12.0.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

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

auto_shell_gpt-1.12.0-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file auto_shell_gpt-1.12.0.tar.gz.

File metadata

  • Download URL: auto_shell_gpt-1.12.0.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for auto_shell_gpt-1.12.0.tar.gz
Algorithm Hash digest
SHA256 30b481b6bb7639e154efe97715c7ebbb1b698591c6a1d6ae6c4b2b7fd4e3f9ca
MD5 c44cbf6b8847634b5d774621ce5b6a35
BLAKE2b-256 28e82d7131c0d6bace5b4ac3b9c9dd8beb3ba29b1997a9f642e81b61b5b0acb6

See more details on using hashes here.

File details

Details for the file auto_shell_gpt-1.12.0-py3-none-any.whl.

File metadata

File hashes

Hashes for auto_shell_gpt-1.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 225c90742571f7b0ed2273d523d21b3a4773855f29a991a541020d0ed63c224f
MD5 ddfb73c125e00303c4367dd5bdc598c8
BLAKE2b-256 ce19b0ad7b7d648332bc5f9d2f1b75a38b75e82debfe50ae52a48157a8d7d3f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page