https://github.com/welpo/kawari
Local, private diffs; shareable URLs.
https://github.com/welpo/kawari
developer-tools diff local-first privacy vanilla-javascript webapp
Last synced: 5 days ago
JSON representation
Local, private diffs; shareable URLs.
- Host: GitHub
- URL: https://github.com/welpo/kawari
- Owner: welpo
- License: agpl-3.0
- Created: 2026-02-01T23:51:36.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-03-19T10:56:07.000Z (3 months ago)
- Last Synced: 2026-06-14T08:04:38.196Z (9 days ago)
- Topics: developer-tools, diff, local-first, privacy, vanilla-javascript, webapp
- Language: JavaScript
- Homepage: https://diff.osc.garden
- Size: 2.29 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: COPYING
Awesome Lists containing this project
README
kawari
Private diffs. Shareable URLs.
A privacy-focused diff tool. Paste two texts, see what changed. No accounts, no tracking, works offline.
## Features
- No server; everything runs locally in the browser
- Share via URL: diffs are compressed and encoded in the URL
- Works offline as an installable PWA
- Minimap: visual overview for navigating large diffs
- Drag and drop files directly into the text areas
- Download patch files compatible with `git apply`
- Ignore options: whitespace, quote style (" vs ')
- Keyboard shortcuts:
- Cmd/Ctrl+Enter: compare texts
- j/n: next change
- k/p: previous change
- e: edit (back to input)
- Shift+click on collapsed section: expand/collapse all
## Contributing
Please do! I'd appreciate bug reports, improvements (however minor), suggestions…
The tool uses vanilla JavaScript, HTML, and CSS. To run locally:
1. Clone the repository: `git clone https://github.com/welpo/kawari.git`
2. Navigate to the app directory: `cd diff/app`
3. Start a local server: `python3 -m http.server`
4. Visit `http://localhost:8000` in your browser
The important files are:
- `app.js`: UI logic and event handling
- `diff.js`: diff algorithms (Myers, Patience) and patch generation
- `diff.worker.js`: Web Worker for off-main-thread diffing
- `styles.css`: styles
- `index.html`: structure
### Tests
Tests live in `tests/` and use Node's built-in test runner:
```bash
node --test tests/*.mjs
```
- `patch.test.mjs`: verifies generated patches can be applied with `git apply`. Each test case in `tests/cases/` has an `original.txt` and `modified.txt`.
- `normalization.test.mjs`: tests whitespace/quote normalization logic.
## Need help?
Something not working? Have an idea? Let me know!
- Questions or ideas → [start a discussion](https://github.com/welpo/kawari/discussions)
- Found a bug? → [report it here](https://github.com/welpo/kawari/issues/new?labels=bug)
- Feature request? → [let me know](https://github.com/welpo/kawari/issues/new?labels=feature)
## License
kawari is free software: you can redistribute it and/or modify it under the terms of the [GNU Affero General Public License as published by the Free Software Foundation](./COPYING), either version 3 of the License, or (at your option) any later version.