{"id":18896476,"url":"https://github.com/descope/descopecli","last_synced_at":"2025-04-07T07:10:47.196Z","repository":{"id":224417818,"uuid":"762384373","full_name":"descope/descopecli","owner":"descope","description":"A command line utility for performing common tasks on Descope projects","archived":false,"fork":false,"pushed_at":"2025-03-27T20:56:10.000Z","size":212,"stargazers_count":91,"open_issues_count":2,"forks_count":4,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-31T06:01:45.660Z","etag":null,"topics":["authentication","authorization","cli","descope"],"latest_commit_sha":null,"homepage":"https://docs.descope.com","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/descope.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audit/cmd.go","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-23T17:05:03.000Z","updated_at":"2025-03-27T20:56:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"02d9f602-701e-430d-b0c5-756b1a232cf5","html_url":"https://github.com/descope/descopecli","commit_stats":null,"previous_names":["descope/descopecli"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/descope%2Fdescopecli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/descope%2Fdescopecli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/descope%2Fdescopecli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/descope%2Fdescopecli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/descope","download_url":"https://codeload.github.com/descope/descopecli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608151,"owners_count":20965952,"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":["authentication","authorization","cli","descope"],"created_at":"2024-11-08T08:34:06.724Z","updated_at":"2025-04-07T07:10:47.170Z","avatar_url":"https://github.com/descope.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/descope/descopecli\"\u003e\n    \u003cimg src=\".github/images/descope-logo.png\" alt=\"Descope Logo\" width=\"160\" height=\"160\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eDescope CLI\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    A command line tool for managing your Descope project \n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n## About\n\nThe `descope` command line tool provides a convenient way to perform common tasks on your Descope project by leveraging Descope's management APIs.\n\n* Create and modify project entities such as users, tenants and access keys.\n* Manage project settings and configurations using snapshots that can be exported, validated and imported into other projects.\n* Search and display audit logs for projects.\n* Supports JSON output for easy integration into scripts and CI/CD workflows.\n\n\u003cbr/\u003e\n\n## Installation\n\n### All Platforms\n\nThe `descope` tool is available as a downloadable binary from the [releases page](https://github.com/descope/descopecli/releases/latest).\n\n### Debian/Ubuntu\n\nInstall `descope` using APT:\n\n```bash\nsudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys e8365d8513142909\necho \"deb https://descope.github.io/packages stable main\" | sudo tee /etc/apt/sources.list.d/descope.list\nsudo apt-get update\nsudo apt-get install descope\n```\n\n### Fedora/CentOS\n\nYou can install `descope` using DNF by adding the Descope repository:\n\n```bash\nsudo dnf config-manager --add-repo https://descope.github.io/packages/descope.repo\nsudo dnf install descope\n```\n\n### Build from Source\n\nYou can build the `descope` command line tool directly with the `go` compiler:\n\n1.  Verify that you have Go 1.21 or newer installed, and if not, follow the instructions on the [Go website](https://go.dev/dl):\n\n    ```bash\n    go version\n    ```\n\n2.  Clone or download the repository:\n\n    ```bash\n    git clone https://github.com/descope/descopecli\n    cd descopecli\n    ```\n\n3.  Install `descope` with `make install`:\n\n    ```bash\n    # installs to $GOPATH/bin by default\n    make install\n    ```\n\n\u003cbr/\u003e\n\n## Getting Started\n\n### Requirements\n\n-   The Descope project's `Project ID` is required by `descope` to know which project\n    to work with. You can find it in the [Project section](https://app.descope.com/settings/project)\n    in the Descope console.\n-   You'll also need a valid Descope management key for the above project. You can create\n    a management key in the [Company section](https://app.descope.com/settings/company) in\n    the Descope console.\n\n### Usage\n\nAll `descope` commands expect the Descope management key to be provided in\nthe `DESCOPE_MANAGEMENT_KEY` environment variable. You'll have to provide your\nDescope project's unique id either in the `DESCOPE_PROJECT_ID` environment\nvariable or as a command argument, depending on the command.\n\n```bash\nexport DESCOPE_PROJECT_ID='P...'\nexport DESCOPE_MANAGEMENT_KEY='K...'\ndescope --help\n```\n\n```\nA command line utility for working with the Descope management APIs\n\nUsage:\n  descope [command]\n\nEntity Commands:\n  access-key  Commands for creating and managing access keys\n  apps        Commands for creating and managing applications and integrations\n  tenant      Commands for creating and managing tenants\n  user        Commands for creating and managing users\n\nProject Commands:\n  audit       Commands for working with audit logs\n  project     Commands for managing projects\n\nAdditional Commands:\n  completion  Generate the autocompletion script for the specified shell\n  help        Help about any command\n```\n\n\u003cbr/\u003e\n\n## Examples\n\n### Tenants\n\n#### Create a tenant\n\n```bash\n# creates a new tenant with a predefined tenantId\ndescope tenant create 'AcmeCorp' --id 'acmecorp'\n```\n\n```\n* Created new tenant with id: acmecorp\n```\n\n#### List all tenants\n\n```bash\n# use the --json option to get structured JSON output from any command\ndescope tenant load-all --json\n```\n\n```json\n{\n    \"count\": 1,\n    \"ok\": true,\n    \"tenants\": [\n        {\n            \"id\": \"acmecorp\",\n            \"name\": \"AcmeCorp\",\n            \"selfProvisioningDomains\": [],\n            \"authType\": \"none\"\n        }\n    ]\n}\n```\n\n### Users\n\n#### Create a user in a tenant\n\n```bash\n# creates a user and sends them an invitation if configured in the Descope console\ndescope user create 'andyr@example.com' --name 'Andy Rhoads' -t 'acmecorp' --json\n```\n\n```json\n{\n    \"ok\": true,\n    \"user\": {\n        \"name\": \"Andy Rhoads\",\n        \"email\": \"andyr@example.com\",\n        \"userId\": \"U2eY8ZRNUlC9IKqLGzmAww7qgK0T\",\n        \"loginIds\": [\"andyr@example.com\"],\n        \"verifiedEmail\": true,\n        \"userTenants\": [\n            {\n                \"tenantId\": \"acmecorp\",\n                \"tenantName\": \"AcmeCorp\"\n            }\n        ],\n        \"status\": \"invited\",\n        \"createdTime\": 1712070205\n    }\n}\n```\n\n#### List all users\n\n```bash\n# returns a page of user results\ndescope user load-all --limit 10 --page 0\n```\n\n```\n* Loaded 3 users\n  - User 0: { \"name\": ... }\n  - User 1: { \"name\": ... }\n  - User 2: { \"name\": ... }\n```\n\n### Project\n\n#### Manage project settings\n\n```bash\n# to prevent mistakes some project commands require the projectId as\n# an argument, rather than as an environment variable\n\n# export a snapshot of all the project's settings and configurations\ndescope project snapshot export 'P2abc...' --path ./descope_export\n\n# import the exported snapshot from the first project into another project\ndescope project snapshot import 'P2xyz...' --path ./descope_export\n```\n\n#### Search audit records\n\n```bash\n# searches for any audit records about the user we created above\ndescope audit search 'andyr' --json\n```\n\n```json\n{\n    \"count\": 1,\n    \"ok\": true,\n    \"records\": [\n        {\n            \"action\": \"UserCreated\",\n            \"loginIds\": [\"andyr@example.com\"]\n        }\n    ]\n}\n```\n\n\u003cbr/\u003e\n\n## Support\n\n#### Contributing\n\nIf anything is missing or not working correctly please open an issue or pull request.\n\n#### Learn more\n\nTo learn more please see the [Descope documentation](https://docs.descope.com).\n\n#### Contact us\n\nIf you need help you can hop on our [Slack community](https://www.descope.com/community) or send an email to [Descope support](mailto:support@descope.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdescope%2Fdescopecli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdescope%2Fdescopecli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdescope%2Fdescopecli/lists"}