Skip to main content

AI Command Master

一个基于AI的命令行工具,帮助用户更高效地完成命令行操作。

功能特点

  • 支持多种AI模型配置(OpenAI、Deepseek、智谱AI等)
  • 智能命令解析和执行(自然语言转命令行)
  • 多配置文件管理(支持环境隔离)
  • 跨平台支持(Windows/macOS/Linux)

典型场景

  • 快速查询复杂命令语法
  • 自动化重复性运维操作
  • 安全执行危险命令前确认
  • 开发环境快速配置

安装

环境要求

  • Python >= 3.8(建议3.13.0)
  • pip 23.0+(Python包管理器)
  • Git 2.30+(源码安装需要)

安装步骤

方法一:通过pip安装(推荐)

使用清华PyPI镜像加速安装:

pip install ai-command-master -i https://pypi.tuna.tsinghua.edu.cn/simple

方法二:从源码安装

  1. 克隆项目代码:
git clone https://gitee.com/yourusername/ai-command-master.git
cd ai-command-master
  1. 安装依赖(使用镜像源):
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple .

快速开始

1. 创建配置文件

# Windows系统需要以管理员模式运行CMD/PowerShell
# myconfig为文件名,建议使用model名命名
ai config create myconfig

2. 配置文件示例

# 请以官方提供的API文档为准
model_provider = "Moonshot"
model_name = "moonshot-v1-8k"
base_url = "https://api.moonshot.cn/v1"
api_key = "your_api_key"
max_token: 8192
temperature: 0.3

3. 配置文件管理

# 列出所有配置文件
ai config list

# 显示当前配置
ai config show

# 切换配置文件
ai config switch myconfig

......

使用指南

基础使用

# 获取帮助
ai --help

# 执行命令(Windows路径示例)
ai ask 如何批量重命名当前目录下所有.txt文件为.md文件?

开发说明

环境配置(Windows)

  1. 创建虚拟环境:
python -m venv venv
venv\Scripts\activate
  1. 安装包:
# 使用.virtualenv文件安装所有依赖
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple e .

许可证

本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情

Metadata

Release files for ai-command-master 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai-command-master 1.1.3
File Size Uploaded Provenance Actions
ai_command_master-1.1.3.tar.gz 25.1 kB Without provenance Details for ai_command_master-1.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ai-command-master 1.1.3
File Interpreter ABI Platform Actions
ai_command_master-1.1.3-py3-none-any.whl Python 3 none any Details for ai_command_master-1.1.3-py3-none-any.whl

Total release size: 54.9 kB

Release files / ai_command_master-1.1.3.tar.gz

Download URL ai_command_master-1.1.3.tar.gz
Size 25.1 kB
Tags Source
SHA-256 checksum
How to use checksums
445c852b169446e78655023843cdaaf76d3879090e1014fd3385cfa644b4bee8
BLAKE2b-256 checksum
How to use checksums
e44afd1d2965ed7cd0b877b161bb017726702b94938e9ad7634071edec8f933b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Release files / ai_command_master-1.1.3-py3-none-any.whl

Download URL ai_command_master-1.1.3-py3-none-any.whl
Size 29.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7513007229a91efb8413306dfebdefa773f684c6e818d5e2cb2181b3a04bdc4
BLAKE2b-256 checksum
How to use checksums
27c1c20c085a052d926470ad4e6736e57583cbc380176ea0128ed742d9aacae0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Security for ai-command-master 1.1.3

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.

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