CLI tool for managing Infomaniak services — DNS records, domains, and more.
Project description
infomaniak-cli
CLI tool for managing your Infomaniak services from the terminal.
Currently supports DNS management — more features planned.
Features
- List all domains on your account
- List, filter, and inspect DNS records
- Create, update, and delete records (A, AAAA, CNAME, MX, TXT, SRV, NS, etc.)
- Check if a record resolves correctly on Infomaniak's nameservers
- Auto-detects your account ID
- Simple
.envor environment variable configuration
Install
With pipx (recommended)
pipx install infomaniak
With pip
pip install infomaniak
From source
git clone https://github.com/peaktwilight/infomaniak-cli.git
cd infomaniak-cli
pip install .
Configuration
1. Get an API token
- Go to Infomaniak API tokens
- Create a new token with these scopes:
domain:readdns:readdns:write
- Copy the token
2. Set the token
Option A — environment variable:
export INFOMANIAK_API_TOKEN=your-token-here
Option B — .env file:
cp .env.example .env
# Edit .env and paste your token
Usage
# List all domains
infomaniak-cli domains
# List DNS records for a domain
infomaniak-cli records example.com
# Filter by record type
infomaniak-cli records example.com --type CNAME
# Check if a record resolves correctly
infomaniak-cli check example.com 12345
# Create a new record
infomaniak-cli add example.com A blog 93.184.216.34
infomaniak-cli add example.com CNAME app target.example.net --ttl 300
# Update a record
infomaniak-cli update example.com 12345 --target 93.184.216.35
infomaniak-cli update example.com 12345 --ttl 300
# Delete a record (with confirmation)
infomaniak-cli delete example.com 12345
# Delete without confirmation
infomaniak-cli delete example.com 12345 --yes
# Show version
infomaniak-cli --version
Example output
$ infomaniak-cli domains
Domains (2):
ID Domain DNSSEC DNS@IK
─────── ─────────────── ────── ──────
100001 example.com yes yes
100002 example.org yes yes
$ infomaniak-cli records example.com --type A
DNS records for example.com (type=A) — 2 records:
ID Type Name Target TTL
────── ──── ──── ────────────── ────
200001 A @ 93.184.216.34 3600
200002 A www 93.184.216.34 3600
Why not OAuth?
Infomaniak's OAuth2 apps only support openid, profile, email, and phone scopes. The DNS management scopes (domain:read, dns:read, dns:write) are only available through API tokens — so there's no way to implement a browser-based login flow.
API reference
Built on the Infomaniak API:
| Endpoint | Description |
|---|---|
GET /1/domain/account/{id} |
List domains |
GET /2/zones/{zone}/records |
List DNS records |
POST /2/zones/{zone}/records |
Create record |
PUT /2/zones/{zone}/records/{id} |
Update record |
DELETE /2/zones/{zone}/records/{id} |
Delete record |
GET /2/zones/{zone}/records/{id}/check |
Check record health |
License
MIT
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 infomaniak-0.1.0.tar.gz.
File metadata
- Download URL: infomaniak-0.1.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8686cceffe578be7e0923a6083b2824c02f08aba46cbe97bb3d2e1c96761d9e
|
|
| MD5 |
2127fca7473aa617ac29621adc141cfa
|
|
| BLAKE2b-256 |
a6da919cf1aadf245ffc435fbd36f7085978ba32b68b90ffd2b5b3f1391672ae
|
Provenance
The following attestation bundles were made for infomaniak-0.1.0.tar.gz:
Publisher:
publish.yml on peaktwilight/infomaniak-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
infomaniak-0.1.0.tar.gz -
Subject digest:
e8686cceffe578be7e0923a6083b2824c02f08aba46cbe97bb3d2e1c96761d9e - Sigstore transparency entry: 1098259536
- Sigstore integration time:
-
Permalink:
peaktwilight/infomaniak-cli@0756a1cc3dba8565f290d826f381d2df8e040081 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/peaktwilight
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0756a1cc3dba8565f290d826f381d2df8e040081 -
Trigger Event:
release
-
Statement type:
File details
Details for the file infomaniak-0.1.0-py3-none-any.whl.
File metadata
- Download URL: infomaniak-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7643954bf86070bc8226e61dc0918c1c1835c6bc6ddf1bff4fe610142d8251e
|
|
| MD5 |
c467a6f95042ae19bfc736866d46cc61
|
|
| BLAKE2b-256 |
220c26d9488deaf89991668a1a39ef7ca696ba708d92adc67633d86a0ed4e8b6
|
Provenance
The following attestation bundles were made for infomaniak-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on peaktwilight/infomaniak-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
infomaniak-0.1.0-py3-none-any.whl -
Subject digest:
c7643954bf86070bc8226e61dc0918c1c1835c6bc6ddf1bff4fe610142d8251e - Sigstore transparency entry: 1098259568
- Sigstore integration time:
-
Permalink:
peaktwilight/infomaniak-cli@0756a1cc3dba8565f290d826f381d2df8e040081 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/peaktwilight
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0756a1cc3dba8565f290d826f381d2df8e040081 -
Trigger Event:
release
-
Statement type: