From 8c2d1df03f419d08d4b91484e2ecd9be180c2c69 Mon Sep 17 00:00:00 2001 From: Adam French Date: Tue, 7 Jul 2026 13:42:57 +0100 Subject: [PATCH] Update readme for new commands and storage model Document aliases, clamping, rm/reset, color behavior, and hardlinked snapshots (including the archiving caveat). Co-Authored-By: Claude Fable 5 --- readme.md | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/readme.md b/readme.md index 16890ad..3da73b5 100644 --- a/readme.md +++ b/readme.md @@ -58,6 +58,8 @@ tour next 2 tour step 1 # jump to any step by number ``` +Navigation clamps at the ends: `tour next` on the last step (or `tour prev` on the first) just tells you where you are instead of failing, and overshooting with `tour next 100` lands on the last step. + ## Commands ### Author workflow @@ -69,33 +71,40 @@ tour step 1 # jump to any step by number | `tour unstage ` | Remove files from staging | | `tour commit -m ` | Commit staged files as a new step | | `tour commit -m ` | Stage and commit files in one step | +| `tour rm ` | Mark files for removal in the next commit | | `tour end -m ` | Finalize the tour | ### Reader workflow -| Command | Description | -|---------|-------------| -| `tour start` | Load the first step | -| `tour next [n]` | Advance n steps (default 1) | -| `tour prev [n]` | Go back n steps (default 1) | -| `tour step ` | Jump to step n | +| Command | Alias | Description | +|---------|-------|-------------| +| `tour start` | | Load the first step | +| `tour next [n]` | `n` | Advance n steps (default 1) | +| `tour prev [n]` | `p` | Go back n steps (default 1) | +| `tour step ` | `s` | Jump to step n | +| `tour reset [--force]` | | Remove tracked files and clear the session (asks first) | ### Other -| Command | Description | -|---------|-------------| -| `tour info` | Show tour metadata | -| `tour status` | Show current step and staged files | -| `tour list` | List all steps with messages | -| `tour help` | Show help message | +| Command | Alias | Description | +|---------|-------|-------------| +| `tour info` | | Show tour metadata | +| `tour status` | `st` | Show current step and staged files | +| `tour list` | `ls` | List all steps, marking the current one | +| `tour help` | | Show help message | + +Colored output is automatic: it's disabled when output is piped or when the `NO_COLOR` environment variable is set. ## How it works -Each step is stored as a complete file snapshot in `.tour/steps//`. When navigating between steps, `tour` replaces tracked files in your working directory and shows a diff of what changed — new files, modified files (with line-level diffs), and deleted files. +Each step is stored as a complete file snapshot in `.tour/steps//`. When navigating between steps, `tour` touches only the files that differ between the current and target step, and shows a diff of what changed — new files, modified files (with line-level diffs), and deleted files. + +Files that don't change between steps are hardlinked rather than copied, so a step only costs disk space for its changes. This is transparent — a tour looks and behaves like plain directories — but note that archiving `.tour/` with a tool that doesn't preserve hardlinks will expand it to full copies (correctness is unaffected). The `.tour/` directory contains: - `steps/` — numbered directories, each holding the full file state for that step plus a `message` file - `session` — tracks the reader's current position - `info` — tour metadata (author, description, language, dates) - `staged` — files staged for the next commit +- `removed` — files marked for removal in the next commit - `ended` — marker indicating the tour is finalized