Skip to content

cru stats

Display summary statistics about your kiln directory.

cru stats

The stats command scans your kiln directory and provides a summary of its contents. It recursively walks through all subdirectories and reports file counts, markdown file counts, and total storage size.

This command is useful for:

  • Getting a quick overview of your kiln’s size
  • Monitoring growth over time
  • Verifying that your kiln path is configured correctly

The stats command currently takes no options or flags. It operates on the kiln path configured in your Crucible configuration file.

The total number of files in your kiln directory and all subdirectories.

The count of files with a .md extension (case-insensitive).

The combined size of all files in your kiln, reported in kilobytes (KB).

The absolute path to your kiln directory.

Kiln Statistics
Total files: 127
Markdown files: 89
Total size: 2048 KB
Kiln path: /home/user/my-kiln
Kiln scan completed successfully.
Error: kiln path does not exist: /path/to/nonexistent
Please configure kiln.path in your config file (see: cru config show)

Solution: Configure your kiln path:

[kiln]
path = "/path/to/your/kiln"

If the command cannot read certain directories or files, those items will be skipped and the scan will continue.

The stats command:

  • Recursively scans all subdirectories
  • Identifies markdown files by .md extension (case-insensitive)
  • Uses filesystem metadata for file sizes
  • Uses saturating addition to prevent overflow on very large kilns

Implementation: crates/crucible-cli/src/commands/stats.rs

  • :h process - Process your kiln for search and queries
  • :h search - Search indexed content
  • :h config.kiln - Kiln configuration options