{"id":31737567,"url":"https://github.com/dwarf1er/idfmgr","last_synced_at":"2026-04-17T23:31:59.220Z","repository":{"id":318632209,"uuid":"1055570315","full_name":"Dwarf1er/idfmgr","owner":"Dwarf1er","description":"A lightweight wrapper around idf.py that simplifies ESP-IDF version management, project creation with templates, and switching between GCC and Clang toolchains.","archived":false,"fork":false,"pushed_at":"2025-11-02T20:55:01.000Z","size":287,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-02T22:17:24.301Z","etag":null,"topics":["cli","clitool","esp-idf","esp32","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dwarf1er.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-09-12T13:14:30.000Z","updated_at":"2025-11-02T20:55:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"2fff59e7-eae2-4bb5-beda-ba8501a30221","html_url":"https://github.com/Dwarf1er/idfmgr","commit_stats":null,"previous_names":["dwarf1er/idfmgr"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Dwarf1er/idfmgr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwarf1er%2Fidfmgr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwarf1er%2Fidfmgr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwarf1er%2Fidfmgr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwarf1er%2Fidfmgr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dwarf1er","download_url":"https://codeload.github.com/Dwarf1er/idfmgr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dwarf1er%2Fidfmgr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31950215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cli","clitool","esp-idf","esp32","go","golang"],"created_at":"2025-10-09T09:25:17.759Z","updated_at":"2026-04-17T23:31:59.214Z","avatar_url":"https://github.com/Dwarf1er.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# idfmgr\n#### Simplifying ESP32 project management\n\n\u003cimg alt=\"idfmgr logo\" src=\"https://raw.githubusercontent.com/Dwarf1er/idfmgr/master/assets/idfmgr-logo.png\" height=\"250\" /\u003e\n\n![License](https://img.shields.io/github/license/Dwarf1er/idfmgr?style=for-the-badge)\n![Issues](https://img.shields.io/github/issues/Dwarf1er/idfmgr?style=for-the-badge)\n![PRs](https://img.shields.io/github/issues-pr/Dwarf1er/idfmgr?style=for-the-badge)\n![Contributors](https://img.shields.io/github/contributors/Dwarf1er/idfmgr?style=for-the-badge)\n![Stars](https://img.shields.io/github/stars/Dwarf1er/idfmgr?style=for-the-badge)\n\n\u003c/div\u003e\n\n## Project Description\n\n**idfmgr** is a command-line wrapper around Espressif's idf.py tool that simplifies ESP32 development workflows. It handles the complexity of managing multiple ESP-IDF versions, provides project templates, and makes it easy to switch between GCC and Clang toolchains—all while leveraging the power of the official idf.py tool underneath.\n\n### Key Features\n\n- **Version Management**: Install, list, and remove multiple ESP-IDF versions\n- **Project Templates**: Create projects with base, Arduino or IDF component templates\n- **Dual Toolchain Support**: Build with GCC or Clang (separate build directories)\n- **Per-Project Versioning**: Track ESP-IDF version with `.espidf-version` files\n- **Integrated Workflow**: Build and flash with automatic environment setup\n- **Multi-Target Support**: ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6, ESP32-H2\n\n# Table of Contents\n- [idfmgr](#idfmgr)\n\t\t\t- [Simplifying ESP32 project management](#simplifying-esp32-project-management)\n\t- [Project Description](#project-description)\n\t\t- [Key Features](#key-features)\n- [Table of Contents](#table-of-contents)\n\t- [Installation](#installation)\n\t\t- [Using go install (Recommended)](#using-go-install-recommended)\n\t\t- [Download Pre-built Binaries](#download-pre-built-binaries)\n\t\t- [Build from Source](#build-from-source)\n\t\t- [Prerequisites](#prerequisites)\n\t- [Quick Start](#quick-start)\n\t- [Commands](#commands)\n\t\t- [Version Management](#version-management)\n\t\t\t- [`list`](#list)\n\t\t\t- [`install \u003cversion\u003e`](#install-version)\n\t\t\t- [`installed`](#installed)\n\t\t\t- [`remove [version...]`](#remove-version)\n\t\t- [Project Management](#project-management)\n\t\t\t- [`create \u003cproject-name\u003e`](#create-project-name)\n\t\t\t- [`activate`](#activate)\n\t\t\t- [`info`](#info)\n\t\t- [Building and Flashing](#building-and-flashing)\n\t\t\t- [`build`](#build)\n\t\t\t- [`flash`](#flash)\n\t\t\t- [`exec [idf.py args...]`](#exec-idfpy-args)\n\t- [Templates](#templates)\n\t\t- [Base Template](#base-template)\n\t\t- [Arduino Template (`--arduino`)](#arduino-template---arduino)\n\t\t- [IDF Component Template (`--component`)](#idf-component-template---component)\n\t- [Configuration](#configuration)\n\t\t- [Environment Variables](#environment-variables)\n\t\t- [Per-Project Configuration](#per-project-configuration)\n\t- [Tips \\\u0026 Tricks](#tips--tricks)\n\t\t- [Dual Toolchain Workflow](#dual-toolchain-workflow)\n\t\t- [Quick Arduino Development](#quick-arduino-development)\n\t\t- [Using idf.py Directly](#using-idfpy-directly)\n\t- [ESP IDF Project Structure](#esp-idf-project-structure)\n\t- [License](#license)\n\n## Installation\n\n### Using go install (Recommended)\n\nIf you have Go installed (1.21+), this is the easiest method:\n```bash\ngo install github.com/Dwarf1er/idfmgr@latest\n```\n\nMake sure `$GOPATH/bin` (typically `~/go/bin`) is in your `PATH`.\n\n### Download Pre-built Binaries\n\nDownload the latest release for your platform from the [releases page](https://github.com/Dwarf1er/idfmgr/releases), replace version as needed in the commands:\n\n**Linux:**\n```bash\nwget https://github.com/Dwarf1er/idfmgr/releases/download/vX.X.X/idfmgr-linux-x64-vX.X.X\nchmod +x idfmgr-linux-x64-vX.X.X\nsudo mv idfmgr-linux-x64-vX.X.X /usr/local/bin/idfmgr\n```\n\n**macOS:**\n```bash\n# Intel Mac\nwget https://github.com/Dwarf1er/idfmgr/releases/download/vX.X.X/idfmgr-osx-x64-vX.X.X\nchmod +x idfmgr-osx-x64-vX.X.X\nsudo mv idfmgr-osx-x64-vX.X.X /usr/local/bin/idfmgr\n\n# Apple Silicon Mac\nwget https://github.com/Dwarf1er/idfmgr/releases/download/vX.X.X/idfmgr-osx-arm64-vX.X.X\nchmod +x idfmgr-osx-arm64-vX.X.X\nsudo mv idfmgr-osx-arm64-vX.X.X /usr/local/bin/idfmgr\n```\n\n**Windows:**\nDownload the `.exe` file and add it to your PATH.\n\n### Build from Source\n```bash\ngit clone https://github.com/Dwarf1er/idfmgr.git\ncd idfmgr\ngo build -o idfmgr\nsudo mv idfmgr /usr/local/bin/\n# or move to a directory in your PATH on Windows\n```\n\n### Prerequisites\n\n`idfmgr` will check for these automatically, but you'll need:\n- Git\n- Python 3\n- CMake\n- Ninja build system\n- wget\n\n## Quick Start\n```bash\n# 1. Install an ESP-IDF version\nidfmgr install v5.1.2\n\n# 2. Create a new project\nidfmgr create my-project\n\n# 3. Build with GCC (default)\ncd my-project\nidfmgr build\n\n# 4. Flash to device\nidfmgr flash --monitor\n```\n\n## Commands\n\n### Version Management\n\n#### `list`\nList available ESP-IDF versions from GitHub releases\n```bash\nidfmgr list\n```\n\n#### `install \u003cversion\u003e`\nInstall a specific ESP-IDF version\n```bash\n# Install specific version\nidfmgr install v5.1.2\n\n# Install latest version\nidfmgr install latest\n\n# Skip prerequisite checks\nidfmgr install v5.1.2 --skip-prereqs\n\n# Skip Clang toolchain installation\nidfmgr install v5.1.2 --skip-clang\n```\n\n#### `installed`\nList currently installed ESP-IDF versions\n```bash\nidfmgr installed\n```\n\n#### `remove [version...]`\nRemove installed ESP-IDF versions\n```bash\n# Remove specific version\nidfmgr remove v5.1.2\n\n# Remove multiple versions\nidfmgr remove v4.4.6 v5.0.0\n\n# Remove all versions\nidfmgr remove all\n\n# Skip confirmation prompt\nidfmgr remove v5.1.2 --force\n```\n\n### Project Management\n\n#### `create \u003cproject-name\u003e`\nCreate a new ESP-IDF project\n```bash\n# Basic project\nidfmgr create my-project\n\n# Arduino-based project\nidfmgr create my-arduino-project --arduino\n\n# Specific ESP-IDF version\nidfmgr create my-project --version v5.1.2\n\n# Specific target chip\nidfmgr create my-project --target esp32s3\n\n# Combined options\nidfmgr create my-project --arduino --target esp32s3 --version v5.1.2\n```\n\n**What gets created:**\n- `.espidf-version` - Tracks ESP-IDF version for this project\n- `.clangd` - LSP configuration for IDE support\n- `sdkconfig.defaults` - Sensible default configurations\n- `.gitignore` - Ignores build artifacts and generated files\n- Git repository with initial commit\n\n#### `activate`\n\nSet up the ESP-IDF environment for the current project automatically. This reads the `.espidf-version` file and outputs shell commands to configure environment variables.\n\nLinux/MacOS\n```bash\n# Activate environment in the current shell\neval \"$(idfmgr activate)\"\n```\n\nWindows (PowerShell)\n```powershell\n# Launch a PowerShell with ESP-IDF environment configured\nidfmgr activate\n```\n\n**What it does:**\n- Sets `IDF_PATH`, `PATH`, `IDF_PYTHON_ENV_PATH`, and other ESP-IDF variables (including `esp-clang` for LSP integration in your IDE)\n- Works for the project’s specific ESP-IDF version\n- Enables subsequent `idf.py` or `idfmgr exec` commands without manual export\n\n#### `info`\n\nShow project and environment information\n```bash\nidfmgr info\n```\n\n**Output includes:**\n- Current ESP-IDF version\n- Installation path\n- Build status (GCC/Clang)\n- Manual activation instructions\n- Usage examples\n\n### Building and Flashing\n\n#### `build`\nBuild the current project\n```bash\n# Build with GCC (default) - output: build/\nidfmgr build\n\n# Build with Clang - output: build-clang/\nidfmgr build --clang\n```\n\n#### `flash`\nFlash the built project to device\n```bash\n# Flash GCC build\nidfmgr flash\n\n# Flash Clang build\nidfmgr flash --clang\n\n# Flash and open serial monitor\nidfmgr flash --monitor\nidfmgr flash -m\n\n# Specify serial port\nidfmgr flash --port /dev/ttyUSB0\nidfmgr flash -p /dev/ttyUSB0\n\n# Combined options\nidfmgr flash --clang --monitor --port /dev/ttyUSB1\n```\n\n#### `exec [idf.py args...]`\n\nExecute any idf.py command with proper environment setup\n```bash\n# Open menuconfig\nidfmgr exec menuconfig\n\n# Monitor serial output\nidfmgr exec monitor\n\n# Monitor with specific port\nidfmgr exec -p /dev/ttyUSB0 monitor\n\n# Erase flash\nidfmgr exec erase-flash\n\n# Full clean\nidfmgr exec fullclean\n\n# App-only flash (faster)\nidfmgr exec app-flash\n```\n\nThis command is perfect for accessing idf.py features not wrapped by idfmgr, while still benefiting from automatic environment management.\n\n## Templates\n\n### Base Template\n\nStandard ESP-IDF project with:\n- Renamed `main.c` for consistency\n- Pre-configured `.clangd` for LSP support\n- Sensible defaults in `sdkconfig.defaults`\n- Git repository initialized\n\n### Arduino Template (`--arduino`)\n\nAll base template features plus:\n- Arduino-ESP32 as git submodule\n- Pre-configured CMake for Arduino support\n- `main.cpp` with Arduino-style `setup()` and `loop()`\n- Serial communication ready\n\n### IDF Component Template (`--component`)\n\nMinimal ESP-IDF registry component with:\n- Standard component folder structure (`include/` and `src/`)\n- `.gitignore` to ignore build artifacts and temporary files\n- Git repository initialized for version control\n- Ready to be added to any ESP-IDF project or published to the ESP-IDF registry\n\n---\n\n## Configuration\n\n### Environment Variables\n\n- `ESP_BASE` - Installation directory for ESP-IDF versions (default: `~/.esp`)\n```bash\nexport ESP_BASE=/custom/path/to/esp\n```\n\n### Per-Project Configuration\n\nEach project contains a `.espidf-version` file:\n```\nv5.1.2\n```\n\nThis ensures consistent ESP-IDF version across builds and between developers.\n\n---\n\n## Tips \u0026 Tricks\n\n### Dual Toolchain Workflow\n\nBuild and flash with both toolchains:\n```bash\nidfmgr build          # GCC -\u003e build/\nidfmgr build --clang  # Clang -\u003e build-clang/\n\nidfmgr flash          # Flash GCC build\nidfmgr flash --clang  # Flash Clang build\n```\n\n### Quick Arduino Development\n```bash\nidfmgr create blink --arduino --target esp32s3\ncd blink\nidfmgr build --clang\nidfmgr flash --clang --monitor\n```\n\n### Using idf.py Directly\n\nWhen you need features not wrapped by idfmgr, use `exec`:\n```bash\n# Instead of manually sourcing export.sh and running idf.py\nidfmgr exec menuconfig\n\n# Instead of:\n# . ~/esp/esp-idf-v5.1.2/export.sh\n# idf.py menuconfig\n```\n\nOr check the manual activation path:\n```bash\nidfmgr info\n# Shows: . ~/esp/esp-idf-v5.1.2/export.sh\n```\n\n## ESP IDF Project Structure\n```\nmy-project/\n├── .espidf-version          # ESP-IDF version tracking\n├── .clangd                  # LSP configuration\n├── .gitignore               # Build artifacts ignored\n├── sdkconfig.defaults       # Default configurations\n├── CMakeLists.txt           # Root CMake configuration\n├── main/\n│   ├── CMakeLists.txt       # Main component configuration\n│   └── main.c (or main.cpp) # Application entry point\n└── components/              # Custom components\n    └── arduino/             # (Arduino template only)\n```\n\n## License\n\nThis software is licensed under the [MIT license](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwarf1er%2Fidfmgr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwarf1er%2Fidfmgr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwarf1er%2Fidfmgr/lists"}