Skip to content
Start free

AI code generator that explains its code

Describe what you need and get working code with a plain explanation.

Examples

Three things people make with it.

  • A clipboard with a few lines of Python beside a mug and a rubber duck
    Write the function
  • An error page marked fixed beside a rubber duck and a sticky note
    Fix the bug
  • A SQL query card floating above a lake with a paper boat
    Query it

How it works

  1. Describe what you need

    Say what the code should do, paste a snippet to review, or attach a screenshot, a mockup or an error log.

  2. Get the code and the why

    You get working code and a plain explanation of how it works, not only a block to paste.

  3. Iterate with follow-ups

    Ask for changes, tests or a fix. The thread keeps its context, so each reply builds on the last.

Who it’s for

  • A clipboard with a few lines of Python beside a mug and a rubber duck

    A side project you have put off

    Describe the idea and get a first working version to build on.

  • An error page marked fixed beside a rubber duck and a sticky note

    Code review and bug fixing

    Check a change for problems before you push, or find the cause of an error.

  • A SQL query card floating above a lake with a paper boat

    Learning a language

    Ask what a line does, why it is written that way, and how to write it differently.

Example requests and answers

Five requests with a short sample of the answer. Real answers include an explanation and vary by model.

Python: return the nth Fibonacci number
def fib(n): a, b = 0, 1; for _ in range(n): a, b = b, a + b; return a. It keeps two numbers and updates them n times.
SQL: the top 3 customers by total order value
SELECT customer_id, SUM(amount) AS total FROM orders GROUP BY customer_id ORDER BY total DESC LIMIT 3;
Python: turn a loop into a list comprehension
A loop that appends n * n for each even n becomes [n * n for n in nums if n % 2 == 0].
Error: TypeError, 'NoneType' object is not subscriptable
You are indexing a value that is None, often because a function returned nothing. Check what the function returns, and handle the empty case.
JavaScript: what does Array.prototype.map do?
It returns a new array made by calling a function on each element. It does not change the original array.

How to get better code

Give the context. Say the language and version, the framework, what the code receives and what it should return. A request with an example input and the output you expect gets much closer to what you need.

Ask for small pieces. A function, a query or a component is easier to check than a whole program, and you can ask for the next piece once the first one works.

Ask for tests. Ask for a few test cases, including an edge case, then run them. If a test fails, paste the failure back and ask for a fix.

Reviewing and fixing code

Paste the code and say what you want checked: bugs, performance, readability or security. For an error, include the full message and the lines it points to. If the model is wrong, say so and paste the new output. It uses the thread to correct itself.

When to use an AI code generator

It works best for well-defined pieces: a function with clear inputs and outputs, a query, a regular expression, a test, a conversion between formats, or an explanation of code you did not write. These are quick to check, so you spend your time on the part that needs judgement.

It is less reliable when the task depends on things it cannot see, such as your whole codebase, your data or your infrastructure. In that case give it the relevant files and the error output, and keep each request small.

Always read what it writes before you run it, and test it. Be especially careful with code that touches passwords, payments, personal data or the file system, and never paste secrets such as API keys into a request.

Frequently asked questions

Which languages does it support?

Common ones in production today: JavaScript and TypeScript, Python, SQL, Java and Kotlin, plus HTML, CSS, shell scripts and more.

Can it debug my code?

Yes. Paste the code and the error message and ask what is wrong. You get the likely cause and a fix, and you can attach a log or a screenshot for more context.

Can it build a full app?

It can write the parts of an app, such as components, functions, queries and tests, and explain how they fit together. To build and publish a whole site or app from one description, use Chatly's website builder.

Is the code safe to use?

Treat it like code from a colleague. Read it, run it and test it before you ship it, and be careful with anything that handles passwords, payments or personal data.

Is it free?

You can start for free. Paid plans add credits and features. Standard is $20 a month, or less when you pay quarterly or yearly.

One prompt in.
Real work out.

Describe what you need and get working code with a plain explanation.

Chatly on your Mac

Chatly for Mac

Every model on your desktop, with the files and screenshots you already have to hand.

Download for macOS

Ready to get it done?

Download Chatly for free

Available for desktop