From 744b0613809a69006619cae3fb714c99518f7d37 Mon Sep 17 00:00:00 2001 From: Diane Diaz Date: Thu, 29 Jan 2026 15:54:32 -0800 Subject: [PATCH 1/2] cli newline keybinding --- documentation/docs/guides/environment-variables.md | 4 ++++ documentation/docs/guides/goose-cli-commands.md | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/documentation/docs/guides/environment-variables.md b/documentation/docs/guides/environment-variables.md index adef53f4f6a5..734b384d25f3 100644 --- a/documentation/docs/guides/environment-variables.md +++ b/documentation/docs/guides/environment-variables.md @@ -158,6 +158,7 @@ These variables control how goose manages conversation sessions and context. | `GOOSE_SUBAGENT_MAX_TURNS` | Sets the maximum turns allowed for a [subagent](/docs/guides/subagents) to complete before timeout | Integer (e.g., 25) | 25 | | `CONTEXT_FILE_NAMES` | Specifies custom filenames for [hint/context files](/docs/guides/context-engineering/using-goosehints#custom-context-files) | JSON array of strings (e.g., `["CLAUDE.md", ".goosehints"]`) | `[".goosehints"]` | | `GOOSE_CLI_THEME` | [Theme](/docs/guides/goose-cli-commands#themes) for CLI response markdown | "light", "dark", "ansi" | "dark" | +| `GOOSE_CLI_NEWLINE_KEY` | Customize the keyboard shortcut for [inserting newlines in CLI input](/docs/guides/goose-cli-commands#keyboard-shortcuts) | Single character (e.g., "n", "m") | "j" (Ctrl+J) | | `GOOSE_RANDOM_THINKING_MESSAGES` | Controls whether to show amusing random messages during processing | "true", "false" | "true" | | `GOOSE_CLI_SHOW_COST` | Toggles display of model cost estimates in CLI output | "true", "1" (case insensitive) to enable | false | | `GOOSE_AUTO_COMPACT_THRESHOLD` | Set the percentage threshold at which goose [automatically summarizes your session](/docs/guides/sessions/smart-context-management#automatic-compaction). | Float between 0.0 and 1.0 (disabled at 0.0) | 0.8 | @@ -189,6 +190,9 @@ export CONTEXT_FILE_NAMES='["CLAUDE.md", ".goosehints", ".cursorrules", "project # Set the ANSI theme for the session export GOOSE_CLI_THEME=ansi +# Use Ctrl+N instead of Ctrl+J for newline +export GOOSE_CLI_NEWLINE_KEY=n + # Disable random thinking messages for less distraction export GOOSE_RANDOM_THINKING_MESSAGES=false diff --git a/documentation/docs/guides/goose-cli-commands.md b/documentation/docs/guides/goose-cli-commands.md index 2f5f3ffc4a2d..bd1039c6415e 100644 --- a/documentation/docs/guides/goose-cli-commands.md +++ b/documentation/docs/guides/goose-cli-commands.md @@ -731,8 +731,8 @@ goose session --name use-custom-theme ### Keyboard Shortcuts **Session Control:** -- **`Ctrl+C`** - Interrupt the current request -- **`Ctrl+J`** - Add a newline +- **`Ctrl+C`** - Clear the current line if text is entered, interrupt the current request if processing, or exit the session if line is empty +- **`Ctrl+J`** - Add a newline. Can customize the character via `GOOSE_CLI_NEWLINE_KEY` in the [config file](/docs/guides/config-files) (e.g. `GOOSE_CLI_NEWLINE_KEY: n`) or as an [environment variable](/docs/guides/environment-variables#session-management). Avoid "c" and common terminal shortcuts like "r", "w", "z". **Navigation:** - **`Cmd+Up/Down arrows`** - Navigate through command history From fa9a23408c37ea9aaf80fcd4c438316d6da2de70 Mon Sep 17 00:00:00 2001 From: dianed-square <73617011+dianed-square@users.noreply.github.com> Date: Thu, 29 Jan 2026 16:04:18 -0800 Subject: [PATCH 2/2] Update documentation/docs/guides/goose-cli-commands.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- documentation/docs/guides/goose-cli-commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/docs/guides/goose-cli-commands.md b/documentation/docs/guides/goose-cli-commands.md index bd1039c6415e..ace3687f41dd 100644 --- a/documentation/docs/guides/goose-cli-commands.md +++ b/documentation/docs/guides/goose-cli-commands.md @@ -732,7 +732,7 @@ goose session --name use-custom-theme **Session Control:** - **`Ctrl+C`** - Clear the current line if text is entered, interrupt the current request if processing, or exit the session if line is empty -- **`Ctrl+J`** - Add a newline. Can customize the character via `GOOSE_CLI_NEWLINE_KEY` in the [config file](/docs/guides/config-files) (e.g. `GOOSE_CLI_NEWLINE_KEY: n`) or as an [environment variable](/docs/guides/environment-variables#session-management). Avoid "c" and common terminal shortcuts like "r", "w", "z". +- **`Ctrl+J`** - Add a newline. Can customize the character via `GOOSE_CLI_NEWLINE_KEY` in the [config file](/docs/guides/config-files) (e.g. `GOOSE_CLI_NEWLINE_KEY: n`) or as an [environment variable](/docs/guides/environment-variables#session-management). Avoid "c" and common terminal shortcuts like "r", "w", "z". **Navigation:** - **`Cmd+Up/Down arrows`** - Navigate through command history