Skip to content

feat(cli): add functionality to retrieve workspace build logs to CLI #19008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rowansmithau
Copy link
Contributor

This is a Blink assisted attempt to add functionality to the CLI to enable the retrieval of workspace ID's and their build logs to the CLI in order to remove the need to use the web UI or make a direct API call. Useful when creating workspaces via CLI and they fail to launch. The idea came about as a result of a customer support request and observing a gap in functionality.

coder@prebuild-c7tlltci5p5rdha:~/coder$ ./coder builds list rowan-build-logs
BUILD  BUILD ID                              STATUS   REASON     CREATED              DURATION  
1      3b569192-c547-421b-befd-2f743a1fea64  Started  initiator  2025-07-21 18:58:17  41s       
2      e3cd1fe1-03b4-4884-991e-b7d29d863b9c  Started  initiator  2025-07-22 22:51:49  12s
coder@prebuild-c7tlltci5p5rdha:~/coder$ ./coder logs e3cd1fe1-03b4-4884-991e-b7d29d863b9c
[22:51:50] Setting up: 
[22:51:50] Planning infrastructure: Initializing the backend...
[22:51:50] Planning infrastructure: Initializing modules...
[22:51:50] Planning infrastructure: Downloading dev.registry.coder.com/coder/code-server/coder 1.3.0 for code-server...
...
[22:52:01] Starting workspace: Apply complete! Resources: 5 added, 1 changed, 5 destroyed.
[22:52:01] Starting workspace: Outputs: 0
[22:52:02] Cleaning Up: 

@rowansmithau rowansmithau added cli Area: CLI needs-evaluation Use this label on feature requests that require joint evaluation by Product and Engineering teams. labels Jul 22, 2025
@rowansmithau rowansmithau changed the title Attempt to add functionality to retrieve workspace build logs to CLI feat(cli): Attempt to add functionality to retrieve workspace build logs to CLI Jul 22, 2025
@rowansmithau rowansmithau changed the title feat(cli): Attempt to add functionality to retrieve workspace build logs to CLI feat(cli): add functionality to retrieve workspace build logs to CLI Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Area: CLI needs-evaluation Use this label on feature requests that require joint evaluation by Product and Engineering teams.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant