Add casts core recording and rendering support @osterman (#2692)
## what- Add casts-core support with
atmos cast play,atmos cast render, and global--castrecording for CLI output, including help output recording. - Add asciicast recorder/playback/rendering packages, terminal/PTY capture plumbing, IO recorder support, and shell writer hooks used by command recording.
- Add workflow/custom-command step support and schemas for
cast,simulate,script, andworkdir, plus config defaults/loading behavior and focused tests. - Include non-cast user-visible fixes discovered while splitting this work, with dedicated fix notes under
docs/fixes.
scope
- This PR is intentionally limited to casts-core implementation, schemas, and related non-cast fixes.
- Full casts documentation, announcement/blog content, demo cast assets/configs, and cast-generation workflows are intentionally omitted from this PR and will be implemented in a follow-up pull request.
- The original
ascii-castbranch remains the source for the follow-up content work and can be rebased after this core PR merges.
non-cast fix notes
docs/fixes/2026-07-06-custom-command-import-merge.mddocs/fixes/2026-07-06-custom-command-include-env.mddocs/fixes/2026-07-06-custom-command-env-map-form.mddocs/fixes/2026-07-06-custom-command-step-execution.mddocs/fixes/2026-07-06-terminal-color-and-force-tty.mddocs/fixes/2026-07-06-help-rendering-without-config.mddocs/fixes/2026-07-06-mask-shell-and-env-output.mddocs/fixes/2026-07-06-chdir-updates-pwd.mddocs/fixes/2026-07-06-local-vendor-source-paths.mddocs/fixes/2026-07-06-step-output-labels.md
why
- Split the reviewable casts-core implementation out of
ascii-castbefore the user-facing documentation and content work lands separately. - Enable recording, playback, rendering, and scripted workflow flows without carrying generated demo/content payloads in this PR.
- Keep the non-cast fixes that are required for the retained custom-command, terminal, env, masking, and workdir behavior.
validation
go test ./cmd/cast ./cmd ./pkg/config ./pkg/schema ./pkg/terminal ./pkg/ui -run 'Test|^$' -count=1COLUMNS=80 GIT_CONFIG_GLOBAL="$PWD/.context/gitconfig-test" go test ./tests -run 'TestCLICommands/(indentation|Invalid_Log_Level_in_Config_File|Invalid_Log_Level_in_Environment_Variable|secrets-masking_describe_config|atmos_toolchain_--help|atmos_toolchain_install_--help|atmos_toolchain_info_--help|atmos_validate_component_failure_with_UI_output|atmos_workflow_shell_command_not_found|atmos_workflow_failure|atmos_workflow_failure_on_shell_command|atmos_workflow_invalid_step_type|atmos_workflow_invalid_from_step|atmos_workflow_invalid_manifest)$' -count=1go test ./cmd/...go test ./pkg/asciicast ./pkg/io ./pkg/terminal/... ./pkg/runner/step ./pkg/process ./pkg/schema ./pkg/configgo test ./cmd/cast -count=1git diff --check -- docs/fixes
Summary by CodeRabbit
- New Features
- Added
castrecording with multi-format rendering (GIF/MP4/HTML/ASCII/PNG/JPEG), including workflow support for cast + simulate/session outputs. - Introduced new workflow steps:
script,hint,workdir, plus cast-basedsimulate.
- Added
- Bug Fixes
- Help output no longer fails when configuration is missing/invalid.
- Step output labels now respect
show.labels; improved stdout masking and terminal width/color/forced-TTY behavior;chdirnow updatesPWD.
- Chores
- Updated vendoring and recording-related handling, plus snapshots/help docs for the new
castfunctionality.
- Updated vendoring and recording-related handling, plus snapshots/help docs for the new