fionn_cli/
lib.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2//! # fionn-cli
3//!
4//! Command-line interface for fionn - a Swiss Army knife for JSON with SIMD acceleration.
5//!
6//! ## Installation
7//!
8//! ```bash
9//! cargo install fionn-cli
10//! ```
11//!
12//! ## Usage
13//!
14//! ```bash
15//! # Convert JSON to greppable format
16//! fionn gron data.json
17//!
18//! # Convert back to JSON
19//! fionn gron -u data.gron
20//!
21//! # Diff two JSON files
22//! fionn diff old.json new.json
23//!
24//! # Apply a JSON patch
25//! fionn patch data.json changes.patch
26//!
27//! # Merge JSON files
28//! fionn merge base.json overlay.json
29//!
30//! # Query JSON
31//! fionn query '.users[0].name' data.json
32//!
33//! # Format JSON
34//! fionn format data.json
35//! fionn format -c data.json  # compact
36//!
37//! # Validate JSON
38//! fionn validate data.json
39//!
40//! # Infer schema
41//! fionn schema data.json
42//! ```
43//!
44//! ## Subcommands
45//!
46//! | Command | Description |
47//! |---------|-------------|
48//! | `gron` | Convert JSON to greppable line format |
49//! | `diff` | Compute RFC 6902 diff between two JSON files |
50//! | `patch` | Apply JSON Patch to a file |
51//! | `merge` | Merge multiple JSON files (RFC 7396) |
52//! | `query` | Query JSON with path expressions |
53//! | `format` | Pretty-print or compact JSON |
54//! | `validate` | Check JSON validity |
55//! | `schema` | Infer JSON schema from data |
56//! | `stream` | Process JSONL streams |
57//! | `bench` | Run basic benchmarks |
58//!
59//! ## Library Usage
60//!
61//! This crate is primarily a CLI tool. For programmatic access to fionn
62//! functionality, use the constituent library crates directly:
63//!
64//! - [`fionn`](https://docs.rs/fionn) - Umbrella crate with all functionality
65//! - [`fionn-gron`](https://docs.rs/fionn-gron) - Greppable JSON transformation
66//! - [`fionn-diff`](https://docs.rs/fionn-diff) - JSON diff, patch, merge
67//! - [`fionn-tape`](https://docs.rs/fionn-tape) - Tape-based JSON representation
68//! - [`fionn-simd`](https://docs.rs/fionn-simd) - SIMD acceleration primitives
69//! - [`fionn-core`](https://docs.rs/fionn-core) - Core types and traits
70
71#![doc(html_root_url = "https://docs.rs/fionn-cli/0.1.0")]
72#![warn(missing_docs)]
73
74/// Re-export of fionn-gron for gron functionality.
75pub use fionn_gron as gron;
76
77/// Re-export of fionn-diff for diff/patch/merge functionality.
78pub use fionn_diff as diff;
79
80/// Re-export of fionn-core for core types.
81pub use fionn_core as core;