{"id":40905093,"url":"https://github.com/lnussbaum/incant","last_synced_at":"2026-01-22T02:37:37.080Z","repository":{"id":280948119,"uuid":"932117830","full_name":"lnussbaum/incant","owner":"lnussbaum","description":"Incus frontend to describe and provision development environments","archived":false,"fork":false,"pushed_at":"2026-01-19T21:31:15.000Z","size":425,"stargazers_count":55,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-20T03:35:44.171Z","etag":null,"topics":["development-environment","incus","orchestration"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lnussbaum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-13T11:52:02.000Z","updated_at":"2026-01-19T21:31:19.000Z","dependencies_parsed_at":"2025-04-03T20:25:41.746Z","dependency_job_id":"2c1dec6b-69e0-455a-b9ac-68e3c9bf7f34","html_url":"https://github.com/lnussbaum/incant","commit_stats":null,"previous_names":["lnussbaum/incant"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lnussbaum/incant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnussbaum%2Fincant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnussbaum%2Fincant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnussbaum%2Fincant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnussbaum%2Fincant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lnussbaum","download_url":"https://codeload.github.com/lnussbaum/incant/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnussbaum%2Fincant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28651809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["development-environment","incus","orchestration"],"created_at":"2026-01-22T02:37:37.010Z","updated_at":"2026-01-22T02:37:37.075Z","avatar_url":"https://github.com/lnussbaum.png","language":"Python","readme":"# Incant\n\n[![PyPI version](https://img.shields.io/pypi/v/incus-incant.svg)](https://pypi.org/project/incus-incant/)\n\nIncant is a frontend for [Incus](https://linuxcontainers.org/incus/) that provides a declarative way to define and manage development environments. It simplifies the creation, configuration, and provisioning of Incus instances using YAML-based configuration files.\n\n## Features\n\n- **Declarative Configuration**: Define your development environments using simple YAML files.\n- **Shared Folder Support**: Mount the current working directory into the instance.\n- **Provisioning Support**: Declare and run provisioning scripts automatically, copy files to the instance, set up an SSH server automatically, and configure an LLMNR daemon.\n\n## Installation\n\nEnsure you have Python installed and `incus` available on your system.\n\nYou can install Incant from PyPI:\n\n```sh\npipx install incus-incant\n```\n\nOr install directly from Git:\n\n```sh\npipx install git+https://github.com/lnussbaum/incant.git\n```\n\n## Usage\n\n### Install and configure Incus\n\n[Incus](https://linuxcontainers.org/incus/) is required by Incant. [Incus' documentation](https://linuxcontainers.org/incus/docs/main/) describes how to install it, but in short, you can do:\n```sh\n# install Incus from your distribution's packages\napt-get -y install incus\n\n# Configure Incus with default settings\nincus admin init --auto\n\n# Add yourself to the incus-admin group\nusermod -a -G incus-admin \u003cyour_login\u003e\n\n# Gain the new group in the current shell (alternatively, you can log out and log in again)\nnewgrp incus-admin\n```\n### Configure Incant\n\nIncant looks for a configuration file named `incant.yaml`, `incant.yaml.j2`, or `incant.yaml.mako` in the current directory.\n\nYou can ask Incant to create an example configuration file with:\n```sh\n$ incant init\n```\n\nA very basic example:\n```yaml\ninstances:\n  debian-sid:\n    image: images:debian/14\n```\n\nAnother example, that starts a KVM virtual machine:\n```yaml\ninstances:\n  debian-sid:\n    image: images:debian/14\n    vm: true\n```\n\nA more complex example that demonstrates most of Incant's features:\n```yaml\ninstances:\n  basic-container:\n    image: images:ubuntu/24.04\n    devices:\n      root:\n        size: 1GiB\n    wait: true # wait for instance to be ready (incus agent running)\n    shared_folder: false # disable shared folder (/incant) setup (default: enabled)\n    config: # any incus config options\n      limits.processes: 100\n  basic-vm:\n    image: images:ubuntu/24.04\n    vm: true\n    type: c1-m1 # 1 CPU, 1GB RAM\n  provisioned:\n    image: images:debian/13\n    provision: # a list of provisioning steps\n      - | # first, an inlined script\n        #!/bin/bash\n        set -xe\n        apt-get update\n        apt-get -y install curl ruby\n      # then, a script. the path can be relative to the current dir,\n      # as incant will 'cd' to /incant, so the script will be available inside the instance\n      - examples/provision/web_server.rb\n      - ssh: true # configure an ssh server and provide access\n      # - ssh: # same with more configuration\n      #    clean_known_hosts: true (that's the default)\n      #    # authorized_keys: path to file (default: concatenate id_*.pub)\n      - llmnr: true # configure and start an LLMNR daemon\n      - copy: # copy a file using 'incus file push'\n          source: ./README.md\n          target: /tmp/README.md\n          mode: \"0644\"\n          uid: 0\n          gid: 0\n```\n\n### Initialize and Start an Instance\n\n```sh\n$ incant up\n```\n\nor for a specific instance, if you have several instances described in your configuration file:\n\n```sh\n$ incant up my-instance\n```\n\n### Provision again an Instance that was already started previously\n\n```sh\n$ incant provision\n```\n\nor for a specific instance:\n\n```sh\n$ incant provision my-instance\n```\n\n### Use your Instances\n\nUse [Incus commands](https://linuxcontainers.org/incus/docs/main/instances/) to interact with your instances:\n\n```sh\n$ incus exec ubuntu-container -- apt-get update\n$ incus shell my-instance # or `incant shell` if you have a single instance\n$ incus console my-instance\n$ incus file edit my-container/etc/hosts\n$ incus file delete \u003cinstance_name\u003e/\u003cpath_to_file\u003e\n```\n\nYour instance's services are directly reachable on the network. They should be discoverable in DNS if the instance supports [LLMNR](https://en.wikipedia.org/wiki/Link-Local_Multicast_Name_Resolution) or [mDNS](https://en.wikipedia.org/wiki/Multicast_DNS).\n\n### Destroy an Instance\n\n```sh\n$ incant destroy\n```\n\nor for a specific instance:\n\n```sh\n$ incant destroy my-instance\n```\n\n### View Configuration (especially useful if you use Mako or Jinja2 templates)\n\n```sh\n$ incant dump\n```\n\n## Caveats\n\n### Shared folders don't work on ARM64\n\nThis is known as [Incus issue #91](https://github.com/zabbly/incus/issues/91) and [virtiofsd issue #212](https://gitlab.com/virtio-fs/virtiofsd/-/issues/212).\n\nThe default shared folder (/incant) can be disabled using:\n```yaml\ninstances:\n  my-instance:\n    shared_folder: false\n```\n\n### Virtual machines (not containers) for RHEL-based distributions need an explicit agent:config device\n\nThis can be added using a pre-launch command, with:\n```yaml\ninstances:\n  alma9vm:\n    image: images:almalinux/9\n    vm: true\n    pre-launch:\n      - config device add alma9vm agent disk source=agent:config\n```\n\nSee [Incus documentation](https://linuxcontainers.org/incus/docs/main/reference/devices_disk/)\n\n### Name resolution (DNS) does not work for some images\n\nSome images enable [LLMNR](https://en.wikipedia.org/wiki/Link-Local_Multicast_Name_Resolution) or [mDNS](https://en.wikipedia.org/wiki/Multicast_DNS), so that their names are automatically resolvable from the host. For others, a custom provisioning step (`- llmnr: true`) can be added to enable LLMNR in `systemd-resolved` at instance startup.\n* Images that are known to work out of the box: debian/{11,12,13,14}, archlinux/current\n* Images that are known to work with `llmnr: true`: ubuntu/{22.04,24.04}, almalinux/{8,9,10}\n\n### No network connectivity when Docker is installed\n\nIf Docker is installed on the same machine as Incus is running on, started instances may not have\nnetwork connectivity. See the Incus documentation for how to mitigate that:\n[Prevent connectivity issues with Incus and Docker](https://linuxcontainers.org/incus/docs/main/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-incus-and-docker)\n\n## Incant compared to Vagrant\n\nIncant is inspired by Vagrant, and intended as an Incus-based replacement for Vagrant.\n\nThe main differences between Incant and Vagrant are:\n\n* Incant is Free Software (licensed under the Apache 2.0 license). Vagrant is licensed under the non-Open-Source Business Source License.\n* Incant is only a frontend for [Incus](https://linuxcontainers.org/incus/), which supports containers (LXC-based) and virtual machines (KVM-based) on Linux. It will not attempt to be a more generic frontend for other virtualization providers. Thus, Incant only works on Linux.\n\nSome technical differences are useful to keep in mind when migrating from Vagrant to Incant.\n\n* Incant is intended as a thin layer on top of Incus, and focuses on provisioning. Once the provisioning has been performed by Incant, you need to use Incus commands such as `incus shell` to work with your instances.\n* Incant shares the current directory as `/incant` inside the instance (compared to Vagrant's sharing of `/vagrant`). Incant tries to share the current directory read-write (using Incus' `shift=true`) but this fails in some cases, such as restricted containers. So there are chances that the directory will only be shared read-only.\n* Incant does not create a user account inside the instance -- you need to use the root account, or create a user account during provisioning (for example, with `adduser --disabled-password --gecos \"\" incant`)\n* Incant uses a YAML-based description format for instances. [Mako](https://www.makotemplates.org/) or [Jinja2](https://jinja.palletsprojects.com/) templates can be used to those YAML configuration files if you need more complex processing, similar to what is available in *Vagrantfiles* (see the examples/ directory).\n\n## Incant compared to other projects\n\nThere are several other projects addressing similar problem spaces. They are shortly described here so that you can determine if Incant is the right tool for you.\n\n* [lxops](https://github.com/melato/lxops) and [blincus](https://blincus.dev/) manage the provisioning of Incus instances using a declarative configuration format, but the provisioning actions are described using  [cloud-init](https://cloud-init.io/) configuration files. [lxops](https://github.com/melato/lxops) uses [cloudconfig](https://github.com/melato/cloudconfig) to apply them, while [blincus](https://blincus.dev/) requires *cloud* instances that include cloud-init. In contrast, using Incant does not require knowing about cloud-init or fitting into cloud-init's formalism.\n* [terraform-provider-incus](https://github.com/lxc/terraform-provider-incus) is a [Terraform](https://www.terraform.io/) or [OpenTofu](https://opentofu.org/) provider for Incus. Incant uses a more basic scheme for provisioning, and does not require knowing about Terraform or fitting into Terraform's formalism.\n* [cluster-api-provider-lxc (CAPL)](https://github.com/neoaggelos/cluster-api-provider-lxc) is an infrastructure provider for Kubernetes' Cluster API, which enables deploying Kubernetes clusters on Incus. Incant focuses on the more general use case of provisioning system containers or virtual machines outside of the Kubernetes world.\n* [devenv](https://devenv.sh/) is a [Nix](https://nixos.org/)-based development environment manager. It also uses a declarative file format. It goes further than Incant by including the definition of development tasks. It also covers defining services that run inside the environment, and generating OCI containers to deploy the environment to production. Incant focuses on providing the environment based on classical Linux distributions and tools.\n\n## Copyright and License\n\nCopyright 2025 Lucas Nussbaum\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis software except in compliance with the License.  You may obtain a copy of\nthe License at \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e, or in the\n[LICENSE](LICENSE) file.\n\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations under the License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnussbaum%2Fincant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flnussbaum%2Fincant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnussbaum%2Fincant/lists"}