Skip to content
Projects

About

Unofficial, open-source Swift SDK, macOS CLI, and wire protocol spec for Fujifilm X-series cameras (USB C1-C7 slots, BLE backup, Wi-Fi import, in-camera RAW conversion). Not affiliated with FUJIFILM.

Systems & Infrastructure

How these counts are measured

Measured star growth

in 24h
+5
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

FujiKit

Safe, open-source Swift SDK, macOS CLI (fuji), native MCP server (fuji mcp), and wire protocol reference for Fujifilm X-series cameras.

Unofficial. FujiKit is an independent community project. It is not made by, affiliated with, or endorsed by FUJIFILM Corporation.

Back up, diff, and write custom film simulation slots (C1-C7) over USB, try a look on the camera's live shooting state (experimental), pull full-size photos over camera Wi-Fi without Fujifilm's XApp, inspect .dat settings backups, and drive your camera's own X-Processor for authentic in-camera RAW conversion.

  • Zero third-party dependencies: pure Swift 6 (ImageCaptureCore, CoreBluetooth, Network, Foundation)
  • Agent-native out of the box: built-in stdio MCP server (fuji mcp), --json output, and an installable SKILL.md for Claude Code, Codex, Cursor, and Claude Desktop
  • iOS 18+ & macOS 15+ Swift Package: zero .unsafeFlags, ready for Xcode or SwiftPM by version tag
  • Hardware-safe by architecture: read-only PTP opcode allowlist for photo imports, mandatory fresh backups before every write, byte-diff RestoreGuard, and strict readback verification
  • Canonical wire spec included: FUJIFILM-PROTOCOL.md documents USB PTP, Bluetooth LE (basic and 1.30+ secure pairing), the FUJIFILMX-BACKUP binary format, checksums, and Wi-Fi PTP/IP with strict evidence labels

Quickstart (macOS CLI)

Install via Homebrew (recommended, Apple Silicon, no Xcode required)

brew install maam00/tap/fuji

Or build from source (embeds macOS Info.plist for USB, Bluetooth, and Local Network permissions):

git clone https://github.com/maam00/fujikit.git
cd fujikit
make install

Use it

Plug in your camera over USB with MENU -> NETWORK/USB SETTING -> CONNECTION MODE -> USB RAW CONV./BACKUP RESTORE:

# Inspect connected body, firmware, and all C1-C7 slots (read-only, supports --json)
fuji info
fuji show
fuji show --json

# Spot setting drift across C1-C7, or preview changes before writing
fuji diff
fuji diff examples/recipes/classic-chrome-day.json
fuji diff backup-before.json backup-after.json --json   # offline

# Take a timestamped backup of all 7 custom slots
fuji backup

# Load recipes into C1-C7 (backs up first, writes, reads back every property)
fuji load examples/recipes/classic-chrome-day.json

# EXPERIMENTAL: try one look on the live shooting state (live codes, not the C1-C7 slot codes).
# On the X100VI only the film simulation write has been run on real hardware, and whether the
# camera folds live changes into the selected C slot is unknown. Preview with --dry-run first.
fuji look-live examples/recipes/street-chrome.json --dry-run
fuji look-live examples/recipes/street-chrome.json --snapshot live-before.json
fuji look-restore live-before.json

# Pull recent full-size photos wirelessly over BLE wake + camera Wi-Fi
# (unplug USB first; your Mac's Wi-Fi moves to the camera's network until the import ends)
fuji import-wifi --last 10

# Render a RAF file using your camera's real film-simulation engine (never touches C1-C7)
fuji rawconv DSCF0001.RAF --recipe examples/recipes/street-chrome.json

# Inspect a FUJIFILMX-BACKUP .dat file offline (read-only)
fuji settings-probe backup.dat

Run fuji --help for all subcommands.


Use with Claude Code, Codex, Cursor, or Claude Desktop

FujiKit ships a zero-dependency stdio MCP server inside the fuji binary plus a standard skills/fujikit/SKILL.md.

Option A: Connect via MCP (fuji mcp)

Add this to your MCP config (Claude Code, Codex, Claude Desktop, or Cursor):

{
  "mcpServers": {
    "fujikit": {
      "command": "fuji",
      "args": ["mcp"]
    }
  }
}

Exposed MCP tools (with readOnlyHint annotations):

  • Read-only: fuji_info, fuji_show, fuji_diff, fuji_backup, fuji_settings_probe
  • Read-only on the camera, but changes this Mac: fuji_import_wifi (moves the Mac's Wi-Fi to the camera's network for the duration and writes photo files)
  • Guarded camera actions: fuji_load (supports dry_run: true, mandatory fresh backup), fuji_rawconv
  • Experimental: fuji_look_live (see the note in the quickstart above)

Option B: Install the Agent Skill

npx skills add maam00/fujikit

Use FujiKit in Your Swift / iOS / macOS App

Add FujiKit via Swift Package Manager:

dependencies: [
    .package(url: "https://github.com/maam00/fujikit.git", from: "0.2.0")
]

Connect over USB (ImageCaptureCore) and load custom slots with per-slot readback verification:

import FujiKit

let link = CameraLink.usb()
let recipes: [Recipe] = [
    Recipe(
        name: "Street Chrome",
        filmSim: .classicChrome,
        grain: .weakSmall,
        colorChrome: .weak,
        colorChromeFxBlue: .off,
        whiteBalance: .daylight,
        kelvin: 0,
        wbShiftR: 2,
        wbShiftB: -3,
        dynamicRange: .dr200,
        highlight: -0.5,
        shadow: 1.0,
        color: 1,
        sharpness: -1,
        noiseReduction: -4,
        clarity: 0
    )
]

let report = try await link.load(looks: recipes) { slot in
    print("C\(slot.slot): \(slot.verdict)")
}
await link.disconnect()

In Xcode Previews, simulators, and unit tests, swap CameraLink.usb() for MockCameraLink() (identical API, zero hardware required).

Core Modules

Module What it provides
USB PTP FujiCamera, CameraLink, ImageCaptureTransport, SlotEncoder, LiveControl, SlotDiff
MCP Server MCPServer (pure Swift 6 JSON-RPC 2.0 stdio server, injectable MCPToolExecutor)
Bluetooth LE FujiBluetoothLink, FujiBLEFlows, basic & 1.30+ secure pairing, settings backup & Wi-Fi wake
Settings File (.dat) FujiSettingsFile, SettingsLookPatch, RestoreGuard: parse, probe, and narrow-patch FUJIFILMX-BACKUP files with incremental checksum updates
Wi-Fi & USB Import PhotoImporter, FujiPTPIPTransport, FujiWifiWake, ReadOnlyPTP, ExifReader
In-Camera RAW Conv FujiRawConverter, D185Profile: drive Fujifilm's hardware X-Processor over USB
Safety & Qualification CameraCompatibility, USBQualification, SlotBackup, CameraCheck

The Fujifilm Wire Protocol Reference

If you are building Fujifilm tooling in any language (Swift, Rust, Python, Go, C++), start with:

👉 docs/FUJIFILM-PROTOCOL.md

Every fact in the spec is tagged with its exact evidence level (VERIFIED-HW, CODE, CITED, or HYPOTHESIS):

  • USB PTP D18C-D1A4 slot registers, gating rules, monochrome skip sets, and the Grain-Off 1 -> 6/7 readback quirk
  • macOS ptpcamerad exclusive-claim behavior
  • Bluetooth LE GATT tables, basic (4-byte key) vs. secure (1.30+ LE bonding + f557d96b status echo), and chunked zlib backup/restore framing
  • FUJIFILMX-BACKUP binary layout (0xF800-0x11000), volatile regions, and checksum model at 0x108
  • Wi-Fi PTP/IP gallery session handshake, handle priming (GetObjectInfo before GetPartialObject), and EXIF date probing

Camera Compatibility & Adding Your Body

Read-only operations (info, show, diff, backup, settings-probe, props --read) work safely without modifying camera state.

Verified slot writes are strictly allowlisted by exact model + firmware so FujiKit never guesses wire encodings on an untested body:

Body Firmware USB Read / Diff / Backup USB Slot Writes (C1-C7) BLE Backup / Wi-Fi Import BLE Modified Writes
X100VI 1.10 Verified Verified (write, readback, exact restore, restart) Verified (basic BLE + Wi-Fi JPEG pull) Experimental lab only
X100VI 1.31 Verified Verified (write, readback, exact restore, restart) Secure BLE + hidden-SSID Wi-Fi implemented (untested on HW) Blocked
X100VI 1.30, 1.32+ Supported Ready to qualify (fuji qualify-usb) Secure BLE + hidden-SSID Wi-Fi implemented (untested on HW) Blocked
X-E5 1.12 Verified Verified by its owner with fuji qualify-usb --full (write, readback, exact restore, restart; #14) Untested Blocked
X-E5 Other firmware Supported Ready to qualify (fuji qualify-usb) Untested Blocked
X-T5 4.32 Supported Ready to qualify (fuji qualify-usb); passed in a third-party port (#6) Untested Blocked
X-H2, X-H2S, X-S20, X-T50, X-M5, X-T30 III, GFX100 II, GFX100S II, GFX100RF Any Supported Ready to qualify (fuji qualify-usb) Untested Blocked
Older bodies (X-E4, X-T4, X100V, …) Any Read-only probe Blocked Untested Blocked

Own an X100VI on firmware 1.30 or 1.32, an X-T5, or another body in the "Ready to qualify" rows?

Help qualify your camera in 2 minutes (tests C7 only, backs up first, verifies readback, and restores your original slot). Passing doesn't switch on other writes; it gives us the record we need to do that:

fuji qualify-usb --qualify-unverified-firmware --out my-camera-record.json

# Have another minute? --full also checks every film simulation, white balance, grain and chrome value.
fuji qualify-usb --qualify-unverified-firmware --full --out my-camera-record.json

Own an older body (X-E4, X-T4, X100V, …)?

Slot writes are blocked on these bodies today, and fuji qualify-usb refuses before reading or writing anything. The first step is a read-only report:

fuji info --json

See docs/COMPATIBILITY.md and open an Add Camera issue with the output. Check it for your serial number before posting.

Not on a Mac, or porting the qualification flow?

fuji is macOS-only. docs/COMPATIBILITY.md points to a WebUSB port that runs in Chrome on Linux and Windows. conformance/ publishes every command qualify-usb sends so any port can check itself against FujiKit, and records/ holds the hardware records behind the table above.


Safety Guarantees

Writing to camera settings carries real risk if done carelessly. FujiKit enforces four non-negotiable invariants in code (not just docs). See docs/SAFETY.md:

  1. Photos can never be modified or deleted: All import transports are wrapped in ReadOnlyPTP, which throws before transmitting any destructive opcode (DeleteObject, FormatStore, SendObject, etc.).
  2. Fresh backup before every write: load and qualify-usb always snapshot all seven slots first and refuse to proceed if any slot fails to read.
  3. Byte-level RestoreGuard: Any settings-file restore verifies that only the chosen slot bytes and 16-bit checksum changed relative to a fresh backup from the same serial number.
  4. Strict readback verification: A 0x2001 OK response from the camera is never trusted alone. Every written property is read back and verified (accounting for documented hardware quirks like Grain Off returning 6/7).

Development

# Run the full offline test suite (440+ tests, no camera required)
make test

# Build the CLI with embedded Info.plist
make build
make verify-plist

Credits & License

MIT Licensed. See LICENSE.

Protocol discoveries build on and credit the open-source Fujifilm community: FilmKit, fuji-bridge, libfuji, furble, fffw, and helios (full upstream licenses in THIRD_PARTY_NOTICES.md and third_party/licenses/).

FujiKit is an independent open-source project and is not affiliated with or endorsed by FUJIFILM Corporation. FUJIFILM, X100VI, and film simulation names are trademarks of FUJIFILM Corporation.

Explore related projects

Loading…