https://github.com/vinayak-mehta/ipychat
An AI extension for IPython that makes it work like Cursor
https://github.com/vinayak-mehta/ipychat
Last synced: about 2 months ago
JSON representation
An AI extension for IPython that makes it work like Cursor
- Host: GitHub
- URL: https://github.com/vinayak-mehta/ipychat
- Owner: vinayak-mehta
- License: apache-2.0
- Created: 2024-12-29T17:08:27.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-01-05T11:23:18.000Z (5 months ago)
- Last Synced: 2025-04-01T16:40:44.220Z (2 months ago)
- Language: Python
- Homepage:
- Size: 3.64 MB
- Stars: 63
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
# ipychat: An AI extension for IPython that makes it work like [Cursor](https://cursor.sh/)
[](https://pypi.org/project/ipychat/) [](https://pypi.org/project/ipychat/) [](https://pypi.org/project/ipychat/)
**ipychat** is an AI extension for IPython that helps you understand, debug, and write Python faster.
![]()
## Features
- **Context-Aware**: Automatically uses relevant context from your IPython session
- **Rich Output**: Markdown-formatted responses with syntax highlighting
- **Multiple AI Models**: Supports GPT-4o, Claude 3.5 Sonnet, and Gemini. Local models coming soon.
- **Interactive Configuration**: Easy model switching and configuration through magic commands## Installation
You can install `ipychat` using pip:
```python
$ pip install ipychat
```## Usage
You can start the REPL by running the `ipychat` command:
```
$ ipychat
Welcome to ipychat! Use %ask to chat with gpt-4o.
You can change models using %models.In [1]:
```Alternatively, you can load the `ipychat` extension in an IPython session:
```
In [1]: %load_ext ipychat
```You can then start asking the model any question using the `%ask` magic.
```
In [1]: %ask what can I do with the cities dataframe
```You can change the current model using the `%models` magic.
```
In [1]: %models
```## Configuration
Based on the model you want to use, either set `OPENAI_API_KEY`, or `ANTHROPIC_API_KEY`, or both environment variables. You can also run `ipychat config` to configure `ipychat` interactively.
## Contributing
Contributions are welcome! Please feel free to submit a pull request.
## Versioning
`ipychat` uses [Semantic Versioning](https://semver.org/). For the available versions, see the tags on the GitHub repository.
## License
This project is licensed under the Apache License, see the [LICENSE](https://github.com/vinayak-mehta/ipychat/blob/master/LICENSE) file for details.