# CEXF at a glance: Celestium EXchange Format

**Status of this document: informative, not normative.** This page adds no rule. If it and the
specification [`CEXF-SPECIFICATION.md`](CEXF-SPECIFICATION.md) disagree, the specification governs.
It describes format version **1** and lives at `https://celestium.nl/cexf/v1/CEXF-AT-A-GLANCE.md`.

**License.** This page is made available under
[Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/):
`SPDX-License-Identifier: CC-BY-4.0`. © 2026 Timothy van der Ham. Rights holder: **Timothy van der
Ham**. A suitable credit reads: "CEXF at a glance: Celestium EXchange Format, © 2026 Timothy van der Ham,
https://celestium.nl/cexf/v1/CEXF-AT-A-GLANCE.md, licensed under CC BY 4.0." The JSON example is made
available under [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/):
`SPDX-License-Identifier: CC0-1.0`. The full declaration is in the "License" section of the
specification.

**Names and people.** Product names in these documents (other astrology programs, libraries,
standards bodies) are trademarks of their owners and are used only to say what they are. "CEXF"
and "Celestium" are names of the rights holder's format and programs. They are not licensed: the
license gives no right to use either name for a product of your own or to suggest that the rights
holder endorses it. Saying that your software reads or writes CEXF is fine. All persons in the
example are fictitious. Any likeness to a real person is accidental.

A section number with `§` and no file name refers to the specification.

## What a file is

A `.cexf` file is one JSON text in UTF-8. It holds **subjects** (a person, an event, a country, an
organisation or a horary question), the **charts** of each subject and the **notes** on those
charts. It carries what is needed to calculate a chart again: the moment, the place, a few
settings and parameters. It carries no calculated positions or houses ([§11](CEXF-SPECIFICATION.md#11-what-isnt-carried-positions-and-houses)).

## The data model

```
file
├── folders[]                 optional: id, name, parentId, protected
└── subjects[]                required, may be empty
    ├── id, displayName, kind (default person), names, sex, notes, extensions
    └── charts[]              at least one; exactly one has sequence 0
        ├── sequence 0        primary chart (birth, event, founding); no type
        └── sequence n > 0    derived chart: type, parameters, parents
            ├── time          utc, timeZone, localTime, utcOffset (four fields)
            ├── location      latitude, longitude, and a few descriptive members
            ├── zodiacSystem, ayanamsa, customAyanamsa, frame, houseSystem
            ├── lunarNode, blackMoon   variant of the lunar node and of the Black Moon
            ├── source        where the data came from
            ├── notes[]       title and/or text
            ├── parents[]     (subject, sequence, role): a link to another chart
            └── extensions, modifierExtensions
```

A chart is identified by `(subject id, sequence)`. Ids are unique within the file. `parents` links
a composite, a Davison chart, a synastry or a group composite to its source charts (role
`parent`), and a relocation to its original chart (role `source`) ([§8](CEXF-SPECIFICATION.md#8-parents-linked-charts-parents-and-source-charts)). The chart types are in [§6.2](CEXF-SPECIFICATION.md#62-the-chart-type-keys)
and their parameters in [§6.4](CEXF-SPECIFICATION.md#64-parameters-per-chart-type). `extensions` holds vendor data under reverse-domain keys ([§9](CEXF-SPECIFICATION.md#9-extensions-a-per-vendor-namespace-mechanism)).

## The main fields

**Req.** says whether the member must be present. **Role** says what the member does:
*decides* means that an invalid value costs the record ([§10](CEXF-SPECIFICATION.md#10-error-handling), rows E1, E2, E3, CH3, CH4 and CH8, and RF5 for an element of `parents` that is an object; an element of `charts` or `parents` that is not an object is row E1);
*informative* means that an invalid value is reported, not recorded, and the record stays (row E5);
*calculation parameter* means that an invalid or absent value is reported, the reader uses its own
choice, and the chart stays (row CH5).

| Object | Member | Req. | Role |
|---|---|---|---|
| root | `format` (`"cexf"`), `version` (1), `subjects` | yes | decides |
| root | `folders` | no | decides |
| root | `generatedAt`, `generator` | no | informative (row F4, not E5) |
| folder | `id` | yes | decides |
| folder | `name` | yes | informative |
| folder | `parentId`, `protected` | no | informative |
| subject | `id`, `charts` | yes | decides |
| subject | `displayName` | yes | informative |
| subject | `kind`, `givenName`, `namePrefix`, `familyName`, `sex`, `folderId`, `notes`, `extensions` | no | informative |
| chart | `sequence` | yes | decides |
| chart | `type` | yes, unless `sequence` is 0 | decides |
| chart | `time`, `location` | yes, with exceptions ([§5](CEXF-SPECIFICATION.md#5-chart)) | decides |
| chart | `parameters` | by chart type ([§6.4](CEXF-SPECIFICATION.md#64-parameters-per-chart-type)) | decides for `number`, `age`, `direction`, `body` and `point`; calculation parameter for `key`, `method`, `aspects`, `latitude`, `angles`, `houses` and `houseAnchor`; informative for `question` |
| chart | `parents`, `zodiacSystem`, `ayanamsa`, `customAyanamsa`, `frame`, `modifierExtensions` | no | decides |
| chart | `label` | no; yes for `life-event` | informative; decides for `life-event` |
| chart | `houseSystem`, `lunarNode`, `blackMoon`, `source`, `notes`, `extensions` | no | informative |
| time | `utc`, `localTime`, `utcOffset` | yes | decides |
| time | `timeZone` | yes | informative |
| time | `unknown` | no | decides |
| time | `standard`, `dstOffset`, `sourceCalendar` | no | informative |
| location | `latitude`, `longitude` | yes | decides |
| location | `altitude`, `placeName`, `country`, `countryCode`, `region` | no | informative |
| note | `title` or `text`, at least one | yes | informative |
| note | `format`, `createdAt`, `updatedAt` | no | informative |
| parent entry | `subject`, `sequence`, `role` | yes | decides |

Four rules explain most questions:

- **Four time fields.** `localTime` is `utc` shifted by `utcOffset`; a reader checks that ([§7.3](CEXF-SPECIFICATION.md#73-arithmetic-consistency-required-what-a-reader-checks)).
  `utc` governs calculation, `localTime` with `utcOffset` governs what was entered ([§7.4](CEXF-SPECIFICATION.md#74-what-wins-on-conflict-between-timezone-and-localtimeutcoffset)).
- **Absent is not the same as unrecognised.** A default value is a statement: a chart without
  `zodiacSystem` is tropical ([§1](CEXF-SPECIFICATION.md#1-basic-principles)). `null` is allowed only on `parentId` and `folderId`. An empty
  string is never a value ([§1](CEXF-SPECIFICATION.md#1-basic-principles)).
- **Values of `parameters` are strings.** A direction chart needs `age` (at least six decimals) and
  `direction` (`direct` or `converse`) ([§6.4](CEXF-SPECIFICATION.md#64-parameters-per-chart-type)).
- **Registers are open.** A value that is not registered is valid; a reader reports it and goes on
  ([§7c.1](CEXF-SPECIFICATION.md#7c1-these-three-fields-are-registers-not-fences), [§10](CEXF-SPECIFICATION.md#10-error-handling)).

## What a derived chart needs

`kind` (what the subject is about) and `type` (what kind of chart it is) are independent ([§4.4](CEXF-SPECIFICATION.md#44-kind-and-type-are-two-independent-axes-dont-confuse-them)). The
kinds are `person`, `event`, `country`, `organization` and `horary`. Beyond `time` and `location`,
each type needs the following ([§6.2](CEXF-SPECIFICATION.md#62-the-chart-type-keys), [§6.4](CEXF-SPECIFICATION.md#64-parameters-per-chart-type), [§8](CEXF-SPECIFICATION.md#8-parents-linked-charts-parents-and-source-charts)):

| Type | Required `parameters` | `parents` |
|---|---|---|
| `harmonic` | `number` | none |
| `primary-direction`, `secondary-progression`, `tertiary-progression`, `solar-arc`, `minor-progression`, `sidereal-minor-progression` | `age`, `direction` | none |
| `profection` | `age` (whole years) | none |
| `planet-return` | `body` | none |
| `life-event` | none; `label` is required | none |
| `composite`, `davison`, `synastry` | none | at most 2, role `parent` |
| `group-composite` | none | any number, role `parent` |
| `relocation` | none | at most 1, role `source` |
| `solar-return`, `lunar-return`, `ingress`, `transit`, `horary`, `mundane`, `electional`, `prenatal-syzygy`, `prenatal-lunation`, `prenatal-eclipse` | none | none |

A chart type that a reader does not recognise is set aside, not refused (row CH1).

## A minimal valid file

One subject, one chart. This file validates against [`cexf-schema.json`](cexf-schema.json).

```json
{
  "format": "cexf",
  "version": 1,
  "subjects": [
    {
      "id": 1,
      "displayName": "Johanna van der Berg",
      "charts": [
        {
          "sequence": 0,
          "time": {
            "utc": "1990-04-12T08:15:00Z",
            "timeZone": "Europe/Amsterdam",
            "localTime": "1990-04-12T10:15:00",
            "utcOffset": "+02:00"
          },
          "location": { "latitude": 52.3702, "longitude": 4.8952 }
        }
      ]
    }
  ]
}
```

## What you must at least do

**As a reader.** Apply [§10](CEXF-SPECIFICATION.md#10-error-handling) to every document: for each situation named there, give the outcome
class, the target and the notice of its row. Never crash on input. Never claim that a record is used
when it is not, and never change a value without a notice. A reader may be partial: one that shows
charts and calculates nothing is conformant. For a value you cannot calculate, use your own choice
and report it (row CH17). A chart type you do not implement is set aside and reported (row CH1), or, if you take it up as a chart of another kind, calculated as that kind and reported (row CH17). A
reader that also writes keeps what it does not recognise (the write-back column of [§10.3](CEXF-SPECIFICATION.md#103-the-rows)).

**As a writer.** Write UTF-8 without a byte order mark. Produce only documents that validate
against `cexf-schema.json` and that satisfy what the schema cannot express: the identity of [§7.3](CEXF-SPECIFICATION.md#73-arithmetic-consistency-required-what-a-reader-checks),
unique ids and sequences, references that resolve, and the `time` rules per chart type ([§7](CEXF-SPECIFICATION.md#7-time-four-fields-and-which-one-wins-on-conflict)). Write
no `null` where it is not allowed and no empty string. Write the required parameters of a derived
chart, and every calculation parameter whose value you know ([§6.4](CEXF-SPECIFICATION.md#64-parameters-per-chart-type)). Write in the recommended order of [§4.5](CEXF-SPECIFICATION.md#45-the-order-of-subjects-and-folders): `folders` before `subjects`, a parent folder before its children, the charts of a subject in ascending `sequence`.

## Where to go next

| You want | Go to |
|---|---|
| Every rule, field and error case (normative) | [`CEXF-SPECIFICATION.md`](CEXF-SPECIFICATION.md) |
| The quick start, the reasons behind the rules, worked examples, a full example file | [`CEXF-GUIDE.md`](CEXF-GUIDE.md) |
| The explanation of each test vector | [`CEXF-GUIDE.md`](CEXF-GUIDE.md), [§12a](CEXF-GUIDE.md#12a-test-vectors) |
| What the reference implementation does not take over | [`CEXF-GUIDE.md`](CEXF-GUIDE.md), Appendix A |
| Pitfalls by programming language | [`CEXF-GUIDE.md`](CEXF-GUIDE.md), Appendix B |
| To check a file by machine | [`cexf-schema.json`](cexf-schema.json) |
| Documents that are valid or wrong on purpose | [`cexf-test-vectors.json`](cexf-test-vectors.json) |
