Skip to content

cwp log

shipped 1.0.0-rc.2
cwp log <env> [flags]

Acts on the environment you name. There is no local default, so you name one.

ArgumentWhat it isDefault
<env>environment to read the ledger of
FlagWhat it doesDefault
--item <path>only entries that carried this path’s artifact
--since <date>only entries at or after this date
--with-agentwith —dry-run on a host with no shell: install and remove the PHP agent so the plan is realoff

Plus the shared flags --json, -v, --verbose, -q, --quiet and --dry-run.

What it does

Answers where did this come from and how do I get back, which drift detection alone never can.

cwp status tells you two sides disagree. It cannot tell you that the disagreement arrived in Tuesday’s deploy, from commit c3f8a2. It cannot tell you that the restore point taken before it still has a name you can type.

cwp log prod
2026-08-22 09:14  deploy   12 content · 3 settings    c3f8a2 main
  restore point: 2026-08-22-091355-a3f
2026-08-21 17:02  refused  push blocked — prod no longer matches what cwp recorded: content
2026-08-21 16:58  observed 1 content
2026-08-19 11:30  pull     8 content                  9a11de main (dirty)
  previous tree: 7f2c9ab   (git checkout 7f2c9ab -- .)
2026-08-16 08:00  adopt                               9a11de main

It is local and free. The ledger lives in the committed ref, so this reads one file and talks to nothing. It answers on a train. It answers about an environment that is down right now, which is when somebody asks.

Two of its events are the ones a drift table can never give you. A refusal is a fact: a prevented accident. Without the ledger it vanishes with the terminal scrollback, and somebody later asks why the deploy did not go out on Tuesday. An observation is a read of an environment that found it had moved. It is the line above the refusal, four minutes earlier, and it answers when did this start. A run from a dirty tree carries a mark, because that state corresponds to no commit at all.

A read that agreed with the baseline writes nothing. The log has a bound, and a survey is the cheapest and most frequent thing this tool does.

Narrowing

cwp log prod --since 2026-08-01
cwp log prod --item content/page/about.yml

--item narrows by artifact, not by item, and that limit is deliberate. An entry records counts per artifact rather than item names. The ledger lives in git and merges by hand, and a list of every page in every pull would make it unreadable and its conflicts unresolvable. git log -- <path> is the tool for the rest, and it is right there.

What it does not do

  • It is not a commit graph. This is a ledger of events against one environment. It does not branch, it does not merge, and it has no parents.
  • It records nothing about your machine: no paths, usernames or hostnames. The ref lives in git, shared, and a colleague’s home directory is not a fact about the environment.
  • It is not cwp tail. That streams a container’s output. This is what happened to an environment, a different question under a similar-sounding name. cwp logs became cwp tail for that reason.