Skip to content

Commit

Permalink
Merge pull request #388 from reubenmiller/docs-generate-man-pages
Browse files Browse the repository at this point in the history
docs: generate man pages preparing for a new release
  • Loading branch information
reubenmiller authored Jun 9, 2024
2 parents 0c8dd6e + ba2dd8c commit ec216d6
Show file tree
Hide file tree
Showing 24 changed files with 14,455 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_clear.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ c8y sessions clear [flags]

```
### Example 1: Clear session in bash
$ eval $(c8y session clear)
$ eval $(c8y sessions clear)
Clear the current session
## Example 2: Clear session in fish
$ c8y session clear | source
$ c8y sessions clear | source
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ c8y sessions decryptText [flags]
```
Example 1:
c8y session decryptText --text "{encrypted}asdfasdfasdfasdfasdf"
c8y sessions decryptText --text "{encrypted}asdfasdfasdfasdfasdf"
Encrypt the text "Hello World". You will be prompted for the passphrase to encrypt the data.
Example 2:
c8y session encryptText --text "Hello World" --passphrase "so4methIng-7hat-Matters"
c8y sessions encryptText --text "Hello World" --passphrase "so4methIng-7hat-Matters"
Encrypt the text "Hello World", the text will be encrypted using the given passphrase (without being prompted)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ c8y sessions encryptText [flags]
Example 1: Encrypt the text "Hello World". You will be prompted for the passphrase to encrypt the data.
> c8y session encryptText --text "Hello World"
> c8y sessions encryptText --text "Hello World"
Enter password 🔒: [input is hidden]
Password: {encrypted}ec5b837a03408ffb731307584eac40ac047989a002951e4b7139fa60189e504b6840bc027cece28b3f36717839d96af1c5dba8c850b9a9079846066ee1596cc8d26f4138f76ce3
Example 2: Encrypt the text "Hello World", the text will be encrypted using the given passphrase (without being prompted)
> c8y session encryptText --text "Hello World" --passphrase "so4methIng-7hat-Matters"
> c8y sessions encryptText --text "Hello World" --passphrase "so4methIng-7hat-Matters"
Password: {encrypted}ec5b837a03408ffb731307584eac40ac047989a002951e4b7139fa60189e504b6840bc027cece28b3f36717839d96af1c5dba8c850b9a9079846066ee1596cc8d26f4138f76ce3
```
Expand Down
109 changes: 109 additions & 0 deletions docs/go-c8y-cli/docs/cli/c8y/sessions/c8y_sessions_login.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
category: sessions
title: c8y sessions login
---
login to Cumulocity IoT and return environment variables (including a token)

### Synopsis

Set a session, login and test the session and get either OAuth2 token, or using two factor authentication

```
c8y sessions login [flags]
```

### Examples

```
$ eval "$( c8y sessions login --from-file .env )"
Set a session from a dotenv file
$ eval "$( c8y sessions login --from-env )"
Set a session from environment variables (e.g. in Github)
$ eval "$( c8y-session-bitwarden | c8y sessions login --from-stdin --format json )"
Set a session from an external command, accepting the selected session via stdin
$ eval "$( c8y sessions login --from-cmd "c8y sessions set --output json" )"
Set a session using the in-built "c8y sessions set"
$ eval "$( c8y sessions login --from-cmd "c8y-session-bitwarden list --folder c8y" --format json )"
Set a session from an external command, where the external commands returns the selected session in json format on stdout
```

### Options

```
--format string External command format, e.g. json, yaml, toml
--from-cmd string External command to execute to get the log in details
--from-env Read from environment variables
--from-file string Read session from a file
--from-stdin Read from standard input
-h, --help help for login
--loginType string Login type preference, e.g. OAUTH2_INTERNAL or BASIC. When set to BASIC, any existing token will be cleared
--no-banner Don't show the session banner
--output-format string Output format
--provider string Session provider which returns the session to use
--shell string Shell type to return the environment variables
```

### Options inherited from parent commands

```
--abortOnErrors int Abort batch when reaching specified number of errors (default 10)
--allowEmptyPipe Don't fail when piped input is empty (stdin)
--cache Enable cached responses
--cacheBodyPaths strings Cache should limit hashing of selected paths in the json body. Empty indicates all values
--cacheTTL string Cache time-to-live (TTL) as a duration, i.e. 60s, 2m (default "60s")
-c, --compact Compact instead of pretty-printed output when using json output. Pretty print is the default if output is the terminal
--confirm Prompt for confirmation
--confirmText string Custom confirmation text
--currentPage int Current page which should be returned
--customQueryParam strings add custom URL query parameters. i.e. --customQueryParam 'withCustomOption=true,myOtherOption=myvalue'
--debug Set very verbose log messages
--delay string delay after each request, i.e. 5ms, 1.2s (default "0ms")
--delayBefore string delay before each request, i.e. 5ms, 1.2s (default "0ms")
--dry Dry run. Don't send any data to the server
--dryFormat string Dry run output format. i.e. json, dump, markdown or curl (default "markdown")
--examples Show examples for the current command
--filter stringArray Apply a client side filter to response before returning it to the user
--flatten flatten json output by replacing nested json properties with properties where their names are represented by dot notation
-f, --force Do not prompt for confirmation. Ignored when using --confirm
-H, --header strings custom headers. i.e. --header "Accept: value, AnotherHeader: myvalue"
--includeAll Include all results by iterating through each page
-k, --insecure Allow insecure server connections when using SSL
-l, --logMessage string Add custom message to the activity log
--maxJobs int Maximum number of jobs. 0 = unlimited (use with caution!)
--noAccept Ignore Accept header will remove the Accept header from requests, however PUT and POST requests will only see the effect
--noCache Force disabling of cached responses (overwrites cache setting)
-M, --noColor Don't use colors when displaying log entries on the console
--noLog Disables the activity log for the current command
--noProgress Disable progress bars
--noProxy Ignore the proxy settings
-n, --nullInput Don't read the input (stdin). Useful if using in shell for/while loops
-o, --output string Output format i.e. table, json, csv, csvheader (default "table")
--outputFile string Save JSON output to file (after select/view)
--outputFileRaw string Save raw response to file (before select/view)
--outputTemplate string jsonnet template to apply to the output
-p, --pageSize int Maximum results per page (default 5)
--progress Show progress bar. This will also disable any other verbose output
--proxy string Proxy setting, i.e. http://10.0.0.1:8080
-r, --raw Show raw response. This mode will force output=json and view=off
--retries int Max number of attempts when a failed http call is encountered (default 3)
--select stringArray Comma separated list of properties to return. wildcards and globstar accepted, i.e. --select 'id,name,type,**.serialNumber'
--session string Session configuration
-P, --sessionPassword string Override session password
-U, --sessionUsername string Override session username. i.e. peter or t1234/peter (with tenant)
--silentExit Silent status codes do not affect the exit code
--silentStatusCodes string Status codes which will not print out an error message
--timeout string Request timeout duration, i.e. 60s, 2m (default "60s")
--totalPages int Total number of pages to get
-v, --verbose Verbose logging
--view string Use views when displaying data on the terminal. Disable using --view off (default "auto")
--withError Errors will be printed on stdout instead of stderr
--withTotalElements Request Cumulocity to include the total elements in the response statistics under .statistics.totalElements (introduced in 10.13)
-t, --withTotalPages Request Cumulocity to include the total pages in the response statistics under .statistics.totalPages
--workers int Number of workers (default 1)
```

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Get-ApplicationCollection
[[-ProvidedFor] <String>]
[[-Subscriber] <String>]
[[-User] <Object[]>]
[[-Tenant] <String>]
[-HasVersions]
[[-Availability] <String>]
[-PageSize <Int32>]
[-WithTotalPages]
[-WithTotalElements]
Expand Down Expand Up @@ -180,6 +183,52 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -Tenant
The ID of a tenant that either owns the application or is subscribed to the applications.
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -HasVersions
When set to true, the returned result contains applications with an applicationVersions field that is not empty.
When set to false, the result will contain applications with an empty applicationVersions field.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Availability
Application access level for other tenants.
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AbortOnErrors
Abort batch when reaching specified number of errors
Expand Down
Loading

0 comments on commit ec216d6

Please sign in to comment.