跳转到主要内容

Uptycs平台的命令行界面,具有自动完成和语法高亮。

项目描述

iusql

Build Status

Uptycs的命令行客户端,具有自动完成和语法高亮。此工具基于dbcli框架。我们在工具中使用了Uptycs的restcall。

安装

如果您已经知道如何安装Python包,则可以通过pip安装它

您可能需要在Linux上使用sudo。

如果您想使用pip安装iusql,可以使用以下命令

$ sudo pip install iusql

如果您想从源安装,可以使用以下命令

$ git pull iusql
$ cd iusql
$ python setup.py install

用法

$ iusql --help

Usage: iusql -k <uptycs key file> [DATABASE]

Examples:
  - iusql -k mykeyfile [global|realtime|audit]

首次启动时,将在~/.config/iusql/config自动创建一个配置文件。请参阅文件本身以获取所有可用选项的说明。

以下是通过该工具可用的选项

+-------------+----------------------------+------------------------------------------------------------+
| Command     | Shortcut                   | Description                                                |
+-------------+----------------------------+------------------------------------------------------------+
| .databases  | .databases                 | List databases.                                            |
| .open       | .open                      | Change to a new database.                                  |
| .schema     | .schema[+] [table]         | The complete schema for the database or a single table     |
| .status     | \s                         | Show current settings.                                     |
| .tables     | \dt[+] [table]             | List or describe tables.                                   |
| \G          | \G                         | Display current query results vertically.                  |
| \e          | \e                         | Edit command with editor (uses $EDITOR).                   |
| \f          | \f [name [args..]]         | List or execute favorite queries.                          |
| \fd         | \fd [name]                 | Delete a favorite query.                                   |
| \fs         | \fs name query             | Save a favorite query.                                     |
| \once       | \o [-o] filename           | Append next result to an output file (overwrite using -o). |
| exit        | \q                         | Exit.                                                      |
| help        | \?                         | Show this help.                                            |
| nopager     | \n                         | Disable pager, print to stdout.                            |
| notee       | notee                      | Stop writing results to an output file.                    |
| pager       | \P [command]               | Set PAGER. Print the query results via PAGER.              |
| prompt      | \R                         | Change prompt format.                                      |
| quit        | \q                         | Quit.                                                      |
| rehash      | \#                         | Refresh auto-completions.                                  |
| source      | \. filename                | Execute commands from file.                                |
| system      | system [command]           | Execute a system shell commmand.                           |
| tableformat | \T                         | Change the table format used to output results.            |
| tee         | tee [-o] filename          | Append all results to an output file (overwrite using -o). |
| watch       | watch [seconds] [-c] query | Executes the query every [seconds] seconds (by default 5). |
+-------------+----------------------------+------------------------------------------------------------+

项目详情


下载文件

下载适合您的平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分发

此版本没有提供源分发文件。请参阅有关生成分发存档的教程。

构建分发

iusql-2.0.6-py2.py3-none-any.whl (51.1 kB 查看哈希值)

上传时间 Python 2 Python 3

由以下支持