基于大语言模型的命令行代码助手
Project description
nezha
nezha 是一个命令行 AI 助手工具,支持模型选择、对话、计划生成、配置初始化等多种智能操作,适合开发者和 AI 爱好者快速集成和使用。
主要特性
- 支持多种大语言模型(LLM),包括预置和用户自定义模型
- 模型可配置、可切换
- 命令行交互式体验,支持对话 (
chat)、计划 (plan) 等多种命令 - 支持通过
init命令初始化或重置配置 - 配置灵活,支持用户自定义模型参数和安全设置
- 适合二次开发和集成
安装方法
通过 pip 安装(推荐)
pip install nezha-agent
源码安装
git clone https://github.com/echovic/nezha.git
cd nezha
pip install .
快速开始
初始化配置 (可选)
nezha init
查看和管理模型
# 查看所有可用模型
nezha models list
# 交互式选择并设置默认模型
nezha models select
# 添加新模型配置
nezha models add
启动对话
nezha chat
生成计划
nezha plan "帮我写一个发送邮件的 Python 脚本"
配置说明
- 默认配置文件位于
~/.config/nezha/config.yaml(路径可能因操作系统而异,请参考platformdirs文档) - 可通过
nezha init命令生成或重置配置文件 - 支持自定义模型列表及参数
- 安全相关配置位于
security_config.yaml
贡献指南
欢迎提交 issue 和 PR!如需贡献代码,请遵循本项目的代码规范。
联系方式
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 nezha_agent-0.1.2.tar.gz.
File metadata
- Download URL: nezha_agent-0.1.2.tar.gz
- Upload date:
- Size: 29.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 |
2adebcbd0d54966fefd8b9170c1e8dcb0385480f4fcf528a02822fa80766676a
|
|
| MD5 |
e40fb32857db01697624098d02ce2678
|
|
| BLAKE2b-256 |
32592eec87b26a931365af2c69ece9138cbfb2fb458aecc41fe89678bdc04594
|
Provenance
The following attestation bundles were made for nezha_agent-0.1.2.tar.gz:
Publisher:
publish-to-pypi.yml on echoVic/nezha
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nezha_agent-0.1.2.tar.gz -
Subject digest:
2adebcbd0d54966fefd8b9170c1e8dcb0385480f4fcf528a02822fa80766676a - Sigstore transparency entry: 200689400
- Sigstore integration time:
-
Permalink:
echoVic/nezha@79213e59d74ab82b2fbac6a696bc34bb8ab3454e -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/echoVic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@79213e59d74ab82b2fbac6a696bc34bb8ab3454e -
Trigger Event:
push
-
Statement type:
File details
Details for the file nezha_agent-0.1.2-py3-none-any.whl.
File metadata
- Download URL: nezha_agent-0.1.2-py3-none-any.whl
- Upload date:
- Size: 35.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 |
1dd52e81d7d18bf1c9c4381a22ea44108cbb8e0beccd2ba3be03157f03159cb4
|
|
| MD5 |
4d7a65ab9ab20caa44b8aef801c598e7
|
|
| BLAKE2b-256 |
8fb7014e3bef9ebc33f10b2c1b0a64fc41531d8b3d97e0a761117cb1a75eb9c6
|
Provenance
The following attestation bundles were made for nezha_agent-0.1.2-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on echoVic/nezha
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nezha_agent-0.1.2-py3-none-any.whl -
Subject digest:
1dd52e81d7d18bf1c9c4381a22ea44108cbb8e0beccd2ba3be03157f03159cb4 - Sigstore transparency entry: 200689404
- Sigstore integration time:
-
Permalink:
echoVic/nezha@79213e59d74ab82b2fbac6a696bc34bb8ab3454e -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/echoVic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@79213e59d74ab82b2fbac6a696bc34bb8ab3454e -
Trigger Event:
push
-
Statement type: