Skip to main content

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 .env or 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

  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-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

infomaniak-0.1.0.tar.gz (7.0 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.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

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

Hashes for infomaniak-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e8686cceffe578be7e0923a6083b2824c02f08aba46cbe97bb3d2e1c96761d9e
MD5 2127fca7473aa617ac29621adc141cfa
BLAKE2b-256 a6da919cf1aadf245ffc435fbd36f7085978ba32b68b90ffd2b5b3f1391672ae

See more details on using hashes here.

Provenance

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

Hashes for infomaniak-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c7643954bf86070bc8226e61dc0918c1c1835c6bc6ddf1bff4fe610142d8251e
MD5 c467a6f95042ae19bfc736866d46cc61
BLAKE2b-256 220c26d9488deaf89991668a1a39ef7ca696ba708d92adc67633d86a0ed4e8b6

See more details on using hashes here.

Provenance

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