Skip to content

feat: a terminal UI for people, plus fixes for go vet and atStart - #55

Open
Bradenream wants to merge 19 commits into
masterfrom
braden/terminal-ui-and-fixes/COR-0
Open

Bradenream wants to merge 19 commits into
masterfrom
braden/terminal-ui-and-fixes/COR-0

Conversation

@Bradenream

@Bradenream Bradenream commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Three pieces of work in one PR, split into 19 commits. Each commit builds and passes the Go and behaviour tests on its own, so the PR reads best commit by commit.

  1. CI: go vet passes again. Master's Vet step has been red since 2026-10-06.
  2. Fix: workflow insert-step and add-actions stop sending "atStart": true on every request. Inserting a step after another step always failed.
  3. A terminal UI for people. Bare vf opens a home banner and an inline prompt, auth commands show status lines, errors print once, and every command group says what it is for. The prompt has short help, history across sessions with ctrl-r, abbreviation matching and folding of long output, and API calls show a spinner. Machine output (JSON, YAML, TOON, --jq, agent mode) is byte for byte unchanged.

Commits, in review order

# Commit What to look at
1 ci: run go vet through a script that skips Speakeasy's const fields scripts/vet.sh: drops only the structtag finding on lines with a const:"…" tag
2 build: add an overlay that keeps optional literal flags optional .speakeasy/overlays/optional-literal-flags.yaml: the source of fix 2
3 fix(workflow): send atStart only when it is asked for Regenerated SDK/CLI, plus Go and dry-run tests
4 style: use Voiceflow blue as the accent color #38BDF8 → #397DFF
5 fix(output): print a human-mode error once reported.go. An undocumented status keeps its "unknown status code returned" on the status line
6 feat(ui): add the terminal design spec and the ui package Start with internal/ui/DESIGN.md. It is the spec for everything after this
7 feat(output): decide per stream whether to style output output.UI: decorate only on a terminal, outside agent mode, not TERM=dumb
8 feat(prompt): add an inline line editor with command completion internal/prompt
9 docs: describe vf and each command group in plain words Mostly mechanical: 44 group root.go files, --usage schema, docs/
10 feat: open a home banner and prompt on bare vf home.go, and root.go dropping the explorer auto-launch
11 feat(auth): show login, signup, logout and whoami as status lines oauth/present.go, cli/auth_present.go
12 fix(prompt): take the selected command on Enter after a group prompt.go enterCompletes: a group never runs bare, since all it would do is print its help
13 feat(prompt): show short help inside the home prompt cli/prompt_help.go: no global flags on every help page. Outside the prompt and in agent mode, help is Cobra's, unchanged
14 fix(prompt): keep the sign-in state after a line that skips setup home.go runLine: after --help, the prompt no longer reads "Not signed in"
15 feat(ui): show a spinner while an API call runs client/spinner.go, wired in with one line in client.go. Draws after 300 ms, on stderr, at a terminal only
16 feat(prompt): keep history across sessions and search it with ctrl-r cli/history.go: lines that may hold a credential are never written
17 feat(prompt): match abbreviations in the menu complete.go fuzzyScore: only when nothing else matches
18 feat(prompt): fold long output, show the rest with ctrl-o output/fold.go, wired in with one line in output.go. Only inside the prompt, at a terminal
19 feat(docs): give vf docs the spinner and folding cli/docs.go: it makes its own requests, so it needed both wired in by hand

What changes for a person at a terminal

  • Bare vf: shows a banner (version, sign-in state, what to try) and an inline prompt that runs vf commands until exit or ctrl-d. It used to open the full-screen explorer, which is still vf explore.
  • Auth: vf auth login and signup show the URL, whether the browser opened, and a spinner. logout and whoami report the session, including whether it renews itself.
  • Errors: print once. Before, the status and body were printed a second time.
  • Help: help, the README summary and docs/ describe each group ("Publish, clone, merge and compare environments") instead of "Operations for environment". Inside the prompt, help leaves out the two dozen global flags.
  • Waiting: an API call that takes over 300 ms shows ✻ List projects… 2s · ctrl-c to cancel on stderr, erased before the result prints.
  • The prompt:
    • History is kept in ~/.config/vf/history (owner-only, newest 1,000 lines), and ctrl-r searches it.
    • The menu reads envpub as environment publish and --pid as --project-id.
    • A result taller than the screen folds behind … +365 lines · ctrl-o to show them.

What stays the same

  • Off a terminal, in agent mode, or with --no-interactive: bare vf prints help exactly as before.
  • Machine output: JSON, YAML, TOON and --jq output carry no color or glyphs, per DESIGN.md rule 1.
  • Plain text: the plain output of every auth command is unchanged. Scripts and the behaviour tests read it.
  • Folding and the spinner never apply in a pipe, in agent mode, with TERM=dumb, or with --debug/--dry-run. Folding also never applies outside the home prompt, so a shell always gets every line.

Testing

  • Every commit passes gofmt, go build ./..., scripts/vet.sh, go test ./... and VF_SKIP_INTEGRATION_TESTS=1 yarn test, and leaves go.mod and go.sum unchanged. The integration suite (test/vf-*.test.ts) was not run: it needs a token and a throwaway workspace, as in CI.
  • yarn oxlint: 0 errors. The 1 warning is the existing one on master.
  • Manually at a terminal:
    • Banner and prompt, styled whoami, plain help when piped, a human-mode connection error printed once, and insert-step --after-step-id --dry-run sending no atStart.
    • In the prompt: short help, abbreviations, ctrl-r finding a line from an earlier session, and a long docs get page folding then showing in full on ctrl-o.
    • The spinner drawing and erasing itself in a pty.

Notes for reviewers

Bare `go vet ./...` has failed on every master run since 2026-10-06, when
the API spec gained its first const properties. Speakeasy generates each
one as an unexported struct field with a json tag, which its own JSON code
reads by reflection, and vet's structtag check flags every one of them.

The fields are regenerated several times a day and vet has no inline
ignore, so scripts/vet.sh drops exactly that finding, and only on a line
that carries a `const:"…"` tag. Any other vet finding still fails the run,
including the same message for an ordinary unexported field.
The realtime API declares five properties as zod
`z.literal(true).optional()`: absent, or true. That reaches the spec as
`type: boolean` with a one-value `enum: [true]`, and Speakeasy generates a
one-value enum as a const field, which its JSON code always encodes and
never decodes.

The overlay drops those one-value enums so each property is a plain
optional boolean again. The two properties that really are constants
(StableFunctionCheckResponseUnion.checked and
StableWorkflowStepReadOnlyContent.readOnly) are left alone. Remove the
overlay once the API spec stops emitting these as one-value enums.
Regenerated with the optional-literal-flags overlay. Before it, the CLI
sent `"atStart": true` on every `workflow insert-step` and
`workflow add-actions` request. The server rejects atStart together with
afterStepID, so inserting a step after another step always failed. Every
decoded response also reported overridden, incomplete and literalText as
true, whatever the server sent.

Now atStart is sent only with --at-start, which both commands offer, and
those response fields decode to what the server returned. Go tests and
dry-run behaviour tests cover the request bodies for both commands, and a
round-trip test covers the three response fields.
#38BDF8 (sky) becomes #397DFF, Voiceflow's blue, in the Speakeasy theme
config and every hand-set copy of it: the explorer, the interactive
forms, and the auth and configure forms.
Agent mode already marks a printed error as reported, so the trailing
line Cobra's caller would print is suppressed. Human mode was left alone
on the theory that the trailing line was a readable one-line summary. It
was not. It is SDKDefaultError.Error(), which repeats the status and the
whole body, and for a connection error it repeats the "Error: …" line
word for word. Human mode now marks its errors as reported too.

The one thing that line said and the body does not is the SDK's message
for a status the operation never documents, such as a 200 where only 201
means success: "unknown status code returned". The status line now
carries it, as "API Error (HTTP 200): unknown status code returned". The
generic "API error occurred" is still left off, since the status already
says that.
internal/ui/DESIGN.md is the spec for everything vf shows a person at a
terminal: machine output stays byte for byte as it is, styling is decided
per stream, Voiceflow blue is the only fixed color, state colors mean
state, and the glyph vocabulary is closed. It respects --color, NO_COLOR,
FORCE_COLOR and TERM=dumb.

internal/ui implements it: status lines, the banner box, a spinner, path
and time formatting. Nothing calls it yet. charmbracelet/x/ansi and
muesli/termenv move from indirect to direct dependencies.
output.UI returns a ui.UI for one stream. It decorates only when that
stream is a terminal, agent mode is off and TERM is not dumb, and it
colors according to --color, NO_COLOR and FORCE_COLOR. So
`vf project list | jq` keeps a plain stdout while an error on stderr can
still be styled.
internal/prompt reads one line in a box drawn in the scrollback, not a
full-screen view. It offers a completion menu built from the Cobra tree,
keeps history, shows a placeholder, and splits the line into arguments
with shell-style quoting. Nothing calls it yet.
Speakeasy describes the root command as "Realtime: Realtime gateway API
service" and every group with no tag description as "Operations for
<group>". Help, the README summary, the --usage schema and docs/ now say
what each one is for: "Build, test, and operate Voiceflow AI agents from
your terminal", "Publish, clone, merge and compare environments", and so
on.

The group descriptions are edits to generated root.go files, which
persistent edits carry through regeneration.
At a terminal, bare `vf` now prints a banner (version, sign-in state,
what to try next) and opens an inline prompt that runs vf commands until
you type exit or press ctrl-d. `/` opens a menu of every command group,
and "vf project list" works as typed in a shell.

It used to open the full-screen explorer instead. The explorer is still
`vf explore`, but the banner and prompt stay in the scrollback, as
DESIGN.md asks. Off a terminal, in agent mode, or with --no-interactive,
bare `vf` prints help exactly as before.

The sign-in state follows the order the client picks a credential:
--token, VF_TOKEN, the browser session, then a token saved by
`vf configure`. It reads only local state, so the banner is instant and
works offline.
At a terminal, `vf auth login` and `vf auth signup` show the
authorization URL, whether the browser opened, and a spinner while they
wait. `vf auth logout` and `vf auth whoami` report the session the same
way, including whether it renews itself. The plain text is unchanged
everywhere else, which scripts, agents and the tests read.

Login gains a `present` hook beside OnAuthURL, so the styled view can
draw its own prompt and learn whether the browser opened. OnAuthURL
still wins when both are set. The signup next steps now come from one
list that both outputs share.
Copilot AI balanced review requested due to automatic review settings November 29, 2026 18:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Active issues misreport explicit token clearing, add styling or prompts to machine-output modes, and suppress help for bare vf --no-interactive.

3 open issues
What changed in this PR

This PR improves the Voiceflow CLI’s terminal experience while fixing optional workflow flags and restoring the CI vet check.

Changes:

  • Adds terminal presentation for home and authentication flows, shared UI helpers, and single-print human-mode errors.
  • Preserves absent optional boolean fields through SDK serialization and exposes --at-start explicitly.
  • Filters intentional generated-code vet warnings and refreshes command descriptions, documentation, and accent colors.
File Description
test/​errors-teach.test.ts Tests single-print human errors.
test/​dry-run.test.ts Tests optional atStart request behavior.
scripts/​vet.sh Filters intentional const-field vet warnings.
README.md Clarifies the CLI summary.
internal/​ui/​time.go Formats relative expiry times.
internal/​ui/​path.go Shortens paths under home.
internal/​ui/​path_test.go Tests home-path shortening.
internal/​ui/​lines.go Adds nested output and terminal sizing.
internal/​sdk/​models/​components/​stableworkflowstepinsertrequest.go Makes AtStart optional and writable.
internal/​sdk/​models/​components/​stableworkflowportactionsaddrequest.go Makes AtStart optional and writable.
internal/​sdk/​models/​components/​stableworkflowlink.go Preserves optional Overridden values.
internal/​sdk/​models/​components/​stabletranscriptgrepresponse.go Preserves optional LiteralText values.
internal/​sdk/​models/​components/​stableenvironmentsearchtextreadresponse.go Preserves optional Incomplete values.
internal/​sdk/​models/​components/​optional_literal_flags_test.go Tests optional flag round trips.
internal/​prompt/​split.go Parses quoted command arguments.
internal/​output/​ui.go Chooses styling per output stream.
internal/​output/​ui_test.go Tests stream styling policy.
internal/​output/​reported.go Preserves SDK details when suppressing duplicates.
internal/​output/​reported_test.go Tests human error reporting.
internal/​output/​output.go Marks human errors as already printed.
internal/​oauth/​signup.go Derives plain signup tips from shared data.
internal/​oauth/​oauth.go Adds presentation hooks and renewal status.
internal/​oauth/​command.go Selects styled terminal login.
internal/​interactive/​interactive.go Applies Voiceflow blue to forms.
internal/​explorer/​styles.go Applies Voiceflow blue to explorer.
internal/​cli/​workspace/​root.go Clarifies workspace help.
internal/​cli/​workflow/​root.go Clarifies workflow help.
internal/​cli/​workflow/​insertstep.go Exposes optional --at-start.
internal/​cli/​workflow/​addactions.go Exposes optional --at-start.
internal/​cli/​widget/​root.go Clarifies widget help.
internal/​cli/​whoami.go Selects styled terminal identity output.
internal/​cli/​variable/​root.go Clarifies variable help.
internal/​cli/​transcript/​root.go Clarifies transcript help.
internal/​cli/​transcript/​property/​root.go Clarifies transcript-property help.
internal/​cli/​tool/​root.go Clarifies tool help.
internal/​cli/​test/​turn/​root.go Clarifies test-turn help.
internal/​cli/​test/​testfolder/​root.go Clarifies test-folder help.
internal/​cli/​test/​run/​root.go Clarifies test-run help.
internal/​cli/​test/​root.go Clarifies test help.
internal/​cli/​test/​check/​root.go Clarifies test-check help.
internal/​cli/​secret/​root.go Clarifies secret help.
internal/​cli/​prompt/​root.go Clarifies reusable-prompt help.
internal/​cli/​project/​root.go Clarifies project help.
internal/​cli/​playbook/​root.go Clarifies playbook help.
internal/​cli/​playbook/​playbookpath/​root.go Clarifies playbook-path help.
internal/​cli/​phonenumber/​root.go Clarifies phone-number help.
internal/​cli/​persona/​root.go Clarifies persona help.
internal/​cli/​message/​root.go Clarifies message help.
internal/​cli/​mcptool/​root.go Clarifies MCP-tool help.
internal/​cli/​mcpserver/​root.go Clarifies MCP-server help.
internal/​cli/​knowledgebase/​root.go Clarifies knowledge-base help.
internal/​cli/​integration/​root.go Clarifies integration help.
internal/​cli/​function/​root.go Clarifies function help.
internal/​cli/​function/​functionvariable/​root.go Clarifies function-variable help.
internal/​cli/​function/​functionpath/​root.go Clarifies function-path help.
internal/​cli/​event/​root.go Clarifies event help.
internal/​cli/​evaluation/​root.go Clarifies evaluation help.
internal/​cli/​environment/​root.go Clarifies environment help.
internal/​cli/​document/​root.go Clarifies document help.
internal/​cli/​document/​documentfolder/​root.go Clarifies document-folder help.
internal/​cli/​credits/​root.go Clarifies credits help.
internal/​cli/​conversation/​state/​root.go Clarifies conversation-state help.
internal/​cli/​conversation/​root.go Clarifies conversation help.
internal/​cli/​configure.go Applies Voiceflow blue to configuration forms.
internal/​cli/​billing/​subscription/​root.go Clarifies subscription help.
internal/​cli/​billing/​root.go Clarifies billing help.
internal/​cli/​billing/​limits/​root.go Clarifies billing-limit help.
internal/​cli/​billing/​billingcredits/​root.go Clarifies billing-credit help.
internal/​cli/​auth.go Adds styled token-save and logout reports.
internal/​cli/​apitool/​root.go Clarifies API-tool help.
internal/​cli/​apitool/​apitoolvariable/​root.go Clarifies API-tool-variable help.
internal/​cli/​analytics/​root.go Clarifies analytics help.
internal/​cli/​analytics/​query/​root.go Clarifies analytics-query help.
internal/​cli/​agent/​root.go Clarifies agent help.
go.mod Promotes existing UI dependencies to direct requirements.
docs/​vf_workspace.md Refreshes workspace description and flag help.
docs/​vf_workspace_update.md Refreshes flag help and workspace reference.
docs/​vf_workspace_list.md Refreshes flag help and workspace reference.
docs/​vf_workspace_get.md Refreshes flag help and workspace reference.
docs/​vf_workspace_delete.md Refreshes flag help and workspace reference.
docs/​vf_workspace_create.md Refreshes flag help and workspace reference.
docs/​vf_whoami.md Refreshes flag help and CLI reference.
docs/​vf_version.md Refreshes flag help and CLI reference.
docs/​vf_variable.md Refreshes variable description and flag help.
docs/​vf_variable_update.md Refreshes flag help and variable reference.
docs/​vf_variable_list.md Refreshes flag help and variable reference.
docs/​vf_variable_get.md Refreshes flag help and variable reference.
docs/​vf_variable_delete.md Refreshes flag help and variable reference.
docs/​vf_variable_create.md Refreshes flag help and variable reference.
docs/​vf_transcript.md Refreshes transcript description and references.
docs/​vf_transcript_search.md Refreshes flag help and transcript reference.
docs/​vf_transcript_property.md Refreshes property description and flag help.
docs/​vf_transcript_property_update.md Refreshes flag help and property reference.
docs/​vf_transcript_property_set-value.md Refreshes flag help and property reference.
docs/​vf_transcript_property_list.md Refreshes flag help and property reference.
docs/​vf_transcript_property_get.md Refreshes flag help and property reference.
docs/​vf_transcript_property_delete.md Refreshes flag help and property reference.
docs/​vf_transcript_property_create.md Refreshes flag help and property reference.
docs/​vf_transcript_get.md Refreshes flag help and transcript reference.
docs/​vf_tool.md Refreshes tool description and flag help.
docs/​vf_tool_update.md Refreshes flag help and tool reference.
docs/​vf_tool_list.md Refreshes flag help and tool reference.
docs/​vf_tool_get.md Refreshes flag help and tool reference.
docs/​vf_tool_delete.md Refreshes flag help and tool reference.
docs/​vf_tool_create.md Refreshes flag help and tool reference.
docs/​vf_project.md Refreshes project description and flag help.
docs/​vf_project_update.md Refreshes flag help and project reference.
docs/​vf_project_list.md Refreshes flag help and project reference.
docs/​vf_project_get.md Refreshes flag help and project reference.
docs/​vf_project_delete.md Refreshes flag help and project reference.
docs/​vf_project_create.md Refreshes flag help and project reference.
docs/​vf_playbook.md Refreshes playbook description and flag help.
docs/​vf_playbook_update.md Refreshes flag help and playbook reference.
docs/​vf_playbook_list.md Refreshes flag help and playbook reference.
docs/​vf_playbook_get.md Refreshes flag help and playbook reference.
docs/​vf_playbook_delete.md Refreshes flag help and playbook reference.
docs/​vf_playbook_create.md Refreshes flag help and playbook reference.
docs/​vf_mcp-tool.md Refreshes MCP-tool description and flag help.
docs/​vf_mcp-tool_list.md Refreshes flag help and MCP-tool reference.
docs/​vf_mcp-tool_get.md Refreshes flag help and MCP-tool reference.
docs/​vf_mcp-server.md Refreshes MCP-server description and flag help.
docs/​vf_mcp-server_update.md Refreshes flag help and MCP-server reference.
docs/​vf_mcp-server_sync.md Refreshes flag help and MCP-server reference.
docs/​vf_mcp-server_list.md Refreshes flag help and MCP-server reference.
docs/​vf_mcp-server_get.md Refreshes flag help and MCP-server reference.
docs/​vf_mcp-server_delete.md Refreshes flag help and MCP-server reference.
docs/​vf_mcp-server_create.md Refreshes flag help and MCP-server reference.
docs/​vf_knowledge-base.md Refreshes knowledge-base description and flag help.
docs/​vf_knowledge-base_query.md Refreshes flag help and knowledge-base reference.
docs/​vf_function.md Refreshes function description and references.
docs/​vf_function_variable.md Refreshes variable description and flag help.
docs/​vf_function_variable_update.md Refreshes flag help and variable reference.
docs/​vf_function_variable_list.md Refreshes flag help and variable reference.
docs/​vf_function_variable_get.md Refreshes flag help and variable reference.
docs/​vf_function_variable_delete.md Refreshes flag help and variable reference.
docs/​vf_function_variable_create.md Refreshes flag help and variable reference.
docs/​vf_function_update.md Refreshes flag help and function reference.
docs/​vf_function_path.md Refreshes path description and flag help.
docs/​vf_function_path_update.md Refreshes flag help and path reference.
docs/​vf_function_path_list.md Refreshes flag help and path reference.
docs/​vf_function_path_get.md Refreshes flag help and path reference.
docs/​vf_function_path_delete.md Refreshes flag help and path reference.
docs/​vf_function_path_create.md Refreshes flag help and path reference.
docs/​vf_function_list.md Refreshes flag help and function reference.
docs/​vf_function_get.md Refreshes flag help and function reference.
docs/​vf_function_delete.md Refreshes flag help and function reference.
docs/​vf_function_create.md Refreshes flag help and function reference.
docs/​vf_explore.md Refreshes flag help and CLI reference.
docs/​vf_evaluation.md Refreshes evaluation description and flag help.
docs/​vf_evaluation_update.md Refreshes flag help and evaluation reference.
docs/​vf_evaluation_run.md Refreshes flag help and evaluation reference.
docs/​vf_evaluation_list.md Refreshes flag help and evaluation reference.
docs/​vf_evaluation_get.md Refreshes flag help and evaluation reference.
docs/​vf_evaluation_delete.md Refreshes flag help and evaluation reference.
docs/​vf_evaluation_create.md Refreshes flag help and evaluation reference.
docs/​vf_environment.md Refreshes environment description and flag help.
docs/​vf_environment_update.md Refreshes flag help and environment reference.
docs/​vf_environment_update-traffic-split.md Refreshes flag help and environment reference.
docs/​vf_environment_publish.md Refreshes flag help and environment reference.
docs/​vf_environment_merge.md Refreshes flag help and environment reference.
docs/​vf_environment_list.md Refreshes flag help and environment reference.
docs/​vf_environment_get.md Refreshes flag help and environment reference.
docs/​vf_environment_delete.md Refreshes flag help and environment reference.
docs/​vf_environment_compile.md Refreshes flag help and environment reference.
docs/​vf_environment_clone.md Refreshes flag help and environment reference.
docs/​vf_document.md Refreshes document description and flag help.
docs/​vf_document_update.md Refreshes flag help and document reference.
docs/​vf_document_list.md Refreshes flag help and document reference.
docs/​vf_document_get.md Refreshes flag help and document reference.
docs/​vf_document_delete.md Refreshes flag help and document reference.
docs/​vf_document_create-url.md Refreshes flag help and document reference.
docs/​vf_document_create-text.md Refreshes flag help and document reference.
docs/​vf_document_create-table.md Refreshes flag help and document reference.
docs/​vf_conversation.md Refreshes conversation description and references.
docs/​vf_conversation_state.md Refreshes state description and flag help.
docs/​vf_conversation_state_update.md Refreshes flag help and state reference.
docs/​vf_conversation_state_update-variables.md Refreshes flag help and state reference.
docs/​vf_conversation_state_get.md Refreshes flag help and state reference.
docs/​vf_conversation_state_delete.md Refreshes flag help and state reference.
docs/​vf_conversation_send.md Refreshes flag help and conversation reference.
docs/​vf_configure.md Refreshes flag help and CLI reference.
docs/​vf_auth.md Refreshes flag help and CLI reference.
docs/​vf_auth_whoami.md Updates noninteractive flag wording.
docs/​vf_auth_signup.md Updates noninteractive flag wording.
docs/​vf_auth_logout.md Updates noninteractive flag wording.
docs/​vf_auth_login.md Updates noninteractive flag wording.
docs/​vf_api-tool.md Refreshes API-tool description and references.
docs/​vf_api-tool_variable.md Refreshes variable description and flag help.
docs/​vf_api-tool_variable_update.md Refreshes flag help and variable reference.
docs/​vf_api-tool_variable_list.md Refreshes flag help and variable reference.
docs/​vf_api-tool_variable_get.md Refreshes flag help and variable reference.
docs/​vf_api-tool_variable_delete.md Refreshes flag help and variable reference.
docs/​vf_api-tool_variable_create.md Refreshes flag help and variable reference.
docs/​vf_api-tool_update.md Refreshes flag help and API-tool reference.
docs/​vf_api-tool_list.md Refreshes flag help and API-tool reference.
docs/​vf_api-tool_get.md Refreshes flag help and API-tool reference.
docs/​vf_api-tool_delete.md Refreshes flag help and API-tool reference.
docs/​vf_api-tool_create.md Refreshes flag help and API-tool reference.
docs/​vf_analytics.md Refreshes analytics description and references.
docs/​vf_analytics_query.md Refreshes query description and flag help.
docs/​vf_analytics_query_workspace-transcript-count.md Refreshes flag help and query reference.
docs/​vf_analytics_query_workspace-token-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_workspace-interaction-count.md Refreshes flag help and query reference.
docs/​vf_analytics_query_workflow-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_unique-user-count.md Refreshes flag help and query reference.
docs/​vf_analytics_query_prompt-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_project-transcript-count.md Refreshes flag help and query reference.
docs/​vf_analytics_query_project-transcript-cost.md Refreshes flag help and query reference.
docs/​vf_analytics_query_project-token-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_project-interaction-count.md Refreshes flag help and query reference.
docs/​vf_analytics_query_playbook-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_organization-token-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_mcp-tool-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_knowledge-base-document-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_intent-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_integration-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_hourly-project-token-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_hourly-organization-token-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_function-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_entity-token-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_daily-token-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_category-token-usage.md Refreshes flag help and query reference.
docs/​vf_analytics_query_call-duration.md Refreshes flag help and query reference.
docs/​vf_analytics_query_call-count.md Refreshes flag help and query reference.
docs/​vf_analytics_query_api-tool-usage.md Refreshes flag help and query reference.
docs/​vf_agent.md Refreshes agent description and flag help.
docs/​vf_agent_update.md Refreshes flag help and agent reference.
docs/​vf_agent_get.md Refreshes flag help and agent reference.
.speakeasy/​workflow.yaml Registers the optional-boolean overlay.
.speakeasy/​overlays/​optional-literal-flags.yaml Removes constant constraints from five optional flags.
.speakeasy/​out.openapi.yaml Records transformed optional boolean schemas.
.speakeasy/​gen.yaml Sets the generated UI accent color.
.github/​workflows/​ci.yaml Runs vet through the filtering script.

Review effort: Balanced

Comment thread internal/cli/auth.go
keychainStored = true
}
changed = true
tokenEntered = v != ""
Comment thread internal/cli/home.go
Comment on lines +46 to +48
if !u.Decorated() {
return cmd.Help()
}
Comment thread internal/output/ui.go
Comment on lines +32 to +35
return ui.New(w, ui.Options{
Color: !IsAgentMode() && wantsColor(colorFlag, terminal),
Decorate: !IsAgentMode() && terminal && os.Getenv("TERM") != "dumb",
})
Picking a group from the menu opened its commands with the ❯ on the
first, but Enter then ran the bare group, which prints its help: 61 lines
for `workflow`, 24 of them global flags. Typing a group's name in full and
pressing Enter did the same.

A group never runs bare now. Its name typed in full opens it like a
partial name, and with its commands in the menu, Enter takes the one the
❯ is on. A command's flags in the menu still do not stop Enter running
the command, and with the menu hidden, Enter runs the line as typed.
Cobra's help ends every page with the global flags: two dozen lines, the
same on every command, which in the prompt bury the lines that answer the
question. `workflow` help was 61 lines, 24 of them global flags.

Inside the prompt, help now leaves them out. A group lists its commands as
the menu does, then says `workflow <command> --help` shows a command's
flags (30 lines for workflow). A command keeps Cobra's Usage, Examples and
Required/Optional Flags, then one line pointing at the global flags.
`--help` on its own lists every group and the global flags.

Outside the prompt, and in agent mode inside it, help is Cobra's,
unchanged: agents read it to learn --output-format, --jq and --dry-run.
Each prompt line resets config so nothing leaks into the next, and the
line's PersistentPreRunE loads it again. A line that never reaches
PersistentPreRunE (--help, a flag that does not parse) left it reset,
and the prompt then read the sign-in state from nothing: after
`workflow --help` it said "Not signed in" and offered `auth login` to
someone who was signed in.

runLine now loads config again once the line is done, which is a no-op
when the line already did.
At a terminal, every API request now shows the Working spinner on stderr
once it has run for 300 ms, saying what the command does:

  ✻ List projects… 2s · ctrl-c to cancel

A quicker request draws nothing, and the line is erased before the result
prints. Never in a pipe, in agent mode, with TERM=dumb, or with --debug or
--dry-run, which write their own lines to stderr.

ui.SpinAfter is Spin with a delay before the first frame.
The home prompt's history used to vanish when the prompt closed. It is now
kept in ~/.config/vf/history (owner-only), the newest 1,000 lines. A line
that may hold a credential (a token, vfp_, a secret, a password, an API
key) is never written there; ↑ still reaches it until the prompt closes.

Ctrl-R searches history as a shell does: newest match first, the match in
the box and "search history: publ" under it. Ctrl-R again steps older,
Enter runs the match, Tab puts it on the line to edit, Esc goes back. The
? panel lists it.
When nothing starts with, contains or deeply names the word being typed,
the menu now reads it as an abbreviation, as Claude Code's does: its
letters in order, the first starting a word. "envpub" offers environment
publish, "kbq" knowledge-base query, "workflow addblk" add-blocks, and
"--pid" offers --project-id.

Matches rank by letters that start words, then runs of letters, then the
shorter label. Requiring the first letter to start a word keeps a few
letters from matching half the commands by chance. Words the menu already
matched are unchanged.
Inside the home prompt, a result taller than the screen used to flood the
scrollback. It now prints a screenful, then one muted line, as Claude Code
folds long tool output:

  … +182 lines · ctrl-o to show them

Ctrl-O on an empty line, or the prompt word `more`, prints the rest. A
few lines over the limit never fold. Only inside the prompt and at a
terminal: a shell, a pipe and agent mode always get every line.

output.Result writes through output/fold.go, which passes everything
through unless the prompt has turned folding on. prompt.Options.Keys lets
a key run a word on an empty line.
vf docs search and vf docs get make their own requests and print their
own results, so they got neither the API spinner nor folding. The banner
suggests docs search first, so they now use both: client.StartSpinner
for the wait ("Searching the docs…", "Fetching the page…") and
output.ResultWriter for the result, which folds a long page inside the
home prompt.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants