定制 16bitsrl/fattureincloud-cli 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

16bitsrl/fattureincloud-cli

Composer 安装命令:

composer create-project 16bitsrl/fattureincloud-cli

包简介

Comprehensive CLI for Fatture in Cloud API - built for humans and agents.

README 文档

README

A CLI for the Fatture in Cloud API, with full API coverage, agent-oriented docs, and a practical XML import workflow for fattura elettronica files.

See CHANGELOG.md for release notes starting from 1.0.1.

Install

Composer

composer global require 16bitsrl/fattureincloud-cli

Static binaries

Each release also ships static builds for Linux, macOS, and Windows: download them from the GitHub release assets.

After download, make the binary executable on Unix-like systems:

chmod +x ./fic-linux-x86_64
./fic-linux-x86_64 --version

Quick start

# Authenticate
fic auth:login

# Set your default company
fic company:set

# Explore the generated API commands
fic api:list

# Search helpers
fic clients:search acme --company-id=12345
fic suppliers:search studio --company-id=12345
fic products:search consulting --company-id=12345

Get your manual token at secure.fattureincloud.it/api.

XML e-invoice import

The official API does not ingest raw XML, so the CLI recreates documents through JSON APIs.

For issued XML imports, the recreated document is treated as an electronic invoice by default.

# Preview a single XML
fic einvoice:import /absolute/path/to/fattura.xml --company-id=12345 --dry-run

# Preview a signed XML.p7m file
fic einvoice:import /absolute/path/to/fattura.xml.p7m --company-id=12345 --dry-run

# Import a folder of XML files (direction is auto-detected from XML content)
fic einvoice:import /absolute/path/to/xml-dir --company-id=12345 --yes

The import supports recap before creation, dry runs, .xml and .xml.p7m inputs, client/supplier matching, embedded attachment carry-over, automatic direction inference (issued/received/self-invoice), and structured mapping for supported e-invoice fields before falling back to ei_raw. If neither XML party matches the selected company, the import is rejected.

Agent skill

This repository includes an agent skill that teaches coding agents how to use the CLI, including filtering, sorting, pagination, FAQ edge cases, quotas, and XML import.

Install the skill

fic install-skill

Skill sources live in skills/fattureincloud/.

Handy examples

fic api:list-issued-documents --company-id=12345 --type=invoice --sort=-date --json
fic api:list-clients --company-id=12345 --q="vat_number = 'IT01234567890'" --json
fic api:send-e-invoice --company-id=12345 --document-id=99

API coverage

Resource Commands
Clients list, get, create, modify, delete, info
Suppliers list, get, create, modify, delete
Products list, get, create, modify, delete
Issued documents list, get, create, modify, delete, totals, email, transform, join
E-Invoices send, verify XML, get XML, rejection reason
Received documents list, get, create, modify, delete, totals, pending
Receipts list, get, create, modify, delete, monthly totals
Taxes (F24) list, get, create, modify, delete, attachments
Cashbook list, get, create, modify, delete
Archive list, get, create, modify, delete, attachments
Settings payment accounts/methods, VAT types, tax profile, templates
Info cities, countries, currencies, languages, categories, etc.
Webhooks list, create, get, modify, delete, verify
User info, companies
Companies info, plan usage

Testing

composer test

Releasing a new version

Use the release script:

./bin/release.sh X.Y.Z

It will:

  • build builds/fic with the requested version
  • verify that builds/fic matches the source version
  • commit builds/fic
  • create tag vX.Y.Z
  • push branch and tag

Then the GitHub release workflow will build the PHAR and static binaries for Linux, macOS, and Windows.

If you only want to verify that the committed PHAR is still aligned with the source version:

./bin/check-phar-sync.sh

CI also runs the same sync check on pushes and pull requests.

Users install or update with composer global require 16bitsrl/fattureincloud-cli.

Updating the OpenAPI spec

./bin/update-spec.sh              # latest from master
./bin/update-spec.sh v2.1.8       # specific tag
fic clear-cache                   # clear cached spec and temporary files

Credits

License

The MIT License (MIT). Please see LICENSE.md for more information.

16bitsrl/fattureincloud-cli 适用场景与选型建议

16bitsrl/fattureincloud-cli 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 03 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「api」 「cli」 「invoicing」 「E-Invoice」 「fattureincloud」 「italia」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 16bitsrl/fattureincloud-cli 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 16bitsrl/fattureincloud-cli 我们能提供哪些服务?
定制开发 / 二次开发

基于 16bitsrl/fattureincloud-cli 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 37
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-17