Skip to main content

Sensors Sidecar CLI

An experimental little "sidecar" system that can run a bunch of code quality sensors next to a coding agent. It can run linting, tests, and other checks on a schedule or in watch mode, persists structured state under .sensors/ in the target codebase, and exposes a sensors CLI for running the service, checking the sensor status, or displaying the status in a human readable format.

Companion repository to this article: [Maintainability sensors for coding agents]

Use /_local-setup skill to set it up on your machine (or use the SKILL.md file as documentation if you want to do it manually).

Platform note: The control plane uses Unix domain sockets, tested only on MacOS.

This tool was more or less vibe coded, though I did do regular refactorings with AI, and used the CLI to run sensors for this codebase ("eating my own dog food"). Check out .sensors/sensors-cli.sensors.yaml to see the sensors used here. And look at 2026-06-15_modularity-review.md for examples of why quick sensors like this can help with maintainability, but can only go so far when we don't spend much time on the larger code structure...

Commands

(CLI needs to be installed via uv tool install, see /_local-setup skill)

# Is the sensors service running? (exit 0 = yes, 1 = no)
sensors status .

# All sensors start processes on this host (from /proc or ps)
sensors status --all

# Start the sensors
sensors start .

# Show the state
sensors show .

# Start the sensors and immediately jump into the display mode
sensors show --start .

# Agent-optimized runner results (failures included per runner); exit 0/1/2
sensors check .

sensors check . --runner eslint

# Save a score snapshot via RPC (needs a process to be running)
sensors snapshot .

Configuration

The CLI looks for a *.sensors.yaml file under .sensors/.

There are some skills in this repo that document this setup more and that you can reuse:

  • .claude/skills/sensors_config-default - a minimalist default setup that tries to determine one sensor example from your codebase. Use this to just get a taste
  • .claude/skills/sensors_config-typescript - my full Typescript sensors setup
  • .claude/skills/sensors_config-python - my full Python sensors setup

Parsers

The project comes with a bunch of output parsers for common tools, like eslint or ruff. If you want to use a tool as a sensor that is not yet supported, you either have to add a new parser to the code (and reinstall the CLI), or you can use the default parser.

Adding a new parser

This repo contains a skill that documents how to add a new parser .claude/skills/_new-parser/SKILL.md in this repo for a guided template.

Default parser: Expected output format

Use parser: default in your runner config to connect any tool that can emit a JSON object in the specified schema. You have to build a script for your tool that turns the tool's output into this schema, and use that script in your sensor configuration.

This repo contains a skill that can help you write a wrapper script around your tool to transform your tool's data into the JSON schema .claude/skills/sensors_wrap-tool/SKILL.md

Schema

{
  "findings": [
    {
      "message": "Unused variable 'x'",
      "severity": "error",
      "file": "src/foo.py",
      "line": 42,
      "column": 9,
      "rule": "F841",
      "context": "x is assigned but never used"
    }
  ],
  "metrics": [
    {
      "key": "errorCount",
      "label": "Errors",
      "value": 1,
      "direction": "less"
    }
  ],
  "guidance": [
    {
      "rule": "F841",
      "body": "Remove variable or use it."
    }
  ],
  "score": {
    "value": 1,
    "direction": "less",
    "description": "Issues reported by tool"
  },
  "success": false,
  "summary": "1 issue",
  "extra": {
    "any": "parser-specific payload"
  }
}

This schema mirrors the SensorReading model used by built-in parsers. All fields are optional; missing values are derived as follows:

Field If absent or null
findings treated as []
metrics treated as []
guidance treated as []
extra treated as {}
success true when findings is empty, false otherwise
summary "N issue(s)" / "No issues" derived from findings count
score.value len(findings)
score.direction "less" (lower is better)
score.description "Issues reported by tool"

success, summary, and score can be set explicitly and are used as-is. This allows tools that do not produce per-finding rows (for example, coverage checks) to report a score directly.

Example config

runners:
  - name: my-custom-check
    parser: default
    enabled: true
    mode: interval
    command: some-tool | ./scripts/to-parser-default-format.sh
    interval: 10000

Minimal valid output

A tool that only reports a count without individual violations:

{"success": false, "summary": "Coverage 72% (threshold 80%)", "score": {"value": 72, "direction": "more"}}

A tool with no issues:

{"findings": []}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sensors_cli-0.1.1.tar.gz (90.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sensors_cli-0.1.1-py3-none-any.whl (71.7 kB view details)

Uploaded Python 3

File details

Details for the file sensors_cli-0.1.1.tar.gz.

File metadata

  • Download URL: sensors_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 90.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sensors_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b0133396dae54ecdaf243b23d6ec898ab7b41bb3ed8c71bacb6427fcebb2498a
MD5 1b1bde4cc4644a94a39461ef853ec5d7
BLAKE2b-256 6c3b67f70625e8ad81d40753a579ac2f654b013b92848545a44bf8e3509dadc3

See more details on using hashes here.

File details

Details for the file sensors_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sensors_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 71.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sensors_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ba335616a52e7da891cf3196e8ed91292d95e0d7f1eddf9790b5924ce21223f
MD5 8cb4dacc7633b3c0cc3b24626c5658dd
BLAKE2b-256 411372526f0bdd029b09c142edc5375372b6682cf5f35e4343a0ada51eeeca01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page