Metadata-Version: 2.4
Name: flighthub2-cli
Version: 0.1.2
Summary: DJI FlightHub 2 OpenAPI client, CLI and MCP server — control docks, drones, waylines, flight tasks, livestreams and 3D models from the terminal or from an AI agent.
Project-URL: Homepage, https://github.com/alecad/dji-flighthub2-cli
Project-URL: Repository, https://github.com/alecad/dji-flighthub2-cli
Project-URL: Issues, https://github.com/alecad/dji-flighthub2-cli/issues
Project-URL: Changelog, https://github.com/alecad/dji-flighthub2-cli/blob/main/CHANGELOG.md
Project-URL: Documentation, https://github.com/alecad/dji-flighthub2-cli#readme
Author-email: Alessio Caddeo <alessio.caddeo@gmail.com>
Maintainer-email: Alessio Caddeo <alessio.caddeo@gmail.com>
License:                                  Apache License
                                   Version 2.0, January 2004
                                http://www.apache.org/licenses/
        
           TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
        
           1. Definitions.
        
              "License" shall mean the terms and conditions for use, reproduction,
              and distribution as defined by Sections 1 through 9 of this document.
        
              "Licensor" shall mean the copyright owner or entity authorized by
              the copyright owner that is granting the License.
        
              "Legal Entity" shall mean the union of the acting entity and all
              other entities that control, are controlled by, or are under common
              control with that entity. For the purposes of this definition,
              "control" means (i) the power, direct or indirect, to cause the
              direction or management of such entity, whether by contract or
              otherwise, or (ii) ownership of fifty percent (50%) or more of the
              outstanding shares, or (iii) beneficial ownership of such entity.
        
              "You" (or "Your") shall mean an individual or Legal Entity
              exercising permissions granted by this License.
        
              "Source" form shall mean the preferred form for making modifications,
              including but not limited to software source code, documentation
              source, and configuration files.
        
              "Object" form shall mean any form resulting from mechanical
              transformation or translation of a Source form, including but
              not limited to compiled object code, generated documentation,
              and conversions to other media types.
        
              "Work" shall mean the work of authorship, whether in Source or
              Object form, made available under the License, as indicated by a
              copyright notice that is included in or attached to the work
              (an example is provided in the Appendix below).
        
              "Derivative Works" shall mean any work, whether in Source or Object
              form, that is based on (or derived from) the Work and for which the
              editorial revisions, annotations, elaborations, or other modifications
              represent, as a whole, an original work of authorship. For the purposes
              of this License, Derivative Works shall not include works that remain
              separable from, or merely link (or bind by name) to the interfaces of,
              the Work and Derivative Works thereof.
        
              "Contribution" shall mean any work of authorship, including
              the original version of the Work and any modifications or additions
              to that Work or Derivative Works thereof, that is intentionally
              submitted to Licensor for inclusion in the Work by the copyright owner
              or by an individual or Legal Entity authorized to submit on behalf of
              the copyright owner. For the purposes of this definition, "submitted"
              means any form of electronic, verbal, or written communication sent
              to the Licensor or its representatives, including but not limited to
              communication on electronic mailing lists, source code control systems,
              and issue tracking systems that are managed by, or on behalf of, the
              Licensor for the purpose of discussing and improving the Work, but
              excluding communication that is conspicuously marked or otherwise
              designated in writing by the copyright owner as "Not a Contribution."
        
              "Contributor" shall mean Licensor and any individual or Legal Entity
              on behalf of whom a Contribution has been received by Licensor and
              subsequently incorporated within the Work.
        
           2. Grant of Copyright License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              copyright license to reproduce, prepare Derivative Works of,
              publicly display, publicly perform, sublicense, and distribute the
              Work and such Derivative Works in Source or Object form.
        
           3. Grant of Patent License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              (except as stated in this section) patent license to make, have made,
              use, offer to sell, sell, import, and otherwise transfer the Work,
              where such license applies only to those patent claims licensable
              by such Contributor that are necessarily infringed by their
              Contribution(s) alone or by combination of their Contribution(s)
              with the Work to which such Contribution(s) was submitted. If You
              institute patent litigation against any entity (including a
              cross-claim or counterclaim in a lawsuit) alleging that the Work
              or a Contribution incorporated within the Work constitutes direct
              or contributory patent infringement, then any patent licenses
              granted to You under this License for that Work shall terminate
              as of the date such litigation is filed.
        
           4. Redistribution. You may reproduce and distribute copies of the
              Work or Derivative Works thereof in any medium, with or without
              modifications, and in Source or Object form, provided that You
              meet the following conditions:
        
              (a) You must give any other recipients of the Work or
                  Derivative Works a copy of this License; and
        
              (b) You must cause any modified files to carry prominent notices
                  stating that You changed the files; and
        
              (c) You must retain, in the Source form of any Derivative Works
                  that You distribute, all copyright, patent, trademark, and
                  attribution notices from the Source form of the Work,
                  excluding those notices that do not pertain to any part of
                  the Derivative Works; and
        
              (d) If the Work includes a "NOTICE" text file as part of its
                  distribution, then any Derivative Works that You distribute must
                  include a readable copy of the attribution notices contained
                  within such NOTICE file, excluding those notices that do not
                  pertain to any part of the Derivative Works, in at least one
                  of the following places: within a NOTICE text file distributed
                  as part of the Derivative Works; within the Source form or
                  documentation, if provided along with the Derivative Works; or,
                  within a display generated by the Derivative Works, if and
                  wherever such third-party notices normally appear. The contents
                  of the NOTICE file are for informational purposes only and
                  do not modify the License. You may add Your own attribution
                  notices within Derivative Works that You distribute, alongside
                  or as an addendum to the NOTICE text from the Work, provided
                  that such additional attribution notices cannot be construed
                  as modifying the License.
        
              You may add Your own copyright statement to Your modifications and
              may provide additional or different license terms and conditions
              for use, reproduction, or distribution of Your modifications, or
              for any such Derivative Works as a whole, provided Your use,
              reproduction, and distribution of the Work otherwise complies with
              the conditions stated in this License.
        
           5. Submission of Contributions. Unless You explicitly state otherwise,
              any Contribution intentionally submitted for inclusion in the Work
              by You to the Licensor shall be under the terms and conditions of
              this License, without any additional terms or conditions.
              Notwithstanding the above, nothing herein shall supersede or modify
              the terms of any separate license agreement you may have executed
              with Licensor regarding such Contributions.
        
           6. Trademarks. This License does not grant permission to use the trade
              names, trademarks, service marks, or product names of the Licensor,
              except as required for reasonable and customary use in describing the
              origin of the Work and reproducing the content of the NOTICE file.
        
           7. Disclaimer of Warranty. Unless required by applicable law or
              agreed to in writing, Licensor provides the Work (and each
              Contributor provides its Contributions) on an "AS IS" BASIS,
              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
              implied, including, without limitation, any warranties or conditions
              of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
              PARTICULAR PURPOSE. You are solely responsible for determining the
              appropriateness of using or redistributing the Work and assume any
              risks associated with Your exercise of permissions under this License.
        
           8. Limitation of Liability. In no event and under no legal theory,
              whether in tort (including negligence), contract, or otherwise,
              unless required by applicable law (such as deliberate and grossly
              negligent acts) or agreed to in writing, shall any Contributor be
              liable to You for damages, including any direct, indirect, special,
              incidental, or consequential damages of any character arising as a
              result of this License or out of the use or inability to use the
              Work (including but not limited to damages for loss of goodwill,
              work stoppage, computer failure or malfunction, or any and all
              other commercial damages or losses), even if such Contributor
              has been advised of the possibility of such damages.
        
           9. Accepting Warranty or Additional Liability. While redistributing
              the Work or Derivative Works thereof, You may choose to offer,
              and charge a fee for, acceptance of support, warranty, indemnity,
              or other liability obligations and/or rights consistent with this
              License. However, in accepting such obligations, You may act only
              on Your own behalf and on Your sole responsibility, not on behalf
              of any other Contributor, and only if You agree to indemnify,
              defend, and hold each Contributor harmless for any liability
              incurred by, or claims asserted against, such Contributor by reason
              of your accepting any such warranty or additional liability.
        
           END OF TERMS AND CONDITIONS
        
           APPENDIX: How to apply the Apache License to your work.
        
              To apply the Apache License to your work, attach the following
              boilerplate notice, with the fields enclosed by brackets "[]"
              replaced with your own identifying information. (Don't include
              the brackets!)  The text should be enclosed in the appropriate
              comment syntax for the file format. We also recommend that a
              file or class name and description of purpose be included on the
              same "printed page" as the copyright notice for easier
              identification within third-party archives.
        
           Copyright 2026 Alessio Caddeo
        
           Licensed under the Apache License, Version 2.0 (the "License");
           you may not use this file except in compliance with the License.
           You may obtain a copy of the License at
        
               http://www.apache.org/licenses/LICENSE-2.0
        
           Unless required by applicable law or agreed to in writing, software
           distributed under the License is distributed on an "AS IS" BASIS,
           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
           See the License for the specific language governing permissions and
           limitations under the License.
License-File: LICENSE
License-File: NOTICE
Keywords: 3d-reconstruction,ai-agent,api-client,cli,dji,dji-dock,dji-flighthub,dock-3,drone,drone-in-a-box,flight-task,flighthub,flighthub-2,flighthub2,livestream,llm-tools,mcp,mcp-server,model-context-protocol,openapi,photogrammetry,rest-api,uav,wayline
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Systems Administration
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.7
Requires-Dist: rich>=13.7
Requires-Dist: typer>=0.12
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.2; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Requires-Dist: types-pyyaml; extra == 'dev'
Provides-Extra: mcp
Requires-Dist: mcp>=1.2; extra == 'mcp'
Description-Content-Type: text/markdown

# DJI FlightHub 2 CLI — `fh2`

**An unofficial, complete command-line client, Python SDK and MCP server for the [DJI FlightHub 2](https://fh.dji.com) OpenAPI.**

Manage projects, docks, aircraft, flight routes, missions, livestreams, map annotations and 3D reconstruction — from your terminal, from Python, or from an AI agent.

[![PyPI](https://img.shields.io/pypi/v/flighthub2-cli.svg)](https://pypi.org/project/flighthub2-cli/)
[![Python](https://img.shields.io/pypi/pyversions/flighthub2-cli.svg)](https://pypi.org/project/flighthub2-cli/)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
[![CI](https://github.com/alecad/dji-flighthub2-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/alecad/dji-flighthub2-cli/actions/workflows/ci.yml)

```bash
pip install flighthub2-cli
export FLIGHTHUB2_TOKEN="<your organization key>"

fh2 project list
fh2 device list --org
fh2 task list --sn 7CTXXXXXXXXXX --days 30
```

---

## Why this exists

DJI publishes the FlightHub 2 OpenAPI reference on Apifox, but the documentation **does not state the API base URL** — the examples point at `127.0.0.1:30812`. This project fills that gap and everything around it:

| | |
|---|---|
| **Base URL, documented** | `https://es-flight-api-eu.djigate.com` (EU) and `https://es-flight-api-us.djigate.com` (US). Pick with `--region`, or set `--base-url` for on-premises. |
| **All 42 documented endpoints** | Every operation in the FlightHub 2 OpenAPI v0.1 reference, none omitted — verified by a test that diffs the code against the published spec. |
| **Business errors handled** | FlightHub 2 answers `HTTP 200` with `code != 0` for most real failures. This client raises on those instead of silently returning junk. |
| **Verified against the real API** | Not just mocks: every operation was run against a live FlightHub 2 organization, including the two object-storage upload flows DJI documents only half of. See [docs/LIVE_VALIDATION.md](docs/LIVE_VALIDATION.md) — it also records the undocumented behaviour found on the way, and the four documented endpoints DJI's EU gateway does not actually serve. |
| **Built for AI agents** | A machine-readable operation catalogue, a generic `fh2 call`, and a built-in MCP server — with a risk model that keeps an agent from launching an aircraft by accident. |

> **Disclaimer.** This is an independent project, not affiliated with or endorsed by SZ DJI Technology Co., Ltd. It talks to real drones and docks. Read [Safety](#safety) before using the write operations.

---

## Install

```bash
pip install flighthub2-cli
```

With the MCP server for AI agents:

```bash
pip install "flighthub2-cli[mcp]"
```

Requires Python 3.11+.

## Authentication

FlightHub 2 authenticates with an **organization key** (a JWT) sent as `X-User-Token`, plus a **project UUID** sent as `X-Project-Uuid` for project-scoped endpoints.

Get the organization key from:
**FlightHub 2 → My Organization → Organization Settings → FlightHub Sync → Organization Key**

```bash
export FLIGHTHUB2_TOKEN="eyJhbGciOi..."
export FLIGHTHUB2_PROJECT_UUID="fa863413-0c9c-40ae-ba41-bfce0d078d48"
export FLIGHTHUB2_REGION="eu"          # or us
```

Or persist it in a config file (`~/.config/flighthub2/config.toml`):

```bash
fh2 config set --token "eyJhbGciOi..." --region eu
fh2 config set --project "fa863413-..." --profile production
fh2 config show          # token is redacted
```

Verify the whole chain in one command:

```bash
fh2 system ping
```

> A key issued by the EU cloud is rejected by the US gateway with `401`. If you get `401` with a token you know is valid, try the other `--region`.

---

## Usage

Output is a **table on a terminal** and **JSON when piped**, so the same command serves people and scripts:

```bash
fh2 project list                    # pretty table
fh2 project list | jq '.[].uuid'    # JSON
fh2 project list -o json            # force JSON
```

### Projects and devices

```bash
fh2 project list                              # all projects in the organization
fh2 project find "Nazionale_TEST"             # resolve a name to a UUID
fh2 project devices                           # devices in the current project
fh2 project sts-token                         # storage credentials for wayline upload
fh2 project add-member 1922165135267708928 --role project-admin

fh2 device list --org                         # every dock/aircraft in the organization
fh2 device state 7CTXXXXXXXXXX                # live state payload
fh2 device hms 7CTXXXXXXXXXX --language en    # health alerts
```

### Flight routes (waylines)

```bash
fh2 wayline list
fh2 wayline find "Ricerca Primaria"
fh2 wayline download "Ricerca Primaria" -o ./routes/
```

Uploading a route takes three steps, because the file goes straight to object
storage and only then gets registered. [`examples/upload_wayline.py`](examples/upload_wayline.py)
does the whole thing:

```bash
pip install boto3
python examples/upload_wayline.py route.kmz "New Route"
```

### Missions

```bash
fh2 task list --sn 7CTXXXXXXXXXX --days 30
fh2 task get <task-uuid>
fh2 task media <task-uuid>
fh2 task track <task-uuid> --geojson > flight.geojson

# always dry-run first
fh2 task create --name "Patrol" --sn 7CTX... --wayline "Ricerca Primaria" --dry-run
fh2 task create --name "Patrol" --sn 7CTX... --wayline "Ricerca Primaria" --yes
```

### Livestream and forwarding

```bash
fh2 livestream start 7CTXXXXXXXXXX 52-0-0 --quality ultra_high_definition
fh2 converter create --name push-01 --sn 7CTX... --camera-index 52-0-0 --url rtmp://…
fh2 converter set <converter-id> --auto-push
fh2 converter list
```

### Map annotations and 3D models

```bash
fh2 annotation create --name "Staging area" --type 0 --coordinates "[9.19,45.46]"
fh2 annotation create --name "Perimeter" --type 2 \
    --coordinates "[[[9.19,45.46],[9.20,45.46],[9.20,45.47]]]"

fh2 model list
fh2 model get 3279378
fh2 openmodel running
```

Run `fh2 --help` or `fh2 <group> --help` for the full reference.

---

## For AI agents

This is the part that makes `fh2` different from a hand-rolled wrapper. Three layers, from most to least structured.

### 1. MCP server

```bash
pip install "flighthub2-cli[mcp]"
fh2 mcp serve                  # read + write operations
fh2 mcp serve --read-only      # reads only
fh2 mcp serve --allow-dangerous # everything, including flight commands
```

Register it with any MCP client (Claude Desktop, Claude Code, Cursor):

```json
{
  "mcpServers": {
    "flighthub2": {
      "command": "fh2",
      "args": ["mcp", "serve"],
      "env": {
        "FLIGHTHUB2_TOKEN": "eyJhbGciOi...",
        "FLIGHTHUB2_PROJECT_UUID": "fa863413-...",
        "FLIGHTHUB2_REGION": "eu"
      }
    }
  }
}
```

Each operation becomes one tool with a proper JSON Schema. Preview the surface without starting a server:

```bash
fh2 mcp tools --read-only
```

### 2. Discover and call from a shell

An agent that can run one shell command needs no integration at all:

```bash
fh2 schema                       # every operation + JSON Schema
fh2 schema --risk read           # only safe ones
fh2 schema -o task.create        # one operation in detail

fh2 call project.list
fh2 call task.list -a sn=7CTX... -a begin_at=1750000000 -a end_at=1760000000
fh2 call device.command --args-json '{"device_sn":"1ZN...","command":"return_home"}' --yes
```

### 3. Risk model

Every operation is classified, and the classification is enforced in the CLI, in `fh2 call` and in the MCP server:

| Risk | Meaning | Guard |
|---|---|---|
| `read` | Read-only. | none |
| `write` | Changes stored data. Reversible. | none |
| `dangerous` | Moves aircraft, takes control from an on-site pilot, spends reconstruction quota, or deletes data. | requires `--yes`; hidden from MCP unless `--allow-dangerous` |

`--dry-run` short-circuits every write: the request is built, validated and printed, but never sent.

```bash
fh2 --dry-run call task.create --args-json '{"name":"T","sn":"7CT...","wayline_uuid":"..."}'
```

Stable exit codes let a script branch on the failure type: `0` ok, `2` usage, `3` config, `4` auth, `5` not found, `6` FlightHub business error, `7` connection.

---

## Python library

```python
from flighthub2 import FlightHub2Client

with FlightHub2Client(token="...", project_uuid="...", region="eu") as fh:
    assert fh.system.status().healthy

    for project in fh.organization.list_projects(all_pages=True):
        print(project.uuid, project.name)

    for wayline in fh.waylines.list():
        print(wayline.id, wayline.name, wayline.template_types)

    task = fh.flight_tasks.get("<task-uuid>")
    print(task.status, task.folder_info)
```

Everything is typed with Pydantic models and tolerant of new server-side fields. Errors map to a real hierarchy:

```python
from flighthub2 import BusinessError, AuthenticationError

try:
    fh.devices.command("1ZN...", "return_home")
except AuthenticationError as exc:
    print("bad token", exc.request_id)
except BusinessError as exc:
    print("FlightHub refused:", exc.code, exc.message)
```

---

## Configuration reference

| Environment variable | CLI option | Default |
|---|---|---|
| `FLIGHTHUB2_TOKEN` | `--token` | — (required) |
| `FLIGHTHUB2_PROJECT_UUID` | `--project` / `-p` | — |
| `FLIGHTHUB2_REGION` | `--region` | `eu` |
| `FLIGHTHUB2_BASE_URL` | `--base-url` | from region |
| `FLIGHTHUB2_LANGUAGE` | `--language` | `en` |
| `FLIGHTHUB2_TIMEOUT` | `--timeout` | `30` |
| `FLIGHTHUB2_MAX_RETRIES` | — | `3` |
| `FLIGHTHUB2_CONFIG` | — | `~/.config/flighthub2/config.toml` |

Precedence: CLI option > environment > config file profile > default.

---

## Safety

This tool drives real hardware. A few things worth knowing before you automate it:

- `device.command` acts on a **flying aircraft** immediately.
- `device.acquire-control` takes payload control away from whoever holds it, **including an operator on site**.
- `task.create` with `task_type=immediate` **launches the aircraft now**.
- `model.create` and `openmodel.start` **consume reconstruction quota**.
- `openmodel.delete` / `resource-delete` **destroy data**.

All of the above are marked `dangerous`, need `--yes`, and are hidden from the MCP server by default. Use `--dry-run` while developing, and give agents a token scoped to a test project.

---

## Development

```bash
git clone https://github.com/alecad/dji-flighthub2-cli
cd dji-flighthub2-cli
python -m venv .venv
source .venv/bin/activate       # Windows: .venv\Scripts\activate
pip install -e ".[dev,mcp]"

pytest                          # 372 unit tests, no network
ruff check . && ruff format --check . && mypy
```

The repository ships `.vscode/launch.json` and `.vscode/settings.json`, which **Cursor** and **VS Code** both read: open the folder and you get run/debug configurations for the CLI, the MCP server and the test suite, with breakpoints working out of the box.

Live tests run against the real API and are opt-in:

```bash
export FLIGHTHUB2_TOKEN=... FLIGHTHUB2_PROJECT_UUID=...
pytest --run-live                    # read-only calls
pytest --run-live --run-mutating     # also creates and deletes test data
```

See [CONTRIBUTING.md](CONTRIBUTING.md).

---

## Endpoint coverage

All 42 endpoints of the FlightHub 2 OpenAPI v0.1 reference (plus `project.find` and `wayline.find`, convenience lookups built on the list endpoints):

| Group | Operations |
|---|---|
| System | `system.status` |
| Organization & projects | `project.list`, `project.find`, `project.sts-token`, `project.add-member`, `device.list-org`, `device.list` |
| Device management | `device.state`, `device.hms`, `device.command`, `device.change-camera`, `device.change-lens`, `device.acquire-control`, `device.release-control`, `device.stream-quality`, `device.rtk-calibrate` |
| Livestream | `livestream.start`, `converter.create`, `converter.set`, `converter.list`, `converter.delete` ⚠️ |
| Flight tasks | `task.create`, `task.update-status`, `task.list`, `task.get`, `task.media`, `task.track` |
| Flight routes | `wayline.finish-upload`, `wayline.list`, `wayline.get`, `wayline.find` |
| Map models | `model.list`, `model.get`, `model.create` |
| Annotations | `annotation.create` |
| Open modeling | `openmodel.obtain-token`, `openmodel.upload-callback`, `openmodel.resource-get`, `openmodel.resource-delete`, `openmodel.start`, `openmodel.stop`, `openmodel.get`, `openmodel.running`, `openmodel.delete` |

`fh2 schema` prints this catalogue as JSON, always in sync with the code — a test asserts it.

⚠️ The four `converter.*` (stream forwarder) endpoints are documented by DJI but returned `404` on the EU gateway during validation, while `livestream.start` on the same path prefix worked. They appear to be gated by region or licence tier. They are implemented and kept in the client because they may work on your deployment; the CLI explains the `404` if they do not. Details in [docs/LIVE_VALIDATION.md](docs/LIVE_VALIDATION.md).

---

## Credits

Created and maintained by **[Alessio Caddeo](https://github.com/alecad)**.

- Repository: <https://github.com/alecad/dji-flighthub2-cli>
- API reference: [DJI FlightHub 2 OpenAPI v1.0](https://apifox.com/apidoc/shared/484eaf38-faef-488e-ad9b-8edffac94406) (published by DJI on Apifox)
- DJI FlightHub 2 user manual: <https://fh.dji.com/user-manual/>

If this saved you time, a ⭐ on the repository helps other people find it.

## License

Licensed under the **[Apache License 2.0](LICENSE)**.

You may use, modify and redistribute this software freely, **including commercially**, provided you keep the copyright notice and the [NOTICE](NOTICE) file, which credit the original author and repository.

```
Copyright 2026 Alessio Caddeo
https://github.com/alecad/dji-flighthub2-cli
```

---

<sub>**Keywords:** DJI FlightHub 2 API, FlightHub 2 CLI, FlightHub 2 Python SDK, DJI Dock 2 / Dock 3 automation, DJI drone-in-a-box, FlightHub Sync OpenAPI, DJI wayline API, DJI flight task API, DJI livestream RTMP forwarding, DJI 3D reconstruction API, FlightHub 2 MCP server, DJI drone AI agent.</sub>
