Skip to main content

replgpt

replgpt is an interactive Python REPL enhanced with OpenAI's GPT models for intelligent assistance. This tool allows you to interleave Python commands and prompting for code generation and guidance from a GPT-based assistant.

Features

  • Standard Python REPL: Execute Python commands directly in the REPL. Code you write and it's results will be automatically added to your chat context.
  • GPT-Enhanced Responses: Enter natural language commands to generate code and receive helpful responses from OpenAI's GPT model.
  • File Context: Load files into context so your assistant can reference them.

Installation

Install replgpt directly from PyPI:

pip install replgpt

Usage

Set Up API Key

Set the OPENAI_API_KEY environment variable with your OpenAI API key:

export OPENAI_API_KEY="your-openai-api-key"

After installing, start the REPL with:

replgpt

Commands

Basic Commands

  • Python Commands: Enter Python code as you would in a standard REPL.
  • Natural Language: Enter plain text to interact with the assistant.

Special Commands inside the REPL:

  • /file_to_context <file_path>: Loads the specified file into context, making its contents accessible to the assistant for reference.

Example Workflow

1.Start replgpt: Run the command replgpt in your terminal. 2.Load a File: Use /file_to_context <file_path> to load a file for context. 3.Ask Questions or Run Code: Enter natural language commands or Python code.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

replgpt-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

replgpt-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file replgpt-0.1.0.tar.gz.

File metadata

  • Download URL: replgpt-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for replgpt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ee24451c051ef2806f04d6809a97660caddf0d70be7be5484ce142f82b22d4fa
MD5 136d4a770d6d140354423ed048f97422
BLAKE2b-256 8663707d51e5574c6598ebc417ced93e4aba06718ebdca3092467cf212974492

See more details on using hashes here.

File details

Details for the file replgpt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: replgpt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for replgpt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ffad920d28c5b39fc9365982a3247c9713e22adf5fc3b419238a64b354f19f2f
MD5 e764f576e60285fd14733d490c243c68
BLAKE2b-256 5f881ddc658d7ee4eb557f0e13a53f62a379e656fe1a0bd6df05f912895479a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page