ai-cli
一个AI辅助的命令行工具,提供错误捕获和bash历史管理功能,让你的命令行体验更加高效和友好。
功能特性
- 错误捕获功能:自动捕获bash命令执行错误,并保存详细的错误信息到日志文件
- 实时Bash历史:获取并展示bash内存中的实时历史命令
- 轻量级设计:仅依赖Python标准库,无需额外安装依赖
安装
从PyPI安装
pip install ai-cli
从源码安装
# 克隆仓库
git clone https://github.com/yourusername/ai-cli.git
cd ai-cli
# 安装开发模式
pip install -e .
使用方法
错误捕获功能
# 安装错误捕获功能到bashrc
error-tracker
# 重新加载bashrc以应用更改
source ~/.bashrc
之后,当你执行的命令失败时,错误详情会自动保存到/tmp/last_error_details.txt文件中。
Bash历史查询
# 使用命令行工具查询当前bash历史
ai-cli
项目结构
ai-cli/
├── ai_cli/ # 主源码目录
│ ├── __init__.py # 包初始化文件
│ ├── app.py # 错误捕获功能实现
│ ├── cli.py # 命令行界面
│ └── config/ # 配置文件目录
│ └── __init__.py
├── setup.py # 安装配置文件
├── requirements.txt # 依赖列表
├── MANIFEST.in # 打包配置文件
├── README.md # 项目说明文档
└── LICENSE # 许可证文件
开发
安装开发依赖
pip install -r requirements.txt
运行测试
pytest
代码风格检查
flake8
black ai_cli
贡献
欢迎提交Issues和Pull Requests!
许可证
本项目采用MIT许可证 - 详见LICENSE文件
Metadata
Release files for ai-cli-helper 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ai_cli_helper-0.1.0.tar.gz | 6.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ai_cli_helper-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.3 kB
Release files / ai_cli_helper-0.1.0.tar.gz
| Download URL | ai_cli_helper-0.1.0.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
438629358b0e4f5f6b9afb9965d486f9768deb0b5ba6a65c06becf216023e5fa
|
|
BLAKE2b-256 checksum How to use checksums |
10a0bfdad9ad2189f24106b375e55c7b91792123046ee6a3cbcc8c3a2a16b43d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / ai_cli_helper-0.1.0-py3-none-any.whl
| Download URL | ai_cli_helper-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5e98a7d10c4316c0a9c6c92462203ae16ba0a8d48f7057556ab7308e41fad49
|
|
BLAKE2b-256 checksum How to use checksums |
94d9256c2e54e2509bf67dd693e8e9f5869775124a1594bb358294cf4ef6b218
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for ai-cli-helper 0.1.0
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.