Skip to content
forked from Mattie/cataclysm

Cataclysm - Code generation library for the end game

License

Notifications You must be signed in to change notification settings

xyztlp/cataclysm

 
 

Repository files navigation

Cataclysm - End Game for Developers

Embrace the End

cataclysm is the end of mortal coding. Let inhuman intelligence write your code based on context.

>>> from cataclysm import consume
>>> consume(globals())

>>> x = get_italicized_phrases_wikipedia(page="Global catastrophic risk", only_lowercase_words=True, min_length=6)
>>> print(x[:5])
['existential risks', 'existential catastrophe[16]', 'global', 'terminal', 'permanent,']

Installation

pip install cataclysm

# in your project directory, copy the default datafiles
cataclysm init

Configure API keys

Our demise is powered by OpenAI GPT4, so you'll need an API key from them.

Use init or copy env.template.cataclysm to .env in your working/app directory and add your API keys there:

OPENAI_API_KEY = "ADD_YOUR_OPENAI_KEY"

Usage (Modes)

Global Cataclysm

With a global cataclysm, fresh code will be generated for any unrecognized function anywhere. You just need a descriptive function name, arguments, and maybe some comments for context. The rest is up to Them.

>>> from cataclysm import consume
>>> consume(globals())
>>> s = "May the gods have mercy on us all"
>>> corrupted = convert_some_words_to_disturbing_unicode_text(s, "mercy on us")
>>> print_surrounded_by_ascii_art_of_an_old_scroll(corrupted, use_wcwidth_for_padding=True)
 _________________________
| May the gods have