Add --json to any command to print its result as one JSON object on standard output. Progress messages still go to
standard error.
| Field |
Meaning |
version |
The gspot version that ran, as a string. |
exitCode |
The process exit code. See Exit codes. |
notes |
Lines of text for you to read, such as the next command to run. |
When a command fails, its object has error and message instead of the fields of the command. message describes the
failure and what to do. For an unexpected failure, only --verbose adds stack, which holds the error message and its
stack trace. error holds one of these codes:
| Code |
What failed |
arguments |
Command arguments or flags, or a command that does not fit the repository, such as init where gspot.toml exists. |
git |
A Git operation. |
writing |
Writing gspot.toml or a generated file. |
filesystem |
A repository file is missing, unreadable, or at a path that gspot rejects. |
parse |
A file has invalid syntax or structure, including malformed TOML in gspot.toml. |
settings |
A parsed setting has an invalid name, value, or combination. |
configuration |
A tsconfig or jsconfig that gspot cannot read, such as one that extends a package that is not installed. |
install |
Installing tools. |
tool |
Finding or running a tool. |
runtime |
The running Node.js or Bun version is older than the minimum of the package. |
unexpected |
An unexpected error. The message names it. |
canceled |
A signal stopped the command. exitCode holds the exit code of the signal. |
init, install, and the commands that change settings list the generated files by what happened to them. Each field
holds paths relative to the root folder of the repository.
| Field |
Meaning |
written |
Files that gspot created or replaced. |
updated |
Files where gspot changed only its own block or keys. |
deleted |
Files that gspot deleted because no setting needs them. |
unchanged |
Files that already matched gspot.toml. |
| Field |
Meaning |
totals |
The counts of the run: files, checks, findings, filesFlagged, and seconds. |
categories |
The findings by category, real problems first: name, count, the five largest rules, and three examples of the largest rule. |
filesToFormat |
Number of files that differ from the format that gspot uses. |
notRun |
One line for each check that could not run, and a line that names a lockfile to stage when Git does not track it. |
leftOut |
The checks that a scan leaves out, because they run your code. |
cost |
The tools, the megabytes in .gspot/, and the seconds in perTool. |
plan |
What gspot init will do, as in gspot init. |
settingsText |
The text of the gspot.toml that init writes. |
nextSteps |
The commands to run next. |
checks |
The result of every planned check, as in gspot check, with every finding. |
The object of gspot init --json also has the generated-file fields.
| Field |
Meaning |
root |
The repository folder. |
plan |
What init will do. |
settingsText |
The text of the new gspot.toml. |
installed |
One line per install step that changed something, as in gspot install. |
missing |
What stays missing after the install, with what to do about it. |
steps |
The commands that the install ran, as argument lists. |
plan holds the level and these fields, and each file row has a path and a note:
Field of plan |
Holds |
configurations |
One row per configuration: configuration, origin, scopes, and the counts checks and checksOff. |
write |
The files that init writes. |
deleted |
The tool configs that init deletes, and the tool that replaces each one. |
keep |
The files that init leaves as they are, such as a CI file or a hook of another tool. |
change |
The files that init edits in place, such as the block it adds to AGENTS.md. |
lintFolders |
The folders of lint scripts, which you delete when nothing calls them. |
lintCommands |
One row per lint command that gspot replaces, with what to do: file, line, source, command, tool, and fix. |
carryover |
One row per replaced tool config, with its path, its tool, and what happens to its rules and options. |
from |
With --from: the file that --from names, and the leftOutSettings. |
Field of a carryover row |
Holds |
covered |
The number of rules that gspot already runs. |
carried |
What init copies into gspot.toml. |
differing |
The options to set after init. |
reasons |
The weaker values that need a reason. |
plugins |
What to keep with a plugin record. |
commandChecks |
What to keep with a command check of your own. |
dropped |
What init leaves out. |
The object of gspot install --json also has the generated-file fields.
| Field |
Meaning |
summary |
One sentence about the result. |
installed |
One line per step that changed something, such as the npm tools. |
missing |
What stays missing, with what to do about it. |
steps |
The commands that install ran, as argument lists. |
notes holds what you still have to do, such as the lines to add to hooks that another tool manages.
| Field |
Meaning |
stages |
The stages that ran, such as commit and push. |
started |
Start time as an ISO 8601 timestamp. |
duration |
Elapsed run time in milliseconds. |
comparison |
The content that a run with --staged or --base read, working-tree, index, or commit, and its reference, or null. |
checks |
The result of each planned check, with its findings. A check that no file selects appears only with --verbose. |
skippedCount |
The number of skipped checks for each cause, the checks that no file selects included. |
ignores |
Ignores in effect, with their check, optional lint rule, paths, and reason. |
unstagedChanges |
The number of changed files that the run left out because it read only the staged files. |
partial |
Whether the run selected only staged files, changed files, or named paths. |
fixes |
The changed files, files restored after broken fixes, files skipped for merge-conflict markers, and fixer errors of a --fix run, or null. |
failed |
Check IDs that failed or stopped with an error, and the checks whose fixer failed. |
Each item of checks has check, scope, status, fileCount, duration, and findings. It can also have these
fields:
Field of a checks item |
Holds |
help |
How to fix its findings. |
fixCommand |
The gspot check --fix command that fixes them. |
files |
The files that the check read, for a check that lists them. |
note |
Why the check was skipped or could not run. |
rerun |
The command that runs only this check again. |
command |
With --verbose, the command line that gspot ran. |
cause |
Why a skipped check did not run. |
stack |
With --verbose, the error message and the stack trace of a check that stopped on an internal error. |
status holds one of these values. missing and error mean that the run did not finish, and it exits with code 2.
status |
The check |
passed |
Found nothing. |
failed |
Reported findings. |
missing |
Needs a tool or an environment that is not installed. |
error |
Could not finish. note says why. |
canceled |
Was stopped by a signal, and the run exits with the code of that signal. |
skipped |
Did not run, for the reason in cause. |
cause |
The check did not run because |
system |
The operating system cannot run it. |
replaced |
Another check runs in its place, such as nextjs/tsc for typescript/tsc, or the run of an enclosing scope covers it. |
setting |
A setting that it needs is empty. |
condition |
The repository does not meet its condition, such as no TypeScript for vue/vue-tsc. |
level |
It runs only at level all. |
ignore |
An ignore turns it off. |
no-files |
No file of the run matches it. |
Each finding has check, file, message, fixable, and explain, which holds the command that explains its check or
lint rule. It can also have these fields, and a finding without a place in a file can have an empty file:
| Field of a finding |
Holds |
line, column |
The place in the file, counted from 1. |
rule |
The lint rule. |
fingerprint |
The ID of this one finding, from a tool that gives one, such as Gitleaks. gspot ignore --rule also takes it. |
help |
How to fix this finding, when it differs from the help of its check. |
diff |
With --verbose, the unified diff of a gspot/generated-files finding. |
gspot check --hook pre-push --json checks the newest commit of each pushed ref. It returns these fields:
revisions: one item for each commit that it checks, with hash, refs, the pushed commits, shallow, and its
report.
skipped: the pushed refs that gspot did not check, with ref, hash, and reason.
canceled: pendingRefs when a signal stopped the run, and otherwise null.
add, remove, set, unset, ignore, and unignore return these fields and the generated-file fields.
An edit that leaves gspot.toml and every generated file unchanged prints written, updated, deleted, and unchanged
as empty lists.
| Field |
Meaning |
changed |
Whether the command changed gspot.toml. |
summary |
One sentence about the result. |
Do not read changed as a sign that the generated files changed, because a command that leaves gspot.toml unchanged can
still rewrite generated files that are out of date.
gspot list configurations --json returns the same fields.
| Field |
Meaning |
selected |
Each selected configuration, with name and checks. |
removed |
Each removed configuration, with name, scope, and its reason. |
available |
Each configuration that you can add, with name and description. |
Each item of checks has check, scope, and status: on, or skipped with a cause, as in
gspot check.
| Field |
Meaning |
settings |
Each setting of each scope. |
Each item has setting, source, and scope. It also has value when a default or gspot.toml gives one. When a change
of the setting needs a reason, reasonFor names that change, such as raising. source says where the value comes from:
kind |
name |
default |
gspot |
configuration |
The name of the configuration. |
root |
gspot.toml |
scope |
The path of the scope that sets it. |
unset |
Empty. |
gspot explain <subject> [rule] --json returns kind, subject, and the fields of that kind. To explain a lint rule, put
its name after its check, such as gspot explain javascript/eslint no-console --json.
| Field |
Meaning |
check |
The ID, such as python/ruff. |
configuration |
The configuration of a shipped check, or null. |
command |
The command of a [[command_check]], or null. |
paths |
The paths of a [[command_check]], or null. |
stage |
|
level |
|
summary |
What the check looks for. |
why |
Why it matters. |
help |
How to fix a finding. |
condition |
What must hold for the check to run, or null. |
crashPattern |
The output that marks a crash of the tool, or null. |
runInCopy |
Whether the check runs on a copy of the files, or null. |
minVersions |
The oldest version of each runtime or tool that the check needs. |
turnOff |
The gspot ignore commands, each or null: paths for some paths, and rule for one lint rule. |
settingNames |
The settings that change the check. |
ruleFiles |
The rule files that describe what the check enforces. |
selected |
Whether a scope selects the configuration of the check, or null. |
ignores |
The ignores of gspot.toml that name the check, with reason and command. |
| Field |
Meaning |
tool |
The tool that reports the rule, or null. |
rule |
The ID, such as no-console. |
check |
The check that runs the rule. |
page |
The link to its documentation, or null. |
description |
What the rule looks for, or null. |
why |
Why the rule matters, or null. |
fix |
How to fix a finding, or null. |
example |
Can be null. |
explanation |
With --verbose, the full explanation, and otherwise null. |
turnOff |
The gspot ignore commands for the rule: everywhere, and for some paths. paths is null for gspot/weakenings, because each of its findings sits on gspot.toml. |
changeOptions |
The gspot set command that changes the options of the rule, or null. |
| Field |
Meaning |
name |
The name that gspot add takes, such as nextjs. |
group |
The kind of configuration, such as framework. |
title |
The display name, such as Next.js. |
description |
|
requires |
The configurations that it needs. |
tools |
|
checks |
Its checks, each with check and stage. |
settingNames |
|
ruleFiles |
Its rule files in your repository. |
alwaysSelected |
Whether gspot selects it in every repository. |
removed |
Each scope that removes it, with scope, reason, and the command to undo. |
| Field |
Meaning |
setting |
The key, such as limits.max_file_lines. |
type |
The kind of value, such as number. |
description |
|
default |
Can be null. |
defaultAll |
The default at level all, or null. |
languageDefaults |
The default per language, or null. |
reasonFor |
The change that needs a reason, or null. |
scopes |
Each scope, with scope, default, value, source as in gspot list settings, and, when present, readBy and reason. |
| Field |
Meaning |
path |
The path from the root of the repository. |
scope |
The scope that holds the path. |
fileKind |
source, generated, vendored, or binary. |
fileKindOrigin |
What set fileKind. |
tags |
The file types that gspot reads the file as, such as typescript or shell. |
configurations |
The selected configurations that check it. |
checks |
The checks that read it. |
ignores |
The ignores that cover it. |
unchecked |
Why no check reads it, or null. |
remedy |
What to do about it, or null. |
exitCode holds 1 when a tool, an environment, or a hook needs you to act, or when the repository pins another gspot
version.
| Field |
Meaning |
tools |
Each tool with name, kind, and state, and want, found, path, help, note, and minimumVersion when known. |
environments |
Project environments that a check needs and that are missing. |
hooks |
The state of the Git hooks: ready, tool, and lines. |
ci |
The state of the CI workflow: enabled, provider, and file. |
ruleFileCount |
The number of rule files for coding agents. |
submodules |
Submodule paths, whose contents gspot does not read. |
pin |
The gspot version that the repository pins, or null. |
In hooks, tool is the program that runs the hooks or null, and lines says what to do about them, or is empty. In
ci, provider and the workflow file are null when gspot does not know them.