44
55## Features
66
7+ - ** Setup Wizard** : Interactive ` setup ` command to get everything running in minutes.
8+ - ** Authentication Management** : Built-in ` auth ` command for gcloud login, ADC setup, and Service Account management.
79- ** Automated Installation** : Downloads and verifies the official Cloud SQL Proxy binary.
810- ** Instance Management** : Lists and selects Cloud SQL instances using your active ` gcloud ` configuration.
9- - ** Process Management** : Starts, stops, and restarts the proxy as a background process with PID tracking .
10- - ** Structured Logging** : JSON logging with automatic masking of sensitive tokens, stored in ` %LOCALAPPDATA% ` .
11- - ** Diagnostics** : Built-in ` doctor ` command to check environment health (gcloud, ADC, network).
11+ - ** Process Management** : Starts, stops, and restarts the proxy as a background process or Windows Service .
12+ - ** Structured Logging** : JSON logging with automatic masking of sensitive tokens.
13+ - ** Diagnostics** : Built-in ` doctor ` command to check environment health (gcloud, ADC, network, service ).
1214- ** Self-Update** : Easily update the proxy binary to the latest version.
1315
1416## Installation
1517
16- Download the latest ` cloudsqlctl.exe ` from the [ Releases] ( https://github.com/your-org/cloudsqlctl/releases ) page and add it to your PATH.
18+ Download the latest installer (` cloudsqlctl-setup.exe ` ) from the [ Releases] ( https://github.com/Kinin-Code-Offical/cloudsqlctl/releases ) page.
19+
20+ ## Quick Start
21+
22+ Run the setup wizard to configure gcloud, authentication, and the proxy:
23+
24+ ``` powershell
25+ cloudsqlctl setup
26+ ```
1727
1828## Usage
1929
@@ -23,29 +33,53 @@ cloudsqlctl [command] [options]
2333
2434### Commands
2535
26- | Command | Description |
27- | :-------- | :------------------------------------------------------------ |
28- | ` install ` | Download and install the Cloud SQL Proxy binary (User scope). |
29- | ` update ` | Update the Cloud SQL Proxy binary to the latest version. |
30- | ` list ` | List available Cloud SQL instances. |
31- | ` select ` | Interactively select a Cloud SQL instance to proxy. |
32- | ` connect ` | Connect to a specific instance directly. |
33- | ` start ` | Start the proxy for the selected instance. |
34- | ` stop ` | Stop the running proxy process. |
35- | ` service ` | Manage Windows Service (Admin required). |
36- | ` env ` | Manage environment variables (User/Machine scope). |
37- | ` gcloud ` | Manage Google Cloud CLI (install portable version). |
38- | ` restart ` | Restart the proxy process. |
39- | ` status ` | Check if the proxy is running and view details. |
40- | ` logs ` | View the tail of the proxy logs. |
41- | ` doctor ` | Run diagnostics to verify environment setup. |
42- | ` reset ` | Reset configuration and remove local files. |
43-
44- ### Example
36+ | Command | Description |
37+ | :-------- | :------------------------------------------------------- |
38+ | ` setup ` | Interactive setup wizard (Recommended for first run). |
39+ | ` auth ` | Manage authentication (Login, ADC, Service Accounts). |
40+ | ` install ` | Download and install the Cloud SQL Proxy binary. |
41+ | ` update ` | Update the Cloud SQL Proxy binary to the latest version. |
42+ | ` list ` | List available Cloud SQL instances. |
43+ | ` select ` | Interactively select a Cloud SQL instance to proxy. |
44+ | ` connect ` | Connect to a specific instance directly. |
45+ | ` start ` | Start the proxy for the selected instance. |
46+ | ` stop ` | Stop the running proxy process. |
47+ | ` service ` | Manage Windows Service (Admin required). |
48+ | ` env ` | Manage environment variables (User/Machine scope). |
49+ | ` gcloud ` | Manage Google Cloud CLI (install portable version). |
50+ | ` status ` | Check if the proxy is running and view details. |
51+ | ` logs ` | View the tail of the proxy logs. |
52+ | ` doctor ` | Run diagnostics to verify environment setup. |
53+ | ` reset ` | Reset configuration and remove local files. |
54+
55+ ### Authentication Modes
56+
57+ ** 1. Developer Mode (Interactive)**
58+ Uses your personal Google Cloud credentials via ` gcloud ` .
4559
4660``` powershell
47- # 1. Install the proxy
48- cloudsqlctl install
61+ cloudsqlctl auth login
62+ cloudsqlctl auth adc
63+ ```
64+
65+ ** 2. Machine/Service Mode (Service Account)**
66+ Uses a Service Account JSON key. Ideal for automated environments or Windows Services.
67+
68+ ``` powershell
69+ # Securely install service account key (Machine scope requires Admin)
70+ cloudsqlctl auth set-service-account --file "C:\path\to\key.json" --scope Machine
71+ ```
72+
73+ ### Windows Service
74+
75+ Run the proxy as a Windows Service for background persistence.
76+
77+ ``` powershell
78+ # Install service (Admin required)
79+ cloudsqlctl service install --instance "my-project:region:instance" --port 5432
80+
81+ # Start service
82+ cloudsqlctl service start
4983
5084# 2. Select your database instance
5185cloudsqlctl select
0 commit comments