{"id":22509154,"url":"https://github.com/lukaspustina/flatcat","last_synced_at":"2026-02-25T05:32:12.580Z","repository":{"id":40504641,"uuid":"345395575","full_name":"lukaspustina/flatcat","owner":"lukaspustina","description":"Flatten nested file formats like JSON, TOML, YAML into single lines with full path to all values.","archived":false,"fork":false,"pushed_at":"2022-12-27T15:02:58.000Z","size":378,"stargazers_count":4,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-16T23:29:40.483Z","etag":null,"topics":["cat","cli","json","rust","toml","tools","yaml"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukaspustina.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-07T16:27:32.000Z","updated_at":"2023-03-03T22:23:48.000Z","dependencies_parsed_at":"2023-01-31T04:02:00.436Z","dependency_job_id":null,"html_url":"https://github.com/lukaspustina/flatcat","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lukaspustina/flatcat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaspustina%2Fflatcat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaspustina%2Fflatcat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaspustina%2Fflatcat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaspustina%2Fflatcat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukaspustina","download_url":"https://codeload.github.com/lukaspustina/flatcat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaspustina%2Fflatcat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29811540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T03:30:18.102Z","status":"ssl_error","status_checked_at":"2026-02-25T03:30:17.799Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cat","cli","json","rust","toml","tools","yaml"],"created_at":"2024-12-07T01:27:52.136Z","updated_at":"2026-02-25T05:32:12.552Z","avatar_url":"https://github.com/lukaspustina.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FlatCat\n\nFlatten nested file formats like JSON, TOML, YAML into single lines with full path to all values.\n\n[![CI Build](https://github.com/lukaspustina/flatcat/actions/workflows/ci.yml/badge.svg)](https://github.com/lukaspustina/flatcat/actions/workflows/ci.yml) [![GitHub release](https://img.shields.io/github/release/lukaspustina/flatcat.svg)](https://github.com/lukaspustina/flatcat/releases) ![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg) ![License: Apache 2.0](https://img.shields.io/badge/license-Apache_2.0-blue.svg)\n\n`flatcat`'s main purpose it to allow to use standard UNIX file commands like `grep`, `awk`, and `sed` to parse nested and hierarchical file formats like JSON, TOML, YAML etc. These files have become the de-facto standard for configurations, but there is little support to deal with these files. `flatcat` helps here by allowing flatten the hierarchical structures into single lines per value with each line containing the whole path to the value.\n\nOf course there are similar tools like [jq](https://github.com/stedolan/jq) for JSON and [yq](https://github.com/mikefarah/yq) for YAML, but they are primarily suited to directly query the data structures which requires you to know what your actually looking for. `flatcat` tries to help to discover these paths -- see the [examples](#examples) section.\n\n## Features\n\n- Behaves like GNU cat unless instructed to flatten files.\n- Supports JSON, TOML, YAML, and more format are coming.\n- Supports colorful output to ease readability\n- Allows to ignore `Null` values\n- Unrecognized file formats are printed as they are plainly\n\n## Quick Start\n\n1. Install `flatcat` – see below for [installation instructions](#installation).\n\n2. Run `fcat -n \u003cfile\u003e` on any file you like. If it's a supported format, it will be flattened. ![Flatten simple YAML file](doc/images/flatten-simple-yaml-file.png)\n\n3. Set shell alias `alias cat=fcat` to replace your system’s `cat` command.\n\n## Table of Contents\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Examples](#examples)\n  - [YAML](#yaml)\n    - [Flatten the YAML file.](#flatten-the-yaml-file)\n    - [Search for path to value](#search-for-path-to-value)\n- [Installation](#installation)\n  - [Docker](#docker)\n  - [Homebrew](#homebrew)\n  - [Debian and Ubuntu](#debian-and-ubuntu)\n  - [Redhat and Fedora](#redhat-and-fedora)\n  - [For Rust Developers](#for-rust-developers)\n  - [From Source](#from-source)\n- [Changelog](#changelog)\n- [Limitations](#limitations)\n- [Postcardware](#postcardware)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Examples\n\n### YAML\n\nLet's say, you have a configuration file in YAML for persons like this:\n\n```yaml\n---\npersons:\n  - age: 42\n    name:\n      family_name: Pustina\n      first_name: Lukas\n    phone:\n    super_cool: true\n```\n\n#### Flatten the YAML file.\n\n```bash\n\u003e fcat -n -f simple.yaml\n    1  .persons[0].age: 42\n    2  .persons[0].name.family_name: \"Pustina\"\n    3  .persons[0].name.first_name: \"Lukas\"\n    4  .persons[0].phone: null\n    5  .persons[0].super_cool: true\n```\n\n#### Search for path to value\n\nNow, let's try to find the path to the my first name:\n\n```bash\n\u003e fcat -f simple.yaml | grep Lukas\n.persons[0].name.first_name: \"Lukas\"\n```\n\n\n## Installation\n\n### Docker\n\nIf you want to give `flatcat` a quick spin and just try it out without too much hassle, you might want to try the Docker image:\n\n```sh\n$ docker run lukaspustina/flatcat:latest fcat \u003cfile\u003e\n```\n\n### Homebrew\n\nYou can add this repository as a custom tap and then install `flatcat` like this:\n\n```sh\n$ brew tap lukaspustina/flatcat https://github.com/lukaspustina/flatcat.git\n$ brew install lukaspustina/flatcat/flatcat\n```\n\n### Debian and Ubuntu\n\nYou can find Debian packages on the [GitHub Release](https://github.com/lukaspustina/flatcat/releases) page. Download the package as `flatcat.deb` and the run\n\n```sh\n$ dpkg -i flatcat.deb\n```\n\n### Redhat and Fedora\n\nYou can find RPM packages on the [GitHub Release](https://github.com/lukaspustina/flatcat/releases) page. Download the package as `flatcat.rpm` and the run\n\n```sh\n$ rpm -i flatcat.rpm\n```\n\n### For Rust Developers\n\n```sh\n$ cargo install flatcat\n```\n\n### From Source\n\nPlease install Rust via [rustup](https://www.rustup.rs) and then run\n\n```sh\n$ git clone https://github.com/lukaspustina/flatcat\n$ cd flatcat\n$ make install\n```\n\n\n## Changelog\n\nPlease see the [CHANGELOG](CHANGELOG.md) for a release history.\n\n\n## Limitations\n\n- Currently, all formats are parsed into memory before printing paths and values. Thus, `flatcat` is memory-bound. This limitation does not apply to plain file printing.\n\n\n## Postcardware\n\nYou’re free to use `flatcat`. If you find it useful, I would highly appreciate you sending me a postcard from your hometown mentioning how you use `flatcat`. My work address is\n\n```plain\n     Lukas Pustina\n     CenterDevice GmbH\n     Rheinwerkallee 3\n     53227 Bonn\n     Germany\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukaspustina%2Fflatcat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukaspustina%2Fflatcat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukaspustina%2Fflatcat/lists"}