AI辅助的命令行工具,提供错误捕获和bash历史管理功能
Project description
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文件
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ai_cli_helper-0.1.0.tar.gz
(6.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ai_cli_helper-0.1.0.tar.gz.
File metadata
- Download URL: ai_cli_helper-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
438629358b0e4f5f6b9afb9965d486f9768deb0b5ba6a65c06becf216023e5fa
|
|
| MD5 |
b029a375cda211160ec78c9ba77db92e
|
|
| BLAKE2b-256 |
10a0bfdad9ad2189f24106b375e55c7b91792123046ee6a3cbcc8c3a2a16b43d
|
File details
Details for the file ai_cli_helper-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ai_cli_helper-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5e98a7d10c4316c0a9c6c92462203ae16ba0a8d48f7057556ab7308e41fad49
|
|
| MD5 |
19320c94c225b1844cab6e7e418b7f71
|
|
| BLAKE2b-256 |
94d9256c2e54e2509bf67dd693e8e9f5869775124a1594bb358294cf4ef6b218
|