Metadata-Version: 2.4
Name: jupyter_ai_magic_commands
Version: 0.0.1
Summary: Package providing Jupyter AI magic commands in IPython
Project-URL: Documentation, https://jupyter-ai.readthedocs.io/en/v3/
Project-URL: Source, https://github.com/jupyter-ai-contrib/jupyter-ai-magic-commands
Project-URL: Tracker, https://github.com/jupyter-ai-contrib/jupyter-ai-magic-commands/issues
Author-email: Project Jupyter <jupyter@googlegroups.com>
License: BSD 3-Clause License
        
        Copyright (c) 2025, jupyter-ai-contrib
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Keywords: ai,ipython,magic-commands
Classifier: Framework :: Jupyter
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Requires-Dist: click<9,>=8.1.0
Requires-Dist: ipython
Requires-Dist: pydantic<3,>=2.10.0
Provides-Extra: all
Requires-Dist: boto3; extra == 'all'
Provides-Extra: dev
Requires-Dist: jupyter-releaser; extra == 'dev'
Requires-Dist: pre-commit<4,>=3.3.3; extra == 'dev'
Requires-Dist: tomlkit; extra == 'dev'
Provides-Extra: test
Requires-Dist: coverage; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-asyncio; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Description-Content-Type: text/markdown

# jupyter-ai-magic-commands

Magics are currently provided for Jupyter AI via the package `jupyter-ai-magics` ([current version 2.31.6](https://pypi.org/project/jupyter-ai-magics)). This works with Jupyter AI v2 but will not work with the collection of extensions for v3 developed in https://github.com/jupyter-ai-contrib, which use `litellm` via the https://github.com/jupyter-ai-contrib/jupyter-ai-litellm repository. Therefore, we introduce an updated magics package, titled `jupyter_ai_magic_commands` (v0.0.1) for use with Jupyter AI v3.

## Installation

Create the environment:

```
conda create -n v3 python=3.13 nodejs=20
conda activate v3
```

To install basic Jupyter AI from scratch using the package collection in https://github.com/jupyter-ai-contrib:

```
pip install jupyter-ai-router jupyter-ai-persona-manager jupyter-ai-jupyternaut

git clone https://github.com/srdas/jupyter-ai-magic-commands.git
cd jupyter-ai-magic-commands
git switch first_magic
cd ..
pip install -e jupyter-ai-magic-commands
```

## Test

To test the new package, try the code in the notebook (attached): `magics_litellm.ipynb`
