Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/coding-agent/src/cli/args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,9 @@ ${chalk.bold("Environment Variables:")}
${ENV_SESSION_DIR.padEnd(32)} - Session storage directory (overridden by --session-dir)
PI_PACKAGE_DIR - Override package directory (for Nix/Guix store paths)
PI_OFFLINE - Disable startup network operations when set to 1/true/yes
PI_RULES_DISABLED - Disable built-in rules when set to 1/true/yes/on
PI_RULES_MAX_RULE_CHARS - Per-rule formatted payload character cap (default: 12000)
PI_RULES_MAX_RESULT_CHARS - Complete static/dynamic block character cap (default: 40000)
PI_TELEMETRY - Override install telemetry when set to 1/true/yes or 0/false/no
PI_SHARE_VIEWER_URL - Base URL for /share command (default: https://pi.dev/session/)

Expand Down
21 changes: 21 additions & 0 deletions packages/coding-agent/src/cli/changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# changes

## PI_RULES environment settings in top-level help (2026-08-03)

### What changed

- `args.ts`: the Environment Variables section now lists `PI_RULES_DISABLED`,
`PI_RULES_MAX_RULE_CHARS`, and `PI_RULES_MAX_RESULT_CHARS` with their accepted values and defaults.

### Why

- The settings added in #670 were documented in the README but omitted from `senpi --help`, leaving the two
environment-only character limits undiscoverable from the CLI.

### Why extension system couldn't handle this

- The static Environment Variables section belongs to `printHelp()` and extensions can register flags, not help
entries for environment settings.

### Expected merge conflict zones on next upstream sync

- LOW: `args.ts` Environment Variables rows.

## `senpi --list-tips` prints the tip catalog as JSON (2026-07-29)

### What changed
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { expect, test, vi } from "vitest";
import { printHelp } from "../../../src/cli/args.ts";

test("lists the public PI_RULES environment settings in top-level help", () => {
// Given: the top-level help output is captured without loading extension flags.
const logSpy = vi.spyOn(console, "log").mockImplementation(() => {});

try {
// When: the CLI renders its built-in help surface.
printHelp(undefined, false);
const output = logSpy.mock.calls.map(([message]) => String(message)).join("\n");

// Then: every public rules setting is discoverable by name.
expect(output).toContain("PI_RULES_DISABLED");
expect(output).toContain("PI_RULES_MAX_RULE_CHARS");
expect(output).toContain("PI_RULES_MAX_RESULT_CHARS");
} finally {
logSpy.mockRestore();
}
});