Write Cloud service connection settings to .env
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
An open pull request (#1167) is already linked, so check its status before starting. If the work remains available, read the existing local dotenv commands and the Cloud service create/get flows to find the relevant entry points. Add the requested parsing, variable-builder, and request-shape tests; done means both commands work as specified, including password handling and write-failure fallback, and the Cloud service guide documents them.
Written by the indexing model from the issue text.
Description
Problem
The common agent flow is "create a Cloud service, then wire it into the application's .env". Local servers have local server dotenv and local postgres dotenv; Cloud has nothing. The agent has to read the endpoints from service get and copy the one-time password out of service create output by hand. That also puts the password in the agent's context and transcript.
The password is returned only by service create and service reset-password, so a later dotenv command can't include it.
Proposal
cloud service create --dotenv [FILE](default.env): after the service is created, write its connection settings and the one-time password to the file. When the file is written, leave the password out of stdout (human and JSON), so it never reaches the agent's context. If writing fails after the service was created, print the password as today and exit nonzero, so the credential is never lost.cloud service dotenv [ID] [--name NAME] [--local]: write the connection settings for an existing service, without a password. Runs with OAuth (read-only).
Keys, matching the local commands' meanings (CLICKHOUSE_PORT is the native port; see #800 for the mcp-clickhouse difference):
| Key | Value |
|---|---|
CLICKHOUSE_HOST |
Host of the service's endpoints |
CLICKHOUSE_PORT |
nativesecure port |
CLICKHOUSE_HTTP_PORT |
https port |
CLICKHOUSE_USER |
default |
CLICKHOUSE_SECURE |
true (Cloud endpoints require TLS) |
CLICKHOUSE_PASSWORD |
Only from create --dotenv |
An existing file is edited in place, as the local commands do: only these keys are replaced, so a CLICKHOUSE_PASSWORD written at create time survives a later service dotenv.
The JWT database auth being researched could later supply a token through a helper command instead of a stored password; that is separate work.
Done when
- Both are implemented with parsing tests, unit tests for the variable builder, and request-shape tests for the file contents, the password kept off stdout, and the write-failure fallback.
- The Cloud service guide documents both.
- Dominant language
- Rust
- Stars
- 80
- Forks
- 9
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 51
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ClickHouse/clickhousectl
-
cargo audit red on main: RUSTSEC-2026-0387 (crypto-bigint 0.5.5 via aws-config credentials-login)Possibly taken @sdairs claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ClickHouse/clickhousectl#1183 ·
Maintainers usually reply within 1 day
-
dependencies
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
ClickHouse/clickhousectl#1185 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 5/100
ClickHouse/clickhousectl#1182 ·
Maintainers usually reply within 1 day
-
rust test-coverage
Difficulty 5/5 Over a week Newbie friendliness 35/100
ClickHouse/clickhousectl#1175 · 2 comments ·
Maintainers usually reply within 1 day
-
rust test-coverage
Difficulty 4/5 3-5 days Newbie friendliness 45/100
ClickHouse/clickhousectl#1174 · 1 comment ·
Maintainers usually reply within 1 day
All issues in ClickHouse/clickhousectl
Similar issues
-
docs(metrics): replace stale src/metrics.rs line anchors in dashboard-metrics.md with symbol namesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
ci-cd desktop size:low telemetry-improvement telemetry-round-1
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
vfarcic/dot-agent-deck#2079 ·
Maintainers usually reply within 1 day
-
enhancement user-priority/P3
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 2 days