CountCraft

by meet-v
5
4
3
2
1
Score: 50/100

Description

The CountCraft plugin calculates note statistics on demand and saves the results as numeric properties. It counts words, characters with or without spaces, lines and headings, including headings at a selected level from H1 to H6. Word and character totals use rendered text rather than raw Markdown, while line and heading counts use the source. Frontmatter is excluded. Each calculation can be enabled separately and mapped to a unique property name, with missing number properties created automatically. A preview command displays statistics without changing the note or its properties. Commands and an optional ribbon icon trigger calculations. It works on desktop and mobile and uses the metadata cache where possible. Vault wide batch calculations and automatic calculation after saving are experimental, with a vault backup recommended before use.

Reviews

No reviews yet.

Stats

4
stars
454
downloads
1
forks
4
days
4
days
5
days
1
total PRs
0
open PRs
0
closed PRs
1
merged PRs
1
total issues
0
open issues
1
closed issues
9
commits

Latest Version

5 days ago

Changelog

What's Changed

New Contributors

Full Changelog: https://github.com/meet-v/CountCraft/compare/1.0.0...1.0.1

README file from

Github

CountCraft — Obsidian Note Statistics, Saved as Properties

CountCraft is a Notes Analytics Sidekick for Obsidian. It adds important stats to your Obsidian notes as properties whenever you want to. Configure counters once, trigger on demand, and get precise metrics saved into note properties—ready for queries, dashboards, and workflows.

Key Features

Counting Capabilities

Following are the supported counters (as of now, planning to expand the support in the future):

  • Word Count: Total number of words in the note. !!
  • Character Count (with spaces): All characters including spaces and punctuation. !!
  • Character Count (without spaces): Characters excluding whitespace. !!
  • Line Count: Total number of lines in the note. !!
  • Heading Count (All Levels): Total number of headings regardless of level.
  • Heading Count (Specific Level): Count headings of a specific level (H1-H6).

!! Word and character counts are based on the rendered text, not the raw markdown source. This means that markdown syntax like *, #, and []() is not included in the counts, giving you a more accurate representation of your note's content. Line and heading counts are still based on the markdown source.

Powerful Configuration

  • Enable/Disable Controls: Toggle individual calculations on or off.
  • Custom Property Mapping: Map each calculation to any property name.
  • Duplicate Prevention: System prevents duplicate calculation configurations.
  • Property Auto-Creation: Automatically creates number-type properties if they don't exist.
  • Optional Ribbon Icon: Enable the optional ribbon icon for quick access to trigger calculations.
  • Calculations Management: Enable or disable, edit or delete calculations as per need.

Calculation Preview

Preview statistics on calculation for a note for quick reference, without updating the properties or editing the notes.

Other Features

  • Command palette integration. This enables adding shortcut to plugin commands or creating buttons or other automaations using other plugins from Obsidian Community.
  • Cache-aware and fast on large vaults through Obsidian’s metadata cache.
  • Debug support.

Experimental Features

Use with caution. Keep backup of the vault before use.

  • Batch calculations across vault.
  • Auto-calculate on saving the file.

Demo Use Cases

  • Writers and bloggers: Track word targets, character limits, and structure (H1–H6) across drafts without leaving Obsidian. Great for SEO briefs, newsletters, and posts with length constraints.
  • Students and researchers: Verify length requirements, outline depth, and section balance before submission. Headings by level help ensure argument structure.
  • Knowledge workers and teams: Standardize note metadata (as properties) for dashboards, dataview queries, and progress tracking—with zero manual updates.
  • Content ops/PMs: Batch-run metrics across folders to audit content libraries, find thin pages, or validate formatting conventions.
  • Enthusiast: Someone who likes to see their stats in the notes properties, and would like to leverage note searching, sorting, filtering based on these statistics.

Installation

From Obsidian (when published)

NOTE: Currently not available on Community Plugins. WIP.

  1. Open Obsidian → Settings → Community Plugins.
  2. Browse/Search for “CountCraft”.
  3. Install and enable.

Manual Installation (GitHub Releases)

  1. Download the latest release assets:
    • manifest.json
    • main.js
  2. Create a folder in the vault:
    • Vault/.obsidian/plugins/count-craft
  3. Copy the files into that folder.
  4. Reload Obsidian and enable CountCraft in Community Plugins.

Getting Started

  1. Open Settings → Community Plugins → CountCraft.
  2. Add a new calculation:
    • Select a counter type.
    • Set a property name (must be unique).
    • Enable the calculation.
  3. Run the command:
    • Command Palette → “CountCraft: Calculate Statistics for Current Note”.
  4. Check Properties panel—the counts are saved and ready for Dataview or other workflows.

Plugin Overview

Available Commands

  • CountCraft: Calculate Statistics for Current Note
  • CountCraft: Preview Statistics (No Property Updates)
  • CountCraft: Calculate Statistics for All Files (Experimental)
  • CountCraft: Open Settings

Settings

  • Ribbon icon: Show/hide quick-access button.
  • Calculations:
    • Add new calculation: Choose type, property name, optional parameter (heading level), enable/disable.
    • Edit existing calculation in a modal.
    • Delete calculation.
  • Duplicate property name prevention across all calculations.
  • Auto-calculate on save (experimental): Re-calculates after file changes.
  • Debug logging: Enables detailed logs in the console.

Property Naming Rules

  • Property names are preserved exactly as entered (only trimmed).
  • No two calculations may share the same property name.
  • Property type is set to Number (automatically created if it doesn’t exist).

Accuracy Notes

  • Counts exclude YAML frontmatter/properties to avoid inflated results.
  • Headings are counted from the body only.
  • Dataview/Reference tables are treated as lines; each row is a line for line count.

Performance

  • Uses Obsidian’s metadata cache where possible.
  • Efficient reading (cachedRead) instead of raw file I/O when available.
  • Batch mode shows progress notices on large vaults.

Compatibility

Uses only the public Obsidian plugin API and browser-safe code. Works on desktop and mobile.

Project Details

Structure

  • manifest.json
  • main.js
  • package.json
  • tsconfig.json
  • esbuild.config.mjs
  • versions.json
  • src
    • main.ts
    • settings.ts
    • counter.ts
    • interfaces.ts
    • constants.ts
    • utils.ts

Development

Prerequisites: Node 16+

  1. npm install
  2. npm run dev (watch mode)
  3. In Obsidian, enable Safe Mode off, and load the plugin folder via your vault’s .obsidian/plugins
  4. Reload Obsidian when needed.

Production build:

  • npm run build (generates main.js at the repo root)

Releasing:

  • Ensure manifest.json and versions.json are updated with the new version and minAppVersion.
  • Attach main.js, manifest.json, and styles.css (if present) to the GitHub release.

Debug

Enable debug logging in settings to:

  • Monitor calculation performance
  • Track property creation
  • Identify processing errors
  • View detailed execution logs

Support

If you find issues or have feature requests, open an issue in the repository.

Troubleshooting

Q: Calculations not running A: Check that at least one calculation is enabled in settings.

Q: Properties not appearing A: Ensure property names are valid (spaces become hyphens, no other special character).

Q: Performance issues on large vaults A: Enable debug mode to monitor performance, consider running calculations on subsets of files. Submit details through submitting an issue on the repo.

Q: Auto-calculate not working A: This feature is experimental and has a 500ms delay after file saves

Q: Calculation are looking high A: CountCraft excludes frontmatter automatically; if counts still look high, verify that body content includes long code blocks or embedded content. (Go through the known issues.)

Roadmap

  • Custom counters.

Contributing

Contributions and issues are welcome!

  • Fork the repo
  • Create a feature branch
  • Commit changes with clear messages
  • Open a PR describing the change and testing steps

Please include screenshots or short clips for UI-related changes.

License

Apache License 2.0

Licensed under the Apache License, Version 2.0 (the “License”); may not use this file except in compliance with the License. Obtain a copy at:

http://www.apache.org/licenses/LICENSE-2.0

NOTICE

CountCraft-Obsidian Copyright (c) 2025 MEET VEKARIA

Required attribution:

  • “CountCraft” by MEET VEKARIA.
  • Please retain this NOTICE file in redistributions, and display attribution in documentation or “About/credits” screens where third‑party notices normally appear.

Additional notices:

  • Portions may include third‑party components; see their respective licenses in the distribution (if any).
  • The contents of this NOTICE file are for informational purposes only and do not modify the License.

CREDITS

Created with ❤️ Meet Vekaria.

If you found this useful, I invite you to:

Buy Me a Coffee: "https://buymeacoffee.com/meet.v",

Be a GitHub Sponsor: "https://github.com/sponsors/meet-v"

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
File Info Panel
5 years ago by CattailNu
This plugin for Obsidian creates a small File Info view that displays the active file's date created, date modified, file size, and links to open the file in its native application and to open the file's folder.
Novel Word Count
5 years ago by Isaac Lyman
Obsidian plugin. Displays a word count or other statistic for each file, folder and vault in the File Explorer pane.
Page Properties
4 years ago by Anton Bualkh
A plugin that adds Logseq-like page tags to Obsidian
Writing Goals
3 years ago by James Lynch
Set yourself dynamic writing goals for notes and folders to help you hit your long form writing targets with Obsidian.
Multi Properties
3 years ago by fez-github
Plugin for Obsidian that allows user to add properties to multiple notes at once.
Metadata Icon
3 years ago by Benature
change metadata entry icon
Target Word Count
3 years ago by TwoFive Labs
Target Word Count Plugin for Obsidian
Daily Statistics
2 years ago by yefengr
obsidian daily statistics
Live Variables
2 years ago by Hamza Ben Yazid
Define variables in your note's properties and reuse them throughout your content.
Calendar
6 years ago by Liam Cain
Simple calendar widget for Obsidian.
Better Word Count
6 years ago by Luke Leppan
Counts the words of selected text in the editor.
Daily Stats
6 years ago by Dhruvik Parikh
Plugin to view your daily word count across all notes in your Obsidian.md vault.
Beeminder Word Count
5 years ago by Yuta Miyama
Beeminder integration with Obsidian, so that your word count in Obsidian contributes to your writing goals.
MetaEdit
5 years ago by Christian B. B. Houmann
MetaEdit for Obsidian
Key Promoter
5 years ago by Johannes Theiner
Learn keyboard shortcuts by showing them when using the mouse
Fold Properties
2 years ago by James Alexandre
Adds Fold/Unfold Properties Function to Folder Context Menu
Ridian
2 years ago by Michel Nivard
This is Ridian: R in Obsidian
Keep the Rhythm
2 years ago by Ezben
An Obsidian plugin to visualize how much you write with a heatmap.
Sentinel
2 years ago by Giorgos Sarigiannidis
A plugin for Obsidian that allows you to update properties or run commands based on document visibility changes.
YourPulse - Your Writing Activity Visualised
2 years ago by Jiri Sifalda
YourPulse.cc - Obsidian.md plugin that turns your vault into a reflection of your creativity, and put your writing on steroids 💪
Wordflow Tracker
2 years ago by LeCheenaX
Track the changes and stats of your edited note files automatically in Obsidian. Record the modified notes and statistics to your daily note with various customizations!
Custom Selected Word Count
a year ago by banisterious
Custom Selected Word Count for Obsidian
CJK Count
a year ago by Louie Kurenai
Vault Stats
a year ago by Blue Heron
A plugin with some simple statistics.
Efficient Word Count
a year ago by Blue Heron
Efficiently calculates and caches word counts for notes, with folder exclusion. Uses cache to avoid recalculating word counts for unchanged notes.
Pretty Properties
a year ago by Anareaty
Japanese Manuscript Counter
10 months ago by Yo Fujii
WPM Reading Time - How Long to Read This Text
7 months ago by Santi Younger
Calculate reading time estimates for selected text using your own reading speed in Words Per Minute.
Chinese Novel Assistant
3 months ago by pingo888
A set of small features designed to make writing Chinese novels more convenient.
Habitify
3 months ago by justrelaxdc
Bases Toolbox
3 months ago by Grub Basket
Adds Quality of Life features to Obsidian Bases
Property Panels
3 months ago by Eva Chen
Display and edit Obsidian frontmatter properties in configurable panels that stay inside the note's scrollable content.
Image Manager
3 months ago by David V. Kimball
Insert, rename, and sort external images by transforming them into local files within your notes.
Japanese Novel Tool
3 months ago by nonkuri
Bases Board
2 months ago by flowing-abyss
Kanban and gallery views for Obsidian Bases.
Trade Rythm
2 months ago by iblameaza
Trade Rythm - Obsidian trading journal plugin
F2 Quick Rename
a month ago by 熊猫别熬夜
F2 to quick rename the current note, or an embedded note/image under the cursor (including wiki aliases and markdown image alt text).
Note Pulse
25 days ago by shovy
Dashboard for your Obsidian vault: note and word trends, writing streak heatmap, task completion, tags and link stats.
Cool Bases
18 days ago by pattgue
Design cool card views for Obsidian Bases.