Skip to content

Commit 8c2a623

Browse files
dstebilaclaude
andcommitted
Update docs for new download-examples CLI command
Update installation guide and tutorial to recommend `proof_frog download-examples` as the primary way to obtain examples, replacing `git clone`. Add download-examples to the CLI reference with full documentation of --ref and --force options. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ec08376 commit 8c2a623

3 files changed

Lines changed: 45 additions & 13 deletions

File tree

manual/cli-reference.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ nav_order: 60
77

88
# CLI Reference
99

10-
The ProofFrog command-line interface (`proof_frog`) lets you parse, type-check, and verify cryptographic game-hopping proofs entirely from the terminal. Six public commands cover the full workflow from inspecting files to running complete proof verification. If you prefer a graphical environment, a browser-based editor is also available via the `web` command described below.
10+
The ProofFrog command-line interface (`proof_frog`) lets you parse, type-check, and verify cryptographic game-hopping proofs entirely from the terminal. Seven public commands cover the full workflow from inspecting files to running complete proof verification. If you prefer a graphical environment, a browser-based editor is also available via the `web` command described below.
1111

1212
> **Activate your Python virtual environment first.** All of the commands below assume that the virtual environment in which ProofFrog was installed is activated in the current terminal session. If you opened a new terminal, re-activate it before running any `proof_frog` (or `python -m proof_frog`) command:
1313
>
@@ -27,6 +27,7 @@ The ProofFrog command-line interface (`proof_frog`) lets you parse, type-check,
2727
| [`check`](#check) | Type-check and semantically analyze a FrogLang file. |
2828
| [`prove`](#prove) | Run proof verification on a `.proof` file. |
2929
| [`describe`](#describe) | Print a concise interface description of a FrogLang file. |
30+
| [`download-examples`](#download-examples) | Download the examples repository. |
3031
| [`web`](#web) | Start the ProofFrog web interface. |
3132

3233
---
@@ -222,6 +223,43 @@ python -m proof_frog describe --json examples/Primitives/SymEnc.primitive
222223

223224
---
224225

226+
## download-examples
227+
228+
### Synopsis
229+
230+
```
231+
python -m proof_frog download-examples [OPTIONS] [DIRECTORY]
232+
```
233+
234+
### Behavior
235+
236+
Downloads the [ProofFrog examples repository](https://github.com/ProofFrog/examples) into the specified directory (default: `examples`). By default the command downloads the version of the examples that was pinned when your copy of ProofFrog was built, ensuring the examples are compatible with your installed version. Use `--ref` to override this and download a specific commit, tag, or branch instead. If the target directory already exists, the command exits with an error unless `--force` is passed.
237+
238+
### Options
239+
240+
| Flag | Description |
241+
|------|-------------|
242+
| `--force` | Overwrite the target directory if it already exists. |
243+
| `--ref REF` | Git ref (commit SHA, tag, or branch) to download. Defaults to the version pinned at build time. |
244+
245+
### Examples
246+
247+
```bash
248+
# Download the examples matching your version of ProofFrog into an "examples" directory
249+
python -m proof_frog download-examples
250+
251+
# Download into a custom directory
252+
python -m proof_frog download-examples my-examples
253+
254+
# Download the latest main branch instead of the pinned version
255+
python -m proof_frog download-examples --ref main
256+
257+
# Overwrite an existing examples directory
258+
python -m proof_frog download-examples --force
259+
```
260+
261+
---
262+
225263
## web
226264

227265
### Synopsis

manual/installation.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,13 @@ Do not use `sudo pip install` to work around a `command not found` error. Instal
138138
139139
## Get the examples
140140
141-
ProofFrog has a companion repository of example proof files. To download it, run:
141+
ProofFrog has a companion repository of example proof files. The easiest way to get them is with the built-in `download-examples` command:
142142
143143
```bash
144-
git clone https://github.com/ProofFrog/examples
144+
proof_frog download-examples
145145
```
146146
147-
This creates an `examples/` directory in your current location containing primitives, schemes, games, and proofs from introductory cryptography.
148-
149-
{: .note }
150-
If you do not have git installed, you can download the examples as a ZIP file from GitHub: go to [github.com/ProofFrog/examples](https://github.com/ProofFrog/examples), click the green **Code** button, and choose **Download ZIP**.
147+
This creates an `examples/` directory in your current location containing primitives, schemes, games, and proofs from introductory cryptography. The command downloads the exact version of the examples that matches your installed ProofFrog release.
151148
152149
## First run
153150

manual/tutorial/hello-frog.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,13 @@ Make sure you've [installed ProofFrog]({% link manual/installation.md %}).
2424

2525
## Get the examples
2626

27-
Clone the ProofFrog examples repository:
27+
Download the ProofFrog examples:
2828

2929
```bash
30-
git clone https://github.com/ProofFrog/examples
30+
proof_frog download-examples
3131
```
3232

33-
This creates an `examples/` directory containing primitives, schemes, games, and proofs from introductory cryptography. The rest of this tutorial assumes you cloned it in your current working directory, so that the path `examples/joy/` exists.
34-
35-
{: .note }
36-
If you do not have git, you can download a zip file containing the examples from the **Code** button on the [examples GitHub page](https://github.com/ProofFrog/examples).
33+
This creates an `examples/` directory containing primitives, schemes, games, and proofs from introductory cryptography. The rest of this tutorial assumes you ran this command in your current working directory, so that the path `examples/joy/` exists.
3734

3835
## Launch the web editor
3936

0 commit comments

Comments
 (0)