Skip to main content

AI 规则仓库自动配置工具,用于下载和配置 airules 的规则文件

Project description

spec-cli

AI 规则仓库自动配置工具,用于下载和配置 airules 的规则文件

🚀 快速上手

前置条件

请确保你的环境满足以下条件:

  • Python :版本 >=3.8
  • AI 编程工具 :Cursor 或 ClaudeCode

一键安装

安装spec-cli

# 通过 pip 安装
pip install spec-cli

# 或者通过uv 安装
uv tool install spec-cli

接着在你的项目根目录打开终端,执行以下命令,即可一键安装 airules 规则文件:

# 使用指定仓库中的规则文件
spec init --template-repository http://git.xxxx/xxx/xxx.git

安装过程日志示例:

==========================================
  AI 规则仓库自动配置脚本
==========================================

[INFO] 目标安装目录: D:\Users\xxx\workspace\xxx\xxx\spec-dev\xxx
[INFO] 模板仓库地址: http://git.xxx.com/xxxx/airules.git

[INFO] 检查前置条件...
[INFO] 前置条件检查通过

请选择您使用的 AI 客户端工具:
1) Cursor
2) ClaudeCode

请输入选项 [1-2]: 1
[INFO] 您选择了: Cursor
[INFO] 开始下载规则仓库: http://git.xxx/xxx/xxxx.git
[WARNING] 临时目录已存在,正在清理...
[INFO] 仓库下载成功
[INFO] 目标配置目录: D:\Users\xxx\workspace\xxx\xxx\spec-dev\xxx\.cursor
[INFO] 正在拷贝 rules 文件夹...
[INFO] 正在拷贝 commands 文件夹...
[INFO] 文件拷贝完成!

[INFO] 配置文件已安装到: D:\Users\xxx\workspace\xxx\xxx\spec-dev\xxx\.cursor
[INFO]   - rules 目录: D:\Users\xxx\workspace\xxx\xxx\spec-dev\xxx\.cursor\rules
[INFO]   - commands 目录: D:\Users\xxx\workspace\xxx\xxx\spec-dev\xxx\commands
[INFO] 清理临时文件...

==========================================
[INFO] 配置完成!请重启您的 AI 工具以使配置生效
==========================================

安装结果

安装完成后,项目目录结构如下:

your-project/
└── .cursor/           # Cursor 配置目录
    ├── rules/         # 规则文件(上下文库)
    │   ├── common/          # 通用规范
    │   ├── languages/       # 编程语言
    │   ├── frameworks/      # 技术框架
    │   ├── project/         # 项目知识(需生成)
    │   └── workflow/        # 工作流定义
    └── commands/      # 斜杠命令
        ├── req.md           # /req 命令
        ├── tech.md          # /tech 命令
        ├── coding.md        # /coding 命令
        └── dev.md           # /dev 命令

验证安装

打开 Cursor,在对话框中输入 /,如果看到 /req、/tech、/coding、/dev 等命令,说明安装成功!

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

spec_cli-0.1.6.tar.gz (548.5 kB view details)

Uploaded Source

Built Distribution

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

spec_cli-0.1.6-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file spec_cli-0.1.6.tar.gz.

File metadata

  • Download URL: spec_cli-0.1.6.tar.gz
  • Upload date:
  • Size: 548.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for spec_cli-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5b5135248a28a8c673fd84d83589f57ecec2d26a0336ca3bbdad3633bd0f7221
MD5 f9bb390049161808908c609cd2825257
BLAKE2b-256 f05aa795fd1df6269ac400ca1b3b653ab0143613bff0694b970f7ffe08ec394a

See more details on using hashes here.

File details

Details for the file spec_cli-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: spec_cli-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for spec_cli-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f8231c68f340d39dc82e36c95d6c359aad9c056b51094cbab8084e5007003193
MD5 a8d6fececb792f66df8522e3209f94c7
BLAKE2b-256 a3163974b45de642e13b7930f9a3d1c4aac01c68f104f0b7d162cb32dacfaff4

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