You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: USER_GUIDE.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1395,7 +1395,7 @@ same source location.
1395
1395
|`--max-results <n>`|`search`| Alias for `--limit`|
1396
1396
|`--color <when>`| All commands | Control ANSI color output. Accepts `auto` (default), `always`, or `never`. Precedence: `--color` flag > `CLICOLOR_FORCE` > `NO_COLOR` > `CLICOLOR=0` > terminal capability auto-detect. Auto mode treats redirected stdout and StringWriter-style test capture as non-ANSI; on Windows it also accepts ConPTY/Windows Terminal virtual-terminal support and terminal hints such as `WT_SESSION`, `WT_PROFILE_ID`, `TERM_PROGRAM`, or non-`dumb``TERM`. Use `--color=always` to keep colored kind labels through a pager such as `cdidx symbols Foo \| less -R`; use `--color=never` (or `NO_COLOR=1`) to suppress ANSI even on a TTY. |
1397
1397
|`--palette <name>`| All commands | Choose the ANSI palette used when color output is enabled. Accepts `basic` (8-color SGR 30–37, the default fallback for minimal SSH/CI terminals), `256` (256-color `\x1b[38;5;Nm`), or `truecolor` (24-bit RGB `\x1b[38;2;R;G;Bm`). Precedence: `--palette` flag > `CDIDX_COLOR_PALETTE` env var > `COLORTERM` / `TERM` auto-detect. The basic palette avoids `\x1b[90m` (bright-black / dim), which is unreadable on many minimal terminals. |
1398
-
|`--metrics <path>`| All commands (and MCP tool calls) | Append one JSONL metrics record per CLI command / MCP tool call to `<path>`. The `CDIDX_METRICS=<path>` environment variable provides the same destination as a fallback when the flag is not passed. Best-effort: any IO failure (missing directory, read-only mount, etc.) is swallowed silently and never breaks the underlying command. |
1398
+
|`--metrics <path>`| All commands (and MCP tool calls) | Append one JSONL metrics record per CLI command / MCP tool call to `<path>`. The `CDIDX_METRICS=<path>` environment variable provides the same destination as a fallback when the flag is not passed. If the destination cannot be opened at startup, cdidx emits a bounded warning, disables metrics, and continues the underlying command. Later write or rotation failures remain best-effort and never break the command. |
1399
1399
1400
1400
If a query itself begins with `-`, pass it as `--query <query>` or `-- <query>`. If an option value itself begins with `--`, pass it as `--opt=<value>` rather than a separated value, for example `--path=--json-dir` or `--db=--tmp.db`.
1401
1401
@@ -1512,7 +1512,7 @@ Currently only the `cdidx --sushi` / `--coffee` / `--ramen` / `--wine` / `--beer
1512
1512
1513
1513
### Metrics emission
1514
1514
1515
-
Pass `--metrics <path>` (or set `CDIDX_METRICS=<path>` in the environment) to make `cdidx` append one JSON-lines record per CLI command and per MCP tool call. The flag wins over the environment variable when both are present. The destination file is opened in append mode, so multiple cdidx invocations writing to the same path interleave cleanly. Emission is best-effort: any IO failure (missing directory, unwritable mount, etc.) is swallowed silently and never breaks the underlying command.
1515
+
Pass `--metrics <path>` (or set `CDIDX_METRICS=<path>` in the environment) to make `cdidx` append one JSON-lines record per CLI command and per MCP tool call. The flag wins over the environment variable when both are present. The destination file is opened in append mode, so multiple cdidx invocations writing to the same path interleave cleanly. If the destination cannot be opened at startup, cdidx emits a bounded warning to stderr, disables metrics, and continues the underlying command. Later record writes and rotation attempts remain best-effort and never break the command.
1516
1516
1517
1517
Each record is a single JSON object on its own line with these fields:
1518
1518
@@ -3856,7 +3856,7 @@ raw match density を正確に測る、といった理由で全 raw chunk hit
-**Report log tailing now reads incrementally (#3397)** — `cdidx report` no longer materializes the bounded log tail window with `ReadToEnd`; it streams lines from the tail offset and keeps only the requested final lines.
-**Archive and log rotation now share replacement-aware slot rotation (#3412)** — metrics logs, MCP audit logs, and suggestion archives now use the common `PrivateLogFile.TryRotateSlots` helper, which replaces existing destination slots with overwrite move semantics where the platform supports them.
-**Metrics sink failures now surface a warning for configured paths (#3504)** — `--metrics` / `CDIDX_METRICS` still keep command execution best-effort, but an unusable configured metrics path now emits a bounded stderr warning instead of silently disabling metrics.
-**Bounded metrics summary input and percentile retention (#3512)** — `scripts/metrics-summary.py` now caps JSONL lines, decoded records, per-line bytes, and retained elapsed values per bucket while keeping total counts and max latency across all processed records.
0 commit comments