{"id":22712046,"url":"https://github.com/dynatrace-oss/dt-cli","last_synced_at":"2025-10-04T03:49:27.717Z","repository":{"id":37856312,"uuid":"356185419","full_name":"dynatrace-oss/dt-cli","owner":"dynatrace-oss","description":"Command line tool for Dynatrace","archived":false,"fork":false,"pushed_at":"2024-11-13T17:11:52.000Z","size":378,"stargazers_count":17,"open_issues_count":3,"forks_count":12,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-16T08:07:59.225Z","etag":null,"topics":["cli","dynatrace","extensions"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/dt-cli/","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/dynatrace-oss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-09T07:54:32.000Z","updated_at":"2024-11-13T17:11:56.000Z","dependencies_parsed_at":"2024-11-13T18:19:29.979Z","dependency_job_id":"486a7de4-47e8-4a0c-92c8-5676fa2affe1","html_url":"https://github.com/dynatrace-oss/dt-cli","commit_stats":{"total_commits":174,"total_committers":14,"mean_commits":"12.428571428571429","dds":0.6666666666666667,"last_synced_commit":"d5c4a93709d4dee131f42784b9d03fb4f574e083"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/dynatrace-oss/dt-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynatrace-oss%2Fdt-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynatrace-oss%2Fdt-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynatrace-oss%2Fdt-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynatrace-oss%2Fdt-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dynatrace-oss","download_url":"https://codeload.github.com/dynatrace-oss/dt-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynatrace-oss%2Fdt-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261212074,"owners_count":23125560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","dynatrace","extensions"],"created_at":"2024-12-10T13:09:15.152Z","updated_at":"2025-10-04T03:49:22.697Z","avatar_url":"https://github.com/dynatrace-oss.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dt-cli — Dynatrace developer's toolbox\n\nDynatrace CLI is a command line utility that assists in signing, building and uploading\nextensions for Dynatrace Extension Framework 2.0.\n\n\u003cp\u003e\n  \u003ca href=\"https://pypi.org/project/dt-cli/\"\u003e\u003cimg alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/dt-cli?color=blue\u0026logo=python\u0026logoColor=white\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/dt-cli/\"\u003e\u003cimg alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/dt-cli?logo=python\u0026logoColor=white\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/dynatrace-oss/dt-cli/actions/workflows/test.yml\"\u003e\u003cimg alt=\"GitHub Workflow Status (main branch)\" src=\"https://img.shields.io/github/actions/workflow/status/dynatrace-oss/dt-cli/test.yml?branch=main\u0026logo=github\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Features\n\n* Work with Extensions 2.0\n  * Build and sign extensions from source\n  * Generate CA certificates for development\n  * Generate development certificates for extension signing\n  * Validate and upload extension to Dynatrace\n* *(planned) Perform various API requests from command line*\n\n## FAQ\n\n**What's the difference between monaco and dt-cli?**\n\n* [Monaco](https://github.com/Dynatrace/dynatrace-configuration-as-code) is a **mon**itoring configuration **a**s **co**de solution that allows you to configure Dynatrace environment using GitOps approach. It follows a declarative approach: define what you need and the tool will ensure the correct configuration.\n* `dt` command line, on the other hand, is a tool for performing imperative step-by-step configuration. You explicitly invoke commands to modify the state.\n\n## Installation\n\n```shell\npip install dt-cli\n```\n\n## Usage\n\n1. *(optional) If you don't already have a developer certificate*\n           \n   1. Generate CA key and certificate\n\n      ```shell\n      $ dt ext genca\n      CA private key passphrase []: \n      Repeat for confirmation: \n      Generating CA...\n\n      Wrote CA private key: ./ca.key\n      Wrote CA certificate: ./ca.pem\n      ```\n\n   1. Generate developer key and certificate from the CA\n\n      ```shell\n      $ dt ext generate-developer-pem --ca-crt ca.pem --ca-key ca.key -o dev.pem\n      Name: Ext\n      Loading CA private key ca.key\n      Loading CA certificate ca.pem\n      Generating developer certificate...\n      Wrote developer certificate: dev.pem\n      Wrote developer private key: dev.pem\n      ```\n\n1. Upload your CA certificate to the Dynatrace credential vault\n\n   See: [Add your root certificate to the Dynatrace credential vault](https://www.dynatrace.com/support/help/extend-dynatrace/extensions20/sign-extension/#add-your-root-certificate-to-the-dynatrace-credential-vault)\n\n1. Upload your CA certificate to OneAgent or ActiveGate hosts that will run your extension\n\n   See: [Uplaod your root certificate to OneAgent or ActiveGate](https://docs.dynatrace.com/docs/extend-dynatrace/extensions20/sign-extension#upload)\n\n1. Build and sign the extension\n\n   ```shell\n   $ dt ext assemble\n   Building extension.zip from extension/\n   Adding file: extension/dashboards/overview_dashboard.json as dashboards/overview_dashboard.json\n   Adding file: extension/extension.yaml as extension.yaml\n   Adding file: extension/activationSchema.json as activationSchema.json\n\n   $ dt ext sign --key dev.pem\n   Successfully signed the extension bundle at bundle.zip\n   ```\n\n1. *(optional) Validate the assembled and signed bundle with your Dynatrace tenant*\n\n   ```shell\n   $ dt ext validate bundle.zip --tenant-url https://\u003ctenantid\u003e.live.dynatrace.com --api-token \u003ctoken\u003e\n   Extension validation successful!\n   ```\n\n1. Upload the extension to your Dynatrace tenant\n\n   ```shell\n   $ dt ext upload bundle.zip --tenant-url https://\u003ctenantid\u003e.live.dynatrace.com --api-token \u003ctoken\u003e\n   Extension upload successful!\n   ```\n\n## Using dt-cli from your Python code\n\nYou may want to use some commands implemented by `dt-cli` directly in your Python code, e.g. to automatically sign your extension in a CI environment.\nHere's an example of building an extension programatically, it assumes `dtcli` package is already installed and available in your working environment.\n\n\n```python\nfrom dtcli import building\n\n\nbuilding.build_extension(\n    extension_dir_path = './extension',\n    extension_zip_path = './extension.zip',\n    extension_zip_sig_path = './extension.zip.sig',\n    target_dir_path = './dist',\n    certificate_file_path = './developer.crt',\n    private_key_file_path = './developer.key',\n    dev_passphrase=None,\n    keep_intermediate_files=False,\n)\n```\n\n## Development\n\nSee our [CONTRIBUTING](CONTRIBUTING.md) guidelines and instructions.\n\n## Contributions\n\nYou are welcome to contribute using Pull Requests to the respective\nrepository. Before contributing, please read our\n[Code of Conduct](https://github.com/dynatrace-oss/dt-cli/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\n`dt-cli` is an Open Source Project. Please see\n[LICENSE](https://github.com/dynatrace-oss/dt-cli/blob/main/LICENSE) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynatrace-oss%2Fdt-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdynatrace-oss%2Fdt-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynatrace-oss%2Fdt-cli/lists"}