#mongo-db #csv #import #cli #template

app fimo

A command-line tool to import CSV files into MongoDB

6 releases

new 0.1.6 May 23, 2025
0.1.5 May 23, 2025
0.1.0 Apr 21, 2025

#417 in Database interfaces

Download history 113/week @ 2025-04-16 23/week @ 2025-04-23 132/week @ 2025-04-30 38/week @ 2025-05-07 256/week @ 2025-05-14

472 downloads per month

MIT license

37KB
760 lines

fimo (File-Mongo) CLI Toolkit

fimo is a modular, high-performance command-line toolkit written in Rust for importing, transforming, and synchronizing structured data with MongoDB. Built for developers, data engineers, and migration tasks, it enables robust data pipelines directly from the terminal.


โœจ What is fimo?

At its core, fimo is a collection of CLI utilities for MongoDB workflows. Each binary targets a specific use case, but they all share a fast, extensible foundation with strong type safety, async performance, and developer-friendly configuration.


๐Ÿš€ Available Tools

Binary Description
fimo-csv Import CSV files into MongoDB using YAML-based field mappings and templates
fimo-sync Sync MongoDB documents across collections or environments incrementally

๐Ÿงฐ Use Cases

  • ๐Ÿ” Keep environments in sync using fimo-sync (e.g., staging โ†’ production)
  • ๐Ÿ“ฅ Load flat files using fimo-csv for initial imports or ongoing feeds
  • โš™๏ธ Define repeatable transformations using Jinja2-style templates
  • ๐Ÿงช Perform safe, resumable batch operations using resume tokens or values

๐Ÿ“ฆ Installation

Install from crates.io:

cargo install fimo

Or build from source:

git clone https://github.com/fimo-org/fimo.git
cd fimo
cargo build --release

๐Ÿ“‚ Project Layout

fimo/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ bin/
โ”‚       โ”œโ”€โ”€ fimo-csv/       # fimo-csv binary: CSV to MongoDB importer
โ”‚       โ””โ”€โ”€ fimo-sync/      # fimo-sync binary: document sync engine
โ”œโ”€โ”€ examples/               # Example input data and config
โ”œโ”€โ”€ tests/                  # Test harnesses
โ”œโ”€โ”€ Cargo.toml              # Multi-binary manifest

๐Ÿ“„ Tool Docs

fimo-csv

  • High-throughput CSV importer
  • YAML mapping with full BSON type support
  • Supports transformations via MiniJinja
  • Ideal for ETL and data warehousing

๐Ÿ“ View fimo-csv documentation โ†’


fimo-sync

  • Real-time or batch sync across MongoDB collections
  • Change stream and field-based sync modes
  • Resume-safe with _id disambiguation
  • Optional health file support for watchdogs

๐Ÿ“ View fimo-sync documentation โ†’


๐Ÿงฉ Coming Soon

fimo-archive

A new utility designed to move large volumes of archived MongoDB documents to external storage such as S3, Azure Blob, or GCS. It will support:

  • BSON/Extended JSON export
  • Filtered and range-based archival (e.g., by date)
  • Compatibility with cold storage solutions
  • Future support for rehydration into live collections

๐Ÿ“ˆ Why fimo?

  • ๐Ÿš€ Rust-powered performance
  • ๐Ÿ” Typed BSON support
  • ๐Ÿง  Intelligent resume logic
  • ๐Ÿ› ๏ธ Modular CLI design
  • ๐Ÿงช Tested on large-scale datasets

Whether you're importing 10,000 rows or syncing millions of documents, fimo helps you do it cleanly, reliably, and efficiently.


๐Ÿ“œ License

MIT ยฉ fimo.org โ€” Built with โค๏ธ in Rust

Dependencies

~19โ€“30MB
~463K SLoC