connection:delete
Remove a connection from clonio.json.
Deletes a saved database connection from the clonio.json configuration file.
Usage
clonio connection:delete [<name>]
clonio connection:delete [<name>] --force
Behaviour
- If
<name>is not provided and only one connection exists, it is selected automatically. If multiple connections exist, an interactive prompt asks you to choose one. In non-interactive mode (--no-interaction), the choice prompt is unavailable: if multiple connections exist and nonameis given, the command fails with exit code2instead of guessing. - If the named connection does not exist, the command exits with an error.
- A summary table of the connection is displayed before deletion. The password is always shown as
••••••••. - If the connection is marked as a production connection, a warning is printed.
- Without
--force, a confirmation prompt is shown. The default answer is No — press Enter to cancel. - With
--force, the confirmation is skipped and the connection is deleted immediately. - On success, a confirmation message is printed.
Options
| Option | Description |
|---|---|
--force |
Skip the confirmation prompt and delete immediately |
Exit codes
| Code | Meaning |
|---|---|
0 |
Connection deleted successfully, or deletion cancelled by the user |
2 |
No connections exist, or the specified connection was not found |
5 |
Write to clonio.json failed (permission denied or JSON encoding error) |
Notes
- The default answer to the confirmation prompt is No. Pressing Enter without typing
yeswill cancel the deletion. - If the connection has
is_productionset totrue, a prominent warning is shown before the confirmation prompt. - The
--forceflag is intended for scripted or non-interactive use where prompts are not desired.