[![PyPI version](https://img.shields.io/pypi/v/cognitoctl.svg?style=plastic)](https://pypi.org/project/cognitoctl/)
![PyPI - Downloads](https://img.shields.io/pypi/dm/cognitoctl?style=plastic)
# cognitoctl
A command-line tool for interacting with AWS Cognito, designed to simplify user, group, and authentication management.
## Table of Contents
1. [Description](#description)
2. [Requirements](#requirements)
3. [Installation](#installation)
4. [Getting Started](#getting-started)
5. [Usage](#usage)
- [Available Commands](#available-commands)
6. [Contributing](#contributing)
---
## Description
This CLI enables easy management of **users and groups in AWS Cognito**. Features include:
- Group creation and management.
- User registration, authentication, and management.
- Password recovery and token updates.
It’s designed for developers needing quick integration with AWS Cognito from the command line.
## Requirements
Before using this CLI, ensure the following prerequisites are met:
- **Python 3.10+**
- **AWS CLI configured** with the necessary credentials to access Cognito.
- Sufficient AWS permissions to manage Cognito.
## Installation
1. Install package:
```bash
pip install cognitoctl
```
## Getting Started
### Initialize the CLI
To use the CLI, you must initialize it with at least one **Cognito project**. Use the init command to set up a project. You can either input configuration details interactively or provide them via a configuration file.
You can use the --help option to get help on parameters and commands.
#### Interactive Mode:
```bash
cognitoctl init
```
You will be prompted to enter the necessary configuration values such as:
- Project Name (e.g., "development", "production").
- AWS Access Key ID
- AWS Secret Access Key
- Cognito User Pool ID.
- Cognito App Client ID
- Cognito Client Secret
- Need use Secret Hash (Y/N)
#### Configuration File:
Alternatively, you can provide the details through a TOML file:
```bash
cognitoctl init -f config.toml
```
Example of config.toml:
```
[project1]
key_id = "your-aws-access-key-id"
access_key = "your-aws-secret-access-key"
userpool_id = "your-userpool-id"
app_client_id = "your-client-id"
app_client_secret = "your-client-secret"
secret_hash = true
```
### Managing Multiple Projects
The CLI allows you to manage multiple Cognito environments as separate projects. Each project is stored in the CLI's configuration, and you can switch between them as needed.
#### Add a New Project
To add another project, simply run init again with a different name:
```bash
cognitoctl init -f proyect2.toml
```
#### Select project
You can select project using:
```bash
cognitoctl config select project1
```
## Usage
| Command | Description | Actions |
|-----------------------------|--------------------------------------------------|----------------------------------------------------------------------|
| `init` | Initializes the CLI with required configuration. | |
| `config` | Apply CLI configuration level actions. | list, current, set, get, select, edit |
| `group` | Apply group level actions. | create, delete, delete-user, add-user, list, get, edit |
| `user` | Apply user level actions. | create, confirm, delete, change-password, enable, disable, get, list |
## Contributing
Contributions are welcome! To improve this tool, follow these steps:
Fork the repository.
Create a new branch:
```bash
git checkout -b feature/new-feature
```
Submit a Pull Request to the main repository, in the branch dev.
Raw data
{
"_id": null,
"home_page": "https://github.com/DaniMG95/cognitoctl",
"name": "cognitoctl",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0.0,>=3.10.0",
"maintainer_email": null,
"keywords": "aws, cognito, authentication, authorization, python, cli",
"author": "Daniel Mu\u00f1oz Gonzalez",
"author_email": "dani16595@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/85/b8/17760d2b102ad211319f9a8f95336101281714b19004d115a808b71aae60/cognitoctl-1.0.0.tar.gz",
"platform": null,
"description": "[![PyPI version](https://img.shields.io/pypi/v/cognitoctl.svg?style=plastic)](https://pypi.org/project/cognitoctl/)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/cognitoctl?style=plastic)\n\n\n# cognitoctl\n\nA command-line tool for interacting with AWS Cognito, designed to simplify user, group, and authentication management. \n\n## Table of Contents\n\n1. [Description](#description)\n2. [Requirements](#requirements)\n3. [Installation](#installation)\n4. [Getting Started](#getting-started)\n5. [Usage](#usage)\n - [Available Commands](#available-commands)\n6. [Contributing](#contributing)\n\n---\n\n## Description\n\nThis CLI enables easy management of **users and groups in AWS Cognito**. Features include: \n- Group creation and management.\n- User registration, authentication, and management.\n- Password recovery and token updates.\n\nIt\u2019s designed for developers needing quick integration with AWS Cognito from the command line. \n\n## Requirements\n\nBefore using this CLI, ensure the following prerequisites are met:\n\n- **Python 3.10+**\n- **AWS CLI configured** with the necessary credentials to access Cognito.\n- Sufficient AWS permissions to manage Cognito.\n\n## Installation\n\n1. Install package:\n```bash\n pip install cognitoctl\n```\n\n## Getting Started\n\n### Initialize the CLI\nTo use the CLI, you must initialize it with at least one **Cognito project**. Use the init command to set up a project. You can either input configuration details interactively or provide them via a configuration file. \nYou can use the --help option to get help on parameters and commands.\n\n#### Interactive Mode:\n```bash\n cognitoctl init\n```\n\nYou will be prompted to enter the necessary configuration values such as:\n\n- Project Name (e.g., \"development\", \"production\").\n- AWS Access Key ID\n- AWS Secret Access Key\n- Cognito User Pool ID.\n- Cognito App Client ID\n- Cognito Client Secret\n- Need use Secret Hash (Y/N)\n\n\n#### Configuration File: \nAlternatively, you can provide the details through a TOML file:\n```bash\n cognitoctl init -f config.toml\n```\n\nExample of config.toml:\n\n```\n[project1]\nkey_id = \"your-aws-access-key-id\"\naccess_key = \"your-aws-secret-access-key\"\nuserpool_id = \"your-userpool-id\"\napp_client_id = \"your-client-id\"\napp_client_secret = \"your-client-secret\"\nsecret_hash = true\n```\n\n\n### Managing Multiple Projects\nThe CLI allows you to manage multiple Cognito environments as separate projects. Each project is stored in the CLI's configuration, and you can switch between them as needed.\n\n#### Add a New Project\nTo add another project, simply run init again with a different name:\n```bash\n cognitoctl init -f proyect2.toml\n```\n\n#### Select project\nYou can select project using:\n\n```bash\n cognitoctl config select project1\n```\n\n## Usage\n| Command | Description | Actions |\n|-----------------------------|--------------------------------------------------|----------------------------------------------------------------------|\n| `init` | Initializes the CLI with required configuration. | |\n| `config` | Apply CLI configuration level actions. | list, current, set, get, select, edit |\n| `group` | Apply group level actions. | create, delete, delete-user, add-user, list, get, edit |\n| `user` | Apply user level actions. | create, confirm, delete, change-password, enable, disable, get, list |\n\n## Contributing\nContributions are welcome! To improve this tool, follow these steps: \nFork the repository. \n\nCreate a new branch:\n```bash\ngit checkout -b feature/new-feature\n```\n\nSubmit a Pull Request to the main repository, in the branch dev.\n\n",
"bugtrack_url": null,
"license": null,
"summary": "CLI to use aws cognito in a simple way",
"version": "1.0.0",
"project_urls": {
"Documentation": "https://github.com/DaniMG95/cognitoctl/blob/main/README.md",
"Homepage": "https://github.com/DaniMG95/cognitoctl",
"Repository": "https://github.com/DaniMG95/cognitoctl"
},
"split_keywords": [
"aws",
" cognito",
" authentication",
" authorization",
" python",
" cli"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "045ab4c39ee1962af1e9338c59b416b990b1c36283ca0b448ed4921b911e659a",
"md5": "551f3a481e36e8718ad90e32c9ad92c4",
"sha256": "a4b11d5bd8c685468e6ad8b9aed3021e062fe6ebaaba62e230322406392bc424"
},
"downloads": -1,
"filename": "cognitoctl-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "551f3a481e36e8718ad90e32c9ad92c4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.10.0",
"size": 11355,
"upload_time": "2024-12-01T18:39:52",
"upload_time_iso_8601": "2024-12-01T18:39:52.506700Z",
"url": "https://files.pythonhosted.org/packages/04/5a/b4c39ee1962af1e9338c59b416b990b1c36283ca0b448ed4921b911e659a/cognitoctl-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "85b817760d2b102ad211319f9a8f95336101281714b19004d115a808b71aae60",
"md5": "7a8ae725d838c2b50af2f46e62e513ec",
"sha256": "027edc322b2e8fa540a72fe0ad6feb54f49fe85df155a8a86007d65471d5dec3"
},
"downloads": -1,
"filename": "cognitoctl-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "7a8ae725d838c2b50af2f46e62e513ec",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.10.0",
"size": 9700,
"upload_time": "2024-12-01T18:39:54",
"upload_time_iso_8601": "2024-12-01T18:39:54.078628Z",
"url": "https://files.pythonhosted.org/packages/85/b8/17760d2b102ad211319f9a8f95336101281714b19004d115a808b71aae60/cognitoctl-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-01 18:39:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DaniMG95",
"github_project": "cognitoctl",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "cognitoctl"
}