CodeGPT

Generate, explain, review and debug code.

CodeGPT helps with the parts of development that are mechanical or unfamiliar: writing a query against a schema you paste in, explaining dense code, drafting tests, and proposing causes for a failing case. Everything it produces is a draft to be reviewed and run against tests.

Workspace

The CodeGPT interface runs here. While it is being connected, the guidance below covers how to use it, what it handles well and where it falls short — the same information you would want before running a first job.

How to use CodeGPT

  1. 1Choose the mode: generate, explain, review, debug or format.
  2. 2Paste the relevant code, schema or error, reduced to the smallest piece that shows the problem.
  3. 3State the language and version, the framework, and the database engine where relevant.
  4. 4Describe what you expected and what actually happened.
  5. 5Review the response for correctness, then test it before adopting it.

Practical examples

SQL from a pasted schema

Input

Two CREATE TABLE statements for customers and orders, engine stated as PostgreSQL, request for customers with no orders in the last 90 days.

Result

A LEFT JOIN with a date filter in the ON clause and a NULL check, plus a note that placing the date filter in WHERE would silently convert it to an inner join.

Debugging a stack trace

Input

A Node.js TypeError with the full trace, the failing function, and the observed versus expected behaviour.

Result

Three ranked hypotheses, each explaining how it would produce that exact message, with the check to run for each rather than a single blind fix.

Supported formats

  • Pasted source code
  • SQL schema definitions
  • Stack traces and error logs
  • JSON payloads

Features

  • SQL generation against a schema you supply
  • Regular expression generation and explanation
  • Line-by-line code explanation
  • Focused review passes for error handling, security or performance
  • Unit test scaffolding
  • JSON formatting and validation

Limitations

  • It can suggest functions, flags or configuration keys that do not exist; check unfamiliar APIs against official documentation.
  • It sees only the code you paste, so it cannot judge concurrency, upstream validation or architecture.
  • Generated SQL is usually correct before it is fast; check execution plans for anything running regularly.
  • Destructive statements must never be run unreviewed.

Privacy and data handling

Code you paste is processed to produce your result and is not retained as a permanent record. Never paste credentials, API keys, private keys or production data. Reduce examples to minimal reproductions where your policy requires it.

The full statement is in our privacy policy.

CodeGPT questions

Guides for CodeGPT

Related tools