mycli 2.25.2__tar.gz → 2.26.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mycli-2.25.2 → mycli-2.26.0}/.github/workflows/ci.yml +27 -6
- {mycli-2.25.2 → mycli-2.26.0}/.github/workflows/publish.yml +9 -5
- mycli-2.26.0/AGENTS.md +144 -0
- mycli-2.26.0/AUTHORS.md +1 -0
- mycli-2.26.0/CONTRIBUTING.md +152 -0
- {mycli-2.25.2/mycli.egg-info → mycli-2.26.0}/PKG-INFO +57 -36
- {mycli-2.25.2 → mycli-2.26.0}/README.md +53 -31
- mycli-2.26.0/SPONSORS.md +1 -0
- {mycli-2.25.2 → mycli-2.26.0}/changelog.md +207 -163
- mycli-2.25.2/doc/key_bindings.rst → mycli-2.26.0/doc/key_bindings.md +24 -44
- mycli-2.26.0/doc/screenshots/polars_describe.png +0 -0
- mycli-2.26.0/doc/screenshots/polars_group_by.png +0 -0
- mycli-2.26.0/doc/screenshots/polars_histogram.png +0 -0
- mycli-2.26.0/doc/screenshots/polars_pivot.png +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/doc/transforms.md +30 -11
- {mycli-2.25.2 → mycli-2.26.0}/docker/resources/test_db-1.0.7.tar.gz +1 -1
- mycli-2.26.0/docker/resources/test_db_license.md +18 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/TIPS +2 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/boundary_tunnel.py +3 -7
- {mycli-2.25.2 → mycli-2.26.0}/mycli/client_connection.py +7 -25
- {mycli-2.25.2 → mycli-2.26.0}/mycli/constants.py +9 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/key_bindings.py +18 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/main_modes/repl.py +2 -2
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/completion_engine.py +68 -1
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/key_binding_utils.py +9 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/special/dbcommands.py +1 -1
- {mycli-2.25.2 → mycli-2.26.0}/mycli/sqlcompleter.py +24 -1
- {mycli-2.25.2 → mycli-2.26.0}/mycli/sqlexecute.py +26 -17
- {mycli-2.25.2 → mycli-2.26.0/mycli.egg-info}/PKG-INFO +57 -36
- {mycli-2.25.2 → mycli-2.26.0}/mycli.egg-info/SOURCES.txt +8 -4
- {mycli-2.25.2 → mycli-2.26.0}/mycli.egg-info/requires.txt +1 -1
- {mycli-2.25.2 → mycli-2.26.0}/mycli.egg-info/scm_file_list.json +8 -4
- mycli-2.26.0/mycli.egg-info/scm_version.json +8 -0
- {mycli-2.25.2 → mycli-2.26.0}/pyproject.toml +3 -4
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_boundary_tunnel.py +73 -70
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_client.py +15 -3
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_client_connection.py +0 -10
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_completion_engine.py +89 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_key_binding_utils.py +33 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_key_bindings.py +61 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_main_modes_repl.py +3 -9
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_smart_completion_public_schema_only.py +85 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_special_dbcommands.py +1 -6
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_sqlcompleter.py +97 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_sqlexecute.py +106 -13
- mycli-2.25.2/AGENTS.md +0 -143
- mycli-2.25.2/AUTHORS.rst +0 -3
- mycli-2.25.2/CONTRIBUTING.md +0 -118
- mycli-2.25.2/SPONSORS.rst +0 -3
- mycli-2.25.2/doc/screenshots/total_histogram.png +0 -0
- mycli-2.25.2/mycli.egg-info/scm_version.json +0 -8
- {mycli-2.25.2 → mycli-2.26.0}/.git-blame-ignore-revs +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/.github/dependabot.yml +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/.github/workflows/lint.yml +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/.github/workflows/typecheck.yml +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/.gitignore +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/LICENSE.txt +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/MANIFEST.in +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/doc/llm.md +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/doc/screenshots/main.gif +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/doc/screenshots/tables.png +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/docker/Dockerfile +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/AUTHORS +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/SPONSORS +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/__init__.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/app_state.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/cli_runner.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/clibuffer.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/client.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/client_commands.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/client_query.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/clistyle.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/clitoolbar.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/compat.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/completion_refresher.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/config.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/keyring_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/kubectl_tunnel.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/lexer.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/macos_keychain.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/main.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/main_modes/batch.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/main_modes/checkup.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/main_modes/completions.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/main_modes/execute.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/main_modes/list_dsn.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/myclirc +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/output.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/__init__.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/batch_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/cli_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/filepaths.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/hybrid_redirection.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/interactive_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/polars_completion.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/polars_transform.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/ptoolkit/__init__.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/ptoolkit/fzf.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/ptoolkit/history.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/ptoolkit/utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/special/__init__.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/special/delimitercommand.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/special/dsn_aliases.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/special/favoritequeries.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/special/iocommands.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/special/llm.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/special/main.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/special/source.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/special/utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/sql_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/sqlresult.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/string_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/tabular_output/__init__.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/packages/tabular_output/sql_format.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/password_sources.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/resources/completions/bash/mycli +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/resources/completions/fish/mycli.fish +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/resources/completions/zsh/_mycli +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/schema_prefetcher.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/ssh_tunnel.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/types.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli/vault.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli.egg-info/dependency_links.txt +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli.egg-info/entry_points.txt +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/mycli.egg-info/top_level.txt +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/setup.cfg +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/__init__.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/__init__.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/auto_vertical.feature +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/basic_commands.feature +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/connection.feature +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/crud_database.feature +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/crud_table.feature +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/db_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/environment.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/fixture_data/help_commands.txt +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/fixture_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/iocommands.feature +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/named_queries.feature +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/specials.feature +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/steps/__init__.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/steps/auto_vertical.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/steps/basic_commands.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/steps/connection.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/steps/crud_database.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/steps/crud_table.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/steps/iocommands.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/steps/named_queries.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/steps/specials.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/steps/utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/steps/wrappers.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/features/wrappager.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/myclirc +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/mylogin.cnf +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/conftest.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_app_state.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_bash_completion.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_batch_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_checkup.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_cli_runner.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_cli_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_clibuffer.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_client_commands.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_client_query.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_clistyle.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_clitoolbar.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_completer_use_switch.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_completion_refresher.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_config.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_delimitercommand.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_dsn_aliases.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_favoritequeries.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_filepaths.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_fish_completion.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_hybrid_redirection.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_interactive_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_keyring_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_kubectl_tunnel.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_macos_keychain.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_main.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_main_modes_batch.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_main_modes_execute.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_main_modes_list_dsn.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_naive_completion.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_output.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_password_sources.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_polars_completion.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_polars_transform.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_ptoolkit_fzf.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_ptoolkit_history.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_ptoolkit_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_schema_prefetcher.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_special_init.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_special_iocommands.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_special_llm.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_special_main.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_special_source.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_special_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_sql_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_sqlresult.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_ssh_tunnel.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_string_utils.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_tabular_output.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_vault.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/pytests/test_zsh_completion.py +0 -0
- {mycli-2.25.2 → mycli-2.26.0}/test/utils.py +0 -0
|
@@ -19,7 +19,7 @@ jobs:
|
|
|
19
19
|
strategy:
|
|
20
20
|
fail-fast: false
|
|
21
21
|
matrix:
|
|
22
|
-
python-version: ["3.
|
|
22
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
23
23
|
|
|
24
24
|
steps:
|
|
25
25
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
@@ -144,7 +144,7 @@ jobs:
|
|
|
144
144
|
uv run -- coverage report -m --sort=Miss --skip-covered --skip-empty
|
|
145
145
|
|
|
146
146
|
tests-wsl:
|
|
147
|
-
name: Tests WSL
|
|
147
|
+
name: Tests WSL (3.14)
|
|
148
148
|
runs-on: windows-latest
|
|
149
149
|
|
|
150
150
|
steps:
|
|
@@ -214,7 +214,7 @@ jobs:
|
|
|
214
214
|
uv run --python 3.14 -- coverage report -m --sort=Miss --skip-covered --skip-empty
|
|
215
215
|
|
|
216
216
|
test-no-extras:
|
|
217
|
-
name: Tests Without Extras
|
|
217
|
+
name: Tests Without Extras (3.14)
|
|
218
218
|
runs-on: ubuntu-latest
|
|
219
219
|
|
|
220
220
|
steps:
|
|
@@ -250,20 +250,41 @@ jobs:
|
|
|
250
250
|
run: |
|
|
251
251
|
uv run tox -e py3.14
|
|
252
252
|
|
|
253
|
-
docker-build:
|
|
254
|
-
name: Build Docker Image
|
|
253
|
+
docker-x86-build:
|
|
254
|
+
name: Build x86 Docker Image
|
|
255
255
|
runs-on: ubuntu-latest
|
|
256
256
|
|
|
257
257
|
permissions:
|
|
258
258
|
contents: read
|
|
259
259
|
|
|
260
|
+
# simpler than the steps in publish.yml, because we don't do the slow buildx multiarch
|
|
260
261
|
steps:
|
|
261
262
|
- name: Checkout repository
|
|
262
263
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
263
264
|
|
|
264
265
|
- name: Build Docker image
|
|
265
266
|
id: build
|
|
266
|
-
uses: docker/build-push-action@
|
|
267
|
+
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
|
268
|
+
with:
|
|
269
|
+
context: .
|
|
270
|
+
file: docker/Dockerfile
|
|
271
|
+
push: false
|
|
272
|
+
|
|
273
|
+
docker-arm-build:
|
|
274
|
+
name: Build ARM Docker Image
|
|
275
|
+
runs-on: ubuntu-24.04-arm
|
|
276
|
+
|
|
277
|
+
permissions:
|
|
278
|
+
contents: read
|
|
279
|
+
|
|
280
|
+
# simpler than the steps in publish.yml, because we don't do the slow buildx multiarch
|
|
281
|
+
steps:
|
|
282
|
+
- name: Checkout repository
|
|
283
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
284
|
+
|
|
285
|
+
- name: Build Docker image
|
|
286
|
+
id: build
|
|
287
|
+
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
|
267
288
|
with:
|
|
268
289
|
context: .
|
|
269
290
|
file: docker/Dockerfile
|
|
@@ -28,7 +28,7 @@ jobs:
|
|
|
28
28
|
|
|
29
29
|
strategy:
|
|
30
30
|
matrix:
|
|
31
|
-
python-version: ["3.
|
|
31
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
32
32
|
|
|
33
33
|
steps:
|
|
34
34
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
@@ -277,6 +277,8 @@ jobs:
|
|
|
277
277
|
needs: [build]
|
|
278
278
|
environment: release
|
|
279
279
|
|
|
280
|
+
# some of these permissions are probably not needed since attestations
|
|
281
|
+
# were removed
|
|
280
282
|
permissions:
|
|
281
283
|
contents: read
|
|
282
284
|
packages: write
|
|
@@ -295,6 +297,7 @@ jobs:
|
|
|
295
297
|
username: ${{ github.actor }}
|
|
296
298
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
297
299
|
|
|
300
|
+
# should be needed for multi-arch images
|
|
298
301
|
- name: Set up Docker Buildx
|
|
299
302
|
id: buildx
|
|
300
303
|
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
|
|
@@ -305,19 +308,20 @@ jobs:
|
|
|
305
308
|
with:
|
|
306
309
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
307
310
|
env:
|
|
311
|
+
# despite this setting, annotations only seem to appear at the index level
|
|
312
|
+
# on "docker buildx imagetools inspect"
|
|
308
313
|
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
|
|
309
314
|
|
|
310
315
|
- name: Build and push Docker image
|
|
311
316
|
id: push
|
|
312
|
-
uses: docker/build-push-action@
|
|
317
|
+
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
|
313
318
|
with:
|
|
314
319
|
context: .
|
|
315
320
|
file: docker/Dockerfile
|
|
316
321
|
push: true
|
|
322
|
+
# the linux/arm64 arch will be very slow to build, so it is only made for
|
|
323
|
+
# publication, not testing
|
|
317
324
|
platforms: linux/amd64,linux/arm64
|
|
318
325
|
tags: ${{ steps.meta.outputs.tags }}
|
|
319
326
|
labels: ${{ steps.meta.outputs.labels }}
|
|
320
327
|
annotations: ${{ steps.meta.outputs.annotations }}
|
|
321
|
-
# unclutter the GitHub interface
|
|
322
|
-
provenance: false
|
|
323
|
-
sbom: false
|
mycli-2.26.0/AGENTS.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Mycli
|
|
2
|
+
|
|
3
|
+
A command line client for MySQL with auto-completion and syntax highlighting.
|
|
4
|
+
|
|
5
|
+
## Project Structure
|
|
6
|
+
|
|
7
|
+
/ # repository root
|
|
8
|
+
├── .github/ # GitHub Actions and configuration
|
|
9
|
+
├── pyproject.toml # project configuration
|
|
10
|
+
├── doc/ # documentation
|
|
11
|
+
├── mycli/ # application source
|
|
12
|
+
├── mycli/__init__.py # provides version number
|
|
13
|
+
├── mycli/app_state.py # `AppStateMixin` application state mixin and related functions
|
|
14
|
+
├── mycli/boundary_tunnel.py # connection over Boundary tunnel
|
|
15
|
+
├── mycli/cli_runner.py # connects and dispatches main modes based on CLI arguments
|
|
16
|
+
├── mycli/clibuffer.py # prompt_toolkit buffer utilities
|
|
17
|
+
├── mycli/client_commands.py # special commands which must be registered separately
|
|
18
|
+
├── mycli/client_connection.py # `ClientConnectionMixin` mixin for establishing the database connection
|
|
19
|
+
├── mycli/client_query.py # `ClientQueryMixin` mixin for running queries and refreshing completions
|
|
20
|
+
├── mycli/client.py # the `MyCli` "god class"
|
|
21
|
+
├── mycli/clistyle.py # prompt_toolkit style utilities
|
|
22
|
+
├── mycli/clitoolbar.py # prompt_toolkit toolbar utilities
|
|
23
|
+
├── mycli/compat.py # OS compatibility helpers
|
|
24
|
+
├── mycli/completion_refresher.py # populates a `SQLCompleter` object in a background thread
|
|
25
|
+
├── mycli/config.py # configuration file readers and utilities
|
|
26
|
+
├── mycli/constants.py # shared constants
|
|
27
|
+
├── mycli/key_bindings.py # prompt_toolkit key binding utilities
|
|
28
|
+
├── mycli/keyring_utils.py # saved credential utilities
|
|
29
|
+
├── mycli/kubectl_tunnel.py # connection over kubectl tunnel
|
|
30
|
+
├── mycli/lexer.py # extends `MySqlLexer` from Pygments
|
|
31
|
+
├── mycli/macos_keychain.py # macOS Keychain credentials preserving access controls
|
|
32
|
+
├── mycli/main.py # processes CLI arguments
|
|
33
|
+
├── mycli/main_modes/ # main execution paths
|
|
34
|
+
├── mycli/main_modes/batch.py # `--batch` mode
|
|
35
|
+
├── mycli/main_modes/checkup.py # `--checkup` mode
|
|
36
|
+
├── mycli/main_modes/completions.py # `--completions` mode
|
|
37
|
+
├── mycli/main_modes/execute.py # `--execute` mode
|
|
38
|
+
├── mycli/main_modes/list_dsn.py # `--list-dsn` mode
|
|
39
|
+
├── mycli/main_modes/repl.py # interactive REPL mode
|
|
40
|
+
├── mycli/myclirc # project-level configuration file
|
|
41
|
+
├── mycli/output.py # `OutputMixin` mixin for feedback and output of query results
|
|
42
|
+
├── mycli/packages/ # application packages
|
|
43
|
+
├── mycli/packages/batch_utils.py # utilities for `--batch` mode
|
|
44
|
+
├── mycli/packages/cli_utils.py # utilities for parsing CLI arguments
|
|
45
|
+
├── mycli/packages/completion_engine.py # implementation of completion suggestions
|
|
46
|
+
├── mycli/packages/filepaths.py # utilities for files, including completion suggestions
|
|
47
|
+
├── mycli/packages/hybrid_redirection.py # implementation of shell-style redirects
|
|
48
|
+
├── mycli/packages/interactive_utils.py # utilities for confirming on destructive statements
|
|
49
|
+
├── mycli/packages/key_binding_utils.py # handlers for key bindings and related special commands
|
|
50
|
+
├── mycli/packages/polars_completion.py # completions for `.|` transforms
|
|
51
|
+
├── mycli/packages/polars_transform.py # implements `.|` transforms
|
|
52
|
+
├── mycli/packages/ptoolkit/ # extends prompt_toolkit
|
|
53
|
+
├── mycli/packages/special/ # implementation of mycli special commands
|
|
54
|
+
├── mycli/packages/sql_utils.py # utilities for parsing SQL statements
|
|
55
|
+
├── mycli/packages/sqlresult.py # the `SQLResult` dataclass for holding responses
|
|
56
|
+
├── mycli/packages/string_utils.py # generic string utilities
|
|
57
|
+
├── mycli/packages/tabular_output/ # extends cli_helper with additional output formats
|
|
58
|
+
├── mycli/password_sources.py # password sources and precedence
|
|
59
|
+
├── mycli/resources/completions/ # shell completions for CLI interface
|
|
60
|
+
├── mycli/ssh_tunnel.py # connecting over a tunnel with `--ssh-jump`
|
|
61
|
+
├── mycli/schema_prefetcher.py # background prefetcher for multi-schema auto-completion
|
|
62
|
+
├── mycli/sqlcompleter.py # offers SQL completions
|
|
63
|
+
├── mycli/sqlexecute.py # runs SQL queries
|
|
64
|
+
├── mycli/types.py # shared types
|
|
65
|
+
├── mycli/vault.py # Vault integration
|
|
66
|
+
├── test/features/ # behave tests
|
|
67
|
+
├── test/myclirc # mycli configuration used for tests
|
|
68
|
+
├── test/mylogin.cnf # `mylogin.cnf` example used for tests
|
|
69
|
+
├── test/pytests/ # pytest tests
|
|
70
|
+
├── test/pytests/conftest.py # pytest configuration
|
|
71
|
+
└── test/utils.py # shared utilities for tests
|
|
72
|
+
|
|
73
|
+
## Development
|
|
74
|
+
|
|
75
|
+
### Python
|
|
76
|
+
|
|
77
|
+
#### Python Dependency Management
|
|
78
|
+
|
|
79
|
+
This repo uses `uv` for dependency management. **Always** prefix Python
|
|
80
|
+
commands with `uv run`. Example:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
env -u PYTHONPATH uv run -- python script.py
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
#### Python Typing
|
|
87
|
+
|
|
88
|
+
This repo uses type annotations which are checked by `mypy`. **Always** add
|
|
89
|
+
type annotations, and always check new code with `env -u PYTHONPATH uv run -- mypy --install-types --non-interactive script.py`.
|
|
90
|
+
|
|
91
|
+
Use lower-case type annotations such as `tuple`, not upper-case type
|
|
92
|
+
annotations such as `Tuple`.
|
|
93
|
+
|
|
94
|
+
Use `Type | None` instead of `Optional[Type]`.
|
|
95
|
+
|
|
96
|
+
#### Python Testing
|
|
97
|
+
|
|
98
|
+
Tests are coordinated by `tox`, and include both `pytest` and `behave` tests.
|
|
99
|
+
To run the full test suite, execute `env -u PYTHONPATH uv run -- tox`.
|
|
100
|
+
|
|
101
|
+
#### Python Compatibility
|
|
102
|
+
|
|
103
|
+
Use Python features available from Python 3.11 through Python 3.14.
|
|
104
|
+
Compatibility with Python 3.9 is not needed. Compatibility with Python
|
|
105
|
+
3.10 is not needed.
|
|
106
|
+
|
|
107
|
+
#### Python Style
|
|
108
|
+
|
|
109
|
+
Import style: prefer `from package import name` over `import package.name as name`.
|
|
110
|
+
|
|
111
|
+
Quoting style: prefer single quotes for new code, but do not remove double quotes
|
|
112
|
+
from existing code.
|
|
113
|
+
|
|
114
|
+
#### Python Environment
|
|
115
|
+
|
|
116
|
+
* Package manager: `uv` (not pip)
|
|
117
|
+
* Formatter: `env -u PYTHONPATH uv run -- ruff format`
|
|
118
|
+
* Linter: `env -u PYTHONPATH uv run -- ruff check`
|
|
119
|
+
* Type checker: `env -u PYTHONPATH uv run -- mypy --install-types --non-interactive`
|
|
120
|
+
|
|
121
|
+
### Git Workflows
|
|
122
|
+
|
|
123
|
+
#### Git Commit Messages
|
|
124
|
+
|
|
125
|
+
* Use the present tense.
|
|
126
|
+
* Keep the first line under 50 characters in length.
|
|
127
|
+
* Keep the second line blank.
|
|
128
|
+
* Keep all other lines under 72 characters in length.
|
|
129
|
+
* Reference issue numbers when available.
|
|
130
|
+
|
|
131
|
+
#### Generating PRs
|
|
132
|
+
|
|
133
|
+
When generating a PR, follow the instructions in `.github/PULL_REQUEST_TEMPLATE.md`:
|
|
134
|
+
|
|
135
|
+
* Add new author names to `mycli/AUTHORS`.
|
|
136
|
+
* Add a new entry to `changelog.md`.
|
|
137
|
+
|
|
138
|
+
### Code Comments
|
|
139
|
+
|
|
140
|
+
Keep comments concise and direct. Use full sentences, ending with a period.
|
|
141
|
+
|
|
142
|
+
### See Also
|
|
143
|
+
|
|
144
|
+
See also the file `CONTRIBUTING.md`.
|
mycli-2.26.0/AUTHORS.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
See [AUTHORS](mycli/AUTHORS)
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Development Guide
|
|
2
|
+
|
|
3
|
+
This is a guide for developers who would like to contribute to the project.
|
|
4
|
+
|
|
5
|
+
If you're interested in contributing to mycli, thank you. We'd love your help!
|
|
6
|
+
You'll always get credit and appreciation for your work.
|
|
7
|
+
|
|
8
|
+
## GitHub Workflow
|
|
9
|
+
|
|
10
|
+
1. [Fork the repository](https://github.com/dbcli/mycli) on GitHub.
|
|
11
|
+
|
|
12
|
+
2. Clone your fork locally:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
git clone <url-for-your-fork>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
3. Add the official repository (`upstream`) as a remote repository:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
git remote add upstream git@github.com:dbcli/mycli.git
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
4. Once you have added upstream, the following command will pull the latest changes to your local `main`:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
git pull upstream main
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
5. Set up [uv](https://docs.astral.sh/uv/getting-started/installation/)
|
|
31
|
+
for development:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
cd mycli
|
|
35
|
+
uv sync --all-extras
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
We've just created a virtual environment and installed all the dependencies
|
|
39
|
+
and tools we need to work on mycli.
|
|
40
|
+
|
|
41
|
+
6. Create a branch for your bugfix or feature based off the `main` branch:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
git checkout -b <name-of-bugfix-or-feature> main
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
7. When your work is ready for the mycli team to review it, push your branch to your fork:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
git push origin <name-of-bugfix-or-feature>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
8. [Create a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)
|
|
54
|
+
on GitHub.
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## Running Mycli with Changes
|
|
58
|
+
|
|
59
|
+
To run mycli with your local changes:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
uv run mycli
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## Running the Tests
|
|
67
|
+
|
|
68
|
+
While you work on mycli, it's important to run the tests to make sure your code
|
|
69
|
+
hasn't broken any existing functionality. To run the tests, just run:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
uv run tox
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Test Database Credentials
|
|
76
|
+
|
|
77
|
+
Some tests require a database connection to work. You can tell the tests which
|
|
78
|
+
credentials to use by setting the applicable environment variables:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
export PYTEST_HOST=localhost
|
|
82
|
+
export PYTEST_USER=mycli
|
|
83
|
+
export PYTEST_PASSWORD=myclirocks
|
|
84
|
+
export PYTEST_PORT=3306
|
|
85
|
+
export PYTEST_CHARSET=utf8mb4
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Since the default values are
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
export PYTEST_HOST=localhost
|
|
92
|
+
export PYTEST_USER=root
|
|
93
|
+
export PYTEST_PASSWORD=<no password>
|
|
94
|
+
export PYTEST_PORT=3306
|
|
95
|
+
export PYTEST_CHARSET=utf8mb4
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
for most cases you only need to set the values which differ from the defaults:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
export PYTEST_USER=mycli
|
|
102
|
+
export PYTEST_PASSWORD=myclirocks
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
If you would like to run the tests as a user with only the necessary privileges,
|
|
106
|
+
create a `mycli` user on your MySQL server and run the following GRANT statements:
|
|
107
|
+
|
|
108
|
+
```sql
|
|
109
|
+
GRANT ALL PRIVILEGES ON `mycli_%`.* TO 'mycli'@'localhost';
|
|
110
|
+
GRANT SELECT ON mysql.* TO 'mycli'@'localhost';
|
|
111
|
+
GRANT SELECT ON performance_schema.* TO 'mycli'@'localhost';
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Editor Tests
|
|
115
|
+
|
|
116
|
+
Some tests expect the program `ex` to be a symbolic link to `vim`.
|
|
117
|
+
|
|
118
|
+
In some systems (e.g. Arch Linux) `ex` is a symbolic link to `vi`, which will
|
|
119
|
+
change the output and therefore make some tests fail.
|
|
120
|
+
|
|
121
|
+
You can check this by running:
|
|
122
|
+
```bash
|
|
123
|
+
readlink -f $(which ex)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
# GitHub PR checklist
|
|
127
|
+
|
|
128
|
+
* add the contribution to `changelog.md`
|
|
129
|
+
* add your name to the `AUTHORS` file (or make sure it is already there)
|
|
130
|
+
* run
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
uv run ruff check && uv run ruff format && uv run mypy --install-types .
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
## Releasing a New Version of Mycli (For Maintainers)
|
|
138
|
+
|
|
139
|
+
We create a new [release](https://github.com/dbcli/mycli/releases) in GitHub. This triggers a GitHub Action which will
|
|
140
|
+
|
|
141
|
+
* run all the tests
|
|
142
|
+
* build a wheel and upload it to PyPI
|
|
143
|
+
* build a Docker image and upload it to ghcr.io
|
|
144
|
+
|
|
145
|
+
Steps to create a release:
|
|
146
|
+
|
|
147
|
+
* Update `changelog.md`, setting the release version and date at the top. Bump the feature version if there are new features in the changelog, otherwise only bump the patch version. Merge this change.
|
|
148
|
+
* Navigate to https://github.com/dbcli/mycli/releases/new .
|
|
149
|
+
* Press "Select Tag" and enter the new version number. It should be the same as in `changelog.md` but with a leading `v`. It should not already exist.
|
|
150
|
+
* Press "Generate Release Notes", which will fill in the notes and the title.
|
|
151
|
+
* Sanity check the generated release notes.
|
|
152
|
+
* Press "Publish Release".
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mycli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.26.0
|
|
4
4
|
Summary: Rich MySQL terminal client with autocompletion, syntax highlighting, and dataframes
|
|
5
5
|
Author: Mycli Core Team
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -15,7 +15,6 @@ Classifier: Intended Audience :: Science/Research
|
|
|
15
15
|
Classifier: Operating System :: OS Independent
|
|
16
16
|
Classifier: Programming Language :: Python
|
|
17
17
|
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
@@ -24,16 +23,16 @@ Classifier: Programming Language :: SQL
|
|
|
24
23
|
Classifier: Topic :: Database
|
|
25
24
|
Classifier: Topic :: Database :: Front-Ends
|
|
26
25
|
Classifier: Topic :: Software Development
|
|
27
|
-
Requires-Python: >=3.
|
|
26
|
+
Requires-Python: >=3.11
|
|
28
27
|
Description-Content-Type: text/markdown
|
|
29
28
|
License-File: LICENSE.txt
|
|
30
|
-
License-File: AUTHORS.
|
|
29
|
+
License-File: AUTHORS.md
|
|
31
30
|
Requires-Dist: click~=8.5.0
|
|
32
31
|
Requires-Dist: clickdc~=0.1.1
|
|
33
32
|
Requires-Dist: cryptography~=50.0.1
|
|
34
33
|
Requires-Dist: Pygments~=2.21.0
|
|
35
34
|
Requires-Dist: prompt_toolkit<4.0.0,>=3.0.41
|
|
36
|
-
Requires-Dist: PyMySQL~=1.
|
|
35
|
+
Requires-Dist: PyMySQL~=1.2.3
|
|
37
36
|
Requires-Dist: sqlparse~=0.6.0
|
|
38
37
|
Requires-Dist: sqlglot~=30.17.0
|
|
39
38
|
Requires-Dist: sqlglotc~=30.17.0
|
|
@@ -72,8 +71,9 @@ Dynamic: license-file
|
|
|
72
71
|
|
|
73
72
|
# mycli
|
|
74
73
|
|
|
75
|
-
[](https://github.com/dbcli/mycli/actions/workflows/ci.yml)
|
|
75
|
+
[](https://pypi.org/project/mycli/)
|
|
76
|
+
[](https://github.com/dbcli/mycli/blob/main/LICENSE.txt)
|
|
77
77
|
|
|
78
78
|
Rich MySQL terminal client with auto-completion, syntax highlighting, and dataframes.
|
|
79
79
|
|
|
@@ -111,41 +111,52 @@ Release 2.0.0 has [breaking changes](https://github.com/dbcli/mycli/blob/v2.0.0/
|
|
|
111
111
|
If you already know how to install Python packages, then you can install mycli
|
|
112
112
|
via `pip`. This package is always up to date.
|
|
113
113
|
|
|
114
|
-
You might need `sudo` on Linux.
|
|
115
|
-
|
|
116
114
|
```bash
|
|
117
115
|
pip install --upgrade 'mycli[all]'
|
|
118
116
|
```
|
|
119
117
|
|
|
120
|
-
or, on macOS (`pygments` is optional
|
|
118
|
+
or, on macOS (`pygments` is optional):
|
|
121
119
|
|
|
122
120
|
```bash
|
|
123
121
|
brew update && brew install mycli pygments
|
|
124
122
|
```
|
|
125
123
|
|
|
126
|
-
or, on Debian or Ubuntu (`fzf` and `pygments` are optional
|
|
124
|
+
or, on Debian or Ubuntu (`fzf` and `pygments` are optional):
|
|
127
125
|
|
|
128
126
|
```bash
|
|
129
|
-
|
|
127
|
+
apt-get install mycli fzf python3-pygments
|
|
130
128
|
```
|
|
131
129
|
|
|
132
|
-
|
|
130
|
+
## Try Without Installing: uv
|
|
133
131
|
|
|
134
|
-
|
|
132
|
+
```bash
|
|
133
|
+
uv tool run 'mycli[all]' --help
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Try Without Installing: Docker
|
|
137
|
+
|
|
138
|
+
The images on Dockerhub are out of date! [ghcr.io](https://github.com/dbcli/mycli/pkgs/container/mycli) images are preferred. A sample database
|
|
139
|
+
is included:
|
|
135
140
|
|
|
136
141
|
```bash
|
|
137
|
-
|
|
142
|
+
docker run --pull=always -it ghcr.io/dbcli/mycli:latest
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
The same image works with macOS [container](https://github.com/apple/container):
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
container run -it ghcr.io/dbcli/mycli:latest
|
|
138
149
|
```
|
|
139
150
|
|
|
140
151
|
# Features
|
|
141
152
|
|
|
142
153
|
* Auto-completion as you type for SQL keywords as well as tables, views, columns, enums, and more!
|
|
143
|
-
* Fuzzy history search using [fzf](https://github.com/junegunn/fzf).
|
|
144
|
-
* Output explorer using [fzf](https://github.com/junegunn/fzf) or other tools.
|
|
145
|
-
* Syntax highlighting using [Pygments](https://pygments.org/).
|
|
146
154
|
* Smart-completion suggests context-sensitive completion:
|
|
147
155
|
- `SELECT * FROM `<kbd>tab</kbd> will only show table names.
|
|
148
156
|
- `SELECT * FROM users WHERE `<kbd>tab</kbd> will only show column names.
|
|
157
|
+
* Fuzzy history search using [fzf](https://github.com/junegunn/fzf).
|
|
158
|
+
* Output explorer using [fzf](https://github.com/junegunn/fzf) or other tools.
|
|
159
|
+
* Syntax highlighting using [Pygments](https://pygments.org/).
|
|
149
160
|
* Multiline queries.
|
|
150
161
|
* Favorite queries with positional or named parameters using [Jinja](https://jinja.palletsprojects.com/en/stable/). Save a query using
|
|
151
162
|
```
|
|
@@ -156,8 +167,7 @@ mycli --help
|
|
|
156
167
|
/f alias --key=value
|
|
157
168
|
```
|
|
158
169
|
* Timing of SQL statements and table rendering.
|
|
159
|
-
*
|
|
160
|
-
* Pretty printing of tabular data.
|
|
170
|
+
* Many output formats for tabular results.
|
|
161
171
|
* Shell-style trailing redirects with `$>`, `$>>` and `$|` operators.
|
|
162
172
|
* [Polars](https://pola.rs) dataframe [transforms and plots](https://github.com/dbcli/mycli/blob/main/doc/transforms.md) with `.|`, and Parquet saves with `.>`.
|
|
163
173
|
* [Querying LLMs](https://www.mycli.net/llm) with context derived from your schema using `/llm`.
|
|
@@ -168,10 +178,19 @@ mycli --help
|
|
|
168
178
|
Mycli creates a config file `~/.myclirc` on the first run; you can use the
|
|
169
179
|
options in that file to configure the above features, and more.
|
|
170
180
|
|
|
171
|
-
Some features are only exposed as [key bindings](https://github.com/dbcli/mycli/blob/main/doc/key_bindings.
|
|
181
|
+
Some features are only exposed as [key bindings](https://github.com/dbcli/mycli/blob/main/doc/key_bindings.md).
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
# Usage
|
|
185
|
+
|
|
186
|
+
See
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
mycli --help
|
|
190
|
+
```
|
|
172
191
|
|
|
173
192
|
|
|
174
|
-
#
|
|
193
|
+
# Contributing
|
|
175
194
|
|
|
176
195
|
If you're interested in contributing to this project, first of all we would like
|
|
177
196
|
to extend our heartfelt gratitude. We've written a small doc to describe how to
|
|
@@ -179,6 +198,7 @@ get mycli running in a development setup.
|
|
|
179
198
|
|
|
180
199
|
https://github.com/dbcli/mycli/blob/main/CONTRIBUTING.md
|
|
181
200
|
|
|
201
|
+
|
|
182
202
|
# Additional Install Instructions
|
|
183
203
|
|
|
184
204
|
## Shell Completions
|
|
@@ -203,8 +223,9 @@ loaded with `source`.
|
|
|
203
223
|
## Alternative Install Methods
|
|
204
224
|
|
|
205
225
|
These are some alternative ways to install mycli that are not managed by our
|
|
206
|
-
team but provided by OS package maintainers.
|
|
207
|
-
|
|
226
|
+
team but provided by OS package maintainers.
|
|
227
|
+
|
|
228
|
+
**NOTE: OS packages could be considerably out of date.**
|
|
208
229
|
|
|
209
230
|
If present, the `fzf` package can be used for fuzzy history search, and as an
|
|
210
231
|
output "explorer" with the `\x` special command. `pygmentize` can be used for
|
|
@@ -227,7 +248,7 @@ using apt. The `fzf` and `python3-pygments` packages are optional but
|
|
|
227
248
|
recommended:
|
|
228
249
|
|
|
229
250
|
```bash
|
|
230
|
-
|
|
251
|
+
apt-get install mycli fzf python3-pygments
|
|
231
252
|
```
|
|
232
253
|
|
|
233
254
|
### Fedora
|
|
@@ -236,15 +257,7 @@ Fedora has a package available for mycli; install it using dnf. The `fzf` and
|
|
|
236
257
|
`python-pygments` packages are optional but recommended:
|
|
237
258
|
|
|
238
259
|
```bash
|
|
239
|
-
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
### Docker
|
|
243
|
-
|
|
244
|
-
The images on Dockerhub are out of date. ghcr.io is preferred. Example:
|
|
245
|
-
|
|
246
|
-
```
|
|
247
|
-
docker run --pull=always -it ghcr.io/dbcli/mycli:latest
|
|
260
|
+
dnf install mycli fzf python-pygments
|
|
248
261
|
```
|
|
249
262
|
|
|
250
263
|
### Windows
|
|
@@ -272,7 +285,7 @@ With WSL, you are probably using an Ubuntu distribution, in which case
|
|
|
272
285
|
recommended dependencies can be installed by
|
|
273
286
|
|
|
274
287
|
```bash
|
|
275
|
-
|
|
288
|
+
apt-get install fzf python3-pygments
|
|
276
289
|
```
|
|
277
290
|
|
|
278
291
|
and mycli can be installed by `apt-get` or by `pip` (recommended):
|
|
@@ -302,7 +315,7 @@ Thanks to [PyMysql](https://github.com/PyMySQL/PyMySQL) for a pure Python adapte
|
|
|
302
315
|
# Compatibility
|
|
303
316
|
|
|
304
317
|
Mycli is tested on macOS (full), Linux (full), Windows (partial), and WSL
|
|
305
|
-
(partial), and requires Python 3.
|
|
318
|
+
(partial), and requires Python 3.11 or better.
|
|
306
319
|
|
|
307
320
|
To connect to MySQL versions earlier than 5.5, you may need to set the
|
|
308
321
|
following in `~/.myclirc`:
|
|
@@ -323,3 +336,11 @@ Common topics include:
|
|
|
323
336
|
- [Configuring mycli](https://mycli.net/config)
|
|
324
337
|
- [Using/Disabling the pager](https://mycli.net/pager)
|
|
325
338
|
- [Syntax colors](https://mycli.net/syntax)
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
# License
|
|
342
|
+
|
|
343
|
+
Mycli is Open Source Software provided under the [BSD 3-Clause License](LICENSE.txt).
|
|
344
|
+
|
|
345
|
+
The Mycli Docker image and git repository include a copy of the [employees sample database](https://dev.mysql.com/doc/employee/en/)
|
|
346
|
+
provided by Oracle under the [Creative Commons Attribution-Share Alike 3.0 Unported License](https://dev.mysql.com/doc/employee/en/employees-license.html).
|