Metadata-Version: 2.1
Name: okta-cli
Version: 18.1.0
Summary: An Okta command line interface for scripting and quickly performing routine tasks
Author-email: Axel Bock <ab@a3b3.de>
License: MIT License
Project-URL: Homepage, https://github.com/flypenguin/okta-cli
Project-URL: Repository, https://github.com/flypenguin/okta-cli
Keywords: okta,cli
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: appdirs ==1.4.4
Requires-Dist: certifi ==2023.7.22
Requires-Dist: charset-normalizer ==3.3.2
Requires-Dist: click ==8.1.7
Requires-Dist: et-xmlfile ==1.1.0
Requires-Dist: idna ==3.4
Requires-Dist: openpyxl ==3.1.2
Requires-Dist: pony ==0.7.17
Requires-Dist: progressbar2 ==4.3.2
Requires-Dist: python-utils ==3.8.1
Requires-Dist: pyyaml ==6.0.1
Requires-Dist: requests ==2.31.0
Requires-Dist: six ==1.16.0
Requires-Dist: typing-extensions ==4.9.0
Requires-Dist: urllib3 ==2.0.7

# Okta-CLI

**NOW WITH HOMEBREW TAP ON A MAC - SEE "INSTALLATION" BELOW :))**

This is a python-based CLI tool for Okta.
**It is not made or maintained by or in any way affiliated with anyone working at Okta.**
It is mainly driven by the personal needs of its author, although the feature set is becoming quite complete now.

It basically is a CLI wrapper around the [Okta REST API](https://developer.okta.com/docs/reference/).

**NOTE:** This is _not_ the same as Okta's own [`okta`](https://cli.okta.com/) CLI interface.
The latter is apparently used for setting up the source for development projects.

## Requirements

- A Mac or Linux machine, it _might_ work on Windows (untested)
- Python 3.7+, for the change log see [CHANGES.rst](CHANGES.rst).
- unfortunately **Python 3.11 is not _yet_ supported** due to a dependency.

## Installation

### Mac & homebrew

```bash
brew tap flypenguin/okta-cli
brew install okta-cli
```

### All others

- create a python virtualenv: `mkvirtualenv okta-cli`
- `pip install okta-cli`
- start using it: `okta-cli config new`

## Quickstart

Every more complex function should have help texts available: `okta-cli users add -h`, or maybe `okta-cli users update -h` or maybe `okta-cli apps add -h` ... those are probably the most interesting ones.

```bash
$ pip install okta-cli                                # install :)
$ okta-cli config new \                               # create a new okta profile
           -n my-profile -\
           -u https://my.okta.url \
           -t API_TOKEN
$ okta-cli users list \                               # search users with a query
           -f 'profile.email eq "my@email.com"'
$ okta-cli features list                              # list okta server-side features
$ okta-cli features enable "Recent Activity"          # enable an Okta feature
$ okta cli users groups adduser \                     # add a user to a group
           -g app1_rollout \
           -u fred.flintstone@flintstones.com
$ okta-cli apps adduser \                             # assign an app to a user
           -a my_app_name -u 0109121 \
           -f profile.employeeId
$ okta-cli users update id012345678 \                 # update a field of a user record
           --set profile.email=my@other.email.com
$ okta-cli users bulk-update update-list.xlsx         # CSV is okay as well :)
$ okta-cli version                                    # print version and exit
$ okta-cli users get my-login -vvvvv                  # see http debug output
```

## Configuration

Running `config new` (see above) will store a JSON configuration file in the directory determined by the `appdirs` module.

## References

This project uses a few nice other projects:

- [Click](https://click.palletsprojects.com)
- [appdirs](https://pypi.org/project/appdirs/)
