Skip to content

Running the CLIF command line tool

Nick Kwiatkowski edited this page Nov 25, 2026 · 1 revision

Running the CLIF command-line tool

clif [<command>] [options] [<path> ...]

Run with no command, clif starts the Language Server on stdio (that is what an editor does). With a command, it runs one batch tool and exits.

Commands

Command Purpose Page
(none) Run the LSP server over stdio Integrating the LSP server into your IDE
unresolved Report every component or method call that does not resolve Unresolved calls
explain Trace how one call site resolved, or why it did not Unresolved calls
unresolved-diff Compare two unresolved --json runs finding by finding Unresolved calls
refs Find references to a component or a function Unresolved calls
deps Print the transitive dependency graph of files Unresolved calls
lint (alias cflint) Run CFLint over files, a project, or what is staged or changed Linting projects and code
suppressions Count @CFLintIgnore suppressions by rule, and fail if they rise Linting projects and code
check Run the configured checks and fail on findings, for CI Performing automated checks
scan Report files the grammar cannot parse Performing automated checks
parse Parse files and report timing and counts Performing automated checks
format Format CFML files to stdout or in place Formatting code
graph Build a whole-project code map Creating Code Maps
routes Report framework routes and what they resolve to Creating Code Maps
mcp Serve the workspace over the Model Context Protocol on stdio Using the MCP server
hook Install and run a git pre-commit hook that runs lint Using the GIT Hooks
version Print the version —
help Print the command list —

Getting help

Every command answers --help (or -h) anywhere on its command line:

clif --help              # the command list
clif help unresolved     # same as: clif unresolved --help
clif graph . --help      # still prints help, rather than mapping "."

Example output of clif --help:

clif 0.7.7

Commands:
  (default)         Run the LSP server over stdio
  parse             Parse CFML files and report timing
  scan              Scan CFML files and report parse errors
  format            Format CFML files (stdout or in-place with -w)
  unresolved        Scan for unresolved component/method calls
  lint              Run lint checks over files, a project, or what is staged or changed
  check             Run the configured checks (lint by default) and fail on findings, for CI
  suppressions      Count lint suppressions by rule, and fail if they rise
  hook              Install and run a git pre-commit hook that runs lint
  refs              Find references to a component or function
  deps              Print component dependency info
  graph             Build a whole-project map of functions and their connections
  mcp               Serve that map over the Model Context Protocol on stdio
  routes            Report framework routes and what they resolve to
  explain           Explain how a call site's component was resolved
  unresolved-diff   Compare two unresolved --json runs, finding by finding
  version           Print version (also --version)
  help              Show this help

Version

Invocation Output
clif version clif 0.7.7
clif --version, clif -version, clif -v Same. -version is CFLint's spelling, so tools that probe cflint -version style flags work too

Common behaviour

Behaviour Detail
Paths Files or directories. Directories are walked by clif itself, so there is no glob to pass (and cmd.exe/PowerShell would not expand one anyway).
Skipped directories Dot-directories such as .git and .claude/worktrees are skipped. Vendor directories the walk skips can be named explicitly: clif unresolved myapp myapp/vendor/wheels.
File types .cfm, .cfc, .cfml and .cfs
Configuration The .clif.json governing the first path is read (walking upward). graph and unresolved resolve each file under its own nearest config unless --one-config is given. See LSP Initialization Options.
Workspace roots When workspacePaths is omitted, the requested directories are the workspace roots (a file uses its parent directory).
Output Results go to stdout; progress and timing go to stderr, so redirection captures only the report.
Unknown options A mistyped flag is an error (unknown option "--wirte"), never taken for a path.

Redirecting output on Windows

# PowerShell 5.1 writes UTF-16 for '>', so ask for UTF-8 explicitly
clif.exe unresolved "$HOME\projects\myapp" | Out-File -Encoding utf8 unresolved.txt
REM cmd.exe
clif.exe unresolved "%USERPROFILE%\projects\myapp" > unresolved.txt

Exit status

Command 0 1 2
lint / cflint No findings, or a report was written (--write / --out in report format) Findings The run cannot be trusted: missing path, broken .cflintrc, CFLint unavailable, not a git repository for --staged/--changed, usage error
check Every check passed A check found more than it allows A check could not run, missing path, usage error
suppressions Counted; with --baseline, nothing rose With --baseline, a count rose Missing path/baseline, usage error
hook Passed, skipped, or done Findings (run pre-commit), or hook missing (check) Not a git repository, a foreign hook in the way, usage error
unresolved-diff Always (the output is for a person) — —
Unknown command — — clif: unknown command or option "x" (see clif --help)

Environment variables

Variable Used by Effect
CLIF_LOG LSP server Write a copy of the whole log to this file; crash reports go there too
CLIF_NO_SUPERVISOR LSP server 1 runs the server directly rather than under the restarting supervisor
CLIF_CPUPROFILE, CLIF_MEMPROFILE All Write a Go CPU / memory profile to this file
CLIF_CFLINT lint, check, LSP The CFLint binary to run, ahead of PATH and the embedded copy
CLIF_CFLINT_DIR lint, check, LSP Where CFLint is unpacked or downloaded, instead of the user cache
CLIF_COMMIT_LOG (or CFLINT_COMMIT_LOG) hook Overrides the --log file path
CLIF_MCP_TOOLS mcp Comma-separated tool allowlist, or slim (same as --tools)
CLIF_DOWNLOAD_URL install.sh, install.ps1 An https:// mirror of the releases
SKIP, PREK_SKIP hook SKIP=lint skips the pre-commit hook for one commit
CFMLEDITOR_LSP_LOG, CFMLEDITOR_CPUPROFILE, CFMLEDITOR_MEMPROFILE All Legacy names, read when the CLIF_ variable is unset

← Developer Documentation · Home

Clone this wiki locally