ctx log list
List recent logs.
List (ls)
Options
| options | shorthand | required | description |
|---|---|---|---|
| --count | -c | Number of logs to show. Defaults to 20. | |
| --json | Show output in JSON format. | ||
| --pretty-json | Show formatted JSON output. | ||
| --short, --oneline | -s | Show compact output. | |
| --verbose | -v | Show detailed output. | |
| --help | -h | Show this help message and exit. | |
| --version | -V | Print 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.
--shortor--onelineshows a compact result.--verboseshows detailed log information.--jsonreturns the result as JSON.--pretty-jsonreturns 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.