gitroll 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/LICENSE +21 -0
- package/README.md +202 -0
- package/SECURITY.md +59 -0
- package/SPEC.md +144 -0
- package/dist/THIRD_PARTY_NOTICES.txt +19 -0
- package/dist/gitroll.mjs +11148 -0
- package/dist/web/THIRD_PARTY_NOTICES.txt +19 -0
- package/dist/web/app.js +118 -0
- package/dist/web/icon.svg +1 -0
- package/dist/web/index.html +67 -0
- package/dist/web/style.css +224 -0
- package/package.json +57 -0
- package/template/.gitattributes +3 -0
- package/template/.gitroll/config.yaml +2 -0
- package/template/.gitroll/types/.gitkeep +0 -0
- package/template/README.md +13 -0
- package/template/attachments/.gitkeep +0 -0
- package/template/entries/.gitkeep +0 -0
- package/template/projects/.gitkeep +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to GitRoll are documented here. GitRoll follows [semantic versioning](https://semver.org). The Roll file format has its own version, documented in [SPEC.md](SPEC.md).
|
|
4
|
+
|
|
5
|
+
## 0.1.0 (2026-09-15)
|
|
6
|
+
|
|
7
|
+
First public release.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- **Rolls:** plain Markdown-and-YAML records with attachments named by their SHA-256 hash, specified in SPEC.md.
|
|
11
|
+
- **Local web app:** timeline, search with quick filters, projects, logging with photos and files, editing with history, and a sync button.
|
|
12
|
+
- **CLI:** `setup`, `log`, `find`, `sync`, `rolls`, `switch`, `new`, `join`, `share`, `backup`, `rename`, `remove`, `projects`, `types`, `template`, `export`, `import`, `check`, `doctor`, `ask`, `ai`.
|
|
13
|
+
- **Event types:** Log, Expense, Maintenance, Decision, Issue and Milestone, plus custom types with fields and defaults.
|
|
14
|
+
- **Syncing:** with a private GitHub repository using your own Git credentials, with automatic merging when the same entry was edited in two places.
|
|
15
|
+
- **Templates and themes:** reusable Roll templates and per-Roll themes.
|
|
16
|
+
- **Template repository:** starter files are published to `jimhoyd-com/gitroll-template` on each release; `gitroll rolls add` registers a Roll you cloned yourself.
|
|
17
|
+
- **Dates and time zones:** timestamps keep the author's offset; a hand-typed date (`2026-09-15`) means noon local time so it stays on that day everywhere; only real ISO 8601 dates are accepted (no `Sept 15` or February 30), and `gitroll check` reports others. Rules are in SPEC.md, with tests across time zones and daylight-saving changes.
|
|
18
|
+
- **End-to-end tests** of the built app: two people sharing a Roll, the browser app over HTTP, and the terminal app in a real terminal.
|
|
19
|
+
- **Template repository renamed** to `jimhoyd-com/gitroll-template`, with step-by-step instructions for starting from it.
|
|
20
|
+
- **Upgrade and uninstall:** `gitroll version`, `gitroll upgrade` (checksum-verified, or Homebrew) and `gitroll uninstall` (never deletes Rolls; `--remove-settings` optional), plus `scripts/uninstall.sh`. Releases verify that uninstalling removes the app and keeps Rolls and settings.
|
|
21
|
+
- **Homebrew:** `brew install jimhoyd-com/tap/gitroll`, published automatically by the release workflow.
|
|
22
|
+
- **Plain `gitroll` opens the terminal app** in a terminal; `gitroll open` (or `--no-browser`/`--plain`, or a script) keeps the browser/basic behavior.
|
|
23
|
+
- **Interactive and basic CLI:** full-screen `gitroll menu` / `gitroll -i` (arrow keys, live find, log, sync, switch Roll) and a step-by-step `gitroll log`; every command also runs without prompts, with `--plain` or outside a terminal.
|
|
24
|
+
- **Plain `gitroll`:** opens the Roll you're in (checking its shape), offers to set up an empty folder, and never changes a repository with other files.
|
|
25
|
+
- **`@gitroll/core`:** the format as a platform-free library.
|
|
26
|
+
- **Release artifacts:** a versioned package tarball with `SHA256SUMS`, build provenance, and generated Homebrew and Scoop definitions, each verified by installing on clean Linux, macOS and Windows machines.
|
|
27
|
+
|
|
28
|
+
### Experimental (hidden)
|
|
29
|
+
- **"Ask your Roll":** local AI answers with citations. Off unless `GITROLL_EXPERIMENTAL=ai` is set.
|
|
30
|
+
|
|
31
|
+
### Security
|
|
32
|
+
- Every read and write stays inside the Roll folder, and symbolic links are refused and reported.
|
|
33
|
+
- The local app binds to loopback only, with a per-session access key, CSP, CSRF and DNS-rebinding protection.
|
|
34
|
+
- Attachments are never cached by the browser, and active content is always downloaded rather than rendered.
|
|
35
|
+
- GPS location is removed from photos, and text that looks like a password, key or card number triggers a warning.
|
|
36
|
+
- Sync checks the real push destinations before every upload, and refuses public, unconfirmable, or untrusted non-GitHub destinations.
|
|
37
|
+
- Distributed builds include third-party license notices.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jimmy Ho
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# GitRoll
|
|
2
|
+
|
|
3
|
+
**A private logbook. Log what happened, find it later.**
|
|
4
|
+
|
|
5
|
+
Write down what happened: the AC was serviced, you paid the contractor, you opened a bank account. Add a photo or a receipt. Find it again in seconds, years later.
|
|
6
|
+
|
|
7
|
+
Your logbook, called a **Roll**, is a folder of plain files on your computer that you can back up to your own private GitHub repository.
|
|
8
|
+
|
|
9
|
+
**GitRoll is free and open source (MIT).** There are no accounts, subscriptions, usage limits, telemetry or servers. Use it for anything, personal or commercial, on as many computers and Rolls as you like.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
GitRoll needs [Git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org) 20 or newer.
|
|
14
|
+
|
|
15
|
+
**Mac or Linux:** download and run the installer. It fetches the latest release, verifies its SHA-256 checksum, and installs it.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
curl -fsSL https://raw.githubusercontent.com/jimhoyd-com/gitroll/main/scripts/install.sh -o install.sh
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
sh install.sh
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Windows (or any system with Node.js):** download `gitroll-<version>.tgz` and `SHA256SUMS` from the [latest release](https://github.com/jimhoyd-com/gitroll/releases/latest), check the checksum, then install the downloaded file:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install -g gitroll-<version>.tgz
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Every release is tested by installing it on clean Linux, macOS and Windows machines before it's published. Homebrew (`brew install jimhoyd-com/tap/gitroll`), Scoop and the npm registry are coming; they'll be listed here once they're live.
|
|
32
|
+
|
|
33
|
+
For one-command backup and sharing, also install the [GitHub CLI](https://cli.github.com) and run `gh auth login`. It's optional.
|
|
34
|
+
|
|
35
|
+
## Start
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
gitroll setup
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This asks for a name, creates your Roll in `~/GitRoll`, and offers to back it up to a new **private** GitHub repository. After that, just run:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
gitroll
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
GitRoll opens right in your terminal: use ↑↓ to browse, `n` to log, `/` to find and `q` to quit. Prefer clicking? Press `o` (or run `gitroll open`) to use it in your browser; keep the terminal open while you do.
|
|
48
|
+
|
|
49
|
+
In the browser:
|
|
50
|
+
|
|
51
|
+
- **Log:** click **Log**, write what happened, and add photos or files. **More options** has project, kind, amount, date and tags. Then click **Save**.
|
|
52
|
+
- **Find:** type in **Search**, use **This month**, **This year** or **With files**, or click any project or `#tag`.
|
|
53
|
+
- **Edit:** open an entry and click **Edit**. **History** shows every earlier version.
|
|
54
|
+
- **Back up:** click **Sync**. The number on the button counts changes that aren't backed up yet.
|
|
55
|
+
|
|
56
|
+
If the page asks you to open GitRoll from the link in your terminal, copy that link. It's a per-session key that keeps other programs on your computer out.
|
|
57
|
+
|
|
58
|
+
## Your data lives in your own repository
|
|
59
|
+
|
|
60
|
+
You don't fork or clone this repository to use GitRoll; it holds only the app's source code. `gitroll setup` creates a separate **private** repository in your own GitHub account for your Roll, containing only your entries and files. (A fork of this public repository couldn't be made private.)
|
|
61
|
+
|
|
62
|
+
## Upgrading
|
|
63
|
+
|
|
64
|
+
Your Rolls contain no app code, so upgrading never changes them: new versions read the same files. If a future version ever needs to change the file format, it will tell you and make the change as a normal commit you can review.
|
|
65
|
+
|
|
66
|
+
| How you installed | Upgrade with |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| Homebrew | `brew upgrade gitroll` (or `gitroll upgrade`) |
|
|
69
|
+
| The installer, or npm | `gitroll upgrade`. It downloads the latest release, checks it against `SHA256SUMS`, and installs it. Running the installer again also works. |
|
|
70
|
+
| From source | `git pull && npm ci && npm run build` |
|
|
71
|
+
|
|
72
|
+
Not sure? `gitroll version` shows the version and how it was installed. `gitroll upgrade --dry-run` shows what would happen without changing anything.
|
|
73
|
+
|
|
74
|
+
## Uninstalling
|
|
75
|
+
|
|
76
|
+
Uninstalling removes the app only. **Your Rolls are never deleted:** they're ordinary folders (in `~/GitRoll` by default) and your private GitHub repositories, and they keep working if you reinstall later.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
gitroll uninstall
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
It shows what it removes and what it keeps, then asks before doing anything. Add `--remove-settings` to also delete GitRoll's settings (your list of Rolls and trusted backups, in `~/.config/gitroll` or `%APPDATA%\GitRoll`), or `--dry-run` to only see the plan.
|
|
83
|
+
|
|
84
|
+
If the `gitroll` command no longer works, remove it directly:
|
|
85
|
+
|
|
86
|
+
| How you installed | Uninstall with |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| Homebrew | `brew uninstall gitroll` |
|
|
89
|
+
| The installer, or npm (Mac, Linux, Windows) | `npm uninstall --global gitroll` |
|
|
90
|
+
| Mac or Linux, any method | [`scripts/uninstall.sh`](scripts/uninstall.sh): download it, read it, then run `sh uninstall.sh` (add `--remove-settings` to also remove settings) |
|
|
91
|
+
|
|
92
|
+
To delete a Roll as well, remove its folder and, if you backed it up, delete its repository on GitHub. That's permanent.
|
|
93
|
+
|
|
94
|
+
## Advanced: start from the template
|
|
95
|
+
|
|
96
|
+
Prefer to skip `gitroll setup`? Every release publishes the starter files to [jimhoyd-com/gitroll-template](https://github.com/jimhoyd-com/gitroll-template):
|
|
97
|
+
|
|
98
|
+
1. Click **Use this template → Create a new repository**, and choose **Private**.
|
|
99
|
+
2. Clone your new repository:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
git clone git@github.com:you/my-roll.git
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
3. Open it:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
cd my-roll && gitroll
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
GitRoll checks the Roll, adds it to your list, and opens it. To add it without opening, run `gitroll rolls add .` instead.
|
|
112
|
+
|
|
113
|
+
Running `gitroll` inside an **empty** folder or freshly cloned empty repository offers to set it up as a Roll. GitRoll never changes a folder that already has other files in it.
|
|
114
|
+
|
|
115
|
+
## Everyday commands
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
gitroll log "AC serviced, capacitor replaced. $325" invoice.pdf
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
gitroll find "capacitor"
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
gitroll sync
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
| Command | What it does |
|
|
130
|
+
| --- | --- |
|
|
131
|
+
| `gitroll` | Open GitRoll in the terminal (press `o` for the browser app) |
|
|
132
|
+
| `gitroll open` | Open GitRoll in your browser |
|
|
133
|
+
| `gitroll upgrade` / `gitroll uninstall` | Get the latest version, or remove the app (your Rolls stay) |
|
|
134
|
+
| `gitroll menu` or `gitroll -i` | Full-screen terminal app: browse with arrow keys, `n` log, `/` find, `s` sync, `r` switch Roll |
|
|
135
|
+
| `gitroll log "text" [files]` | Log something, with optional photos or receipts |
|
|
136
|
+
| `gitroll find "words"` | Find events |
|
|
137
|
+
| `gitroll sync` | Back up, and get changes from anyone you share with |
|
|
138
|
+
| `gitroll rolls` / `gitroll switch <name>` | See your Rolls and pick one |
|
|
139
|
+
| `gitroll rolls add [folder]` | Add a Roll you cloned yourself |
|
|
140
|
+
| `gitroll new "Business" --github` | Create another Roll with a private GitHub backup |
|
|
141
|
+
| `gitroll share <github-user>` | Let someone else log in this Roll |
|
|
142
|
+
| `gitroll doctor` | Check your setup, privacy and backup |
|
|
143
|
+
| `gitroll help more` | Everything else |
|
|
144
|
+
|
|
145
|
+
### Interactive or basic
|
|
146
|
+
|
|
147
|
+
- **Interactive:** `gitroll menu` (or `gitroll -i`) opens a full-screen terminal app. Move with ↑↓, Enter reads an entry, `n` logs something, `/` finds as you type, `s` syncs, `r` switches Roll, `o` opens the browser app and `q` quits. In a simple terminal it falls back to a numbered menu. Also, `gitroll log` with no text asks what happened, which files to attach (you can drag them into the terminal), and which project.
|
|
148
|
+
- **Basic:** every command also works in one line with no questions asked, for scripts and automation. Prompts and colors are off automatically outside a terminal, when `NO_COLOR` is set, or with `--plain`.
|
|
149
|
+
|
|
150
|
+
## Sharing a Roll
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
gitroll share partner-github-name
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
They accept the GitHub invitation, install GitRoll, and run `gitroll join you/home`. Everyone syncs with the same private repository. If two people edit the same entry, GitRoll keeps both versions and tags the entry `#conflict`. See [docs/SHARING.md](docs/SHARING.md).
|
|
157
|
+
|
|
158
|
+
## Templates and themes
|
|
159
|
+
|
|
160
|
+
Add your own kinds of entries, save a Roll's setup as a template for new Rolls, and restyle GitRoll with a small CSS file. See [docs/TEMPLATES.md](docs/TEMPLATES.md).
|
|
161
|
+
|
|
162
|
+
## Privacy
|
|
163
|
+
|
|
164
|
+
- Your entries live only on your computer and, if you back up, in your own GitHub repository. GitRoll collects nothing and keeps no copy.
|
|
165
|
+
- It removes location data from photos, and warns before you save something that looks like a password or card number.
|
|
166
|
+
- Before every sync it confirms your backup repository is private, and refuses to upload if it's public or it can't tell. It only opens on your own computer.
|
|
167
|
+
- **Limitations:** files aren't encrypted, and deleting an entry doesn't erase it from history.
|
|
168
|
+
|
|
169
|
+
Details are in [SECURITY.md](SECURITY.md).
|
|
170
|
+
|
|
171
|
+
## For developers
|
|
172
|
+
|
|
173
|
+
Every entry is a Markdown file with YAML front matter, so `git clone` gives you everything and your records stay readable without GitRoll. The format is specified in [SPEC.md](SPEC.md). The same rules are available as a library, [`@gitroll/core`](packages/core), for building your own tools.
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
make setup
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
make check
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
make demo
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Run `make` to list every shortcut. See [CONTRIBUTING.md](CONTRIBUTING.md) to contribute and [packaging/README.md](packaging/README.md) for releases.
|
|
188
|
+
|
|
189
|
+
| Path | What it is |
|
|
190
|
+
| --- | --- |
|
|
191
|
+
| `src/core` | The GitRoll Format: parsing, validation, event types, search, privacy checks (published as `@gitroll/core`) |
|
|
192
|
+
| `src/node` | Git operations, the CLI and the local web server |
|
|
193
|
+
| `src/web` | The browser interface |
|
|
194
|
+
| `template` | Starter files for a new Roll (data only: no code or workflows) |
|
|
195
|
+
|
|
196
|
+
## GitRoll.com
|
|
197
|
+
|
|
198
|
+
GitRoll.com is an optional, separate, paid service for using your Rolls from any browser or phone. It isn't part of this repository, and the free app never needs it. Your Rolls work the same with or without it.
|
|
199
|
+
|
|
200
|
+
## License
|
|
201
|
+
|
|
202
|
+
[MIT](LICENSE). Bundled third-party licenses are listed in `dist/THIRD_PARTY_NOTICES.txt`.
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Security and privacy
|
|
2
|
+
|
|
3
|
+
GitRoll is local-first software. There's no GitRoll server, account, database, analytics or telemetry. This page explains where data goes, what GitRoll protects against, and what it doesn't.
|
|
4
|
+
|
|
5
|
+
## Where your data lives
|
|
6
|
+
|
|
7
|
+
| Place | What's there | Who controls it |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| Your computer | The Roll folder: events, photos, receipts, full history | You |
|
|
10
|
+
| Your GitHub repository (optional) | A copy, updated when you sync | You, and anyone you share with |
|
|
11
|
+
| GitRoll settings (`~/.config/gitroll`, or `%APPDATA%\GitRoll`) | Where your Rolls are, your display name, AI settings. No events. | You |
|
|
12
|
+
| Anywhere else | Nothing | |
|
|
13
|
+
|
|
14
|
+
GitRoll never asks for, stores or sends a GitHub password or token. Syncing runs your installed `git`, which uses your own SSH key or credential helper.
|
|
15
|
+
|
|
16
|
+
## Protections
|
|
17
|
+
|
|
18
|
+
**Local app**
|
|
19
|
+
- Listens only on `127.0.0.1`. Other addresses are refused, so other devices can't connect.
|
|
20
|
+
- Each run creates a random access key. The browser receives it once, from the link GitRoll opens, then keeps it in an HttpOnly, SameSite=Strict cookie. Other programs or users on the same computer can't read or change your Roll without it.
|
|
21
|
+
- Blocks DNS-rebinding requests (the Host header must be local) and cross-site form posts (writes must be JSON).
|
|
22
|
+
- A strict Content Security Policy: no third-party or inline scripts, no framing.
|
|
23
|
+
- Private responses and attachments are sent with `Cache-Control: no-store`, so receipts and photos aren't left in the browser cache.
|
|
24
|
+
- Uploaded HTML, SVG, XML and JavaScript are always downloaded, never rendered.
|
|
25
|
+
|
|
26
|
+
**Files**
|
|
27
|
+
- Every read and write is checked to stay inside the Roll folder. GitRoll never follows symbolic links, and `gitroll check` reports any it finds.
|
|
28
|
+
- Attachments are named by their SHA-256 hash, so tampering shows up in `gitroll check`.
|
|
29
|
+
- Templates can only add type definitions, projects, a README and a theme stylesheet. Code, scripts and workflows are never copied into a Roll.
|
|
30
|
+
|
|
31
|
+
**Privacy**
|
|
32
|
+
- Location (GPS) data is removed from JPEG photos before they're saved. Turn this off per Roll with `attachments: { remove_location: false }`.
|
|
33
|
+
- Saving an event warns if the text looks like a password, API key, private key, card number or Social Security number, and `gitroll check` lists such events.
|
|
34
|
+
- Before every upload, sync checks each address `git push` would actually send to (including `pushurl` and `insteadOf` rewrites). It refuses if a GitHub repository is public, or if its privacy can't be confirmed (offline, rate limited). It also refuses non-GitHub hosts unless you explicitly run `gitroll trust <address>`. Nothing is cached, so every sync is checked.
|
|
35
|
+
- Your display name comes from settings on your computer, never from the shared Roll, so collaborators can't sign events as each other.
|
|
36
|
+
- "Ask your Roll" only sends questions and the matching events to an AI model on your computer, unless you explicitly allow a remote one. API keys are read from environment variables and never stored. A Roll can turn Ask off for everyone with `ai: false`.
|
|
37
|
+
- `gitroll doctor` reviews your setup: repository visibility, credentials embedded in the backup address, your email appearing in history, commit signing, settings file permissions and AI endpoint.
|
|
38
|
+
|
|
39
|
+
**Git behavior**
|
|
40
|
+
- Git runs without a shell, with prompts disabled and network timeouts, so a sync can't hang.
|
|
41
|
+
- GitRoll never force-pushes or rewrites history. When two people change the same event, both versions are kept.
|
|
42
|
+
|
|
43
|
+
**Supply chain**
|
|
44
|
+
- The installed package has no runtime dependencies; bundled third-party code is listed in `THIRD_PARTY_NOTICES.txt`.
|
|
45
|
+
- Rolls contain no workflows, so logging and syncing use no GitHub Actions.
|
|
46
|
+
- GitRoll's own repository uses CI pinned to commit SHAs, CodeQL and Dependabot.
|
|
47
|
+
|
|
48
|
+
## Limitations to understand
|
|
49
|
+
|
|
50
|
+
- **You're responsible for keeping your repository private.** GitRoll checks GitHub's visibility before syncing, but can't check other Git hosts, and can't stop you from making the repository public later.
|
|
51
|
+
- **Delete isn't erasure.** Deleting an event hides it from the timeline, but it stays in Git history, as do its attachments, on every computer and repository that synced it. Truly removing data means rewriting history (for example with `git filter-repo`) on every copy. Removing a collaborator doesn't delete what they already downloaded.
|
|
52
|
+
- **Files aren't encrypted.** Anyone with access to your computer, your backups or the GitHub repository can read them. Use full-disk encryption on your devices.
|
|
53
|
+
- **Your email may be in history.** Git records the name and email you commit with. Use GitHub's noreply address if that matters to you.
|
|
54
|
+
- **No compliance certification.** GitRoll doesn't make you compliant with GDPR, HIPAA or similar rules. You (and GitHub, as your host) remain responsible for how the data is stored and shared.
|
|
55
|
+
- **AI answers can be wrong.** Always check the cited events.
|
|
56
|
+
|
|
57
|
+
## Reporting a vulnerability
|
|
58
|
+
|
|
59
|
+
Please report security issues privately with GitHub's "Report a vulnerability" button on the GitRoll repository, not in a public issue.
|
package/SPEC.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# GitRoll Format, version 1
|
|
2
|
+
|
|
3
|
+
A Roll is an ordinary Git repository. It must stay readable and useful without GitRoll: every file is Markdown, YAML, or an unmodified original attachment.
|
|
4
|
+
|
|
5
|
+
## Layout
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
.gitroll/config.yaml required
|
|
9
|
+
.gitroll/types/<type>.yaml optional custom event types
|
|
10
|
+
entries/YYYY/MM/<id>.md one event per file
|
|
11
|
+
projects/<slug>.yaml optional project metadata
|
|
12
|
+
attachments/<sha256><.ext> attachment bytes, named by content hash
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Entries never live inside project folders. An event references projects, so one event can belong to several.
|
|
16
|
+
|
|
17
|
+
`YYYY/MM` is taken from the event's `created` timestamp and never changes when the event is edited. Readers must not depend on that folder structure: any `.md` file under `entries/` is an event.
|
|
18
|
+
|
|
19
|
+
## Dates and time zones
|
|
20
|
+
|
|
21
|
+
- **Format.** Timestamps are ISO 8601. Writers record local time with its offset, for example `2026-09-15T14:30:00-07:00`, so both the author's wall-clock time and the exact instant are kept. Readers must accept:
|
|
22
|
+
- `2026-09-15T14:30:00-07:00` or `2026-09-15T21:30:00Z`: an exact instant.
|
|
23
|
+
- `2026-09-15T14:30` or `2026-09-15T14:30:00`: no offset, so the reader's local time.
|
|
24
|
+
- `2026-09-15`: a date typed by hand, meaning noon local time, so it falls on that day in every time zone. Writers expand it to `2026-09-15T12:00:00` when they next save the event.
|
|
25
|
+
- Anything else (such as `Sept 15`) is invalid, and `gitroll check` reports it.
|
|
26
|
+
- **Ordering** uses the instant, so events logged in different time zones sort correctly.
|
|
27
|
+
- **Display and filters** use the viewer's time zone. An event logged at 9:00 in New York shows as 6:00 to someone in Los Angeles, and "this month", `after:` and `before:` use the viewer's local days.
|
|
28
|
+
- **Folders** (`entries/YYYY/MM`) use the year and month as written in `created`, the author's local date, and never move.
|
|
29
|
+
- **Fields** of kind `date` in custom types hold a date (`2026-09-15`) and are shown as that calendar day, without time zone conversion.
|
|
30
|
+
|
|
31
|
+
## `.gitroll/config.yaml`
|
|
32
|
+
|
|
33
|
+
```yaml
|
|
34
|
+
version: 1
|
|
35
|
+
name: My Roll
|
|
36
|
+
attachments:
|
|
37
|
+
max_mb: 25 # optional per-file limit for new attachments
|
|
38
|
+
remove_location: true # optional; remove GPS data from photos (default true)
|
|
39
|
+
ai: true # optional; false turns off "Ask your Roll" for everyone
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`.gitroll/theme.css` (optional) overrides the app's style variables. See docs/TEMPLATES.md.
|
|
43
|
+
|
|
44
|
+
The author name on new events comes from each person's own GitRoll settings or `git config user.name`, never from the shared config.
|
|
45
|
+
|
|
46
|
+
## Events
|
|
47
|
+
|
|
48
|
+
An event is a Markdown file with YAML front matter. The body is free Markdown text.
|
|
49
|
+
|
|
50
|
+
| Field | Required | Meaning |
|
|
51
|
+
| --- | --- | --- |
|
|
52
|
+
| `version` | yes | Format version, currently `1` |
|
|
53
|
+
| `id` | yes | Globally unique id. Writers use UUIDv7 (time-sortable). Must match the file name. |
|
|
54
|
+
| `type` | no | Event type id, default `log`. Lowercase letters, digits and `-`. |
|
|
55
|
+
| `created` | yes | ISO 8601 timestamp with offset: when the event was recorded |
|
|
56
|
+
| `occurred` | no | When it happened. Defaults to `created`. Same format as `created`; see [Dates and time zones](#dates-and-time-zones). |
|
|
57
|
+
| `author` | no | Who logged it |
|
|
58
|
+
| `projects` | no | List of project slugs |
|
|
59
|
+
| `tags` | no | List of lowercase tags |
|
|
60
|
+
| `attachments` | no | List of `{ hash, name, type, size }`, where `hash` is `sha256:<hex>` |
|
|
61
|
+
| `amount` | no | `{ value, currency }`, where currency is an ISO 4217 code |
|
|
62
|
+
| `data` | no | Type-specific structured fields (a mapping) |
|
|
63
|
+
| `source` | no | `{ adapter, id, url? }` for events created by an import. `adapter` + `id` is unique within a Roll. |
|
|
64
|
+
|
|
65
|
+
Unknown front matter keys must be preserved by writers. Unknown `data` keys must be preserved too.
|
|
66
|
+
|
|
67
|
+
### Edits and deletion
|
|
68
|
+
|
|
69
|
+
Edits rewrite the file in place (same path, same `id`), and each edit is its own commit. Deleting an event removes its file in a commit. Git history is the audit trail: previous versions are never rewritten or force-pushed away by GitRoll.
|
|
70
|
+
|
|
71
|
+
## Event types
|
|
72
|
+
|
|
73
|
+
A type is a template: a label, an icon, and optional fields stored under `data`. It never changes how an event is stored. An event whose type isn't known is still a valid event and renders as a general log.
|
|
74
|
+
|
|
75
|
+
Built-in starter types: `log`, `expense`, `maintenance`, `decision`, `issue`, `milestone`.
|
|
76
|
+
|
|
77
|
+
A custom type lives in the Roll, so its data never depends on a plugin being installed:
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
# .gitroll/types/vehicle-service.yaml
|
|
81
|
+
label: Vehicle service
|
|
82
|
+
icon: 🚗
|
|
83
|
+
amount: expected # none | optional | expected (whether to show the amount field)
|
|
84
|
+
fields:
|
|
85
|
+
- key: odometer # lowercase letters, digits, underscore
|
|
86
|
+
label: Odometer
|
|
87
|
+
kind: number # text | longtext | number | date | select | boolean | url
|
|
88
|
+
- key: shop
|
|
89
|
+
label: Shop
|
|
90
|
+
kind: text
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Optional `defaults` prefill the form when someone picks the type. They're plain values; GitRoll never runs anything from a Roll:
|
|
94
|
+
|
|
95
|
+
```yaml
|
|
96
|
+
defaults:
|
|
97
|
+
text: Changed the oil.
|
|
98
|
+
tags: [car]
|
|
99
|
+
projects: [truck]
|
|
100
|
+
amount: { value: 60, currency: USD }
|
|
101
|
+
data: { shop: Jiffy Lube }
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
A custom file with the same id as a built-in type overrides it.
|
|
105
|
+
|
|
106
|
+
## Attachments
|
|
107
|
+
|
|
108
|
+
Attachments are content-addressed. An event refers to an attachment only by `hash`; the file name in the event is the original, human-readable name.
|
|
109
|
+
|
|
110
|
+
In format version 1 the bytes are stored in the repository at `attachments/<sha256hex><.ext>`. Identical files are stored once. Validators check that each file's SHA-256 matches its name.
|
|
111
|
+
|
|
112
|
+
GitRoll removes GPS location data from JPEG photos before hashing and storing them (unless `remove_location` is false), so a stored photo may differ from the camera original only in that metadata.
|
|
113
|
+
|
|
114
|
+
Rolls must not contain symbolic links. Readers must not follow them, and validators report them.
|
|
115
|
+
|
|
116
|
+
Because events reference only hashes, other storage (such as Git LFS or object storage) can be added later without changing existing events. A future store would be declared in `.gitroll/config.yaml`; readers resolve a hash by looking in the repository first.
|
|
117
|
+
|
|
118
|
+
## Projects
|
|
119
|
+
|
|
120
|
+
```yaml
|
|
121
|
+
# projects/bathroom-remodel.yaml
|
|
122
|
+
name: Bathroom Remodel
|
|
123
|
+
description: Main bathroom, 2026
|
|
124
|
+
created: 2026-09-01T10:00:00-05:00
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
An event may reference a slug that has no project file; readers show the slug as the name.
|
|
128
|
+
|
|
129
|
+
## Validation
|
|
130
|
+
|
|
131
|
+
`gitroll check` reports:
|
|
132
|
+
|
|
133
|
+
- a missing or invalid `.gitroll/config.yaml`
|
|
134
|
+
- event files that don't parse, lack required fields, or whose file name doesn't match their `id`
|
|
135
|
+
- duplicate ids or duplicate `source` identities
|
|
136
|
+
- attachment references with no matching file, and attachment files whose content doesn't match their hash
|
|
137
|
+
- invalid project or type definition files
|
|
138
|
+
- `data` values that don't match a known type's field kinds
|
|
139
|
+
|
|
140
|
+
Validation runs locally. A Roll requires no CI.
|
|
141
|
+
|
|
142
|
+
## Reserved for later versions
|
|
143
|
+
|
|
144
|
+
These names are reserved and currently ignored, so they're preserved like any unknown key: `pinned`, `related`, `resolves`, `entities`, `status`, `encryption`.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
GitRoll includes the following third-party software.
|
|
2
|
+
|
|
3
|
+
========================================================================
|
|
4
|
+
yaml 2.9.1 (ISC)
|
|
5
|
+
========================================================================
|
|
6
|
+
|
|
7
|
+
Copyright Eemeli Aro <eemeli@gmail.com>
|
|
8
|
+
|
|
9
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
10
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
11
|
+
and this permission notice appear in all copies.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
15
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
17
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
18
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
19
|
+
THIS SOFTWARE.
|