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.0.tar.gz (90.4 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.0-py3-none-any.whl (71.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sensors_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 90.4 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.0.tar.gz
Algorithm Hash digest
SHA256 efeb58f44c09f2d6800e304f9c1be5cbed61c4c5451daf21e416a29da66eb6b3
MD5 cf0966486ce88bee850ec1a64b8bd8fc
BLAKE2b-256 10d8feb7b379e8f238e18557da6c93e597d96763a5aa8d406352b10a1ea7067c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sensors_cli-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 594202d3b4ba7ad8025e571b8b4705e266e11d465beecc12fea9cda15e011d90
MD5 cd2188b2c787f46c038acb2da6591930
BLAKE2b-256 c0dda07686ff85de03f6869aa8e02c77a74667ee1ebf47363c4edf6604420d33

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