Documentation · Reference

Supported languages

The languages Kimün recognizes and how it counts each file.

LanguageExtensions / Filenames
Bourne Again Shell.bash
Bourne Shell.sh
C.c, .h
C#.cs
C++.cpp, .cxx, .cc, .hpp, .hxx
Clojure.clj, .cljs, .cljc, .edn
CSS.css
Dart.dart
DockerfileDockerfile
DOS Batch.bat, .cmd
Elixir.ex
Elixir Script.exs
Erlang.erl, .hrl
F#.fs, .fsi, .fsx
Go.go
Gradle.gradle
Groovy.groovy
Haskell.hs
HTML.html, .htm
Java.java
JavaScript.js, .mjs, .cjs
JSON.json
Julia.jl
Kaikai.kai
Kotlin.kt, .kts
Lua.lua
Makefile.mk, Makefile, makefile, GNUmakefile
Markdown.md, .markdown
Nim.nim
Objective-C.m, .mm
OCaml.ml, .mli
Perl.pl, .pm
PHP.php
Properties.properties
Python.py, .pyi
R.r, .R
Ruby.rb, Rakefile, Gemfile
Rust.rs
Scala.scala, .sc, .sbt
SQL.sql
Swift.swift
Terraform.tf
Text.txt
TOML.toml
TypeScript.ts, .mts, .cts
XML.xml, .xsl, .xslt, .svg, .fsproj, .csproj, .vbproj, .vcxproj, .sln, .plist, .xaml
YAML.yaml, .yml
Zig.zig
Zsh.zsh

Language-specific notes

  • Kaikai — #[...] opens an attribute, not a # comment, so attributes count as code. Documentation attributes (#[doc("...")], including the multi-line #[doc("""...""")] form) count as comments and are excluded from the complexity, Halstead, and smell analyses.
  • Interior lines of multi-line strings (Kaikai and Python triple-quoted literals) count as code for km loc, but are excluded from cyclomatic, cognitive, Halstead, and smell analyses: prose and embedded data are not control flow.

Features

  • Respects .gitignore rules automatically
  • Deduplicates files by content hash (identical files counted once)
  • Detects languages by file extension, filename, or shebang line
  • Supports nested block comments (Rust, Haskell, OCaml, etc.)
  • Handles pragmas (e.g., Haskell {-# LANGUAGE ... #-}) as code
  • Mixed lines (code + comment) are counted as code, matching cloc behavior