Skip to main content

一个将自然语言需求转换为命令行命令的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密钥

文档与贡献

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

ai_bash-0.1.1.tar.gz (44.9 kB view details)

Uploaded Source

Built Distribution

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

ai_bash-0.1.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

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

Hashes for ai_bash-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6e5ada0cb1c3de6d4546d773b8cd95250818085d7ecd9efc988e13336ccba9d6
MD5 1049217a0032a664f6d9376546365f58
BLAKE2b-256 6889940a5408c95f91700b10362bba37187b688534a5edc67dc0e9fd5c72d2a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_bash-0.1.1.tar.gz:

Publisher: python-publish.yml on weiwei2012holy/cmd_ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for ai_bash-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dc572ed8bb46693bba160b4a075cdaf13c2d236afd5e2e404efca6fac321b49e
MD5 46d0850edd089275c01754584eac649c
BLAKE2b-256 535edf34409bc336bee931e473976e1d3a0d4cf9adf4611efb104c7e2c2555b1

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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