Skip to content

Commit

Permalink
autogen(docs): generate cli docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Oct 13, 2020
1 parent c50a752 commit 5c6a634
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 59 deletions.
11 changes: 8 additions & 3 deletions docs/docs/cli/kratos-identities-delete.md
Expand Up @@ -17,16 +17,21 @@ Delete identities by ID
### Synopsis

This command deletes one or more identities by ID. To delete an identity by some selector, e.g. the recovery email address, use the list command in combination with jq.
Example: delete the identity with the recovery email address "foo@bar.com":

kratos identities delete \$(kratos identities list --format json | jq -r 'map(select(.recovery_addresses[].value == "foo@bar.com")) | .[].id')

We have to admit, this is not easy if you don't speak jq fluently. What about opening an issue and telling us what predefined selectors you want to have? https://github.com/ory/kratos/issues/new/choose

```
kratos identities delete <id-0 [id-1 ...]> [flags]
```

### Examples

```
To delete the identity with the recovery email address "foo@bar.com", run:
$ kratos identities delete $(kratos identities list --format json | jq -r 'map(select(.recovery_addresses[].value == "foo@bar.com")) | .[].id')
```

### Options

```
Expand Down
11 changes: 8 additions & 3 deletions docs/docs/cli/kratos-identities-get.md
Expand Up @@ -17,16 +17,21 @@ Get one or more identities by ID
### Synopsis

This command gets all the details about an identity. To get an identity by some selector, e.g. the recovery email address, use the list command in combination with jq.
Example: get the identities with the recovery email address at the domain "ory.sh":

kratos identities get \$(kratos identities list --format json | jq -r 'map(select(.recovery_addresses[].value | endswith("@ory.sh"))) | .[].id')

We have to admit, this is not easy if you don't speak jq fluently. What about opening an issue and telling us what predefined selectors you want to have? https://github.com/ory/kratos/issues/new/choose

```
kratos identities get <id-0 [id-1 ...]> [flags]
```

### Examples

```
To get the identities with the recovery email address at the domain "ory.sh", run:
$ kratos identities get $(kratos identities list --format json | jq -r 'map(select(.recovery_addresses[].value | endswith("@ory.sh"))) | .[].id')
```

### Options

```
Expand Down
13 changes: 8 additions & 5 deletions docs/docs/cli/kratos-identities-import.md
Expand Up @@ -16,11 +16,7 @@ Import identities from files or STD_IN

### Synopsis

Import identities from files or STD_IN:

kratos identities import file.json

cat file.json | kratos identities import
Import identities from files or STD_IN.

Files can contain only a single or an array of identities. The validity of files can be tested beforehand using "... identities validate".

Expand All @@ -30,6 +26,13 @@ WARNING: Importing credentials is not yet supported.
kratos identities import <file.json [file-2.json [file-3.json] ...]> [flags]
```

### Examples

```
$ kratos identities import file.json
$ cat file.json | kratos identities import
```

### Options

```
Expand Down
114 changes: 66 additions & 48 deletions docs/sidebar.json
@@ -1,71 +1,89 @@
{
"Introduction": ["index", "quickstart", "install", "configuring"],
"Concepts": [
"concepts/index",
"concepts/terminology",
"concepts/ui-user-interface",
"concepts/identity-user-model",
"concepts/index",
"concepts/terminology",
"concepts/ui-user-interface",
"concepts/identity-user-model",
{
"label": "Identity Credentials",
"type": "category",
"items": [
"concepts/credentials",
"concepts/credentials/username-email-password",
"concepts/credentials",
"concepts/credentials/username-email-password",
"concepts/credentials/openid-connect-oidc-oauth2"
]
},
"concepts/browser-redirect-flow-completion",
"concepts/email-sms",
"concepts/rest-api",
"concepts/federation",
},
"concepts/browser-redirect-flow-completion",
"concepts/email-sms",
"concepts/rest-api",
"concepts/federation",
"concepts/security"
],
"Self Service (End-User)": [
"self-service",
"self-service/flows/user-registration",
"self-service/flows/user-login",
"self-service/flows/user-settings",
"self-service/flows/account-recovery",
"self-service/flows/verify-email-account-activation",
"self-service/flows/user-logout",
"self-service/flows/user-facing-errors",
"self-service/flows/2fa-mfa-multi-factor-authentication",
"self-service",
"self-service/flows/user-registration",
"self-service/flows/user-login",
"self-service/flows/user-settings",
"self-service/flows/account-recovery",
"self-service/flows/verify-email-account-activation",
"self-service/flows/user-logout",
"self-service/flows/user-facing-errors",
"self-service/flows/2fa-mfa-multi-factor-authentication",
"self-service/hooks"
],
"Administration": ["admin/managing-users-identities"],
"Guides": [
"guides/sign-in-with-github-google-facebook-linkedin",
"guides/login-session",
"guides/configuring-cookies",
"guides/setting-up-cors",
"guides/account-recovery-password-reset",
"guides/account-activation-email-verification",
"guides/zero-trust-iap-proxy-identity-access-proxy",
"guides/multi-tenancy-multitenant",
"guides/secret-key-rotation",
"guides/high-availability-ha",
"guides/sign-in-with-github-google-facebook-linkedin",
"guides/login-session",
"guides/configuring-cookies",
"guides/setting-up-cors",
"guides/account-recovery-password-reset",
"guides/account-activation-email-verification",
"guides/zero-trust-iap-proxy-identity-access-proxy",
"guides/multi-tenancy-multitenant",
"guides/secret-key-rotation",
"guides/high-availability-ha",
"guides/docker"
],
"Reference": [
"reference/configuration",
"reference/json-schema-json-paths",
"reference/html-forms",
"reference/api",
"reference/configuration",
"reference/json-schema-json-paths",
"reference/html-forms",
"reference/api",
{
"items": [
"cli/kratos",
"cli/kratos-identities",
"cli/kratos-identities-delete",
"cli/kratos-identities-get",
"cli/kratos-identities-import",
"cli/kratos-identities-list",
"cli/kratos-identities-patch",
"cli/kratos-identities-validate",
"cli/kratos-jsonnet",
"cli/kratos-jsonnet-format",
"cli/kratos-jsonnet-lint",
"cli/kratos-remote",
"cli/kratos-remote-status",
"cli/kratos",
"cli/kratos-identities",
"cli/kratos-identities-delete",
"cli/kratos-identities-get",
"cli/kratos-identities-import",
"cli/kratos-identities-list",
"cli/kratos-identities-patch",
"cli/kratos-identities-validate",
"cli/kratos-jsonnet",
"cli/kratos-jsonnet-format",
"cli/kratos-jsonnet-lint",
"cli/kratos-remote",
"cli/kratos-remote-status",
"cli/kratos-remote-version"
]
},
{
"items": [
"cli/kratos",
"cli/kratos-identities",
"cli/kratos-identities-delete",
"cli/kratos-identities-get",
"cli/kratos-identities-import",
"cli/kratos-identities-list",
"cli/kratos-identities-patch",
"cli/kratos-identities-validate",
"cli/kratos-jsonnet",
"cli/kratos-jsonnet-format",
"cli/kratos-jsonnet-lint",
"cli/kratos-remote",
"cli/kratos-remote-status",
"cli/kratos-remote-version"
]
}
Expand All @@ -74,7 +92,7 @@
"SDKs": ["sdk"],
"Development": ["milestones"],
"Further Reading": [
"further-reading/comparison",
"further-reading/comparison",
"further-reading/kratos-video-tutorials"
]
}

0 comments on commit 5c6a634

Please sign in to comment.