Skip to main content

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

Project description

infomaniak

PyPI version Tests Python versions License: MIT

CLI tool for managing your Infomaniak services from the terminal.

Manage DNS, mail, hosting, kDrive, products, and more — all from one command.

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. Check which optional scopes are enabled
  5. Save it to ~/.config/infomaniak/config.ini

Required scopes: accounts, domain:read, dns:read, dns:write

Optional scopes: mail (mailboxes), web (hosting details), drive (kDrive details)

Alternative configuration

# Environment variable
export INFOMANIAK_API_TOKEN=your-token-here

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

Commands

DNS

infomaniak dns domains                                    # List all domains
infomaniak dns records example.com                        # List DNS records
infomaniak dns records example.com --type CNAME           # Filter by type
infomaniak dns check example.com 12345                    # Check record health
infomaniak dns add example.com A blog 93.184.216.34       # Create record
infomaniak dns update example.com 12345 --target 1.2.3.4  # Update record
infomaniak dns delete example.com 12345                   # Delete record
infomaniak dns export example.com                         # Export as JSON
infomaniak dns export example.com -f csv -o records.csv   # Export as CSV
infomaniak dns import example.com records.json            # Import from file
infomaniak dns diff example.com records.json              # Compare live vs file
infomaniak dns sync example.com desired.json --dry-run    # Sync (terraform-style)
infomaniak dns clone source.com target.com                # Clone between domains
infomaniak dns search "76.76.21"                          # Search across all domains
infomaniak dns backup                                     # Backup all domains

Account & Products

infomaniak account                                        # Account overview
infomaniak products                                       # List all products
infomaniak products --type email_hosting                  # Filter by service
infomaniak status                                         # Service status overview

Mail

infomaniak mail list                                      # List mail hostings
infomaniak mail mailboxes <id>                            # List mailboxes (needs 'mail' scope)

Hosting & kDrive

infomaniak hosting list                                   # List web hostings
infomaniak drive list                                     # List kDrive instances

Configuration

infomaniak config show                                    # Show token, source, scopes
infomaniak setup                                          # Interactive setup wizard

JSON output

Add --json to any read command for machine-readable output:

infomaniak dns domains --json
infomaniak dns records example.com --json
infomaniak dns search vercel --json
infomaniak products --json
infomaniak account --json
infomaniak status --json

Example output

$ infomaniak account

  Account

  Name:  John Doe
  ID:    12345
  Total: 5 products

  Service          Count  Examples
  ───────────────  ─────  ─────────────────────────
  domain           2      example.com, example.org
  email_hosting    2      example.com, example.org
  drive            1      example.com

$ infomaniak dns search vercel

  Search: "vercel" — 3 matches across 10 domains

  Domain         ID      Type   Name  Target                   TTL
  ─────────────  ──────  ─────  ────  ───────────────────────  ────
  example.com    200001  CNAME  @     cname.vercel-dns.com     300
  example.com    200002  CNAME  www   cname.vercel-dns.com     300
  example.org    300001  CNAME  @     cname.vercel-dns.com     300

$ infomaniak dns sync example.com desired.json --dry-run

  DNS sync plan for example.com

  File: desired.json
  + 1 to create  - 2 to delete  8 unchanged

  Create:
    + A  new-app → 198.51.100.1

  Delete:
    - CNAME  old-cdn → old.cdn.example.net
    - TXT  _old-verify → verify=abc123

  Dry run — no changes applied.

$ infomaniak status

  Service Status — 5 products

  Service          Total  Active  Issues
  ───────────────  ─────  ──────  ──────
  domain           2      2       none
  email_hosting    2      2       none
  drive            1      1       none

  ✓ All services operational.

API reference

Built on the Infomaniak API:

Endpoint Description
GET /1/accounts Account info
GET /1/products List all products
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
GET /1/mail_hostings/{id}/mailboxes List mailboxes

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.6.0.tar.gz (20.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.6.0-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: infomaniak-0.6.0.tar.gz
  • Upload date:
  • Size: 20.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.6.0.tar.gz
Algorithm Hash digest
SHA256 b680af3d3f5fa0a2597b11a9365d90d99c1a9b5d7bfd99bce93612b5781d18e0
MD5 13c0602a37ed5aeffce18729637b9a36
BLAKE2b-256 8764485513ed2b06233d0c5b2e91a67c02187e12cd5a3047e2bf607ae30f2913

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: infomaniak-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 23.6 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.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1737cc6331342b5f9c4470c604be4d630af33b74dbc27d09a4307a8396f3a03
MD5 56ab011144527c9788d9f48769e65b9a
BLAKE2b-256 f3a6b4c765a4757d9d0620a1ab3c9069a3f8c64e24f3ef4ef930ce791200f3f2

See more details on using hashes here.

Provenance

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