> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/tools/community/mariadb-shell/using-mariadb-shell.md).

# Using MariaDB Shell

Work with MariaDB Shell day to day: shell commands, SQL and Python modes, completion, history, batch runs, result formats, command line integration, and the pager.

MariaDB Shell is an interactive client and a scripting environment at the same time. You type SQL or Python at the prompt, control the shell itself with backslash commands such as `\use` or `\option`, and run the same work unattended from scripts, cron jobs, or CI pipelines.

The pages in this section describe how to work with the shell once it's installed and connected. To install it, see [Installation](/docs/tools/community/mariadb-shell/installation.md). To open a connection, see [Connecting to a Server](/docs/tools/community/mariadb-shell/connecting.md).

{% columns %}
{% column %}
{% content-ref url="/pages/HqSycYIrTJqPDvorYW7u" %}
[Shell Commands](/docs/tools/community/mariadb-shell/using-mariadb-shell/shell-commands.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
The built-in backslash commands, their aliases and syntax, with details on the ones that need explanation.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/OhqZMo0kr8uwuo5wwEWn" %}
[SQL and Python Modes](/docs/tools/community/mariadb-shell/using-mariadb-shell/sql-and-python-modes.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
How to switch between SQL and Python, enter multi-line statements, and run SQL from Python code.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/qHY8XaW3IptBs5AKUpWF" %}
[Autocompletion](/docs/tools/community/mariadb-shell/using-mariadb-shell/autocompletion.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Tab completion for SQL keywords, database object names, Python objects, and shell commands.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/7mlMoDQGvOET5XCZyJbX" %}
[Editing and History](/docs/tools/community/mariadb-shell/using-mariadb-shell/editing-and-history.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Line-editing keys, editing statements in an external editor, and the command history.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/L2pB2hnqgPhLZr7hJl72" %}
[Batch Execution](/docs/tools/community/mariadb-shell/using-mariadb-shell/batch-execution.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
How to run SQL and Python scripts non-interactively, pass arguments to them, and evaluate exit codes.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/iMXj2InIGs5GJjyZpMPv" %}
[Output Formats](/docs/tools/community/mariadb-shell/using-mariadb-shell/output-formats.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Table, tabbed, vertical, and JSON result formats, column metadata, and formatting results from Python.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/atbZLB9nTQS9xDIq8hqB" %}
[Command Line Integration](/docs/tools/community/mariadb-shell/using-mariadb-shell/command-line-integration.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
How to call `util`, `shell`, and `sandbox` operations directly from the operating system shell.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/O8mPItJzX1eZZ1jWamMu" %}
[Pager](/docs/tools/community/mariadb-shell/using-mariadb-shell/pager.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
How to page long results through `less`, `more`, or another program.
{% endcolumn %}
{% endcolumns %}

<sub>*This page is licensed: GPLv2*</sub>
