snapper-fmt 0.8.1

Semantic line break formatter for Org, LaTeX, Markdown, and plaintext
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
<!DOCTYPE html>
<html lang="en" data-accent-color="teal" data-content_root="./">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Command-Line Help for snapper - snapper 0.1.0 documentation</title><link rel="shortcut icon" href="_static/favicon.ico"/><link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" />
      <link rel="canonical" href="https://snapper.turtletech.us/docs/cli-reference.html" /><script>
    function setColorMode(t){let e=document.documentElement;e.setAttribute("data-color-mode",t);let a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,s=t;"auto"===t&&(s=a?"dark":"light"),"light"===s?(e.classList.remove("dark"),e.classList.add("light")):(e.classList.remove("light"),e.classList.add("dark"))}
    setColorMode(localStorage._theme||"auto");
  </script><link rel="stylesheet" type="text/css" href="_static/pygments.css?v=e1a1ceaf" />
    <link rel="stylesheet" type="text/css" href="_static/shibuya.css?v=44020203" />
    <link media="print" rel="stylesheet" type="text/css" href="_static/print.css?v=20ff2c19" />
    <link rel="stylesheet" type="text/css" href="_static/custom.css?v=ae410d03" />
    <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
:root {
  --sy-f-text: "Inter", var(--sy-f-sys), var(--sy-f-cjk), sans-serif;
  --sy-f-heading: "Inter", var(--sy-f-sys), var(--sy-f-cjk), sans-serif;
}
</style>
    <meta property="og:type" content="website"/>
  <meta property="og:url" content="https://snapper.turtletech.us/docs/cli-reference.html"/>
  <meta property="og:title" content="Command-Line Help for snapper"/>
    <meta name="twitter:card" content="summary"/>
  
    <link rel="alternate" hreflang="is" href="/docs/is/cli-reference/" />
    <link rel="alternate" hreflang="pl" href="/docs/pl/cli-reference/" />
<!-- Umami injection -->
<script
  defer
  data-website-id="af8c1286-06aa-414b-958c-e015bed1e569"
  src="https://analytics.turtletech.us/script.js"
></script>
<script>
  window.umami = window.umami || { track: function () {} };
  document.addEventListener("click", function (e) {
    var link = e.target.closest("a");
    if (link && link.hostname !== location.hostname) {
      umami.track("Outbound Link", { url: link.href });
    }
  });
</script></head>
<body><div class="sy-head">
  <div class="sy-head-blur"></div>
  <div class="sy-head-inner sy-container mx-auto">
    <a class="sy-head-brand" href="index.html">
      <img class="light-logo" src="_static/snapper_logo.png" alt="snapper" height="28" loading="lazy" />
      <img class="dark-logo" src="_static/snapper_logo.png" alt="snapper" height="28" loading="lazy" />
      <strong>snapper</strong>
    </a>
    <div class="sy-head-nav" id="head-nav">
      <nav class="sy-head-links"></nav>
      <div class="sy-head-extra flex items-center print:hidden"><form class="searchbox flex items-center" action="search.html" method="get">
  <input type="text" name="q" placeholder="Search" />
  <kbd>/</kbd>
</form><div class="nav-languages">
  <button type="button">
    <span class="md:hidden">Translations</span>
    <iconify-icon icon="lucide:languages"></iconify-icon>
  </button>
  <div class="nav-languages-choices">
    <ul><li><a href="/docs/cli-reference/">English</a></li><li><a href="/docs/is/cli-reference/">Islenska</a></li><li><a href="/docs/pl/cli-reference/">Polski</a></li></ul>
  </div>
</div><div class="sy-head-socials">
  <a href="https://github.com/TurtleTech-ehf/snapper" aria-label="GitHub">
    <iconify-icon icon="simple-icons:github"></iconify-icon>
  </a></div></div>
    </div>
    <div class="sy-head-actions flex items-center shrink-0 print:hidden"><button class="js-theme theme-switch flex items-center"
data-aria-auto="Switch to light color mode"
data-aria-light="Switch to dark color mode"
data-aria-dark="Switch to auto color mode">
<i class="i-lucide theme-icon"></i>
</button><button class="md:hidden flex items-center js-menu" aria-label="Menu" type="button" aria-controls="head-nav" aria-expanded="false">
        <div class="hamburger">
          <span class="hamburger_1"></span>
          <span class="hamburger_2"></span>
          <span class="hamburger_3"></span>
        </div>
      </button>
    </div>
  </div>
</div>
<div class="sy-page sy-container flex mx-auto">
  <aside id="lside" class="sy-lside md:w-72 md:shrink-0 print:hidden">
    <div class="sy-lside-inner md:sticky">
      <div class="sy-scrollbar p-6">
        <div class="globaltoc" data-expand-depth="2"><p class="caption" role="heading" aria-level="3"><span class="caption-text">Tutorials</span></p>
<ul>
<li class="toctree-l1 _expand"><a class="reference internal" href="tutorials/quickstart.html">Quickstart</a></li>
</ul>
<p class="caption" role="heading" aria-level="3"><span class="caption-text">How-to guides</span></p>
<ul>
<li class="toctree-l1 _expand"><a class="reference internal" href="howto/editor-integration.html">Editor Integration</a></li>
<li class="toctree-l1 _expand"><a class="reference internal" href="howto/ci-enforcement.html">CI Enforcement</a></li>
<li class="toctree-l1 _expand"><a class="reference internal" href="howto/git-filter.html">Git Smudge/Clean Filter</a></li>
<li class="toctree-l1 _expand"><a class="reference internal" href="howto/vale-integration.html">Vale Integration</a></li>
<li class="toctree-l1 _expand"><a class="reference internal" href="howto/neural-detection.html">Neural Sentence Detection</a></li>
<li class="toctree-l1 _expand"><a class="reference internal" href="howto/pragmas.html">Skip Regions with Pragmas</a></li>
<li class="toctree-l1 _expand"><a class="reference internal" href="howto/pandoc-backend.html">Pandoc Backend</a></li>
</ul>
<p class="caption" role="heading" aria-level="3"><span class="caption-text">Reference</span></p>
<ul>
<li class="toctree-l1 _expand"><a class="reference internal" href="reference/cli.html">CLI Reference</a></li>
<li class="toctree-l1 _expand"><a class="reference internal" href="reference/formats.html">Supported Formats</a></li>
<li class="toctree-l1 _expand"><a class="reference internal" href="reference/abbreviations.html">Abbreviation Handling</a></li>
<li class="toctree-l1 _expand"><a class="reference internal" href="reference/config.html">Configuration</a></li>
</ul>
<p class="caption" role="heading" aria-level="3"><span class="caption-text">Development</span></p>
<ul>
<li class="toctree-l1 _expand"><a class="reference internal" href="contributing/index.html">Contributing</a></li>
<li class="toctree-l1 _expand"><a class="reference internal" href="faq/index.html">FAQ</a></li>
<li class="toctree-l1 _expand"><a class="reference internal" href="changelog.html">Changelog</a></li>
</ul>
        </div>
      </div>
    </div>
  </aside>
  <div class="lside-overlay js-menu" role="button" aria-label="Close left sidebar" aria-controls="lside" aria-expanded="false"></div>
  <aside id="rside" class="sy-rside pb-3 w-64 shrink-0 order-last">
    <button class="rside-close js-menu xl:hidden" aria-label="Close Table of Contents" type="button" aria-controls="rside" aria-expanded="false">
      <i class="i-lucide close"></i>
    </button>
    <div class="sy-scrollbar sy-rside-inner px-6 xl:top-16 xl:sticky xl:pl-0 pt-6 pb-4"><div class="localtoc"><h3>On this page</h3><ul>
<li><a class="reference internal" href="#snapper"><code class="docutils literal notranslate"><span class="pre">snapper</span></code></a><ul>
<li><a class="reference internal" href="#subcommands"><strong>Subcommands:</strong></a></li>
<li><a class="reference internal" href="#arguments"><strong>Arguments:</strong></a></li>
<li><a class="reference internal" href="#options"><strong>Options:</strong></a></li>
</ul>
</li>
<li><a class="reference internal" href="#snapper-init"><code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">init</span></code></a><ul>
<li><a class="reference internal" href="#id1"><strong>Options:</strong></a></li>
</ul>
</li>
<li><a class="reference internal" href="#snapper-sdiff"><code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">sdiff</span></code></a><ul>
<li><a class="reference internal" href="#id2"><strong>Arguments:</strong></a></li>
<li><a class="reference internal" href="#id3"><strong>Options:</strong></a></li>
</ul>
</li>
<li><a class="reference internal" href="#snapper-git-diff"><code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">git-diff</span></code></a><ul>
<li><a class="reference internal" href="#id4"><strong>Arguments:</strong></a></li>
<li><a class="reference internal" href="#id5"><strong>Options:</strong></a></li>
</ul>
</li>
<li><a class="reference internal" href="#snapper-lsp"><code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">lsp</span></code></a></li>
<li><a class="reference internal" href="#snapper-watch"><code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">watch</span></code></a><ul>
<li><a class="reference internal" href="#id6"><strong>Arguments:</strong></a></li>
<li><a class="reference internal" href="#id7"><strong>Options:</strong></a></li>
</ul>
</li>
</ul>
</div><a class="js-repo-stats repo-stats flex items-center" href="https://github.com/TurtleTech-ehf/snapper"
  data-type="github" data-user="TurtleTech-ehf" data-repo="snapper">
  <span class="w-8 flex items-center justify-around shrink-0 text-3xl">
    <iconify-icon icon="simple-icons:github"></iconify-icon>
  </span>
  <span class="flex-grow px-2 break-all">
    
    
      <span>snapper</span>
    
    <span class="flex text-sm repo-stats-count">
      <span class="flex items-center pr-3">
        <iconify-icon icon="lucide:star"></iconify-icon>
        <strong class="js-repo-stars ml-1">0</strong>
      </span>
      <span class="flex items-center">
        <iconify-icon icon="lucide:git-fork"></iconify-icon>
        <strong class="js-repo-forks ml-1">0</strong>
      </span>
    </span>
  </span>
</a><div class="edit-this-page">
  <a href="https://github.com/TurtleTech-ehf/snapper/blob/main/docs/source/cli-reference.md">Edit this page</a>
</div><div id="ethical-ad-placement" data-ea-publisher="readthedocs"></div></div>
  </aside>
  <div class="rside-overlay js-menu" role="button" aria-label="Close Table of Contents" aria-controls="rside" aria-expanded="false"></div>
  <main class="sy-main w-full max-sm:max-w-full print:pt-6">
<div class="sy-breadcrumbs" role="navigation">
  <div class="sy-breadcrumbs-inner flex items-center">
    <div class="md:hidden mr-3">
      <button class="js-menu" aria-label="Menu" type="button" aria-controls="lside" aria-expanded="false">
        <i class="i-lucide menu"></i>
      </button>
    </div>
    <ol class="flex-1" itemscope itemtype="https://schema.org/BreadcrumbList"><li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
        <a itemprop="item" href="index.html"><span itemprop="name">snapper</span></a>
        <span>/</span>
        <meta itemprop="position" content="1" />
      </li><li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
        <strong itemprop="name">Command-Line Help for <code class="docutils literal notranslate"><span class="pre">snapper</span></code></strong>
        <meta itemprop="position" content="2" />
      </li></ol>
    <div class="xl:hidden ml-1">
      <button class="js-menu" aria-label="Show table of contents" type="button" aria-controls="rside"
        aria-expanded="false">
        <i class="i-lucide outdent"></i>
      </button>
    </div>
  </div>
</div><div class="flex flex-col break-words justify-between">
      <div class="relative min-w-0 max-w-6xl px-6 pb-6 pt-8 xl:px-12">
  <div class="copy-page-wrapper relative pb-4 lg:absolute lg:top-8 lg:right-6 xl:right-12">
  <div id="copy-page-trigger">
    <button
      type="button"
      class="js-copy px-3 py-1 inline-flex items-center gap-1"
      data-url="https://snapper.turtletech.us/docs/_sources/cli-reference.md.txt"
    >
      <i class="i-lucide" data-icon="copy"></i>
      <span>Copy page</span>
    </button>
    <button class="js-menu px-2 py-1" type="button" aria-label="More actions"
      aria-haspopup="menu" aria-expanded="false" aria-controls="copy-page-content">
      <i class="i-lucide chevron-down"></i>
    </button>
  </div>
  <div id="copy-page-content" role="menu" aria-orientation="vertical" aria-hidden="true">
    <div role="presentation">
      <div class="flex flex-col" role="group">
        <button class="js-copy" type="button" role="menuitem"
          data-url="https://snapper.turtletech.us/docs/_sources/cli-reference.md.txt">
          <span class="iconify-icon">
            <i class="i-lucide" data-icon="copy"></i>
          </span>
          <span>Copy page</span>
        </button>
        <a role="menuitem" href="https://snapper.turtletech.us/docs/_sources/cli-reference.md.txt" target="_blank" rel="nofollow"><iconify-icon icon="bi:markdown"></iconify-icon>
            <span>View as Markdown</span></a><a role="menuitem" href="https://chatgpt.com/?hints=search&q=Read%20https%3A//snapper.turtletech.us/docs/_sources/cli-reference.md.txt%20so%20I%20can%20ask%20questions%20about%20it." target="_blank" rel="nofollow">
          <iconify-icon icon="bi:openai"></iconify-icon>
          <span>Open in ChatGPT</span>
        </a><a role="menuitem" href="https://claude.ai/new?q=Read%20https%3A//snapper.turtletech.us/docs/_sources/cli-reference.md.txt%20so%20I%20can%20ask%20questions%20about%20it." target="_blank" rel="nofollow">
          <iconify-icon icon="bi:claude"></iconify-icon>
          <span>Open in Claude</span>
        </a></div>
    </div>
  </div>
</div><article class="yue dark-code" role="main">
          <section id="command-line-help-for-snapper">
<h1>Command-Line Help for <code class="docutils literal notranslate"><span class="pre">snapper</span></code><a class="headerlink" href="#command-line-help-for-snapper" title="Link to this heading">¶</a></h1>
<p>This document contains the help content for the <code class="docutils literal notranslate"><span class="pre">snapper</span></code> command-line program.</p>
<p><strong>Command Overview:</strong></p>
<ul class="simple">
<li><p><a class="reference internal" href="#snapper"><span class="xref myst"><code class="docutils literal notranslate"><span class="pre">snapper</span></code>↴</span></a></p></li>
<li><p><a class="reference internal" href="#snapper-init"><span class="xref myst"><code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">init</span></code>↴</span></a></p></li>
<li><p><a class="reference internal" href="#snapper-sdiff"><span class="xref myst"><code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">sdiff</span></code>↴</span></a></p></li>
<li><p><a class="reference internal" href="#snapper-git-diff"><span class="xref myst"><code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">git-diff</span></code>↴</span></a></p></li>
<li><p><a class="reference internal" href="#snapper-lsp"><span class="xref myst"><code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">lsp</span></code>↴</span></a></p></li>
<li><p><a class="reference internal" href="#snapper-watch"><span class="xref myst"><code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">watch</span></code>↴</span></a></p></li>
</ul>
<section id="snapper">
<h2><code class="docutils literal notranslate"><span class="pre">snapper</span></code><a class="headerlink" href="#snapper" title="Link to this heading">¶</a></h2>
<p>Semantic line break formatter</p>
<p><strong>Usage:</strong> <code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">[OPTIONS]</span> <span class="pre">[FILES]...</span> <span class="pre">[COMMAND]</span></code></p>
<section id="subcommands">
<h3><strong>Subcommands:</strong><a class="headerlink" href="#subcommands" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">init</span></code> — Initialize snapper for a project (generate config, pre-commit, gitattributes)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">sdiff</span></code> — Sentence-level diff between two files</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">git-diff</span></code> — Sentence-level diff against a git ref</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">lsp</span></code> — Start the LSP server (stdin/stdout)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">watch</span></code> — Watch files and reformat on change</p></li>
</ul>
</section>
<section id="arguments">
<h3><strong>Arguments:</strong><a class="headerlink" href="#arguments" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">&lt;FILES&gt;</span></code> — Input files. Reads stdin if omitted</p></li>
</ul>
</section>
<section id="options">
<h3><strong>Options:</strong><a class="headerlink" href="#options" title="Link to this heading">¶</a></h3>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">-f</span></code>, <code class="docutils literal notranslate"><span class="pre">--format</span> <span class="pre">&lt;FORMAT&gt;</span></code> — Input format (auto-detected from extension if omitted)</p>
<p>Possible values: <code class="docutils literal notranslate"><span class="pre">org</span></code>, <code class="docutils literal notranslate"><span class="pre">latex</span></code>, <code class="docutils literal notranslate"><span class="pre">markdown</span></code>, <code class="docutils literal notranslate"><span class="pre">rst</span></code>, <code class="docutils literal notranslate"><span class="pre">plaintext</span></code></p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">--stdin-filepath</span> <span class="pre">&lt;STDIN_FILEPATH&gt;</span></code> — Assume this filename when reading stdin (for format auto-detection)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-o</span></code>, <code class="docutils literal notranslate"><span class="pre">--output</span> <span class="pre">&lt;OUTPUT&gt;</span></code> — Output file (stdout if omitted)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-i</span></code>, <code class="docutils literal notranslate"><span class="pre">--in-place</span></code> — Modify files in place</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-w</span></code>, <code class="docutils literal notranslate"><span class="pre">--max-width</span> <span class="pre">&lt;MAX_WIDTH&gt;</span></code> — Maximum line width (0 = unlimited)</p>
<p>Default value: <code class="docutils literal notranslate"><span class="pre">0</span></code></p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">--neural</span></code> — Use neural sentence detection (nnsplit LSTM model)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--lang</span> <span class="pre">&lt;LANG&gt;</span></code> — Language for neural sentence detection (default: en). Available: en, de, fr, no, sv, zh, tr, ru, uk</p>
<p>Default value: <code class="docutils literal notranslate"><span class="pre">en</span></code></p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">--model-path</span> <span class="pre">&lt;MODEL_PATH&gt;</span></code> — Path to custom ONNX model file for neural detection</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--use-pandoc</span></code> — Use pandoc as parser backend (universal format support)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--check</span></code> — Exit with code 1 if any file would change</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--diff</span></code> — Show a unified diff of what would change</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--config</span> <span class="pre">&lt;CONFIG&gt;</span></code> — Path to config file (default: .snapperrc.toml in current or parent dirs)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--range</span> <span class="pre">&lt;RANGE&gt;</span></code> — Only format lines in this range (1-indexed, inclusive). Format: START:END</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--output-format</span> <span class="pre">&lt;OUTPUT_FORMAT&gt;</span></code> — Output format for –check mode</p>
<p>Default value: <code class="docutils literal notranslate"><span class="pre">text</span></code></p>
<p>Possible values: <code class="docutils literal notranslate"><span class="pre">text</span></code>, <code class="docutils literal notranslate"><span class="pre">json</span></code>, <code class="docutils literal notranslate"><span class="pre">sarif</span></code></p>
</li>
</ul>
</section>
</section>
<section id="snapper-init">
<h2><code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">init</span></code><a class="headerlink" href="#snapper-init" title="Link to this heading">¶</a></h2>
<p>Initialize snapper for a project (generate config, pre-commit, gitattributes)</p>
<p><strong>Usage:</strong> <code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">init</span> <span class="pre">[OPTIONS]</span></code></p>
<section id="id1">
<h3><strong>Options:</strong><a class="headerlink" href="#id1" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">--dry-run</span></code> — Preview what would be generated without writing files</p></li>
</ul>
</section>
</section>
<section id="snapper-sdiff">
<h2><code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">sdiff</span></code><a class="headerlink" href="#snapper-sdiff" title="Link to this heading">¶</a></h2>
<p>Sentence-level diff between two files</p>
<p><strong>Usage:</strong> <code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">sdiff</span> <span class="pre">[OPTIONS]</span> <span class="pre">&lt;OLD&gt;</span> <span class="pre">&lt;NEW&gt;</span></code></p>
<section id="id2">
<h3><strong>Arguments:</strong><a class="headerlink" href="#id2" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">&lt;OLD&gt;</span></code> — Original file</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">&lt;NEW&gt;</span></code> — Modified file</p></li>
</ul>
</section>
<section id="id3">
<h3><strong>Options:</strong><a class="headerlink" href="#id3" title="Link to this heading">¶</a></h3>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">-f</span></code>, <code class="docutils literal notranslate"><span class="pre">--format</span> <span class="pre">&lt;FORMAT&gt;</span></code> — Input format (auto-detected from extension if omitted)</p>
<p>Possible values: <code class="docutils literal notranslate"><span class="pre">org</span></code>, <code class="docutils literal notranslate"><span class="pre">latex</span></code>, <code class="docutils literal notranslate"><span class="pre">markdown</span></code>, <code class="docutils literal notranslate"><span class="pre">rst</span></code>, <code class="docutils literal notranslate"><span class="pre">plaintext</span></code></p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">--no-color</span></code> — Disable colored output</p></li>
</ul>
</section>
</section>
<section id="snapper-git-diff">
<h2><code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">git-diff</span></code><a class="headerlink" href="#snapper-git-diff" title="Link to this heading">¶</a></h2>
<p>Sentence-level diff against a git ref</p>
<p><strong>Usage:</strong> <code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">git-diff</span> <span class="pre">[OPTIONS]</span> <span class="pre">[GIT_REF]</span> <span class="pre">[FILES]...</span></code></p>
<section id="id4">
<h3><strong>Arguments:</strong><a class="headerlink" href="#id4" title="Link to this heading">¶</a></h3>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">&lt;GIT_REF&gt;</span></code> — Git ref to compare against (default: HEAD)</p>
<p>Default value: <code class="docutils literal notranslate"><span class="pre">HEAD</span></code></p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">&lt;FILES&gt;</span></code> — Files to diff. If omitted, diffs all changed prose files</p></li>
</ul>
</section>
<section id="id5">
<h3><strong>Options:</strong><a class="headerlink" href="#id5" title="Link to this heading">¶</a></h3>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">-f</span></code>, <code class="docutils literal notranslate"><span class="pre">--format</span> <span class="pre">&lt;FORMAT&gt;</span></code> — Input format (auto-detected from extension if omitted)</p>
<p>Possible values: <code class="docutils literal notranslate"><span class="pre">org</span></code>, <code class="docutils literal notranslate"><span class="pre">latex</span></code>, <code class="docutils literal notranslate"><span class="pre">markdown</span></code>, <code class="docutils literal notranslate"><span class="pre">rst</span></code>, <code class="docutils literal notranslate"><span class="pre">plaintext</span></code></p>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">--no-color</span></code> — Disable colored output</p></li>
</ul>
</section>
</section>
<section id="snapper-lsp">
<h2><code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">lsp</span></code><a class="headerlink" href="#snapper-lsp" title="Link to this heading">¶</a></h2>
<p>Start the LSP server (stdin/stdout)</p>
<p><strong>Usage:</strong> <code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">lsp</span></code></p>
</section>
<section id="snapper-watch">
<h2><code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">watch</span></code><a class="headerlink" href="#snapper-watch" title="Link to this heading">¶</a></h2>
<p>Watch files and reformat on change</p>
<p><strong>Usage:</strong> <code class="docutils literal notranslate"><span class="pre">snapper</span> <span class="pre">watch</span> <span class="pre">[OPTIONS]</span> <span class="pre">&lt;PATTERNS&gt;...</span></code></p>
<section id="id6">
<h3><strong>Arguments:</strong><a class="headerlink" href="#id6" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">&lt;PATTERNS&gt;</span></code> — Files or glob patterns to watch</p></li>
</ul>
</section>
<section id="id7">
<h3><strong>Options:</strong><a class="headerlink" href="#id7" title="Link to this heading">¶</a></h3>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">-f</span></code>, <code class="docutils literal notranslate"><span class="pre">--format</span> <span class="pre">&lt;FORMAT&gt;</span></code> — Input format (auto-detected from extension if omitted)</p>
<p>Possible values: <code class="docutils literal notranslate"><span class="pre">org</span></code>, <code class="docutils literal notranslate"><span class="pre">latex</span></code>, <code class="docutils literal notranslate"><span class="pre">markdown</span></code>, <code class="docutils literal notranslate"><span class="pre">rst</span></code>, <code class="docutils literal notranslate"><span class="pre">plaintext</span></code></p>
</li>
</ul>
<hr/>
<p><small><i>
This document was generated automatically by
<a href="https://crates.io/crates/clap-markdown"><code>clap-markdown</code></a>.
</i></small></p>
</section>
</section>
</section>

        </article><button class="back-to-top" type="button">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
    <path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
  </svg>
  <span>Back to top</span>
</button><div class="navigation flex print:hidden"></div></div>
    </div>
  </main>
</div>
<footer class="sy-foot">
  <div class="sy-foot-inner sy-container mx-auto">
    
    <div
      style="
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
        color: var(--sy-c-text-weak);
        font-size: 0.9em;
      "
    >
      <div
        style="
          display: flex;
          flex-wrap: wrap;
          justify-content: center;
          gap: 1rem;
          align-items: center;
        "
      >

        
        <span style="display: inline-flex; align-items: center; gap: 0.3em">
          <svg
            xmlns="http://www.w3.org/2000/svg"
            width="1em"
            height="1em"
            viewBox="0 0 24 24"
            fill="currentColor"
            aria-hidden="true"
          >
            <path d="M7,20H4V4h3V20z M14,20h-3V12h3V20z M21,20h-3V8h3V20z" />
          </svg>
          <span
            >Analytics by
            <a
              href="https://umami.is/"
              target="_blank"
              rel="noopener noreferrer"
              style="color: inherit; text-decoration: underline"
              >Umami</a
            ></span
          >
        </span>

        
        <span style="display: inline-flex; align-items: center; gap: 0.3em">
          <span>provided by</span>
          <span style="display: inline-flex; align-items: center; gap: 0.3em">
            <svg xmlns="http://www.w3.org/2000/svg" width="1.4em" height="1.4em" viewBox="0 0 64 64" aria-hidden="true"><g fill-rule="evenodd"><ellipse cx="32" cy="11" fill="#80D25B" rx="7" ry="9"/><path fill="#80D25B" d="M20.3,46c0,0-3.2,9.9.3,13.8c3.5,3.9 6.1,3.4 6.1-6C26.8,44.3 20.3,46 20.3,46Z"/><path fill="#80D25B" d="M38.3,46c0,0-3.2,9.9.4,13.8c3.5,3.9 6.1,3.4 6.1-6C44.8,44.3 38.3,46 38.3,46Z" transform="matrix(-1 0 0 1 81.8 0)"/><path fill="#80D25B" d="M20.6,21.2c0,0-6.7-5.8-10.5-5.2C6.2,16.7 6,22.2 6,24c0,1.8 1.8,13.3 3.8,12.5c2-0.8 4-8.5 4-8.5c1.9,2.3 4.8,2.5 4.8,2.5L20.6,21.2Z"/><path fill="#80D25B" d="M57.6,21.2c0,0-6.6-5.8-10.5-5.2C43.2,16.7 43,22.2 43,24c0,1.8 1.8,13.3 3.8,12.5c2-0.8 4-8.5 4-8.5c1.9,2.3 4.8,2.5 4.8,2.5L57.6,21.2Z" transform="matrix(-1 0 0 1 100.623 0)"/><path fill="#BD7575" stroke="#595959" stroke-linecap="round" stroke-width="2" d="M32,53C40.8,53 48,44.5 48,34C48,23.5 46.7,17 32,17C17.3,17 16,23.5 16,34C16,44.5 23.2,53 32,53Z"/><polygon fill="#BD7575" stroke="#595959" stroke-linecap="round" stroke-width="2" points="32 22 38.9 26 38.9 34 32 38 25.1 34 25.1 26"/><path stroke="#595959" stroke-linecap="round" stroke-width="2" d="M30,8C28.9,8 28,8.9 28,10"/><path stroke="#595959" stroke-linecap="round" stroke-width="2" d="M36,8C34.9,8 34,8.9 34,10" transform="matrix(-1 0 0 1 70 0)"/><path stroke="#595959" stroke-linecap="round" stroke-width="2" d="M32.1,38.2L32.1,52.4M32,21.7L32,17M25.2,26L17.7,23.1M25.1,34.2L16.8,38.9"/><path stroke="#595959" stroke-linecap="round" stroke-width="2" d="M46.2,26L38.7,23.1" transform="matrix(-1 0 0 1 84.951 0)"/><path stroke="#595959" stroke-linecap="round" stroke-width="2" d="M47.1,34.2L38.8,38.9" transform="matrix(-1 0 0 1 85.891 0)"/></g></svg>
            <a
              href="https://turtletech.us/"
              target="_blank"
              rel="noopener noreferrer"
              style="color: inherit; text-decoration: underline"
              >TurtleTech ehf</a
            >
          </span>
        </span>
      </div>
    </div>

    
    <div class="sy-foot-reserved md:flex justify-between items-center">
      <div class="sy-foot-copyright"><p>2026--present, <a href="https://rgoswami.me">Rohit Goswami</a></p>
  
  <p>
    Made with
    
    <a href="https://www.sphinx-doc.org/">Sphinx</a> and
    
    <a href="https://shibuya.lepture.com">Shibuya theme</a>.
  </p>
</div> <div class="sy-foot-socials">
<a href="https://github.com/TurtleTech-ehf/snapper" aria-label="GitHub">
  <iconify-icon icon="simple-icons:github"></iconify-icon>
</a></div>
    </div>
  </div>
</footer>
      <script src="_static/documentation_options.js?v=01f34227"></script>
      <script src="_static/doctools.js?v=fd6eb6e6"></script>
      <script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
      <script src="_static/shibuya.js?v=cac61aee"></script></body>
</html>