Guide

Terminal Session

Use docspress/terminal-session for one copyable command with optional read-only output. It looks like a terminal transcript but never executes code.

When to use it

Choose Terminal Session when the command and its expected output belong together. Use Colorful Code for scripts or configuration files and Code Tabs for equivalent commands. Use API Request / Response for an HTTP exchange.

Attributes

Reference

Terminal Session attributes

Terminal labels, command, and output accepted by docspress/terminal-session.
5 fields
title string

Plain-text session heading.

shell string

Shell or runtime label.

prompt string

Prompt displayed before the command.

command string required

Plain command copied by the reader.

output string

Optional read-only expected output.

Creative examples

Run the package checks

Run the package checks bash
npm run package
Tests passed
Bundle rebuilt

Preview a safe reconciliation

Preview WordPress changes bash
npx docspress publish ./docs --dry-run
Found 42 desired pages
Would create 0
Would update 3
Would trash 1
Conflicts 0

Inspect one response in PowerShell

Read the public API index PowerShell
Invoke-RestMethod https://example.test/wp-json/ | Select-Object name, url
name       url
----       ---
DocsPress  https://example.test

Published behavior and accessibility

Copy copies only command, never the prompt or output. The output has an accessible command-output label, and long lines remain scrollable. No shell process or browser evaluation is attached to the block.

Show only the output needed to recognize success. Do not include volatile timestamps, personal paths, secrets, or pages of logs.

Was this helpful?