GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - deref/transcript: CLI tool for snapshot testing other CLI tools

BranchesTags
Open more actions menu

Latest commit

 

History

62 Commits
62 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
cmdtest
cmdtest
 
 
docs
docs
 
 
editors
editors
 
 
internal
internal
 
 
tests
tests
 
 
.envrc
.envrc
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
CLAUDE.md
CLAUDE.md
 
 
LICENSE
LICENSE
 
 
PLAN.md
PLAN.md
 
 
README.md
README.md
 
 
build.sh
build.sh
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
main.go
main.go
 
 
test.sh
test.sh
 
 
transcript_test.go
transcript_test.go
 
 

Repository files navigation

Transcript

transcript is a CLI tool for snapshot testing command-line programs.

Tests are written in a small, line-oriented format (usually *.cmdt) that captures a shell session: commands, stdout/stderr, and exit codes. The format is designed to be readable in reviews and easy to update when outputs change.

Highlights

  • Record sessions interactively (transcript shell)
  • Check transcripts in CI (transcript check)
  • Update expectations when outputs change (transcript update)
  • Reference external files for large or binary output (1< / 2<)
  • Embed transcripts in Go tests via cmdtest.Check

Quick Start

Create a transcript and check it:

cat > demo.cmdt <<EOF
$ echo stdout
1 stdout

$ echo stderr 1>&2
2 stderr

# Non-zero exit codes.
$ false
? 1
EOF

transcript check ./demo.cmdt

Install

go install github.com/deref/transcript@latest

Transcript is not Go-specific, but it is written in Go and can be used in Go test suites via cmdtest.Check.

Documentation

  • User guide
  • File format reference
  • Go test caching notes
  • Editor support

About

CLI tool for snapshot testing other CLI tools

Topics

clisnapshottesting

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

8 stars

Watchers

1 watching

Forks

1 fork
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.