dbcli/mycli 源码下载与部署教程

项目概述

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.

项目地址

https://github.com/dbcli/mycli

项目页面预览

dbcli/mycli preview

关键指标

  • Stars:11848
  • 主要语言:Python
  • License:Other
  • 最近更新:2026-01-13T11:05:00Z
  • 默认分支:main

本站高速下载(国内可用)

点击下载(本站镜像)
– SHA256:428e1157f73a9646a359136b9bc6e8d44fe4e30ce4083bb7a27616483d8d470c

安装部署要点(README 精选)

Usage

See

mycli --help

Features

mycli is written using prompt_toolkit.

  • Auto-completion as you type for SQL keywords as well as tables, views and
    columns in the database.
  • Syntax highlighting using Pygments.
  • Smart-completion (enabled by default) will suggest context-sensitive completion.
    • SELECT * FROM <tab> will only show table names.
    • SELECT * FROM users WHERE <tab> will only show column names.
  • Support for multiline queries.
  • Favorite queries with optional positional parameters. Save a query using
    \fs alias query and execute it with \f alias whenever you need.
  • Timing of sql statements and table rendering.
  • Config file is automatically created at ~/.myclirc at first launch.
  • Log every query and its results to a file (disabled by default).
  • Pretty prints tabular data (with colors!)
  • Support for SSL connections
  • Shell-style trailing redirects with $>, $>> and $| operators.
  • Some features are only exposed as key bindings

Contributions:

If you’re interested in contributing to this project, first of all I would like
to extend my heartfelt gratitude. I’ve written a small doc to describe how to
get this running in a development setup.

https://github.com/dbcli/mycli/blob/main/CONTRIBUTING.md

Additional Install Instructions:

These are some alternative ways to install mycli that are not managed by our team but provided by OS package maintainers. These packages could be slightly out of date and take time to release the latest version.

Configuration and Usage

For more information on using and configuring mycli, check out our documentation.

Common topics include:
Configuring mycli
Using/Disabling the pager
Syntax colors

常用命令(从 README 提取)

pip install -U 'mycli[all]'

brew update && brew install mycli  # Only on macOS

sudo apt-get install mycli  # Only on Debian or Ubuntu

通用部署说明

  1. 下载源码并阅读 README
  2. 安装依赖(pip/npm/yarn 等)
  3. 配置环境变量(API Key、模型路径、数据库等)
  4. 启动服务并测试访问
  5. 上线建议:Nginx 反代 + HTTPS + 进程守护(systemd / pm2)

免责声明与版权说明

本文仅做开源项目整理与教程索引,源码版权归原作者所有,请遵循对应 License 合规使用。

© 版权声明
THE END
喜欢就支持一下吧
点赞13 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容