clever-tools
clever-tools copied to clipboard
[Draft] Access add-on shells through clever-tools
To access add-ons CLIs, we currently need to use the add-on provider specific command like psql -h <redacted>-postgresql.services.clever-cloud.com -p 5432 -U <redacted> -d <redacted>
.
Proposition
It could be useful to have a more generic clever
command like clever shell <addon_id>
(name to discuss).
Expected behaviors
- Depending on the add-on provider (PostgreSQL, MongoDB, Redis…), the new
clever
command would launch the appropriate shell. - This command would not require a linked application. It would read
~/.config/clever-cloud
to authorize the user and read necessary add-on details. - If appropriate commands (
mysql
,psql
…) are not available,clever-tools
would not install or bundle them, but rather display an OS-specific message explaining the user how to install it. This message would be displayed when runningclever shell <addon_id>
(or whatever name is chosen), not duringclever-tools
installation.
Related issues
- #267
Since the discussed command relates to add-ons exclusively (and not apps), I think it would fit best inside clever addon
.
The result would be clever addon shell <addon_id>
instead of clever shell <addon_id>
.
The API doesn't currently provide a way for us to fetch such informations. It's a Work In Progress but hasn't been merged yet. We'll come back to this issue when the API will be ready.
- [ ] API ready
Which information do you need from the API ?
:ballot_box_with_check: I'm ok with clever addon shell <addon_id>
Which information do you need from the API ?
At least connection details (user / password / hostname / port)
It's on exposed env... Will be ok to use it