You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Layers below `controller` do not import `cmd`. Layers below `aid` do not import `controller`.
@@ -46,6 +76,37 @@ A single command, such as `tecli workspace list`, flows through the layers:
46
76
4.`RunE` reads the resolved token through `cobra/dao` (environment variable first, then the active profile), builds a `*tfe.Client` with `aid.GetTFEClient`, and calls the matching `go-tfe` method.
47
77
5. The controller prints the API response as JSON.
48
78
79
+
The following sequence shows `tecli workspace create --name my-workspace`:
-**Thin wrapper over `go-tfe`.** TECLI does not reimplement Terraform Cloud logic. Each command maps to one `go-tfe` call, so the output mirrors the API response. Upgrading `go-tfe` is the main way new API behavior reaches the CLI.
Copy file name to clipboardExpand all lines: README.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -174,7 +174,21 @@ The `configure` command reads and writes the credentials file only. It does not
174
174
175
175
## Architecture
176
176
177
-
TECLI is a thin command-line wrapper around `hashicorp/go-tfe`. The `main` package calls `cmd.Execute()`, which builds a Cobra command tree. Each command validates flags, marshals them into `go-tfe` option structs, calls the Terraform Cloud API, and prints the JSON response. For components, data flow, and design decisions, see [ARCHITECTURE.md](ARCHITECTURE.md).
177
+
TECLI is a thin command-line wrapper around `hashicorp/go-tfe`. The `main` package calls `cmd.Execute()`, which builds a Cobra command tree. Each command validates flags, marshals them into `go-tfe` option structs, calls the Terraform Cloud API, and prints the JSON response.
178
+
179
+
```mermaid
180
+
%% High-level request flow
181
+
flowchart LR
182
+
user([You / CI pipeline]) --> cli["tecli<br/>Cobra command"]
183
+
cli --> resolve["Resolve org and token<br/>TFC_* env vars, then profile"]
0 commit comments