{"id":20397777,"url":"https://github.com/belingud/py-flagsmith-cli","last_synced_at":"2025-04-12T13:11:11.412Z","repository":{"id":242368606,"uuid":"809376860","full_name":"belingud/py-flagsmith-cli","owner":"belingud","description":"flagsmith-cli Python Implementation","archived":false,"fork":false,"pushed_at":"2024-12-24T11:37:51.000Z","size":128,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T18:57:46.199Z","etag":null,"topics":["flagsmith","flagsmith-cli","py-flagsmith-cli","python","python-cli"],"latest_commit_sha":null,"homepage":"","language":"Python","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/belingud.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2024-06-02T14:19:15.000Z","updated_at":"2024-12-24T11:37:55.000Z","dependencies_parsed_at":"2024-06-02T15:46:18.232Z","dependency_job_id":"efd0df58-e72e-45a4-8071-a15d26a2b239","html_url":"https://github.com/belingud/py-flagsmith-cli","commit_stats":null,"previous_names":["belingud/py-flagsmith-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belingud%2Fpy-flagsmith-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belingud%2Fpy-flagsmith-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belingud%2Fpy-flagsmith-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belingud%2Fpy-flagsmith-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/belingud","download_url":"https://codeload.github.com/belingud/py-flagsmith-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571883,"owners_count":21126522,"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":["flagsmith","flagsmith-cli","py-flagsmith-cli","python","python-cli"],"created_at":"2024-11-15T04:16:43.927Z","updated_at":"2025-04-12T13:11:11.368Z","avatar_url":"https://github.com/belingud.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# py-flagsmith-cli\n\n\n[![PyPI version](https://badge.fury.io/py/py-flagsmith-cli.svg)](https://pypi.org/project/py-flagsmith-cli/) [![License](https://img.shields.io/github/license/belingud/py-flagsmith-cli.svg)](https://opensource.org/licenses/MIT) ![Static Badge](https://img.shields.io/badge/language-Python-%233572A5) ![PyPI - Downloads](https://img.shields.io/pypi/dm/py-flagsmith-cli?logo=python)\n![Pepy Total Downlods](https://img.shields.io/pepy/dt/py-flagsmith-cli?logo=python)\n\n\n[![CodeQL](https://github.com/belingud/py-flagsmith-cli/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/belingud/py-flagsmith-cli/actions/workflows/github-code-scanning/codeql) [![Coverage Status](https://coveralls.io/repos/github/belingud/py-flagsmith-cli/badge.svg?branch=master)](https://coveralls.io/github/belingud/py-flagsmith-cli?branch=master)\n\nflagsmith-cli Python Implementation.\n\nHomepage: https://github.com/belingud/py-flagsmith-cli\n\nYou can install with pip:\n\n```shell\npip install py-flagsmith-cli\n```\n\nRecommand use `pipx`:\n\n```shell\npipx install py-flagsmith-cli\n```\n\nAnd use in cmd:\n\n```shell\npysmith -h\n\n Usage: pysmith [OPTIONS] COMMAND [ARGS]...\n\n╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ --install-completion            Install completion for the current shell.                                    │\n│ --show-completion               Show completion for the current shell, to copy it or customize the           │\n│                                 installation.                                                                │\n│ --help                -h        Show this message and exit.                                                  │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ get       Retrieve flagsmith features from the Flagsmith API and output them to file.                        │\n│ showenv   Show the current flagsmith environment setup. Including environment id and api host.               │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n```\n\nInclude two commands `get` and `showenv`.\n\n`pysmith get`\n\n\n```shell\npysmith get -h\n\n Usage: pysmith get [OPTIONS] [ENVIRONMENT]\n\n Retrieve flagsmith features from the Flagsmith API and output them to file.\n\n EXAMPLES\n $ pysmith get \u003cENVIRONMENT_API_KEY\u003e\n\n $ FLAGSMITH_ENVIRONMENT=x pysmith get\n\n $ pysmith get \u003cenvironment\u003e\n\n $ pysmith get -o ./my-file.json\n\n $ pysmith get -a https://flagsmith.example.com/api/v1/\n\n $ pysmith get -i flagsmith_identity\n\n $ pysmith get -np\n\n╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────────────────╮\n│   environment      [ENVIRONMENT]  The flagsmith environment key to use, defaults to the environment variable │\n│                                   FLAGSMITH_ENVIRONMENT                                                      │\n│                                   [env var: FLAGSMITH_ENVIRONMENT]                                           │\n│                                   [default: None]                                                            │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ --output     -o       \u003ctext\u003e  The file path output [default: None]                                           │\n│ --api        -a       \u003ctext\u003e  The API URL to fetch the feature flags from                                    │\n│                               [default: https://edge.api.flagsmith.com/api/v1/]                              │\n│ --identity   -i       \u003ctext\u003e  The identity for which to fetch feature flags [default: None]                  │\n│ --no-pretty  -np      \u003cflag\u003e  Do not prettify the output JSON                                                │\n│ --entity     -e       \u003ctext\u003e  The entity to fetch, this will either be the flags or an environment document  │\n│                               used for Local Evaluation Mode. Refer to                                       │\n│                               https://docs.flagsmith.com/clients/server-side.                                │\n│                               [default: flags]                                                               │\n│ --help       -h               Show this message and exit.                                                    │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n```\n\n`pysmith showenv`\n\n\n```shell\npysmith showenv -h\n\n Usage: pysmith showenv [OPTIONS]\n\n Show the current flagsmith environment setup. Including environment id and api host.\n\n EXAMPLES:\n\n $ pysmith showenv\n Current flagsmith env setup\u003e\u003e\u003e\n flagsmith environment ID: \u003cenvironment-id\u003e\n flagsmith host: \u003capi-host\u003e\n\n╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ --help  -h        Show this message and exit.                                                                │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n```\n\n**Note**: There is some differences with `flagsmith-cli`:\n\n1. `pysmith` will not save into json file if you don't specify `-o`\n2. `pysmith` will pretty json output as default, use `-np` to disable it. `flagsmith-cli` does the opposite\n\nRefer to:\n\n1. https://docs.flagsmith.com/clients/CLI\n2. https://github.com/Flagsmith/flagsmith-cli\n\n\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fbelingud%2Fpy-flagsmith-cli.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fbelingud%2Fpy-flagsmith-cli?ref=badge_large)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelingud%2Fpy-flagsmith-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelingud%2Fpy-flagsmith-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelingud%2Fpy-flagsmith-cli/lists"}