--- id: jc version: "1.25.7" license: MIT license_treatment: permissive maintenance: active --- # jc — Converts the output of popular command-line tools and file-types to JSON. License: permissive · Maintenance: active · Downloads: 603.8K/mo ## What it is and what it does jc is a command-line JSON converter that transforms the output of popular CLI tools, file-types, and common strings into structured JSON. It works both as a CLI filter (piping command output through jc) and as a Python library, returning dictionaries or lists of dictionaries instead of raw JSON strings. The package includes parsers for many standard Unix tools and supports both strict schema conversion (with type inference and semantic context) and raw pre-processed output modes. Typical use cases include shell scripting with jq for further processing, parsing command output in Ansible, Saltstack, and Nornir automation frameworks, and building data pipelines that need structured input from unstructured CLI output. It has three runtime dependencies (ruamel.yaml, xmltodict, Pygments) and requires Python 3.6 or later. Use it for: - Pipe dig, nslookup, or other network command output through jc and jq to extract specific fields programmatically. - Parse system command output in Ansible playbooks using the community.general jc filter plugin. - Convert file-type outputs (e.g., CSV, XML, YAML) to JSON for downstream processing in scripts. - Build monitoring and alerting systems that ingest CLI tool output and transform it into queryable JSON. - Automate infrastructure orchestration in Saltstack or Nornir by parsing command results as structured data. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts output from popular CLI tools, file-types, and strings into structured JSON for easier parsing in scripts and automation. Yes. jc is actively maintained, has no known vulnerabilities, low install friction, and solves a genuine problem in CLI data processing. The permissive MIT license and broad parser coverage make it a practical choice for automation, scripting, and infrastructure-as-code workflows. Install if you regularly need to extract structured data from command-line tool output. ## Install pip install jc uv add jc poetry add jc ## Installing jc Before you install: Low install friction with a pure Python wheel and three straightforward runtime dependencies. Actively maintained with a recent release and strong community engagement (8663 GitHub stars). License in practice: MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects with minimal obligations. Quickstart: pip install jc import jc import subprocess cmd_output = subprocess.check_output(['dig', 'example.com'], text=True) data = jc.parse('dig', cmd_output) print(data[0]['answer']) Requires Python 3.6 or later; the target CLI tool (e.g., dig) must be installed and available on the system. Verify before relying: - Complete list of supported parsers and their coverage—the excerpt shows only a partial table. - Performance characteristics when parsing large command outputs or streaming data. - Compatibility details with specific versions of ruamel.yaml, xmltodict, or Pygments. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 603.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cli output to json, parse command output json, convert tool output json, command line json parser, structured data from cli, ansible output parsing, bash json conversion, cli-parsing, json-conversion, automation [View on SkillFed](https://skillfed.io/packages/jc) · [View on PyPI](https://pypi.org/project/jc/)