Imperative UniFi homelab actions the Integration API can't express
Project description
unifictl
Imperative UniFi homelab actions that the official Integration API can't
express. Companion to unifi-mcp (reads):
same gateway, same API key, but unifictl hits the private controller API to
do things — starting with toggling switch-port link aggregation (LACP LAGs).
Status:
set lagimplemented. The first feature works end-to-end against the private controller API (API-key auth). SeeSPEC.mdfor the design anddecisions/for the architecture decision records.
Install
uv tool install unifictl # or: pipx install unifictl
Usage
unifictl set lag off # dissolve the LAGs on the leader ports
unifictl set lag on # restore the LACP bonds
unifictl set lag off --dry-run # print the computed change, apply nothing
A real apply prints the diff, prompts for confirmation, and snapshots the
switch's current port_overrides to a timestamped backup before writing.
Configuration
Connection and secrets come from the environment (never committed), matching
unifi-mcp:
| Variable | Purpose |
|---|---|
UNIFI_BASE_URL |
Gateway address, e.g. https://192.168.1.1 |
UNIFI_API_KEY |
Integration API key (also authenticates the private endpoints) |
UNIFI_SITE |
Controller site (default default) |
UNIFI_CA_CERT |
Optional path to the controller CA certificate (PEM) |
UNIFI_INSECURE_TLS |
Last-resort TLS bypass |
UNIFI_TIMEOUT_MS |
Per-request timeout (default 30000) |
Operational parameters (switch MAC and LAG leader ports) live in an
XDG TOML file at ~/.config/unifictl/config.toml; CLI flags override them.
Development
uv sync # create the venv and install deps
task dev:check # lint, format-check, typecheck, import boundaries, tests
task dev:hooks-install # install git hooks (prek)
See SPEC.md for the build reference and decisions/ for the architecture
decision records.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unifictl-0.2.0.tar.gz.
File metadata
- Download URL: unifictl-0.2.0.tar.gz
- Upload date:
- Size: 86.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2c210c8e3a075383d00514069711a434db81972aca2946a58d26d8a52fd56c4
|
|
| MD5 |
3fc4126d224ceeab5213ec80d4c225d3
|
|
| BLAKE2b-256 |
f7edab91805afde2a7bc53242a6217520771842d5e5281e00853757647d46b6e
|
Provenance
The following attestation bundles were made for unifictl-0.2.0.tar.gz:
Publisher:
release.yaml on yo61/unifictl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unifictl-0.2.0.tar.gz -
Subject digest:
d2c210c8e3a075383d00514069711a434db81972aca2946a58d26d8a52fd56c4 - Sigstore transparency entry: 2133580930
- Sigstore integration time:
-
Permalink:
yo61/unifictl@1d3505cff5ba00ec86e3d75ab3f420685ec0ff02 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yo61
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@1d3505cff5ba00ec86e3d75ab3f420685ec0ff02 -
Trigger Event:
push
-
Statement type:
File details
Details for the file unifictl-0.2.0-py3-none-any.whl.
File metadata
- Download URL: unifictl-0.2.0-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd9f9519f2ebe9a85d47aa4294fe5da1b14141b0b0cd6fbd372ba57bc2633656
|
|
| MD5 |
2747d420ba5a0b9daa9b72978f4976ff
|
|
| BLAKE2b-256 |
39d3adcab7d9c971ba3b41a683a4824b66b2629efa065517ccee05c81c7b4c9b
|
Provenance
The following attestation bundles were made for unifictl-0.2.0-py3-none-any.whl:
Publisher:
release.yaml on yo61/unifictl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unifictl-0.2.0-py3-none-any.whl -
Subject digest:
cd9f9519f2ebe9a85d47aa4294fe5da1b14141b0b0cd6fbd372ba57bc2633656 - Sigstore transparency entry: 2133580983
- Sigstore integration time:
-
Permalink:
yo61/unifictl@1d3505cff5ba00ec86e3d75ab3f420685ec0ff02 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yo61
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@1d3505cff5ba00ec86e3d75ab3f420685ec0ff02 -
Trigger Event:
push
-
Statement type: