Metadata-Version: 2.4
Name: esc_mini_tools_chatbot_deeplink
Version: 0.1.2
Summary: CLI to turn any prompt into a shareable chatbot deep link.
Author-email: Sanhe Hu <husanhe@email.com>
Maintainer-email: Sanhe Hu <husanhe@email.com>
License-Expression: AGPL-3.0-or-later
Project-URL: Homepage, https://github.com/MacHu-GWU/esc_mini_tools_chatbot_deeplink-project
Project-URL: Documentation, https://esc-mini-tools-chatbot-deeplink.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/MacHu-GWU/esc_mini_tools_chatbot_deeplink-project
Project-URL: Issues, https://github.com/MacHu-GWU/esc_mini_tools_chatbot_deeplink-project/issues
Project-URL: Changelog, https://github.com/MacHu-GWU/esc_mini_tools_chatbot_deeplink-project/blob/main/release-history.rst
Project-URL: Download, https://pypi.org/pypi/esc-mini-tools-chatbot-deeplink#files
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: <4.0,>=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
License-File: AUTHORS.rst
Provides-Extra: dev
Requires-Dist: rich<14.0.0,>=13.8.1; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest<9.0.0,>=8.2.2; extra == "test"
Requires-Dist: pytest-cov<7.0.0,>=6.0.0; extra == "test"
Provides-Extra: doc
Requires-Dist: Sphinx<8.0.0,>=7.4.7; extra == "doc"
Requires-Dist: sphinx-copybutton<1.0.0,>=0.5.2; extra == "doc"
Requires-Dist: sphinx-design<1.0.0,>=0.6.1; extra == "doc"
Requires-Dist: sphinx-jinja<3.0.0,>=2.0.2; extra == "doc"
Requires-Dist: furo==2024.8.6; extra == "doc"
Requires-Dist: pygments<3.0.0,>=2.18.0; extra == "doc"
Requires-Dist: ipython<8.19.0,>=8.18.1; extra == "doc"
Requires-Dist: nbsphinx<1.0.0,>=0.8.12; extra == "doc"
Requires-Dist: rstobj==2.0.0; extra == "doc"
Requires-Dist: docfly==3.0.3; extra == "doc"
Provides-Extra: mise
Requires-Dist: PyGithub<3.0.0,>=2.8.0; extra == "mise"
Requires-Dist: httpx<1.0.0,>=0.28.0; extra == "mise"
Requires-Dist: tomli<3.0.0,>=2.0.0; python_version < "3.11" and extra == "mise"
Dynamic: license-file


.. .. image:: https://readthedocs.org/projects/esc-mini-tools-chatbot-deeplink/badge/?version=latest
    :target: https://esc-mini-tools-chatbot-deeplink.readthedocs.io/en/latest/
    :alt: Documentation Status

.. .. image:: https://github.com/MacHu-GWU/esc_mini_tools_chatbot_deeplink-project/actions/workflows/main.yml/badge.svg
    :target: https://github.com/MacHu-GWU/esc_mini_tools_chatbot_deeplink-project/actions?query=workflow:CI

.. .. image:: https://codecov.io/gh/MacHu-GWU/esc_mini_tools_chatbot_deeplink-project/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/MacHu-GWU/esc_mini_tools_chatbot_deeplink-project

.. image:: https://img.shields.io/pypi/v/esc-mini-tools-chatbot-deeplink.svg
    :target: https://pypi.python.org/pypi/esc-mini-tools-chatbot-deeplink

.. image:: https://img.shields.io/pypi/l/esc-mini-tools-chatbot-deeplink.svg
    :target: https://pypi.python.org/pypi/esc-mini-tools-chatbot-deeplink

.. image:: https://img.shields.io/pypi/pyversions/esc-mini-tools-chatbot-deeplink.svg
    :target: https://pypi.python.org/pypi/esc-mini-tools-chatbot-deeplink

.. image:: https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github
    :target: https://github.com/MacHu-GWU/esc_mini_tools_chatbot_deeplink-project/blob/main/release-history.rst

.. image:: https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
    :target: https://github.com/MacHu-GWU/esc_mini_tools_chatbot_deeplink-project

------

.. .. image:: https://img.shields.io/badge/Link-API-blue.svg
    :target: https://esc-mini-tools-chatbot-deeplink.readthedocs.io/en/latest/py-modindex.html

.. image:: https://img.shields.io/badge/Link-Install-blue.svg
    :target: `install`_

.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg
    :target: https://github.com/MacHu-GWU/esc_mini_tools_chatbot_deeplink-project

.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg
    :target: https://github.com/MacHu-GWU/esc_mini_tools_chatbot_deeplink-project/issues

.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg
    :target: https://github.com/MacHu-GWU/esc_mini_tools_chatbot_deeplink-project/issues

.. image:: https://img.shields.io/badge/Link-Download-blue.svg
    :target: https://pypi.org/pypi/esc-mini-tools-chatbot-deeplink#files


Welcome to ``esc_mini_tools_chatbot_deeplink`` Documentation
==============================================================================
.. .. image:: https://esc-mini-tools-chatbot-deeplink.readthedocs.io/en/latest/_static/esc_mini_tools_chatbot_deeplink-logo.png
    :target: https://esc-mini-tools-chatbot-deeplink.readthedocs.io/en/latest/

``esc_mini_tools_chatbot_deeplink`` turns any prompt into a shareable link.
Whoever opens the link can copy the prompt with one click and jump straight into
their favorite AI chatbot -- Claude, ChatGPT, Gemini, Grok, Copilot, Meta AI,
Doubao, Qwen, DeepSeek, Kimi, or Z.ai -- then paste and send. Claude and ChatGPT
even open pre-filled, so no paste is needed at all.

This is the command line version of the web tool at
`Chatbot Deep Link Generator <https://mini-tools.easyscalecloud.com/tools/chatbot-deeplink-generator>`_.
It produces links that the same page understands, so you can build them from a
script, a Makefile, or an AI agent instead of typing into a browser.

The prompt is carried in the URL fragment (``#q=...``), which browsers never
send to any server. There is no backend, no logging and no analytics -- the
prompt cannot show up in anyone's server log. Very long prompts should be kept
reasonably short, since browsers and chat apps truncate overly long URLs.

Whatever your prompt contains -- quotes, newlines, emoji, ``&``, ``#``, CJK text
-- it round-trips exactly: decoding the link gives back the original prompt,
character for character. Encoding percent-escapes everything outside the RFC
3986 unreserved set ``A-Za-z0-9-._~``. That is deliberately stricter than
JavaScript's ``encodeURIComponent``, which leaves ``!'()*`` bare: an unbalanced
``)`` truncates a Markdown ``[title](url)`` link, and chat autolinkers strip a
trailing ``)`` or ``!`` off a pasted URL. Escaping those five costs nothing,
since decoding maps them straight back.

Usage
------------------------------------------------------------------------------

Say you want to hand someone a link that makes their chatbot read this very
README and talk it over with them. From the command line, with no installation
at all:

.. code-block:: console

    $ uvx --from esc-mini-tools-chatbot-deeplink chatbot-deeplink --prompt "read https://raw.githubusercontent.com/MacHu-GWU/esc_mini_tools_chatbot_deeplink-project/refs/heads/main/README.rst and chat about it"
    https://mini-tools.easyscalecloud.com/tools/chatbot-deeplink-fallback#q=read%20https%3A%2F%2Fraw.githubusercontent.com%2FMacHu-GWU%2Fesc_mini_tools_chatbot_deeplink-project%2Frefs%2Fheads%2Fmain%2FREADME.rst%20and%20chat%20about%20it

That one long line is the whole output. Share it, and whoever opens it lands on
a page where one click copies the prompt and opens the chatbot of their choice.
`Try that link yourself <https://mini-tools.easyscalecloud.com/tools/chatbot-deeplink-fallback#q=read%20https%3A%2F%2Fraw.githubusercontent.com%2FMacHu-GWU%2Fesc_mini_tools_chatbot_deeplink-project%2Frefs%2Fheads%2Fmain%2FREADME.rst%20and%20chat%20about%20it>`_.

If the package is already installed, drop the ``uvx --from ...`` prefix and call
``chatbot-deeplink`` directly. Run ``chatbot-deeplink -h`` for the full argument
list.

From Python:

.. code-block:: python

    from esc_mini_tools_chatbot_deeplink.api import build_deeplink, parse_deeplink

    url = build_deeplink(
        prompt=(
            "read https://raw.githubusercontent.com/MacHu-GWU"
            "/esc_mini_tools_chatbot_deeplink-project/refs/heads/main/README.rst"
            " and chat about it"
        )
    )

    # and back again, byte for byte
    prompt = parse_deeplink(url)


.. _install:

Install
------------------------------------------------------------------------------

``esc_mini_tools_chatbot_deeplink`` is released on PyPI, so all you need is to:

.. code-block:: console

    $ pip install esc-mini-tools-chatbot-deeplink

To upgrade to latest version:

.. code-block:: console

    $ pip install --upgrade esc-mini-tools-chatbot-deeplink
