Prose & Pigment

A reader for what your agents write.

Prose & Pigment turns a Markdown, text or code file into a typeset page, with the code in colour. It never edits the file, syncs it or sends it anywhere.

Choose a file, and how to show it

Switch to Raw to see the file as it arrived.

Report, typeset

What I changed

The slow step was reading the config on every request. I cache it now, in load_config.

# Read once, then reuse.
@lru_cache(maxsize=1)
def load_config(path: str) -> dict:
    with open(path) as f:
        return json.load(f)
The tests pass. I touched one file.
CheckBeforeAfter
Request time180 ms12 ms
Config reads per request10
Tests passing4141

Report, raw

# What I changed

The slow step was reading the config on **every request**. I cache it now, in `load_config`.

```python
# Read once, then reuse.
@lru_cache(maxsize=1)
def load_config(path: str) -> dict:
    with open(path) as f:
        return json.load(f)
```

> The tests pass. I touched one file.

| Check | Before | After |
|---|---|---|
| Request time | `180 ms` | `12 ms` |
| Config reads per request | `1` | `0` |
| Tests passing | `41` | `41` |

Pigment, typeset

Naming a colour

Give every colour a name and write its value once. A Pigment keeps the two together.

// One name, one value.
struct Pigment {
  let name: String
  let hex: Int

  func red() -> Double {
    Double(hex >> 16 & 0xFF) / 255
  }
}

let lead = Pigment(
  name: "Vermilion", hex: 0xD2452D)
Write the value once. Every view reads it from there.
PigmentValueColours
Vermilion0xD2452Dkeywords
Indigo0x34446Efunction names
Green earth0x6E8B5Bstrings

Pigment, raw

# Naming a colour

Give every colour a **name** and write its value once. A `Pigment` keeps the two together.

```swift
// One name, one value.
struct Pigment {
  let name: String
  let hex: Int

  func red() -> Double {
    Double(hex >> 16 & 0xFF) / 255
  }
}

let lead = Pigment(
  name: "Vermilion", hex: 0xD2452D)
```

> Write the value once. Every view reads it from there.

| Pigment | Value | Colours |
|---|---|---|
| Vermilion | `0xD2452D` | keywords |
| Indigo | `0x34446E` | function names |
| Green earth | `0x6E8B5B` | strings |

A rendering, made by this page.

What it shows

  • Headings, lists, quotes, links and emphasis, set as a page instead of as symbols
  • Code blocks in colour, in 19 languages, including Swift, Python, JavaScript, TypeScript, Rust, Go, SQL and shell
  • Source files too: open a .py or .swift file and read it in colour
  • Tables and callouts
  • More than 30 themes. Pick one for light and one for dark, and the page follows your device
  • Files from the Files app, including iCloud Drive

What it doesn’t do

It doesn’t edit. It doesn’t sync. It keeps no library.

It reads the file you hand it. It doesn’t take pasted or shared text yet; for now it opens files.

Private

No account, no analytics, no ads. The app reads your files on your device, never uploads them, and loads nothing from the internet. The privacy policy says the same thing at more length.

Who makes it

I do, alone. I built it to read what my agents write. Questions go to hello@crossedkeys.co, and the support page covers how the app works.

Zane Robinson

Prose & Pigment

For iPhone and iPad. Free on the App Store.