Skip to content

docs(cli): input and shell commands - #406

Open
hongyi-chen wants to merge 5 commits into
hyc/launch-clifrom
hyc/launch-cli-cli-input
Open

docs(cli): input and shell commands#406
hongyi-chen wants to merge 5 commits into
hyc/launch-clifrom
hyc/launch-cli-cli-input

Conversation

@hongyi-chen

@hongyi-chen hongyi-chen commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Pages changed

  • src/content/docs/cli/input-and-editing.mdx (stub to full draft, now titled "Input and shell commands in the Warp CLI")

Consolidation note: this PR absorbs the content of PR #403 (cli/shell-commands.mdx, which will be closed). The orchestrator deletes shell-commands.mdx and renames this page's slug to input-and-shell-commands at integration.

Features covered

Input and editing:

  • Editing basics: multiline input, soft wrap, six-row viewport, newline keys (Ctrl+J / Shift+Enter / Alt+Enter), readline-style editing keys
  • Slash command menu: / trigger, filtering, current-state suffixes (e.g. /theme, /auto-approve), ghost-text argument hints (e.g. /theme <auto|light|dark>), skills in the menu; links to cli/reference for the full table
  • Input history (merged section): up-arrow menu combining prompts + !-prefixed commands (commands-only in shell mode), filter, mode-switching preview, submit-on-Enter, Esc restore
  • Tab completions (shell mode): single-match auto-apply, longest-common-prefix insert + menu, Tab/Down cycle, Enter accept
  • Mouse support: click-to-position cursor, drag/double-click/triple-click selection, wheel scrolling, clickable footer + attachment-bar controls
  • Selection and clipboard: highlight-to-copy with "copied to clipboard" notice, keyboard selection/copy/cut keys, paste keys, OSC 52 copy over SSH (with tmux passthrough)
  • Image attachments: clipboard image paste, image file-path paste/drop, PNG/JPEG/GIF/WebP, agent-mode lock, attachment bar navigation
  • Voice input: /voice, Ctrl+S, footer Voice control, Listening/Transcribing states, Enter-to-transcribe, Esc-to-cancel; cross-links the agent-platform voice page
  • Keyboard hints: contextual placeholder ghost text and the ? shortcuts menu with adaptive sections

Shell commands (absorbed from #403):

  • Shell mode: agent-first input, ! prefix to enter, Esc/Backspace to exit, > vs ! prompt marker, Shell mode statusline label, !-prefixed highlighted command rows in the transcript, note that running a command cancels an in-progress agent response
  • Natural language detection: off by default (opt-in), /natural-language-detection toggle persists across sessions, agent-biased classification (single tokens switch only with command evidence)
  • Long-running/interactive commands: input passthrough, dimmed "ctrl-c to interrupt" hint, typed-character carryover (shell type-ahead), one-command-at-a-time notice
  • Full-screen (alt-screen) apps: full-area rendering, keyboard/paste/scroll/mouse forwarding, transcript restored on exit
  • Ctrl+C semantics: interrupt running command (never exits), cancel streaming response, clear input, "ctrl-c again to exit" 1s double-press window; Ctrl+D on empty input and /exit; pointer to conversations page for resume

Dropped/unconfirmed

From this PR's original scope:

  • Vim mode: not merged to warp master; no vim wiring or setting in the CLI runtime (only listed as a follow-up in the input-view tech spec). Section removed.
  • Clicking inline menu rows: inline menus (slash/history/completions) have no mouse handling on master; menu rows are keyboard-driven. Claim removed; other mouse support is documented.
  • Configurable voice keybinding / keybinding remapping: the CLI registers remappable-by-name bindings but does not load keybindings.yaml overrides yet (loading is explicitly a follow-up, and the GUI's keybinding-loading launch path is unreachable for the CLI). Documented Ctrl+S as fixed, with no configurability claims.
  • "Opt-in" auto-copy on selection: highlight-to-copy is unconditional in the CLI (no opt-in/opt-out setting; terminal.copy_on_select is GUI-surfaced only). Documented the actual always-on behavior; flagging for eng review in case an opt-in setting lands before launch.

Carried over from #403:

  • Manual attach (CODE-1915): no commits on master or any branch reference this ticket; not shipped, so it is not documented.
  • Command row color: documented as a ! marker + highlighted row background without naming a color (plan mentioned yellow rows; current master uses a theme-blended tint).

Notes for review

  • Anchors /cli/reference/#keyboard-shortcuts and /cli/reference/#slash-commands assume the reference stub's current H2s keep their names.
  • Merging the two history sections surfaced a conflict: my original draft said Enter inserts the recalled entry for editing; code confirms accepting a history entry submits it immediately (handle_accepted_prompt_and_command_history calls handle_submitted). The merged section documents submit-on-Enter.
  • Confirm always-on highlight-to-copy is the intended launch behavior.
  • npm run build passes (363 pages); built title verified as "Input and shell commands in the Warp CLI".

Suggested reviewer(s): Kevin, moira

Co-Authored-By: Oz oz-agent@warp.dev

Replace the cli/input-and-editing.mdx stub with full content covering
editing basics, the slash command menu with argument hints, up-arrow
prompt history, shell tab completions, mouse support, selection and
clipboard behavior (incl. OSC 52 over SSH), image attachments, voice
input, and the contextual keyboard hints plus the ? shortcuts menu.

Dropped from the outline after verifying against warp master: Vim mode
(not merged), inline-menu mouse clicks (not shipped), and configurable
keybinding claims (the CLI does not load keybinding overrides yet).

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label Jul 28, 2026
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 28, 2026 10:09pm

Request Review

@oz-for-oss

oz-for-oss Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@hongyi-chen

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR expands the Warp CLI input and editing page from a stub into a full feature document covering editing, slash commands, history, shell completions, mouse support, clipboard behavior, image attachments, voice input, and keyboard hints. I reviewed the changed docs against the annotated diff, the security checklist, and the provided spec context.

Concerns

  • No blocking concerns found. The provided spec context states that no approved or repository spec context was found, and the docs-only diff does not introduce security-sensitive code or configuration.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

{{WARP_CLI}} tokens are not substituted in MDX frontmatter (Astro's
content layer parses frontmatter outside Vite), so the built title and
description showed the raw token. Body-prose {VARS.WARP_CLI} is
unchanged. Verified the built dist/cli/input-and-editing <title> now
reads "Input and editing in the Warp CLI".

Co-Authored-By: Oz <oz-agent@warp.dev>
Consolidation: merge the verified content of cli/shell-commands.mdx
(PR #403, branch hyc/launch-cli-cli-shell-commands) into
cli/input-and-editing.mdx as a single "Input and shell commands in the
Warp CLI" page. Adds shell mode, natural language detection,
long-running and interactive commands, full-screen apps, and stopping/
exiting sections; merges the two history sections into one (adopting
the verified submit-on-Enter semantics); rewires shell-mode links to
in-page anchors. File rename to the new slug happens at integration.

Co-Authored-By: Oz <oz-agent@warp.dev>
@hongyi-chen hongyi-chen changed the title docs(cli): input and editing docs(cli): input and shell commands Jul 28, 2026
hongyi-chen and others added 2 commits July 28, 2026 15:03
Launch name confirmed as Warp Agent CLI. Base branch merge picks up the
WARP_CLI var change (e2aebe3) for body prose; this updates the two
literal frontmatter strings (title, description). Verified the built
title reads "Input and shell commands in the Warp Agent CLI".

Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant