Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions content/api/howto.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,18 @@
* A **consumer key** (public identifier for your application)
* A **consumer secret** (private key, never expose it client-side)

You can also manage OAuth consumers from the CLI with the `clever oauth-consumers` command set, which covers the full lifecycle (list, create, get, update, open and delete). Use `--with-secret` on the `get` subcommand to retrieve the consumer secret:

Check failure on line 93 in content/api/howto.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/api/howto.md#L93

[Vale.Spelling] Did you really mean 'subcommand'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'subcommand'?", "location": {"path": "content/api/howto.md", "range": {"start": {"line": 93, "column": 208}}}, "severity": "ERROR"}

```bash
clever oauth-consumers create my-app \
--description "My application" \
--url https://my-app.example.com \
--base-url https://my-app.example.com/oauth/callback \
--rights access-personal-information,access-organisations
Comment thread
davlgd marked this conversation as resolved.

clever oauth-consumers get my-app --with-secret
```

> [!NOTE]
> The **base URL** you set when creating the consumer is important: the callback URL you use during the OAuth flow must match this base URL's domain. For local development, register a separate consumer with `http://localhost:<port>` as the base URL.

Expand Down
2 changes: 1 addition & 1 deletion content/changelog/2026/04-07-images-update.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Images update: mdBook 0.5, Static Web Server 2.42, OAuth2Proxy 7.15.1, Tailscale 1.96.3"
description: Many tool updates: check your mdBook configuration for the 0.5 release
description: Many tool updates, check your mdBook configuration for the 0.5 release
date: 2026-04-07
tags:
- images
Expand Down
81 changes: 81 additions & 0 deletions content/changelog/2026/04-09-clever-tools-4.8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: "Clever Tools 4.8: OAuth consumers and drains for add-ons"
date: 2026-04-09
description: Clever Tools 4.8 introduces commands to manage OAuth consumers and extends drain management to add-ons
tags:
- clever-tools
- cli
authors:
- name: David Legrand
link: https://github.com/davlgd
image: https://github.com/davlgd.png?size=40
- name: Hubert Sablonnière
link: https://github.com/hsablonniere
image: https://github.com/hsablonniere.png?size=40
excludeSearch: true
---

[Clever Tools 4.8.0](https://github.com/CleverCloud/clever-tools/releases/tag/4.8.0) is available. This release adds a new `oauth-consumers` command set to manage OAuth consumers from the CLI and extends `clever drain` to operate on add-ons.

## OAuth consumers management

You can now create and manage [OAuth consumers](/api/howto/#create-an-oauth-consumer) directly from the CLI. The new `clever oauth-consumers` command set covers the full lifecycle: list, create, get details, update, open in the Console and delete. Consumers can be referenced by name (when unambiguous) or by their consumer key, and the `get` command supports a `--with-secret` flag when you need to retrieve the consumer secret for application configuration.

Check notice on line 22 in content/changelog/2026/04-09-clever-tools-4.8.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/changelog/2026/04-09-clever-tools-4.8.md#L22

[Google.Passive] In general, use active voice instead of passive voice ('be referenced').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('be referenced').", "location": {"path": "content/changelog/2026/04-09-clever-tools-4.8.md", "range": {"start": {"line": 22, "column": 263}}}, "severity": "INFO"}

```bash
# List OAuth consumers
clever oauth-consumers list

# Create a new consumer with rights and callback URL
clever oauth-consumers create my-app \
--description "My application" \
--url https://my-app.example.com \
--base-url https://my-app.example.com/oauth/callback \
--rights access-personal-information,access-organisations

# Get details, including the secret
clever oauth-consumers get my-app --with-secret

# Update an existing consumer
clever oauth-consumers update my-app --description "Updated description"

# Open the consumer page in the Console
clever oauth-consumers open my-app

# Delete a consumer
clever oauth-consumers delete my-app --yes
```

These commands target the current profile's organisation by default. The `create` command accepts the `--org` option to specify the consumer's organisation. For other commands, the consumer key is enough to identify the resource.

- [Learn more about OAuth consumers](/api/howto/#create-an-oauth-consumer)

## Drains on add-ons

The `clever drain` commands now accept an `--addon` option to manage [log drains](/doc/administrate/log-management/) on add-ons, in addition to applications. All drain subcommands (`create`, `enable`, `disable`, `get`, `remove` and the top-level listing) accept this new option, which resolves either an add-on ID or its real ID. The `--addon` option is mutually exclusive with `--app` and `--alias`.

Check failure on line 54 in content/changelog/2026/04-09-clever-tools-4.8.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/changelog/2026/04-09-clever-tools-4.8.md#L54

[Vale.Spelling] Did you really mean 'subcommands'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'subcommands'?", "location": {"path": "content/changelog/2026/04-09-clever-tools-4.8.md", "range": {"start": {"line": 54, "column": 169}}}, "severity": "ERROR"}

```bash
# List drains on an add-on
clever drain --addon postgresql_xxxxxxxx

# Create a drain on an add-on
clever drain create --addon postgresql_xxxxxxxx raw-http https://logs.example.com

# Get a specific drain
clever drain get --addon postgresql_xxxxxxxx <DRAIN-ID>

# Remove a drain
clever drain remove --addon postgresql_xxxxxxxx <DRAIN-ID>
```

## Bug fixes

- **Network groups** commands have been adapted to the `@clevercloud/client` v12 API change for peer configuration, restoring proper peer handling.

Check notice on line 72 in content/changelog/2026/04-09-clever-tools-4.8.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/changelog/2026/04-09-clever-tools-4.8.md#L72

[Google.Passive] In general, use active voice instead of passive voice ('been adapted').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('been adapted').", "location": {"path": "content/changelog/2026/04-09-clever-tools-4.8.md", "range": {"start": {"line": 72, "column": 36}}}, "severity": "INFO"}

## How to upgrade

To upgrade Clever Tools, [use your favourite package manager](/doc/cli/install/). For example with `npm`:

```
npm update -g clever-tools
clever version
```
11 changes: 10 additions & 1 deletion content/doc/cli/logs-drains.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,16 @@
clever drain disable <DRAIN-ID>
```

The `clever drain` command lists all drains for the target application and shows key metrics for each one. The `clever drain get` command displays detailed metrics for a single drain, including message output rate, throughput (with dynamic units), backlog size, retry attempts, and last error. These metrics help you monitor drain health and troubleshoot delivery issues.
All drain subcommands also accept `--addon ADDON_ID_OR_REAL_ID` to target an add-on instead of an application. The `--addon` option is mutually exclusive with `--app` and `--alias`.

Check failure on line 31 in content/doc/cli/logs-drains.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/doc/cli/logs-drains.md#L31

[Vale.Spelling] Did you really mean 'subcommands'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'subcommands'?", "location": {"path": "content/doc/cli/logs-drains.md", "range": {"start": {"line": 31, "column": 11}}}, "severity": "ERROR"}

```
clever drain --addon postgresql_xxxxxxxx
clever drain create --addon postgresql_xxxxxxxx raw-http https://logs.example.com
clever drain get --addon postgresql_xxxxxxxx <DRAIN-ID>
clever drain remove --addon postgresql_xxxxxxxx <DRAIN-ID>
```

The `clever drain` command lists all drains for the target application or add-on and shows key metrics for each one. The `clever drain get` command displays detailed metrics for a single drain, including message output rate, throughput (with dynamic units), backlog size, retry attempts, and last error. These metrics help you monitor drain health and troubleshoot delivery issues.

Where `DRAIN-TYPE` is one of:

Expand Down
161 changes: 153 additions & 8 deletions content/doc/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
**Options**
```
-o, --org, --owner <org-id|org-name> Organisation to target by its ID (or name, if unambiguous)
-y, --yes Skip confirmation and delete the add-on directly
-y, --yes Skip confirmation and proceed with deletion directly
```

### addon env
Expand All @@ -389,7 +389,7 @@
**Options**
```
-F, --format <format> Output format (human, json, shell) (default: human)
-o, --org, --owner <org-id|org-name> Organisation to target by its ID (or name, if unambiguous)
-o, --org, --owner <org-id|org-name> Organisation to target by its ID (or name, if unambiguous) (deprecated, organisation is now resolved automatically)
```

### addon list
Expand Down Expand Up @@ -816,7 +816,7 @@
**Options**
```
-F, --format <format> Output format (human, json) (default: human)
-o, --org, --owner <org-id|org-name> Organisation to target by its ID (or name, if unambiguous)
-o, --org, --owner <org-id|org-name> Organisation to target by its ID (or name, if unambiguous) (deprecated, organisation is now resolved automatically)
```

#### database backups download
Expand All @@ -838,7 +838,7 @@

**Options**
```
-o, --org, --owner <org-id|org-name> Organisation to target by its ID (or name, if unambiguous)
-o, --org, --owner <org-id|org-name> Organisation to target by its ID (or name, if unambiguous) (deprecated, organisation is now resolved automatically)
--output, --out <file-path> Redirect the output of the command in a file
```

Expand Down Expand Up @@ -875,7 +875,7 @@
```
-a, --alias <alias> Short name for the application
-b, --branch <branch> Branch to push (current branch by default)
-e, --exit-on <step> Step at which the logs streaming is ended, steps are: deploy-start, deploy-end, never (default: deploy-end)
-e, --exit-on <step> Step at which the logs streaming is ended (deploy-start, deploy-end, never) (default: deploy-end)
--follow Continue to follow logs after deployment has ended (deprecated, use `--exit-on never` instead)
-f, --force Force deploy even if it's not fast-forwardable
-q, --quiet Don't show logs during deployment
Expand Down Expand Up @@ -1067,6 +1067,7 @@

**Options**
```
--addon <addon-id> Add-on ID or real ID
-a, --alias <alias> Short name for the application
--app <app-id|app-name> Application to manage by its ID (or name, if unambiguous)
-F, --format <format> Output format (human, json) (default: human)
Expand All @@ -1091,6 +1092,7 @@

**Options**
```
--addon <addon-id> Add-on ID or real ID
-a, --alias <alias> Short name for the application
-k, --api-key <api-key> API key (for newrelic)
--app <app-id|app-name> Application to manage by its ID (or name, if unambiguous)
Expand Down Expand Up @@ -1118,6 +1120,7 @@

**Options**
```
--addon <addon-id> Add-on ID or real ID
-a, --alias <alias> Short name for the application
--app <app-id|app-name> Application to manage by its ID (or name, if unambiguous)
```
Expand All @@ -1140,6 +1143,7 @@

**Options**
```
--addon <addon-id> Add-on ID or real ID
-a, --alias <alias> Short name for the application
--app <app-id|app-name> Application to manage by its ID (or name, if unambiguous)
```
Expand All @@ -1162,6 +1166,7 @@

**Options**
```
--addon <addon-id> Add-on ID or real ID
-a, --alias <alias> Short name for the application
--app <app-id|app-name> Application to manage by its ID (or name, if unambiguous)
-F, --format <format> Output format (human, json) (default: human)
Expand All @@ -1185,6 +1190,7 @@

**Options**
```
--addon <addon-id> Add-on ID or real ID
-a, --alias <alias> Short name for the application
--app <app-id|app-name> Application to manage by its ID (or name, if unambiguous)
```
Expand Down Expand Up @@ -1549,7 +1555,7 @@
**Options**
```
-o, --org, --owner <org-id|org-name> Organisation to target by its ID (or name, if unambiguous)
-y, --yes Skip confirmation and delete the add-on directly
-y, --yes Skip confirmation and proceed with deletion directly
```

### k8s get
Expand Down Expand Up @@ -2394,7 +2400,6 @@

**Options**
```
-F, --format <format> Output format (human, json) (default: human)
-o, --org, --owner <org-id|org-name> Organisation to target by its ID (or name, if unambiguous)
```

Expand Down Expand Up @@ -2528,6 +2533,146 @@
-o, --org, --owner <org-id|org-name> Organisation to target by its ID (or name, if unambiguous)
```

## oauth-consumers

**Description:** Manage OAuth consumers used with a Clever Cloud login

Check warning on line 2538 in content/doc/reference/cli.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/doc/reference/cli.md#L2538

[Google.Colons] ': M' should be in lowercase.
Raw output
{"message": "[Google.Colons] ': M' should be in lowercase.", "location": {"path": "content/doc/reference/cli.md", "range": {"start": {"line": 2538, "column": 1}}}, "severity": "WARNING"}

**Since:** 4.8.0

**Usage**
```
clever oauth-consumers
```

### oauth-consumers create

**Description:** Create an OAuth consumer

Check warning on line 2549 in content/doc/reference/cli.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/doc/reference/cli.md#L2549

[Google.Colons] ': C' should be in lowercase.
Raw output
{"message": "[Google.Colons] ': C' should be in lowercase.", "location": {"path": "content/doc/reference/cli.md", "range": {"start": {"line": 2549, "column": 1}}}, "severity": "WARNING"}

**Since:** 4.8.0

**Usage**
```
clever oauth-consumers create <name> [options]
```

**Arguments**
```
name Consumer name
```

**Options**
```
--base-url <url> OAuth callback base URL
-d, --description <description> Consumer description
-F, --format <format> Output format (human, json) (default: human)
-o, --org, --owner <org-id|org-name> Organisation to target by its ID (or name, if unambiguous)
--picture <url> Application logo URL
--rights <rights> Comma-separated list of rights (access-organisations, access-organisations-bills, access-organisations-consumption-statistics, access-organisations-credit-count, access-personal-information, manage-organisations, manage-organisations-applications, manage-organisations-members, manage-organisations-services, manage-personal-information, manage-ssh-keys, all)
--url <url> Application home URL
```

### oauth-consumers delete

**Description:** Delete an OAuth consumer

Check warning on line 2576 in content/doc/reference/cli.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/doc/reference/cli.md#L2576

[Google.Colons] ': D' should be in lowercase.
Raw output
{"message": "[Google.Colons] ': D' should be in lowercase.", "location": {"path": "content/doc/reference/cli.md", "range": {"start": {"line": 2576, "column": 1}}}, "severity": "WARNING"}

**Since:** 4.8.0

**Usage**
```
clever oauth-consumers delete <consumer-key|consumer-name> [options]
```

**Arguments**
```
consumer-key|consumer-name OAuth consumer key (or name, if unambiguous)
```

**Options**
```
-y, --yes Skip confirmation and proceed with deletion directly
```

### oauth-consumers get

**Description:** Get details of an OAuth consumer

Check warning on line 2597 in content/doc/reference/cli.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/doc/reference/cli.md#L2597

[Google.Colons] ': G' should be in lowercase.
Raw output
{"message": "[Google.Colons] ': G' should be in lowercase.", "location": {"path": "content/doc/reference/cli.md", "range": {"start": {"line": 2597, "column": 1}}}, "severity": "WARNING"}

**Since:** 4.8.0

**Usage**
```
clever oauth-consumers get <consumer-key|consumer-name> [options]
```

**Arguments**
```
consumer-key|consumer-name OAuth consumer key (or name, if unambiguous)
```

**Options**
```
-F, --format <format> Output format (human, json) (default: human)
--with-secret Include the consumer secret in the output
```

### oauth-consumers list

**Description:** List OAuth consumers

Check warning on line 2619 in content/doc/reference/cli.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/doc/reference/cli.md#L2619

[Google.Colons] ': L' should be in lowercase.
Raw output
{"message": "[Google.Colons] ': L' should be in lowercase.", "location": {"path": "content/doc/reference/cli.md", "range": {"start": {"line": 2619, "column": 1}}}, "severity": "WARNING"}

**Since:** 4.8.0

**Usage**
```
clever oauth-consumers list [options]
```

**Options**
```
-F, --format <format> Output format (human, json) (default: human)
```

### oauth-consumers open

**Description:** Open an OAuth consumer in the Clever Cloud Console

Check warning on line 2635 in content/doc/reference/cli.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/doc/reference/cli.md#L2635

[Google.Colons] ': O' should be in lowercase.
Raw output
{"message": "[Google.Colons] ': O' should be in lowercase.", "location": {"path": "content/doc/reference/cli.md", "range": {"start": {"line": 2635, "column": 1}}}, "severity": "WARNING"}

**Since:** 4.8.0

**Usage**
```
clever oauth-consumers open <consumer-key|consumer-name>
```

**Arguments**
```
consumer-key|consumer-name OAuth consumer key (or name, if unambiguous)
```

### oauth-consumers update

**Description:** Update an OAuth consumer

Check warning on line 2651 in content/doc/reference/cli.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/doc/reference/cli.md#L2651

[Google.Colons] ': U' should be in lowercase.
Raw output
{"message": "[Google.Colons] ': U' should be in lowercase.", "location": {"path": "content/doc/reference/cli.md", "range": {"start": {"line": 2651, "column": 1}}}, "severity": "WARNING"}

**Since:** 4.8.0

**Usage**
```
clever oauth-consumers update <consumer-key|consumer-name> [options]
```

**Arguments**
```
consumer-key|consumer-name OAuth consumer key (or name, if unambiguous)
```

**Options**
```
--base-url <url> OAuth callback base URL
-d, --description <description> Consumer description
-F, --format <format> Output format (human, json) (default: human)
-n, --name <name> Consumer name
--picture <url> Application logo URL
--rights <rights> Comma-separated list of rights (access-organisations, access-organisations-bills, access-organisations-consumption-statistics, access-organisations-credit-count, access-personal-information, manage-organisations, manage-organisations-applications, manage-organisations-members, manage-organisations-services, manage-personal-information, manage-ssh-keys, all)
--url <url> Application home URL
```

## open

**Description:** Open an application in the Console
Expand Down Expand Up @@ -2930,7 +3075,7 @@
-a, --alias <alias> Short name for the application
--app <app-id|app-name> Application to manage by its ID (or name, if unambiguous)
--commit <commit-id> Restart the application with a specific commit ID
-e, --exit-on <step> Step at which the logs streaming is ended, steps are: deploy-start, deploy-end, never (default: deploy-end)
-e, --exit-on <step> Step at which the logs streaming is ended (deploy-start, deploy-end, never) (default: deploy-end)
--follow Continue to follow logs after deployment has ended (deprecated, use `--exit-on never` instead)
-q, --quiet Don't show logs during deployment
--without-cache Restart the application without using cache
Expand Down
Loading