v2.0 — new core · open source · native macOS · pure Swift

Code, run & forget.

Retrieve every draft you keep — a fast, focused macOS editor with a calm dark workspace.

Requires macOS 26 or later · Apple silicon

The whole idea

Open anything.
Keep everything.

CodeDraft began as two stubborn wishes — and it honours both, completely.

Open anything you’re handed. A zip, a binary, a PDF, a .docx, an unknown blob — there’s always a way in. Drop it on the menu-bar icon and it opens. Every time.

Lose nothing you write. Code, a credential, a command, an email draft, a stray comment — saved the instant it exists, and found again in a keystroke.

v2 · CoreNG engine

Built from zero — for raw speed.

Not a fork bolted onto an aging core. CodeDraft’s v2 engine was written from the very first line with one priority: maximum performance. Text streams straight from a memory-mapped piece table instead of being loaded whole — so launch is instant in most cases, and even a 1 GB file opens before you blink.

Instant
Launch
Cold start under ~160 ms; warm launches feel immediate.
62ms
Open a 1 GB file
Streamed, not loaded — the window is ready almost instantly.
~20MB
RAM for that 1 GB file
≈0.02× the file size resident — it never eats your memory.
<2ms
Keystroke latency
At 1,000,000 lines. Typing stays glassy under load.
60fps
Scroll a million lines
Viewport-only rendering — no blank frames, no jank.
<25ms
Command palette
Summon, search, act — faster than you can let go of the keys.

Theoretical engineering targets, measured end-to-end on the headless engine (Apple silicon). Real numbers vary with disk, file and machine — but the architecture is built so the common case is always the fast case.

Performance

Fast. Measured. Not claimed.

Every number below comes from CodeDraft's own BenchKit gate suite — the same one that has to pass before a release ships. We ran it just now, live — it could still surprise us.

142ms
cold launch
0.8s
opens a 1 GB file
24MB
memory, idle
7.8MB
download size
Smallone lonely line
0 ms
Medium10,000 lines of Swift
0 ms
Largea million lines
0 ms
Hugea full 1 GB log
0 ms

The 1 GB one just opened in less time than this sentence took to read.

47 features shipped

Sample layout — figures are illustrative until wired to a generated benchmarks.json. Kept here next to the engine section above for side-by-side comparison, not as its replacement.

It’s the little things.

A few of the details CodeDraft gets right for you every day — animated by hand, never stock.

Multi-Cursor
Drop a cursor on each line, then edit them all at once.
One-Button Run
Runs scripts with the interpreter auto-detected, or reopens office docs in their native app — always saving first.
Find & Replace
Live match count, regex, case-preserving replace.
Twelve Dark Themes
The whole UI tints to the active theme's accent.
.docx
Open Anything
Drag & drop any archive, Office doc or binary — open in a second, then run it.
1.0 GB
✓ Loaded instantly
Opens 1 GB file, Stays Fluid
Gigabyte files load instantly and scroll smooth — with search & replace built for speed.
Minimap
A scaled overview on the right edge that keeps pace as you scroll.
Reformat Code
Ctrl+Opt+F unfolds a minified blob into clean lines. One undo.
9:41
notes.md
Menu-Bar Favorites
Always in your menu bar, ready to open a file instantly — drop one to open it, pin favorites, browse recents.
Editor Grid
Optional graph-paper grid with square cells, colored from the theme.
Syntax Highlighting
Fast, accurate highlighting for 16 languages — built in, nothing to install.
quick-sort.py
Run
Paste & Run
Paste a snippet — the language is detected instantly, so you can just hit Run.
DOCX XLSX PPTX ODT EPUB KEY UNZIP ZIP
Unpack & Repack
Most modern formats are just ZIP archives in disguise — CodeDraft unzips them, lets you edit, then zips them back.
Configs & Dotfiles, Too
Highlighting reaches beyond code — bashrc, zshrc, histories, nginx & major server configs included.
$
Pin on Top
Float a compact editor above any app — paste a command into the terminal, copy values into a spreadsheet, fix small things in a loop.
no save prompt
Silent Close
Close a draft and it's already archived to your folder — no “Save changes?” dialog, ever.
Name
Title-Bar Rename
Rename from the title-bar popover and the file on disk follows — title, Recents and editor all update with it.
12
48
73
96
Find Results List
Find All opens a clickable drawer — every match with its line number and context; click to jump, ↑↓ to walk them.
#sorting #python #recursive
Auto-Tags & Memory
On-device embeddings read every draft and tag it for you — a semantic signal that powers typo-proof search, all offline.
quick-sort.py98%
sorting-notes.md71%
bubble_sort.swift64%
Typo-Proof Search
Type it rough and misspelled — an ensemble of exact, prefix, stem, typo and trigram signals still surfaces the right draft.
DOCX XLSX PDF
Office Docs → Text
Word, Excel, PowerPoint, PDF — extracted to readable text and CSV you can actually edit, search and run.
ecommerce.dbbinary
000053 51 4C 69 74 65SQLite
000620 66 6F 72 6D 61 forma
000C74 20 33 00 10 00t 3···
001202 02 0C 40 20 20···@··
006000 2E 8D F8 0D 0F······
Peek Inside Any Binary
Open a database, image or executable and CodeDraft decodes it to a hex + ASCII dump — magic bytes and structure, right there.
Capture

Write it — it's already saved.

Draft some code, jot a note, or just start typing. Everything you write is archived to your folder the moment it exists — no Save dialog, no lost scratch. Organized on disk, easy to manage, always yours.

~/codedraft
+1
Retrieve

Find it, even when you can't spell it.

A search engine built on Apple's Swift frameworks indexes every draft. Type a rough, half-remembered, typo-ridden query and the ensemble ranker still surfaces the right snippet — exact, prefix, stem, typo, trigram and on-device semantic signals, combined.

Read how we did it →

qik srt
quick-sort.py98%
sorting-notes.md71%
bubble_sort.swift64%

Twelve shades of dark.

UI controls — buttons, toggles, sliders, focus rings — pick up the active theme's accent instead of the macOS default.

Black Magic Forest Future Neon LSD Harmonic Sand and Sun Deep Tide + eight more

Honestly, they're so good-looking you'll probably want to devour every last one. Don't say we didn't warn you.

se se

Build it in two commands.

Clone the repo, run the script, and CodeDraft launches itself. No developer account needed — local builds are ad-hoc signed.

Get the source