Skip to main content

CLI tool for managing Infomaniak services — DNS records, domains, and more.

Project description

infomaniak

CLI tool for managing your Infomaniak services from the terminal.

Currently supports DNS management — more services planned.

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

  1. Go to Infomaniak API tokens
  2. Create a new token with these scopes:
    • domain:read
    • dns:read
    • dns:write
  3. 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 dns domains

# List DNS records for a domain
infomaniak dns records example.com

# Filter by record type
infomaniak dns records example.com --type CNAME

# Check if a record resolves correctly
infomaniak dns check example.com 12345

# Create a new record
infomaniak dns add example.com A blog 93.184.216.34
infomaniak dns add example.com CNAME app target.example.net --ttl 300

# Update a record
infomaniak dns update example.com 12345 --target 93.184.216.35
infomaniak dns update example.com 12345 --ttl 300

# Delete a record (with confirmation)
infomaniak dns delete example.com 12345

# Delete without confirmation
infomaniak dns delete example.com 12345 --yes

# Show version
infomaniak --version

Example output

$ infomaniak dns domains

Domains (2):

  ID       Domain           DNSSEC  DNS@IK
  ───────  ───────────────  ──────  ──────
  100001   example.com      yes     yes
  100002   example.org      yes     yes

$ infomaniak dns 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

infomaniak-0.2.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

infomaniak-0.2.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file infomaniak-0.2.0.tar.gz.

File metadata

  • Download URL: infomaniak-0.2.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for infomaniak-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b4af20d2cabac9fc8db88fc5bc86b872e0e92f68e95a69e8e958d45ee59b80e2
MD5 5ecc88c9e8ab7b978731a7985b4d0a56
BLAKE2b-256 ca2548eb932ab3b38c19053b5bf064727d257a312777ee03b4a8254d93151f6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for infomaniak-0.2.0.tar.gz:

Publisher: publish.yml on peaktwilight/infomaniak-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file infomaniak-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: infomaniak-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for infomaniak-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f102c5bd11808c8ac2c9ef0a0ab94dc7b4e08edd2aecfba8f07ecb5f79fab101
MD5 b25012beb8bd71d508b11f8acb6d6b0e
BLAKE2b-256 3f3b67dd41d04ef9667278bf0857b7655a2f7be0908c5aac7f9f9ea1079d8a5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for infomaniak-0.2.0-py3-none-any.whl:

Publisher: publish.yml on peaktwilight/infomaniak-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page