Observed since 21 Oct, 10:00 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
An AI tool that converts natural language requests into command line commands(一个将自然语言需求转换为命令行命令的AI工具)
一个基于大模型的命令行工具,可以将自然语言需求转换为对应平台的命令行命令。 A command-line tool based on large language models that converts natural language requirements into platform-specific command line commands.
Installation:
uv tool install ai_bash
# 更新
# Update
uv tool upgrade ai-bash
需要配置你的大模型才能使用
初始化并查看配置: Initialize and view configuration:
# 显示配置文件路径,如果不存在则创建
# Show config file path, create if not exists
ai --init
# 强制创建新配置文件(覆盖已有配置)
# Force create new config file (overwrite existing)
ai --init --force
配置文件位于用户主目录下的.cmd_ai文件:
Configuration file is located at .cmd_ai in user's home directory:
# 必需的API密钥
# Required API key
OPENAI_API_KEY=你的OpenAI API密钥(your OpenAI API key)
OPENAI_API_HOST=LLM Api Host
OPENAI_MODEL_NAME= LLM model name
Usage:
# 基本用法(生成命令并等待用户回车后执行)
# Basic usage (generate command and wait for user to press Enter)
ai 查一下当前目录的文件路径
ai check the file paths in current directory
# 只生成命令不执行
# Only generate command without execution
ai 列出所有进程 --no-exec
ai list all processes --no-exec
# 只输出纯文本命令,便于手动复制
# Output plain text command for manual copying
ai 查找大文件 --copy
ai find large files --copy
# 自动将命令复制到剪贴板,可直接粘贴使用
# Automatically copy command to clipboard for direct pasting
ai 查找大文件 --clipboard
ai find large files --clipboard
# 执行命令后交互式分析结果
# Interactive analysis after command execution
ai 获取最新10条git提交 --qa
ai get latest 10 git commits --qa
# 查看帮助信息
# View help information
ai --help
使用--qa -q 选项来启用交互式命令分析功能:
Use --qa -q option to enable interactive command analysis:
# 执行git命令并进入交互式分析模式
# Execute git command and enter interactive analysis mode
ai 获取最近10次git提交日志 --qa
ai get latest 10 git commit logs --qa
执行命令后,工具会: After command execution, the tool will:
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.3.2 | 29 Apr 2025 | 3 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 10:00 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:e9e0153836c0cc1434a980d04c212980ab4e5debd43ec569bddd2bc054d79beb