Skip to main content

fec-lint

English · Français

Technical check, not tax advice. fec-lint checks the structure of a file against the published FEC format. It does not certify a file or replace an accountant's review.

Contrôle technique, pas un conseil fiscal. fec-lint vérifie la structure d'un fichier au regard du format FEC publié. Il ne certifie pas un fichier et ne remplace pas la revue d'un expert-comptable.


English

Free structural linter for French FEC files (Fichier des Écritures Comptables, art. A47 A-1 LPF), as a command line tool and an MCP server.

Install

pipx install fec-lint

Command line

fec-lint 123456782FEC20251231.txt
123456782FEC20251231.txt: FAILED (encoding utf-8, separator pipe, lines 214)
  error date_invalid x3: Non-existent date in EcritureDate. - line(s) 21, 22, 23
  error date_format x3: Wrong date format in EcritureDate (expected AAAAMMJJ). - line(s) 64, 65, 66
Structure has errors. Full pre-audit (balance, numbering, risk signals): https://apify.com/highfiddle/fec-checker
  • --json prints the full result: {ok, file, errors[], warnings[], stats}.
  • --name 123456782FEC20251231.txt sets the name checked against SIRENFECAAAAMMJJ.txt.
  • --quiet hides the last line.
  • Exit code: 0 when the structure is OK, 1 on errors, 2 when a file cannot be read. Several files can be given at once.
  • A .zip holding exactly one .txt FEC is unpacked first.

MCP server

Add it to your MCP client (Claude Desktop, Claude Code, Cursor…):

{
    "mcpServers": {
        "fec-lint": {
            "command": "uvx",
            "args": ["--from", "fec-lint", "fec-lint-mcp"]
        }
    }
}

Without uv, install with pipx install fec-lint and use "command": "fec-lint-mcp". The server exposes one tool, lint_fec(path), which takes a local file path and returns the same JSON as --json.

Free vs full pre-audit

Check fec-lint (free) FEC Checker on Apify
File name SIRENFECAAAAMMJJ.txt, SIREN key ✅ ✅
Encoding, separator, 18 headers ✅ ✅
Field formats: dates, amounts, mandatory fields, pairs ✅ ✅
Balance per entry and for the whole file — ✅
EcritureNum gaps and duplicates, ValidDate chronology — ✅
Risk signals: weekends, holidays, round amounts, Benford, cash 53x, suspense 471, after year end — ✅
Verdict, 0-100 score, AI-written fix list (FR/EN) — ✅
Runs locally, nothing leaves your machine on Apify, pay per file

Français

Linter structurel gratuit pour les FEC (Fichier des Écritures Comptables, art. A47 A-1 LPF), en ligne de commande et en serveur MCP.

Installation

pipx install fec-lint

Ligne de commande

fec-lint 123456782FEC20251231.txt
  • --json affiche le résultat complet : {ok, file, errors[], warnings[], stats}.
  • --name 123456782FEC20251231.txt indique le nom à contrôler selon SIRENFECAAAAMMJJ.txt.
  • --quiet masque la dernière ligne.
  • Code de sortie : 0 si la structure est correcte, 1 en cas d'erreur, 2 si un fichier est illisible. Plusieurs fichiers peuvent être passés à la fois.
  • Un .zip contenant un seul FEC .txt est décompressé d'abord.

Les messages sont en anglais ; les codes de règle (date_invalid, header_missing…) sont stables.

Serveur MCP

Ajoutez-le à votre client MCP (Claude Desktop, Claude Code, Cursor…) avec la configuration ci-dessus. L'outil lint_fec(path) prend le chemin d'un fichier local et renvoie le même JSON que --json.

Gratuit ou pré-audit complet

Contrôle fec-lint (gratuit) FEC Checker sur Apify
Nom SIRENFECAAAAMMJJ.txt, clé du SIREN ✅ ✅
Encodage, séparateur, 18 colonnes ✅ ✅
Formats : dates, montants, champs obligatoires, couples de champs ✅ ✅
Équilibre par écriture et du fichier — ✅
Ruptures et doublons d'EcritureNum, chronologie de ValidDate — ✅
Signaux de risque : week-ends, jours fériés, montants ronds, Benford, caisse 53x, attente 471, après clôture — ✅
Verdict, score 0-100, plan de correction rédigé par IA (FR/EN) — ✅
Exécution en local, rien ne quitte votre machine sur Apify, paiement par fichier

Development

python -m venv .venv
.venv/bin/pip install -e ".[test]"   # Windows: .venv\Scripts\pip
pytest

The fixtures in tests/fixtures/ are synthetic FEC files (fictitious SIREN 123456782). MIT license.

Metadata

Release files for fec-lint 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fec-lint 0.1.0
File Size Uploaded Provenance Actions
fec_lint-0.1.0.tar.gz 19.5 kB With provenance Details for fec_lint-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fec-lint 0.1.0
File Interpreter ABI Platform Actions
fec_lint-0.1.0-py3-none-any.whl Python 3 none any Details for fec_lint-0.1.0-py3-none-any.whl

Total release size: 31.4 kB

Release files / fec_lint-0.1.0.tar.gz

Download URL fec_lint-0.1.0.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6a7770f74d9c655bb7d9db385ae382dda2e3370b5643f7521a12222750e79c7a
BLAKE2b-256 checksum
How to use checksums
cdc96a3829995a14e1be91df65d7ef5a770c72d8d6bcfb34c75cc3bc3c65262c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / fec_lint-0.1.0-py3-none-any.whl

Download URL fec_lint-0.1.0-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de91fb2c5600532bd8ba9863512de0874ed6e94a33d011af69ec803abee9c7d2
BLAKE2b-256 checksum
How to use checksums
f8f93e3f7018830c1d25038580347ca8c0401f7cc6d947fdd644e774c919e7e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Security for fec-lint 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fec_lint-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page