Skip to content

Add structured output to tach report #678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pavelzw opened this issue Mar 11, 2025 · 1 comment
Open

Add structured output to tach report #678

pavelzw opened this issue Mar 11, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@pavelzw
Copy link

pavelzw commented Mar 11, 2025

It would be nice if tach report also supported json output.

Something like this

$ tach report --help
...
  --output        Output format, one of `pretty`, `raw`, `json`
tach report --json my_module
{
  "dependencies": [
    {
      "file_path": "my_module/abc.py",
      "line_number": 44,
      "import": "other_module.abc"
    },
    // ...
  ],
  "usages": ...,
  "external-dependencies": ...
}
@bollwyvl
Copy link

bollwyvl commented Apr 3, 2025

Indeed: and a (versioned, published) schema to go with any structured output. A bespoke schema could be derived with e.g. schemars.

Worth considering, though, is Someone Else's Schema, such as SARIF, already conveniently wrapped with serde_sarif. This would provide a direct import path to widely used tools without {m x tach_version} adapters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants