{"id":5690,"library":"pyarmor-cli-core","title":"Pyarmor CLI Core","description":"Pyarmor-cli-core is the foundational library for Pyarmor, providing the platform-specific extension modules (like `pytransform3`) necessary for obfuscating Python scripts and executing obfuscated code. It serves primarily as a dependency for the main `pyarmor` CLI tool. As of its latest PyPI release, the current version is 8.1.1. Releases for `pyarmor-cli-core` are tightly coupled with `pyarmor` releases, offering updated binaries for new Python versions and features.","status":"active","version":"8.1.1","language":"en","source_language":"en","source_url":"https://github.com/dashingsoft/pyarmor","tags":["obfuscation","security","cli","runtime","code protection"],"install":[{"cmd":"pip install pyarmor-cli-core","lang":"bash","label":"Install pyarmor-cli-core"}],"dependencies":[],"imports":[{"note":"pytransform3 is the core C extension module provided by `pyarmor-cli-core`. While most users interact with the `pyarmor` CLI tool, this module is directly used by obfuscated scripts at runtime or for programmatic embedding of Pyarmor's functionality. Direct interaction by end-users is less common.","symbol":"pytransform3","correct":"import pytransform3"}],"quickstart":{"code":"import pytransform3\n\ntry:\n    # Verify the pytransform3 module is loaded and get its version\n    runtime_version = pytransform3.pyarmor_version()\n    print(f\"Pytransform3 module loaded successfully. Version: {'.'.join(map(str, runtime_version))}\")\n\n    # Note: pyarmor-cli-core itself does not expose obfuscation functions directly.\n    # It provides the runtime environment and core binaries used by the 'pyarmor' tool.\n    # To obfuscate scripts, you typically use the 'pyarmor' package/CLI:\n    # (Requires: pip install pyarmor)\n    # from pyarmor import pyarmor_build\n    # pyarmor_build.obfuscate('your_script.py')\n\nexcept ImportError:\n    print(\"Error: pytransform3 module not found. Is pyarmor-cli-core installed correctly?\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")","lang":"python","description":"This quickstart demonstrates how to verify that the `pytransform3` module, provided by `pyarmor-cli-core`, is correctly installed and accessible. It checks the module's version, confirming its presence in your Python environment."},"warnings":[{"fix":"Update CLI usage to the new command set. Refer to the official Pyarmor documentation for `pyarmor 8.x` or newer for updated command syntax.","message":"For Pyarmor 8.0+ (and thus `pyarmor-cli-core` 8.x onwards), the `pyarmor init` command has been removed, and the CLI interface has been streamlined to `gen`, `reg`, `cfg` commands only. Old scripts or automation relying on removed commands will fail.","severity":"breaking","affected_versions":"Pyarmor 8.0+, compatible pyarmor-cli-core versions"},{"fix":"Follow instructions on the Pyarmor documentation (e.g., 'What need to do after upgrading Pyarmor' section) to obtain new CI or update Group License registration files when upgrading to Pyarmor 9.2 or newer.","message":"Upgrading to Pyarmor 9.2+ (and its compatible `pyarmor-cli-core` backend) requires re-requesting or updating registration files for CI and Group Licenses due to changes in license binding mechanisms. Older registration files will not work with Pyarmor 9.2+.","severity":"breaking","affected_versions":"Pyarmor 9.2+, compatible pyarmor-cli-core versions"},{"fix":"Ensure all configuration and project rule files are saved in UTF-8 encoding. If a different encoding is strictly necessary, check Pyarmor documentation for options to explicitly specify encoding, if available.","message":"Configuration files and project rule files in Pyarmor 9.2.2+ (and compatible `pyarmor-cli-core`) now default to UTF-8 encoding. Scripts or tools relying on different default encodings for these files may encounter `UnicodeDecodeError` or other encoding-related issues.","severity":"gotcha","affected_versions":"Pyarmor 9.2.2+, compatible pyarmor-cli-core versions"},{"fix":"Always use the latest compatible `pyarmor-cli-core` package for your specific Pyarmor version and Python interpreter. Refer to Pyarmor release notes for fixes related to specific Python versions or obfuscation modes, and upgrade accordingly.","message":"`pyarmor-cli-core` (as part of the Pyarmor ecosystem) can experience runtime crashes or unexpected behavior with specific Python versions (e.g., 3.12, 3.13) or advanced obfuscation modes (e.g., BCC, RTF) if not kept up-to-date. Many such compatibility and stability issues were fixed in newer `pyarmor` 9.x releases.","severity":"gotcha","affected_versions":"Older Pyarmor 8.x releases, and compatible pyarmor-cli-core versions (e.g., 8.1.1) when used with newer Python interpreters or advanced modes."}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}