@youtyan/code-viewer 0.6.1 → 0.6.3

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/README.md CHANGED
@@ -100,6 +100,9 @@ Common options:
100
100
  - `--cwd <dir>` — repository to view (default: current working directory).
101
101
  - `--open` — open the printed URL in the default browser.
102
102
  - `--port <port>` — bind to a specific port (default: pick a free port).
103
+ - `--bin <name>=<absolute-path>` — override an external command path
104
+ (`git`, `rg`, or `docker`). The same values can be supplied through
105
+ `CODE_VIEWER_BIN_GIT`, `CODE_VIEWER_BIN_RG`, and `CODE_VIEWER_BIN_DOCKER`.
103
106
  - `--scope-omit-dir <name>` — skip a directory under the worktree (repeatable;
104
107
  overrides the Viewer Settings list for this session).
105
108
  - `--version`, `-v` — print the installed version.
@@ -115,6 +118,10 @@ code-viewer HEAD~1 HEAD
115
118
  code-viewer --cwd /path/to/repo --staged
116
119
  ```
117
120
 
121
+ `--bin` is useful when several command installations exist or a login shell
122
+ PATH differs from the environment that starts code-viewer. Override paths must
123
+ be absolute executable files outside the opened repository.
124
+
118
125
  Open **Viewer Settings** in the header to change display options such as
119
126
  theme, layout, sidebar mode, font sizes, and UI language. The language setting
120
127
  translates the viewer chrome itself, including the Help page, settings labels,
@@ -251,8 +258,10 @@ Open Datastores in the global navigation to access:
251
258
  the database.
252
259
  - **Table browser** — paginated data grid with column sort, text filter, cell
253
260
  copy, and CSV/JSON export (capped at 100,000 rows; export respects current
254
- filter/sort). Double-click a cell to edit inline when Edit mode is on; the
255
- whole pending edit batch commits atomically.
261
+ filter/sort). Reload just the current table from the search bar while
262
+ keeping global search and column filters, with a result chip that calls out
263
+ row-count changes. Double-click a cell to edit inline when Edit mode is on;
264
+ the whole pending edit batch commits atomically.
256
265
  - **Detail footer and related panel** — click any cell to open a resizable
257
266
  detail footer; foreign-key cells open a related panel showing the
258
267
  referenced or referencing rows, with multi-step drill-down breadcrumbs.
@@ -276,8 +285,9 @@ Open Datastores in the global navigation to access:
276
285
  - **ER diagram** — auto-generated entity-relationship diagram showing
277
286
  foreign-key relationships between tables.
278
287
  - **Schema view** — table columns (with column comments when the database
279
- defines them), indexes, foreign keys, triggers, and DDL. Tables themselves
280
- surface a comment column on the database table list.
288
+ defines them), indexes, foreign keys, triggers, and DDL, with an in-tab
289
+ schema refresh action. Tables themselves surface a comment column on the
290
+ database table list.
281
291
  - **Global search** — full-text search across all tables and text columns of
282
292
  a database.
283
293
  - **Snapshots and diffs** — take point-in-time snapshots of selected tables
@@ -528,6 +538,9 @@ code-viewer status --json
528
538
 
529
539
  # Override the ref / depth used for "recent commits".
530
540
  code-viewer status --ref main --limit 20 --json
541
+
542
+ # Use a specific git binary when PATH resolution is not the one you want.
543
+ code-viewer status --bin git=/opt/bin/git --json
531
544
  ```
532
545
 
533
546
  The `nextCommands` field pins `--server '<url>'` automatically for
@@ -584,6 +597,9 @@ code-viewer search files --term "src/**/*.test.ts" --max 200 --json
584
597
 
585
598
  # Look at a specific ref instead of the worktree.
586
599
  code-viewer search files --term "config" --ref main --json
600
+
601
+ # Pin the git binary used for CLI-side repository discovery.
602
+ code-viewer search files --term "config" --bin git=/opt/bin/git --json
587
603
  ```
588
604
 
589
605
  Default text output is one path per line, best first. An empty result
@@ -627,6 +643,9 @@ code-viewer file show --path src/sample.ts --ref main --json
627
643
  code-viewer file diff --path src/sample.ts --json
628
644
  code-viewer file diff --path src/sample.ts --from HEAD~1 --to HEAD --full --json
629
645
  code-viewer file diff --path new_sample.ts --untracked --json
646
+
647
+ # Pin the git binary used by local file/blame/history/diff reads.
648
+ code-viewer file history --path src/sample.ts --bin git=/opt/bin/git --json
630
649
  ```
631
650
 
632
651
  Default (non-`--json`) output is tab-separated and easy to grep:
@@ -657,6 +676,7 @@ code-viewer doctor
657
676
  # Full DoctorReport JSON (matches the /_doctor endpoint).
658
677
  code-viewer doctor --json
659
678
  code-viewer doctor --cwd /path/to/repo --port 64160 --json
679
+ code-viewer doctor --bin git=/opt/bin/git --bin docker=/opt/bin/docker --json
660
680
  ```
661
681
 
662
682
  The exit code is `1` iff the worst check status is `"error"` (never on