Today, we're launching “Generate code” to all subscribers of our Hacker Plan. With “Generate code”, you state what you'd like your code to do, and an artifical intelligence writes it for you. You can then run the code right from your repl, with all the other Replit features you know and love (packages get magically installed, a web server gets started if you need it, you can invite your friends for a multiplayer session, and much more).

Cartoon illustration of generate code feature, showing a robot elephant wearing a top hat with icecream cones instead of tusks being generated by a machine

At Replit, our mission is to bring the next billion software creators online. We think that in order to achieve that mission, we need to bring the time from idea to running code to as close to zero as possible. Along with the many features we already offer, we think code generation is a major step in that direction.

If you're a beginner, you can use code generation to get a starting point from which to build your idea. If you're an experienced programmer, you can use code generation to quickly get snippets of code without having to leave your repl. And no matter what your level of experience is, you'll likely find that using code generation is a ton of fun!

If you're a Hacker Plan subscriber, head to the workspace and pick the “Generate code” feature from the context menu. Tell it what you want, and it will automatically detects the language of the file you're in and give you back its best attempt at what you requested.

Under the hood, “Generate code” uses a large language model, a type of artificial intelligence system trained on massive datasets including both code and natural language. While those models are extremely powerful, we're also still in the early days of their development. So if the feature doesn't always work, don't be disappointed: try a different prompt, or re-submit the one you'd originally typed, and the results might surprise you! Feels like the future? That might be because it's already here!

We can't wait to see what you build!