Skip to main content

ctx log list

List recent logs.

List (ls)​

Options​

optionsshorthandrequireddescription
--count-cNumber of logs to show. Defaults to 20.
--jsonShow output in JSON format.
--pretty-jsonShow formatted JSON output.
--short, --oneline-sShow compact output.
--verbose-vShow detailed output.
--help-hShow this help message and exit.
--version-VPrint version information and exit.

What it does​

Lists the most recent logs recorded in the project context.

By default, it shows the latest 20 logs.

When to use it​

Use ctx log list when you want to review recent activity without searching through the complete log history.

Use it when you need a quick view of what has recently been observed, attempted, discussed, or encountered during project work.

How it works​

The command returns logs in recent-first order.

The number of logs displayed can be changed with --count.

The output can be presented using different views:

  • The default view shows recent logs in a concise human-readable format.
  • --short or --oneline shows a compact result.
  • --verbose shows detailed log information.
  • --json returns the result as JSON.
  • --pretty-json returns the JSON result with formatting.

The command only presents existing logs and does not modify them.

Examples​

List recent logs​

ctx log list

Shows the latest 20 logs.

Show more recent logs​

ctx log list --count=50

Shows the latest 50 logs.

Show a compact list​

ctx log list --short

Shows recent logs in a compact format.

View recent logs as formatted JSON​

ctx log list --pretty-json

Shows the recent logs as formatted JSON.

Use the ls alias​

ctx log ls

Lists recent logs using the command alias.