一个将自然语言需求转换为命令行命令的AI工具
Project description
AI-Bash: 智能命令行工具
一个基于大模型的命令行工具,可以将自然语言需求转换为对应平台的命令行命令。
功能介绍
- 接收用户的自然语言描述
- 调用大模型API将需求转换为命令行命令
- 自动识别用户的操作系统和命令行环境
- 根据当前平台生成最适合的命令
- 支持自定义API密钥、主机地址和模型名称
- 生成命令并在用户确认后执行
快速开始
安装:
uv pip install ai_bash
使用:
# 基本用法(生成命令并等待用户回车后执行)
ai 查一下当前目录的文件路径
# 只生成命令不执行
ai 列出所有进程 --no-exec
# 只输出纯文本命令,便于手动复制
ai 查找大文件 --copy
# 自动将命令复制到剪贴板,可直接粘贴使用
ai 查找大文件 --clipboard
# 查看帮助信息
ai --help
配置
初始化并查看配置:
# 显示配置文件路径,如果不存在则创建
ai --init
# 强制创建新配置文件(覆盖已有配置)
ai --init --force
配置文件位于用户主目录下的.cmd_ai文件:
# 必需的API密钥
OPENAI_API_KEY=你的OpenAI API密钥
文档与贡献
- 详细使用说明和开发指南:文档.md
- 贡献代码规范:CONTRIBUTING.md
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
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_bash-0.1.1.tar.gz.
File metadata
- Download URL: ai_bash-0.1.1.tar.gz
- Upload date:
- Size: 44.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e5ada0cb1c3de6d4546d773b8cd95250818085d7ecd9efc988e13336ccba9d6
|
|
| MD5 |
1049217a0032a664f6d9376546365f58
|
|
| BLAKE2b-256 |
6889940a5408c95f91700b10362bba37187b688534a5edc67dc0e9fd5c72d2a7
|
Provenance
The following attestation bundles were made for ai_bash-0.1.1.tar.gz:
Publisher:
python-publish.yml on weiwei2012holy/cmd_ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai_bash-0.1.1.tar.gz -
Subject digest:
6e5ada0cb1c3de6d4546d773b8cd95250818085d7ecd9efc988e13336ccba9d6 - Sigstore transparency entry: 194345295
- Sigstore integration time:
-
Permalink:
weiwei2012holy/cmd_ai@12129531eb232bd71bdd7e043969f2d8428679a0 -
Branch / Tag:
refs/tags/v0.0.3.2 - Owner: https://github.com/weiwei2012holy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@12129531eb232bd71bdd7e043969f2d8428679a0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ai_bash-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ai_bash-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc572ed8bb46693bba160b4a075cdaf13c2d236afd5e2e404efca6fac321b49e
|
|
| MD5 |
46d0850edd089275c01754584eac649c
|
|
| BLAKE2b-256 |
535edf34409bc336bee931e473976e1d3a0d4cf9adf4611efb104c7e2c2555b1
|
Provenance
The following attestation bundles were made for ai_bash-0.1.1-py3-none-any.whl:
Publisher:
python-publish.yml on weiwei2012holy/cmd_ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai_bash-0.1.1-py3-none-any.whl -
Subject digest:
dc572ed8bb46693bba160b4a075cdaf13c2d236afd5e2e404efca6fac321b49e - Sigstore transparency entry: 194345307
- Sigstore integration time:
-
Permalink:
weiwei2012holy/cmd_ai@12129531eb232bd71bdd7e043969f2d8428679a0 -
Branch / Tag:
refs/tags/v0.0.3.2 - Owner: https://github.com/weiwei2012holy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@12129531eb232bd71bdd7e043969f2d8428679a0 -
Trigger Event:
release
-
Statement type: