{"id":37080600,"url":"https://github.com/codemagic-ci-cd/cli-tools","last_synced_at":"2026-02-13T13:28:25.697Z","repository":{"id":37444286,"uuid":"218302248","full_name":"codemagic-ci-cd/cli-tools","owner":"codemagic-ci-cd","description":"Various utilities to managing Android and iOS app builds, code signing, and deployment.","archived":false,"fork":false,"pushed_at":"2025-11-07T11:44:07.000Z","size":100398,"stargazers_count":419,"open_issues_count":12,"forks_count":52,"subscribers_count":7,"default_branch":"master","last_synced_at":"2026-01-05T21:49:02.396Z","etag":null,"topics":["android","app-store","devops","google-play","ios","mobile","testflight"],"latest_commit_sha":null,"homepage":"https://codemagic.io/start/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codemagic-ci-cd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-10-29T14:07:40.000Z","updated_at":"2026-01-05T12:05:01.000Z","dependencies_parsed_at":"2024-01-18T15:25:45.115Z","dependency_job_id":"f7f29373-e199-4d5f-a704-a8f15d5ca5cf","html_url":"https://github.com/codemagic-ci-cd/cli-tools","commit_stats":{"total_commits":725,"total_committers":14,"mean_commits":"51.785714285714285","dds":0.5351724137931034,"last_synced_commit":"7e4f8e6dbc699ecc9a0e5a470936a89afea551ea"},"previous_names":[],"tags_count":266,"template":false,"template_full_name":null,"purl":"pkg:github/codemagic-ci-cd/cli-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemagic-ci-cd%2Fcli-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemagic-ci-cd%2Fcli-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemagic-ci-cd%2Fcli-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemagic-ci-cd%2Fcli-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemagic-ci-cd","download_url":"https://codeload.github.com/codemagic-ci-cd/cli-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemagic-ci-cd%2Fcli-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"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":["android","app-store","devops","google-play","ios","mobile","testflight"],"created_at":"2026-01-14T09:47:02.054Z","updated_at":"2026-02-13T13:28:25.678Z","avatar_url":"https://github.com/codemagic-ci-cd.png","language":"Python","readme":"# Codemagic CLI Tools\n\nCodemagic CLI Tools are a set of command-line utilities for managing Android and iOS app builds,\ncode signing, and deployment. The tools are used to power mobile app builds at [codemagic.io](https://codemagic.io) but can be also used in other virtual environments or locally.\n\n# Installing\n\nCodemagic CLI Tools are available on [PyPI](https://pypi.org/project/codemagic-cli-tools/)\nand can be installed and updated using [pip](https://pip.pypa.io/en/stable/getting-started/).\n\n```\npython -m pip install codemagic-cli-tools\n```\n\nThe package requires Python version 3.8+.\n\n# Command line usage\n\nInstalling the package adds the following executables to your path:\n\n- [`android-app-bundle`](https://github.com/codemagic-ci-cd/cli-tools/blob/master/docs/android-app-bundle/README.md)\n- [`android-keystore`](https://github.com/codemagic-ci-cd/cli-tools/blob/master/docs/android-keystore/README.md)\n- [`app-store-connect`](https://github.com/codemagic-ci-cd/cli-tools/blob/master/docs/app-store-connect/README.md)\n- [`codemagic-cli-tools`](https://github.com/codemagic-ci-cd/cli-tools/blob/master/docs/codemagic-cli-tools/README.md)\n- [`git-changelog`](https://github.com/codemagic-ci-cd/cli-tools/blob/master/docs/git-changelog/README.md)\n- [`google-play`](https://github.com/codemagic-ci-cd/cli-tools/blob/master/docs/google-play/README.md)\n- [`keychain`](https://github.com/codemagic-ci-cd/cli-tools/blob/master/docs/keychain/README.md)\n- [`universal-apk`](https://github.com/codemagic-ci-cd/cli-tools/blob/master/docs/universal-apk/README.md)\n- [`xcode-project`](https://github.com/codemagic-ci-cd/cli-tools/blob/master/docs/xcode-project/README.md)\n\nOnline documentation for all installed executables can be found under\n[`docs`](https://github.com/codemagic-ci-cd/cli-tools/tree/master/docs#cli-tools).\n\nAlternatively, you could see the documentation by using `--help` option from command line:\n\n```bash\n\u003ccommand\u003e --help\n```\nto see general description and subcommands for the tool, or\n\n```bash\n\u003ccommand\u003e \u003csubcommand\u003e --help\n```\nto get detailed information of the subcommand.\n\n**For example:**\n\n```\n$ keychain create --help\nusage: keychain create [-h] [--log-stream {stderr,stdout}] [--no-color] [--version] [-s] [-v] [-pw PASSWORD] [-p PATH]\n\nCreate a macOS keychain, add it to the search list\n\noptional arguments:\n  -h, --help            show this help message and exit\n\nOptional arguments for command create:\n  -pw PASSWORD, --password PASSWORD\n                        Keychain password. Alternatively to entering PASSWORD in plaintext, it may also be specified using the \"@env:\" prefix followed by an environment variable name, or the \"@file:\" prefix followed by a path to the file containing the value. Example: \"@env:\u003cvariable\u003e\" uses the value in the environment variable named \"\u003cvariable\u003e\", and \"@file:\u003cfile_path\u003e\" uses the value from the file at \"\u003cfile_path\u003e\". [Default: '']\n\nOptions:\n  --log-stream {stderr,stdout}\n                        Log output stream. [Default: stderr]\n  --no-color            Do not use ANSI colors to format terminal output\n  --version             Show tool version and exit\n  -s, --silent          Disable log output for commands\n  -v, --verbose         Enable verbose logging for commands\n\nOptional arguments for keychain:\n  -p PATH, --path PATH  Keychain path. If not provided, the system default keychain will be used instead\n```\n\n# Usage from Python\n\nIn addition to the command line interface, the package also provides a mirroring Python API.\nAll utilities that are available as CLI tools are accessible from Python in package\n[`codemagic.tools`](https://github.com/codemagic-ci-cd/cli-tools/blob/v0.28.0/src/codemagic/tools/__init__.py).\nThe CLI actions are instance methods that are decorated by the [`action`](https://github.com/codemagic-ci-cd/cli-tools/blob/v0.28.0/src/codemagic/cli/cli_app.py#L385)\ndecorator. For example, you can use the [`Keychain`](https://github.com/codemagic-ci-cd/cli-tools/blob/v0.28.0/src/codemagic/tools/keychain.py#L111)\ntool from Python source as follows:\n\n```python\nIn [1]: from pathlib import Path\n\nIn [2]: from codemagic.tools import Keychain\n\nIn [3]: Keychain().get_default()\nOut[3]: PosixPath('/Users/priit/Library/Keychains/login.keychain-db')\n\nIn [4]: keychain = Keychain(Path(\"/tmp/new.keychain\"))\n\nIn [5]: keychain.create()\nOut[5]: PosixPath('/tmp/new.keychain')\n\nIn [6]: keychain.make_default()\n\nIn [7]: Keychain().get_default()\nOut[7]: PosixPath('/private/tmp/new.keychain')\n```\n\n# Development\n\nThis project uses [uv](https://docs.astral.sh/uv/) to manage dependencies. Before starting development, please ensure that your\nmachine has `uv` available. Installation instructions can be found from their\n[docs](https://docs.astral.sh/uv/getting-started/installation/).\n\nAssuming you've already cloned the [repository](https://github.com/codemagic-ci-cd/cli-tools/)\nitself, or a fork of it, you can get started by running\n\n```shell\nuv sync\n```\n\nThis will install all required dependencies specified in the `uv.lock` file.\n\nThe source code of the project lives inside the `src` directory and tests are\nimplemented in the `tests` directory.\n\n### Code formatting and linting rules\n\nAutomatic code formatting is done with the [Ruff Formatter](https://docs.astral.sh/ruff/formatter/).\nInvoke formatting checks from repository root directory with\n\n```shell\nuv run ruff format --check .\n```\n\nLinting rules are enforced using the [Ruff Linter](https://docs.astral.sh/ruff/linter/).\nChecks can be started from repository root with\n\n```shell\nuv run ruff check .\n```\n\n### Static type checks\n\nA huge portion of the Python source code has type hints, and all public methods or functions\nare expected to have type hints. Static type checks of the source code are performed using\n[Mypy](http://mypy-lang.org/) from the repository root by running\n\n```shell\nuv run mypy .\n```\n\n### Running tests\n\n[Pytest](https://docs.pytest.org/en/stable/) is used as the framework. As mentioned above,\ntests are stored in the `tests` directory, separated from package source code. Test code layout\nmirrors the structure of the `codemagic` package in the source directory.\n\nTests can be started by running the following command from the repository root:\n\n```shell\nuv run pytest\n```\n\nNote that tests that target [App Store Connect API](https://developer.apple.com/documentation/appstoreconnectapi) or\n[Google Play Developer API](https://developers.google.com/android-publisher) live endpoints\nare skipped by default for obvious reasons. They can be enabled (either for TDD or other reasons)\nby setting the environment variable `RUN_LIVE_API_TESTS` to any non-empty value.\n\nNote that for the tests to run successfully, you'd have to define the following environment variables:\n- For App Store Connect:\n    ```shell\n    export TEST_APPLE_KEY_IDENTIFIER=...  # Key ID\n    export TEST_APPLE_ISSUER_ID=...  # Issued ID\n    ```\n    And either of the two:\n    ```bash\n    export TEST_APPLE_PRIVATE_KEY_PATH=...  # Path to private key in .p8 format\n    export TEST_APPLE_PRIVATE_KEY_CONTENT=...  # Content of .p8 private key\n    ```\n  Those can be obtained from [App Store Connect -\u003e Users and Access -\u003e Keys](https://appstoreconnect.apple.com/access/api).\n  For more information follow Apple's official documentation about [Creating API Keys for App Store Connect API](https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api).\n\n- For Google Play:\n    ```shell\n    export TEST_GCLOUD_PACKAGE_NAME=... # Package name (Ex: com.google.example)'\n    ```\n    And either of the two:\n    ```shell\n    export TEST_GCLOUD_SERVICE_ACCOUNT_CREDENTIALS_PATH=... # Path to gcloud service account credentials with `JSON` key type\n    export TEST_GCLOUD_SERVICE_ACCOUNT_CREDENTIALS_CONTENT=... # Content of gcloud service account credentials with `JSON` key type\n    ```\n\n- For Firebase:\n    Either of the two:\n    ```shell\n    export TEST_FIREBASE_SERVICE_ACCOUNT_CREDENTIALS_PATH=... # Path to gcloud service account credentials with `JSON` key type\n    export TEST_FIREBASE_SERVICE_ACCOUNT_CREDENTIALS_CONTENT=... # Content of gcloud service account credentials with `JSON` key type\n    ```\n\n### Pre-commit hooks\n\nOptionally, the [pre-commit](https://pre-commit.com/) framework can be used to ensure that\nthe source code updates are compliant with all the rules mentioned above.\n\nInstallation instructions are available in their [docs](https://pre-commit.com/#installation).\n\nThe repository already contains pre-configured `.pre-commit-config.yaml`, so to enable\nthe hooks, just run\n\n```shell\npre-commit install\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemagic-ci-cd%2Fcli-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemagic-ci-cd%2Fcli-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemagic-ci-cd%2Fcli-tools/lists"}