Turn plain-language requests - a whole file, or a quick @human note in your code - into real code in seconds. Write less. Stay in control.

npx human-to-code .
sort.human
Create a reusable TypeScript function that:
  - accepts an array of numbers
  - returns a new sorted array
  - never mutates the input
sort.ts
export function sortNumbers(
  items: number[],
): number[] {
  return [...items].sort((a, b) => a - b);
}

generated TypeScript from human intent

Languages & Frameworks

12 languages work today, with extra know-how for React, NestJS, FastAPI & Rust projects - more are on the roadmap

Quick start

Private by default - nothing leaves your computer unless you pick a cloud AI and say yes.

  1. Informal Western developer selecting an AI provider
    Set it once. Say it your way. Proveedor listo. Ahora, en español. Choose a model with Spanish support, then describe the change naturally.
    1

    Choose a provider

    A provider is simply the AI that writes the code for you. Two options: Ollama runs an AI model on your own computer - free, and nothing leaves your machine. OpenAI runs in the cloud - used only after you turn it on and agree. Works anywhere Node.js 24+ runs.

    Provider
  2. Your language. Your workflow. اردو میں لکھیں Pull a multilingual model, then prompt naturally in Urdu when supported.
    Pakistani developer in traditional clothing preparing a local model
    2

    Install Ollama & get the model

    Ollama is a free app that runs AI models on your own computer. Install it, then download ("pull") the model once - the default is qwen2.5-coder:7b. human-to-code talks to it right on your machine, so your code stays with you.

    ollama pull qwen2.5-coder:7b
  3. Business-dressed developer reviewing a configuration file
    3

    Create the settings file

    --init creates a ready-to-edit settings file called human-to-code.config.json. It never overwrites one you already have.

    npx human-to-code --init .

    The new settings file already points to local Ollama - no edits needed.

  4. Arab developer generating and reviewing a safe code patch
    4

    Write & generate

    Write what you want in a .human file (or an @human comment), then run the command. It shows exactly what it will do and asks before writing anything.

    npx human-to-code .

Examples

Two simple ways to go from plain words to code - pick whichever fits you.

Write your request in a *.human file. The finished code is saved right next to it, with the same name (the file type matches the language you chose).

greet.human Human
# greet.humanWrite a function that takes a name and returnsa friendly greeting, with a docstring.
Terminalzsh
$ npx human-to-code .yes wrote greet.py
human-to-codeUTF-8   LF   Ready

Add a short @human comment inside a file you already have, using that language's normal comment style - for example /* @human ... */ in TypeScript or JavaScript, or """ @human ... """ in Python. human-to-code replaces the comment with real code, right where it sat.

utils.ts TypeScript
// utils.ts// @human debounce helper with cancel()
Terminalzsh
$ npx human-to-code .yes wrote utils.ts
TypeScriptUTF-8   LF   Ready

Before writing, it shows a short summary - which files, which AI, which model - and asks first. With --dry-run it shows the plan and writes nothing.

Docs

The essentials - the full README covers everything.

01

Quick start

# default: find .human files and @human
# comments, show a summary, write code
npx human-to-code .

# create a settings file (never overwrites)
npx human-to-code --init .

Needs Node.js 24+. Out of the box it uses Ollama on your own computer (model qwen2.5-coder:7b), so nothing leaves your machine until you switch to a cloud AI and say yes.

02

Providers

Ollama OpenAI

A provider is the AI that writes the code. Two are supported today: Ollama (free, runs on your computer) and OpenAI (runs in the cloud). Your API key is never saved - the settings file only stores the name of the environment variable, like OPENAI_API_KEY. Cloud use stays off until you turn it on and set a spending limit.

03

Commands

  • human-to-code . - find your .human files and @human comments, show a summary, and write the code
  • --init - create a settings file (won't overwrite an existing one)
  • --dry-run - see the plan without writing anything
  • --yes - skip the confirmation question
04

Safety model

Before anything is sent to the AI, it scans for secrets like passwords and keys. It checks the generated code before saving, makes sure separate files still fit together, and always asks before writing. More in SECURITY.md.