@@ -30,7 +30,7 @@ Commands are organized in the `cmd/` directory:
3030Coolify API client implementation:
3131- ` client.go ` - HTTP client with authentication
3232- ` applications.go ` - Application CRUD operations
33- - ` deployments.go ` - Deployment management
33+ - ` deployments.go ` - Deployment management, log parsing, health checks
3434- ` projects.go ` - Project management
3535- ` servers.go ` - Server listing
3636- ` types.go ` - API request/response types
@@ -49,9 +49,9 @@ Framework detection:
4949#### ` internal/deploy/ `
5050Deployment orchestration:
5151- ` setup.go ` - First-time project setup wizard
52- - ` git.go ` - Git-based deployment logic
53- - ` docker.go ` - Docker-based deployment logic
54- - ` watcher.go ` - File watcher for development mode
52+ - ` git.go ` - Git-based deployment logic with verbose output support
53+ - ` docker.go ` - Docker-based deployment logic with verbose output support
54+ - ` watcher.go ` - Deployment status watcher with log streaming
5555
5656#### ` internal/docker/ `
5757Docker operations:
@@ -61,12 +61,12 @@ Docker operations:
6161
6262#### ` internal/git/ `
6363Git operations:
64- - ` repo.go ` - Git repository management (init, commit, push)
64+ - ` repo.go ` - Git repository management (init, commit, push, log )
6565- ` github.go ` - GitHub API client for repository creation
6666
6767#### ` internal/ui/ `
6868User interface:
69- - ` ui.go ` - Terminal UI helpers (spinners, prompts, colors)
69+ - ` ui.go ` - Terminal UI helpers (prompts, colors, output formatting) using survey library
7070- ` task_runner.go ` - BubbleTea task runner for async operations with spinner feedback
7171- ` messages.go ` - Message types for BubbleTea communication
7272
@@ -157,6 +157,42 @@ The task runner:
157157- Can run in verbose mode (no spinner, immediate output)
158158- Uses BubbleTea for terminal UI management
159159
160+ ### Verbose Mode
161+
162+ The CLI supports a global ` --verbose ` / ` -v ` flag that enables detailed output:
163+ - Disables spinners in favor of immediate streaming output
164+ - Git operations (` CommitVerbose ` , ` PushWithTokenVerbose ` ) stream stdout/stderr in dimmed format
165+ - Deployment operations show real-time progress
166+ - Access verbose state via ` cmd.IsVerbose() ` from any command
167+
168+ ### Debug Mode
169+
170+ Set ` CDP_DEBUG=1 ` environment variable for internal debugging:
171+ - Shows binary hash on startup
172+ - Enables trace output in UI functions
173+ - Shows detailed deployment watcher status
174+ - Logs API call details and error information
175+
176+ ### Deployment Watcher Pattern
177+
178+ For monitoring deployments, use ` deploy.WatchDeployment() ` :
179+
180+ ``` go
181+ success := deploy.WatchDeployment (client, appUUID)
182+ if success {
183+ ui.Success (" Deployment complete" )
184+ } else {
185+ ui.Error (" Deployment failed" )
186+ }
187+ ```
188+
189+ The watcher:
190+ - Polls Coolify API for deployment status
191+ - Streams build logs in real-time (dimmed output)
192+ - Handles various Coolify API response formats
193+ - Timeouts after ~ 4 minutes with configurable polling
194+ - Gracefully handles API errors and missing deployments
195+
160196## Common Tasks
161197
162198### Adding a New Command
@@ -181,18 +217,23 @@ The task runner:
181217### UI Feedback
182218
183219Always use ` internal/ui ` helpers:
184- - ` ui.Info() ` - Informational messages
185- - ` ui.Success() ` - Success messages
186- - ` ui.Warn() ` - Warnings
187- - ` ui.Error() ` - Error messages
188- - ` ui.Select() ` / ` ui.Input() ` - User prompts
220+ - ` ui.Info() ` - Informational messages (cyan dot prefix)
221+ - ` ui.Success() ` - Success messages (green dash prefix)
222+ - ` ui.Warning() ` - Warnings (yellow exclamation prefix)
223+ - ` ui.Error() ` - Error messages (red X prefix)
224+ - ` ui.Dim() ` - Dimmed/muted output
225+ - ` ui.Bold() ` - Bold text
226+ - ` ui.Select() ` / ` ui.Input() ` - User prompts (GitHub CLI style via survey library)
227+ - ` ui.Confirm() ` - Yes/no prompts
228+ - ` ui.Password() ` - Secure password input
229+ - ` ui.LogChoice() ` - Log auto-selected choices without user interaction
189230- ` ui.RunTasks() ` - Execute async operations with spinner feedback
190- - ` ui.StepProgress() ` - Display step progress (e.g., "Step 1/5")
191- - ` ui.Divider() ` - Visual separator
192231- ` ui.Spacer() ` - Vertical spacing
193- - ` ui.KeyValue() ` - Display key-value pairs
232+ - ` ui.KeyValue() ` - Display key-value pairs (dimmed, indented)
194233- ` ui.List() ` - Display bulleted lists
234+ - ` ui.Table() ` - Display tabular data
195235- ` ui.NextSteps() ` - Display next steps to user
236+ - ` ui.DimStyle ` - Lipgloss style for dimmed log output
196237
197238## Important Considerations
198239
@@ -258,11 +299,13 @@ The project includes a Makefile for build automation:
258299- ` make test ` - Run tests
259300- ` make help ` - Show available targets
260301
302+ ** Build Workflow:** Always run ` make build && make install ` together when making changes to ensure the CLI is updated both in the bin directory and in the system path.
303+
261304## Dependencies
262305
263306Key external packages:
264307- ` github.com/spf13/cobra ` - CLI framework
265- - ` github.com/charmbracelet/huh ` - Interactive prompts
308+ - ` github.com/AlecAivazis/survey/v2 ` - Interactive prompts (GitHub CLI style)
266309- ` github.com/charmbracelet/bubbletea ` - Terminal UI framework for task runner
267310- ` github.com/charmbracelet/lipgloss ` - Terminal styling
268311- ` github.com/charmbracelet/bubbles ` - BubbleTea components (spinner)
0 commit comments