@@ -21,7 +21,6 @@ The command model is intentionally layered:
2121- ` project ` for remote Agora resources and env export
2222- ` auth ` for login and session inspection
2323- ` config ` for local CLI defaults
24- - ` add ` hidden and reserved for future in-place integrations into an existing codebase
2524
2625## Install / Build
2726
@@ -107,10 +106,6 @@ Handles login, logout, and current session inspection.
107106
108107Reads and updates local CLI defaults such as output mode, log level, and browser behavior.
109108
110- ### ` add `
111-
112- Hidden and reserved for future in-place integrations into an existing application. It is intentionally not part of the normal help surface today.
113-
114109## Common Workflows
115110
116111### Onboard a new demo
@@ -176,6 +171,38 @@ The CLI also writes repo-local project metadata to:
176171
177172That allows the CLI to detect which Agora project a cloned demo is bound to even when you are working inside the repo later.
178173
174+ ## Repo-Local Project Binding
175+
176+ Project resolution precedence is consistent across commands:
177+ 1 . explicit ` --project ` or positional project argument
178+ 2 . repo-local ` .agora/project.json ` resolved from the target repo path
179+ 3 . global CLI context from ` agora project use `
180+
181+ The ` .agora/project.json ` file is created or updated by:
182+ - ` agora init `
183+ - ` agora quickstart create ... --project ... `
184+ - ` agora quickstart env write ... `
185+
186+ It stores durable non-secret metadata:
187+ - ` projectId `
188+ - ` projectName `
189+ - ` region `
190+ - ` template `
191+ - ` envPath `
192+
193+ Examples:
194+
195+ ``` bash
196+ # Inside a bound quickstart repo
197+ ./agora project show --json
198+
199+ # From any directory, target a repo path directly
200+ ./agora quickstart env write /abs/path/to/my-go-demo --json
201+
202+ # Rebind a repo to a different project
203+ ./agora quickstart env write /abs/path/to/my-go-demo --project my-other-project --json
204+ ```
205+
179206## Automation / Agent Usage
180207
181208For scripts, CI, and agentic workflows:
@@ -260,14 +287,11 @@ Quickstart env injection requires a project with an app certificate. If the sele
260287If a command needs a project and none is currently selected, either:
261288
262289``` bash
290+ ./agora quickstart env write my-go-demo --project my-project
263291./agora project use my-project
264292```
265293
266- or pass ` --project ` explicitly:
267-
268- ``` bash
269- ./agora quickstart env write my-go-demo --project my-project
270- ```
294+ or run it inside a repo that already has ` .agora/project.json ` .
271295
272296## Migration
273297
0 commit comments