Skip to content
/ xopilot Public

A simple train-it-yourself AI for generating source code

License

Notifications You must be signed in to change notification settings

xigoi/xopilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

xopilot

xopilot is a simple artificial intelligence (AI) program for generating source code. Unlike other tools with this purpose, it allows you to train the model on any data you want, in order to get exactly the kind of output you need. The program is highly efficient and can work on devices with little memory and processing power, with no GPU required.

Installation

You need to be running an Unix-like system with bash and gzip installed. (Other shells may also work, but the installation procedure needs to be adjusted.)

To install xopilot, simply put this line in your .bashrc, then restart the shell:

alias xopilot=gzip

Usage

In order to work, xopilot first needs to be trained on some existing source code. For example, to train it on the file hello.py included in this repository, simply use the command:

xopilot -k hello.py

This will create a new file hello.py.gz containing the model. To generate some source code with this model, use the following command:

xopilot -dc hello.py.gz

The code will be output to STDOUT, which allows easily redirecting it anywhere, such as your editor of choice.

Licensing

According to Microsoft, code generated by an AI from an opaque model can be freely used, regardless of the license of the code used to train the model. Therefore, feel free to use this for license laundering. (However, don't involve me if you get sued.)

As for xopilot itself, the files in this repository are licensed under the Do What the Fuck You Want to Public License. The gzip dependency has its own license, see xopilot -L for more information.

Other uses

Although primarily intended for source code, xopilot is so flexible that it can be used for generating any kind of data, as long as it's trained on a good input.

About

A simple train-it-yourself AI for generating source code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages