Skip to main content
On this page

Kater CLI Undo a change

kater history

Lists what changed in a workspace, an app or a file, newest first.

Each change says who made it, with which agent, and whether you can undo it now. History is kept in Kater, so in your own terminal it needs kater login.

Examples

Terminal window
# Go to a workspace in your local copy of Kater content
cd connections/snowflake_prod_connection/workspaces/ad_reporting
# List what changed in the workspace, newest first
kater history .
# List what changed in one saved query
kater history query_contracts/spend_by_platform.sql
# List what changed in an app, and in the queries that its page reads
kater history apps/paid_media_performance
# Show only the newest change
kater history . --latest

Arguments

ArgumentDescription
<path>A workspace’s folder, an app’s folder or one file. Give its path from the content root, or from the folder you are in.

Options

OptionDescription
--cursor <cursor>The next_cursor of the page before, to list older changes.
--latestShows only the newest change, without its files or the undo check. You cannot use it with --cursor.

It also takes the global options --json, --kater-root and --help.

What each change shows

  • Its id. An agent’s call or an undo has an id such as ch_3f9a21c0d4e5. Any other change is a commit. kater undo takes the id.
  • When and who. When it was made, who made it, and the agent that worked with them.
  • Its summary, on one line.
  • Its files. Each file that it added, edited, deleted or moved, with the earlier path of a moved file. It also counts the files it touched in other places that you can read.
  • Undo. Whether you can undo it now, or why not. An undo names the change that it undid, and a change that an undo reversed names that undo.

An app’s history also lists the queries that its page reads. You see only the changes and the files that you can read.

Pages and JSON

It lists 20 changes on a page. The last line gives the kater history command, with --cursor, that lists older changes. With --json, each change has change, at, author, agent, summary, files, others and undo. undo is true, or it gives why. Each file has a status: A, M, D, or R with from. An undo adds undoes, a change that was undone adds undone, and next_cursor reads older changes.

See also