Giter Site home page Giter Site logo

ipython-copilot-completer's Introduction

IPython Copilot Completer

IPython Copilot Completer is a plugin for the IPython interactive shell that provides line completion using GitHub Copilot.

Installation

# Method 1: wheel
V="0.0.10"
wget https://github.com/bragradon/ipython-copilot-completer/releases/download/v$V/IPython_Copilot_Completer-$V-py3-none-any.whl
pip install IPython_Copilot_Completer-$V-py3-none-any.whl

# Method 2: local install
git clone https://github.com/bragradon/ipython-copilot-completer.git
cd ipython-copilot-completer
pip install -e .

Once installed, you can activate the plugin by running the following command in an IPython session:

%load_ext copilot_completer

Configuration

You will need to provide a GitHub Copilot API Token to use IPython Copilot Completer. You can obtain a token by running the following magic command in an IPython session:

%copilot_login

This will open a browser window where you can log in to GitHub and generate a token.

Save the token and set it via the GITHUB_COPILOT_ACCESS_TOKEN environment variable so you don't have to login again next time.

Usage

Suggestions will automatically show up while you're typing. Press right arrow key to accept them.

License

IPython Copilot Completer is released under the MIT License.

ipython-copilot-completer's People

Contributors

bragradon avatar chenyuntc avatar qpwo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

qpwo chenyuntc

ipython-copilot-completer's Issues

Import error for ipython 8.11.0

File ~/Documents/ipython-copilot-completer/copilot_completer/modes/key_binding.py:4
      1 from __future__ import annotations
      3 from IPython import get_ipython
----> 4 from IPython.terminal.shortcuts import cursor_in_leading_ws
      5 from prompt_toolkit.enums import DEFAULT_BUFFER
      6 from prompt_toolkit.filters import (
      7     HasFocus,
      8     HasSelection,
      9     emacs_insert_mode,
     10     vi_insert_mode,
     11 )

ImportError: cannot import name 'cursor_in_leading_ws' from 'IPython.terminal.shortcuts' (/home/mk/miniconda3/envs/py39/lib/python3.9/site-packages/IPython/terminal/shortcuts/__init__.py)

Get this onto pypi

Todo list:

  • signup to pypi.org
  • Research a github action that can publish this to pypi
  • Clean up setup.py (or add setup.cfg) so all the metadata is there
  • Setup action to publish

(and/or get help to do the above)

Wheel file doesn't exist for current release

The README tells us to wget the current release file's wheel file (.whl extension) from github and use that to download from wheel. But it doesn't exist in the current release for 0.0.9 while it does for previous releases.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.