Skip to main content

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

Project description

infomaniak

PyPI version Python versions License: MIT

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 .

Getting started

infomaniak setup

The setup wizard will:

  1. Open the Infomaniak token page in your browser
  2. Prompt you to paste your API token
  3. Validate it against the API
  4. Save it to ~/.config/infomaniak/config.ini

You'll need a token with these scopes: domain:read, dns:read, dns:write.

Alternative configuration

You can also set the token manually:

# Environment variable
export INFOMANIAK_API_TOKEN=your-token-here

# Or .env file
cp .env.example .env

Token lookup order: environment variable → config file → .env file.

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 — 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.3.0.tar.gz (8.5 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.3.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for infomaniak-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d7f218adcece63a0f5ed4c9a0e0cd1c5ddb27b37fc01de87dce3d60a8673a4bb
MD5 53aaa28c4b43726f7cb04553387b119e
BLAKE2b-256 96451f3893a09739286558fb23e11a91b37c1891a6e7e6b01151834c59d41dc9

See more details on using hashes here.

Provenance

The following attestation bundles were made for infomaniak-0.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: infomaniak-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74cd9be0a12bae8f3c29c7c43e6b2787a8e87103974d4939fb320d9059e92ba9
MD5 2a1f2a9ed2e3ba8d2d8e6522f078db79
BLAKE2b-256 7ce359cd3dc324c13d059912e44ef19c4e9b2d271e20f2ba5e12a5e0e932c735

See more details on using hashes here.

Provenance

The following attestation bundles were made for infomaniak-0.3.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