zll


Namezll JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/bigzhu/zll
Summarymy ssh client
upload_time2025-07-18 03:01:56
maintainerNone
docs_urlNone
authorbigzhu
requires_python<4.0,>=3.10
licenseNone
keywords ssh tool
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ZLL - SSH Connection Manager

[![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

一个简单高效的 SSH 连接管理工具,帮助你快速管理和连接到远程服务器。

## 特性

- 🔒 **安全优先**: 仅支持 SSH 密钥认证,不存储密码
- 📋 **连接管理**: 保存和管理 SSH 连接信息
- 🔍 **智能搜索**: 支持通过主机名、IP 或描述快速查找连接
- ⚡ **快速连接**: 通过序号或关键字快速连接到服务器
- 📝 **简单配置**: 使用 CSV 格式存储连接信息,易于编辑和备份

## 安装

### 使用 pip 安装

```bash
pip install zll
```

### 从源码安装

```bash
git clone https://github.com/bigzhu/zll.git
cd zll
poetry install
```

## 使用方法

启动 zll:

```bash
zll
```

### 主要功能

- **添加连接**: 输入 `a` 添加新的 SSH 连接信息
- **退出程序**: 输入 `q` 退出
- **数字连接**: 输入对应序号直接连接到服务器
- **搜索连接**: 输入主机名、IP 或描述关键字进行搜索
- **删除连接**: 输入 `d` 然后输入要删除的连接序号

### 使用示例

```bash
# 启动 zll
$ zll

# 显示所有连接列表
Number  User    Host            Port    Description
0       root    192.168.1.100   22      Web Server
1       admin   db.example.com  22      Database Server
2       user    staging.app.com 2222    Staging Environment

# 直接连接
Input number, IP, or hostname (q to quit, a to add, d to delete): 0
# 连接到 192.168.1.100

# 搜索连接
Input number, IP, or hostname (q to quit, a to add, d to delete): web
# 显示包含 "web" 关键字的连接

# 添加新连接
Input number, IP, or hostname (q to quit, a to add, d to delete): a
Input username: myuser
Input ip or hostname: newserver.com
Input port (default 22): 2222
Input comment: My New Server
Added successfully!
```

## 配置文件

连接信息存储在 CSV 格式的配置文件中,位置:

- **macOS**: `~/Library/Application Support/zll/hosts.csv`
- **Linux**: `~/.local/share/zll/hosts.csv`
- **Windows**: `%APPDATA%\zll\hosts.csv`

文件格式:
```csv
User,Host,Port,Description
root,192.168.1.100,22,Web Server
admin,db.example.com,22,Database Server
```

## 开发

### 环境设置

```bash
# 克隆项目
git clone https://github.com/bigzhu/zll.git
cd zll

# 安装 Poetry(如果未安装)
curl -sSL https://install.python-poetry.org | python3 -

# 安装依赖
poetry install

# 激活虚拟环境
poetry shell
```

### 运行测试

```bash
# 运行所有测试
poetry run pytest

# 运行测试并生成覆盖率报告
poetry run pytest --cov=zll --cov-report=html

# 运行类型检查
poetry run mypy zll

# 代码格式化
poetry run black zll tests
poetry run isort zll tests

# 代码检查
poetry run ruff zll tests
```

### 安装 pre-commit hooks

```bash
poetry run pre-commit install
```

## 许可证

MIT License - 详见 [LICENSE](LICENSE) 文件

## 贡献

欢迎提交 Issue 和 Pull Request!

## 变更日志

### v0.2.0
- 重大代码质量改进
- 修复测试导入问题,将测试文件移至正确目录
- 添加完整的类型注解和文档字符串
- 改进异常处理和输入验证
- 添加开发工具配置(Black, isort, mypy, ruff, pytest)
- 配置 pre-commit hooks
- 更新所有依赖包到最新版本
- 完全重写 README 文档
- 添加贡献指南(CONTRIBUTING.md)
- 提升代码格式化和质量标准

### v0.1.11
- 基础功能实现
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/bigzhu/zll",
    "name": "zll",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "ssh, tool",
    "author": "bigzhu",
    "author_email": "vermiliondun@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/97/9a/6967ad2744796c89a9536c25b5c19a18159d24f4a81b6702ce1b8c30f644/zll-0.2.0.tar.gz",
    "platform": null,
    "description": "# ZLL - SSH Connection Manager\n\n[![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n\u4e00\u4e2a\u7b80\u5355\u9ad8\u6548\u7684 SSH \u8fde\u63a5\u7ba1\u7406\u5de5\u5177\uff0c\u5e2e\u52a9\u4f60\u5feb\u901f\u7ba1\u7406\u548c\u8fde\u63a5\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\n\n## \u7279\u6027\n\n- \ud83d\udd12 **\u5b89\u5168\u4f18\u5148**: \u4ec5\u652f\u6301 SSH \u5bc6\u94a5\u8ba4\u8bc1\uff0c\u4e0d\u5b58\u50a8\u5bc6\u7801\n- \ud83d\udccb **\u8fde\u63a5\u7ba1\u7406**: \u4fdd\u5b58\u548c\u7ba1\u7406 SSH \u8fde\u63a5\u4fe1\u606f\n- \ud83d\udd0d **\u667a\u80fd\u641c\u7d22**: \u652f\u6301\u901a\u8fc7\u4e3b\u673a\u540d\u3001IP \u6216\u63cf\u8ff0\u5feb\u901f\u67e5\u627e\u8fde\u63a5\n- \u26a1 **\u5feb\u901f\u8fde\u63a5**: \u901a\u8fc7\u5e8f\u53f7\u6216\u5173\u952e\u5b57\u5feb\u901f\u8fde\u63a5\u5230\u670d\u52a1\u5668\n- \ud83d\udcdd **\u7b80\u5355\u914d\u7f6e**: \u4f7f\u7528 CSV \u683c\u5f0f\u5b58\u50a8\u8fde\u63a5\u4fe1\u606f\uff0c\u6613\u4e8e\u7f16\u8f91\u548c\u5907\u4efd\n\n## \u5b89\u88c5\n\n### \u4f7f\u7528 pip \u5b89\u88c5\n\n```bash\npip install zll\n```\n\n### \u4ece\u6e90\u7801\u5b89\u88c5\n\n```bash\ngit clone https://github.com/bigzhu/zll.git\ncd zll\npoetry install\n```\n\n## \u4f7f\u7528\u65b9\u6cd5\n\n\u542f\u52a8 zll\uff1a\n\n```bash\nzll\n```\n\n### \u4e3b\u8981\u529f\u80fd\n\n- **\u6dfb\u52a0\u8fde\u63a5**: \u8f93\u5165 `a` \u6dfb\u52a0\u65b0\u7684 SSH \u8fde\u63a5\u4fe1\u606f\n- **\u9000\u51fa\u7a0b\u5e8f**: \u8f93\u5165 `q` \u9000\u51fa\n- **\u6570\u5b57\u8fde\u63a5**: \u8f93\u5165\u5bf9\u5e94\u5e8f\u53f7\u76f4\u63a5\u8fde\u63a5\u5230\u670d\u52a1\u5668\n- **\u641c\u7d22\u8fde\u63a5**: \u8f93\u5165\u4e3b\u673a\u540d\u3001IP \u6216\u63cf\u8ff0\u5173\u952e\u5b57\u8fdb\u884c\u641c\u7d22\n- **\u5220\u9664\u8fde\u63a5**: \u8f93\u5165 `d` \u7136\u540e\u8f93\u5165\u8981\u5220\u9664\u7684\u8fde\u63a5\u5e8f\u53f7\n\n### \u4f7f\u7528\u793a\u4f8b\n\n```bash\n# \u542f\u52a8 zll\n$ zll\n\n# \u663e\u793a\u6240\u6709\u8fde\u63a5\u5217\u8868\nNumber  User    Host            Port    Description\n0       root    192.168.1.100   22      Web Server\n1       admin   db.example.com  22      Database Server\n2       user    staging.app.com 2222    Staging Environment\n\n# \u76f4\u63a5\u8fde\u63a5\nInput number, IP, or hostname (q to quit, a to add, d to delete): 0\n# \u8fde\u63a5\u5230 192.168.1.100\n\n# \u641c\u7d22\u8fde\u63a5\nInput number, IP, or hostname (q to quit, a to add, d to delete): web\n# \u663e\u793a\u5305\u542b \"web\" \u5173\u952e\u5b57\u7684\u8fde\u63a5\n\n# \u6dfb\u52a0\u65b0\u8fde\u63a5\nInput number, IP, or hostname (q to quit, a to add, d to delete): a\nInput username: myuser\nInput ip or hostname: newserver.com\nInput port (default 22): 2222\nInput comment: My New Server\nAdded successfully!\n```\n\n## \u914d\u7f6e\u6587\u4ef6\n\n\u8fde\u63a5\u4fe1\u606f\u5b58\u50a8\u5728 CSV \u683c\u5f0f\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u4f4d\u7f6e\uff1a\n\n- **macOS**: `~/Library/Application Support/zll/hosts.csv`\n- **Linux**: `~/.local/share/zll/hosts.csv`\n- **Windows**: `%APPDATA%\\zll\\hosts.csv`\n\n\u6587\u4ef6\u683c\u5f0f\uff1a\n```csv\nUser,Host,Port,Description\nroot,192.168.1.100,22,Web Server\nadmin,db.example.com,22,Database Server\n```\n\n## \u5f00\u53d1\n\n### \u73af\u5883\u8bbe\u7f6e\n\n```bash\n# \u514b\u9686\u9879\u76ee\ngit clone https://github.com/bigzhu/zll.git\ncd zll\n\n# \u5b89\u88c5 Poetry\uff08\u5982\u679c\u672a\u5b89\u88c5\uff09\ncurl -sSL https://install.python-poetry.org | python3 -\n\n# \u5b89\u88c5\u4f9d\u8d56\npoetry install\n\n# \u6fc0\u6d3b\u865a\u62df\u73af\u5883\npoetry shell\n```\n\n### \u8fd0\u884c\u6d4b\u8bd5\n\n```bash\n# \u8fd0\u884c\u6240\u6709\u6d4b\u8bd5\npoetry run pytest\n\n# \u8fd0\u884c\u6d4b\u8bd5\u5e76\u751f\u6210\u8986\u76d6\u7387\u62a5\u544a\npoetry run pytest --cov=zll --cov-report=html\n\n# \u8fd0\u884c\u7c7b\u578b\u68c0\u67e5\npoetry run mypy zll\n\n# \u4ee3\u7801\u683c\u5f0f\u5316\npoetry run black zll tests\npoetry run isort zll tests\n\n# \u4ee3\u7801\u68c0\u67e5\npoetry run ruff zll tests\n```\n\n### \u5b89\u88c5 pre-commit hooks\n\n```bash\npoetry run pre-commit install\n```\n\n## \u8bb8\u53ef\u8bc1\n\nMIT License - \u8be6\u89c1 [LICENSE](LICENSE) \u6587\u4ef6\n\n## \u8d21\u732e\n\n\u6b22\u8fce\u63d0\u4ea4 Issue \u548c Pull Request\uff01\n\n## \u53d8\u66f4\u65e5\u5fd7\n\n### v0.2.0\n- \u91cd\u5927\u4ee3\u7801\u8d28\u91cf\u6539\u8fdb\n- \u4fee\u590d\u6d4b\u8bd5\u5bfc\u5165\u95ee\u9898\uff0c\u5c06\u6d4b\u8bd5\u6587\u4ef6\u79fb\u81f3\u6b63\u786e\u76ee\u5f55\n- \u6dfb\u52a0\u5b8c\u6574\u7684\u7c7b\u578b\u6ce8\u89e3\u548c\u6587\u6863\u5b57\u7b26\u4e32\n- \u6539\u8fdb\u5f02\u5e38\u5904\u7406\u548c\u8f93\u5165\u9a8c\u8bc1\n- \u6dfb\u52a0\u5f00\u53d1\u5de5\u5177\u914d\u7f6e\uff08Black, isort, mypy, ruff, pytest\uff09\n- \u914d\u7f6e pre-commit hooks\n- \u66f4\u65b0\u6240\u6709\u4f9d\u8d56\u5305\u5230\u6700\u65b0\u7248\u672c\n- \u5b8c\u5168\u91cd\u5199 README \u6587\u6863\n- \u6dfb\u52a0\u8d21\u732e\u6307\u5357\uff08CONTRIBUTING.md\uff09\n- \u63d0\u5347\u4ee3\u7801\u683c\u5f0f\u5316\u548c\u8d28\u91cf\u6807\u51c6\n\n### v0.1.11\n- \u57fa\u7840\u529f\u80fd\u5b9e\u73b0",
    "bugtrack_url": null,
    "license": null,
    "summary": "my ssh client",
    "version": "0.2.0",
    "project_urls": {
        "Documentation": "https://github.com/bigzhu/zll",
        "Homepage": "https://github.com/bigzhu/zll",
        "Repository": "https://github.com/bigzhu/zll"
    },
    "split_keywords": [
        "ssh",
        " tool"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d37ad9f723f17f7a9ba9780d62258a4c5bf1798d19cd006ddb5d8a3b05ce1001",
                "md5": "55d0e1a910708a5548abefe6f55e4415",
                "sha256": "fdae30585bb9787085dae04c7beb97a511170563a15d9285beafcdb7fb1a1aaf"
            },
            "downloads": -1,
            "filename": "zll-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "55d0e1a910708a5548abefe6f55e4415",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 5837,
            "upload_time": "2025-07-18T03:01:55",
            "upload_time_iso_8601": "2025-07-18T03:01:55.045991Z",
            "url": "https://files.pythonhosted.org/packages/d3/7a/d9f723f17f7a9ba9780d62258a4c5bf1798d19cd006ddb5d8a3b05ce1001/zll-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "979a6967ad2744796c89a9536c25b5c19a18159d24f4a81b6702ce1b8c30f644",
                "md5": "20d48c76ed8fe5b347f649d20d01a649",
                "sha256": "f5b151fb628374e1ce8d5919fd3654df90347e9bb1894d55a539531e88dfe85d"
            },
            "downloads": -1,
            "filename": "zll-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "20d48c76ed8fe5b347f649d20d01a649",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 5805,
            "upload_time": "2025-07-18T03:01:56",
            "upload_time_iso_8601": "2025-07-18T03:01:56.571069Z",
            "url": "https://files.pythonhosted.org/packages/97/9a/6967ad2744796c89a9536c25b5c19a18159d24f4a81b6702ce1b8c30f644/zll-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-18 03:01:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bigzhu",
    "github_project": "zll",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "zll"
}
        
Elapsed time: 1.63671s