Skip to content

Commit 1dee2d9

Browse files
Copilotjongio
andauthored
Align documentation with implementation (#45)
* Initial plan * Fix documentation inconsistencies: yaml field names and installation instructions Co-authored-by: jongio <2163001+jongio@users.noreply.github.com> * Fix reqs command documentation and add global flags Co-authored-by: jongio <2163001+jongio@users.noreply.github.com> * Update version examples to current version (0.5.1) Co-authored-by: jongio <2163001+jongio@users.noreply.github.com> * Fix broken documentation links and update project structure Co-authored-by: jongio <2163001+jongio@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jongio <2163001+jongio@users.noreply.github.com>
1 parent bc1e67f commit 1dee2d9

File tree

4 files changed

+77
-36
lines changed

4 files changed

+77
-36
lines changed

cli/README.md

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,34 @@ App automatically detects and manages dependencies for:
2828

2929
### For End Users
3030

31-
First, add the extension registry:
31+
First, enable azd extensions:
3232

3333
```bash
34-
azd config set extension.registry https://raw.githubusercontent.com/jongio/azd-app/main/registry.json
34+
azd config set alpha.extension.enabled on
35+
```
36+
37+
Then add the extension registry:
38+
39+
```bash
40+
azd extension source add -n app -t url -l "https://raw.githubusercontent.com/jongio/azd-app/refs/heads/main/registry.json"
3541
```
3642

3743
Then install the extension:
3844

3945
```bash
40-
azd extension install app
46+
azd extension install jongio.azd.app
4147
```
4248

4349
Or install from a specific version:
4450

4551
```bash
46-
azd extension install app --version 0.1.0
52+
azd extension install jongio.azd.app --version 0.5.1
4753
```
4854

4955
To uninstall:
5056

5157
```bash
52-
azd extension uninstall app
58+
azd extension uninstall jongio.azd.app
5359
```
5460

5561
### For Development & Testing
@@ -112,7 +118,7 @@ The devcontainer includes:
112118
- Mage, golangci-lint, and all development tools
113119
- Your Azure credentials automatically mounted
114120

115-
See [.devcontainer/README.md](.devcontainer/README.md) for details.
121+
See [../.devcontainer/README.md](../.devcontainer/README.md) for details.
116122

117123
### Prerequisites
118124

@@ -173,9 +179,9 @@ The generated `azure.yaml`:
173179
```yaml
174180
name: my-project
175181
reqs:
176-
- id: node
182+
- name: node
177183
minVersion: 22.0.0
178-
- id: pnpm
184+
- name: pnpm
179185
minVersion: 10.0.0
180186
```
181187
@@ -191,12 +197,12 @@ reqs:
191197
```yaml
192198
name: my-project
193199
reqs:
194-
- id: docker
200+
- name: docker
195201
minVersion: "20.0.0"
196202
checkRunning: true
197-
- id: nodejs
203+
- name: nodejs
198204
minVersion: "20.0.0"
199-
- id: python
205+
- name: python
200206
minVersion: "3.12.0"
201207
```
202208
@@ -310,7 +316,7 @@ resourceGroup := os.Getenv("AZURE_RESOURCE_GROUP_NAME")
310316
envName := os.Getenv("AZURE_ENV_NAME")
311317
```
312318

313-
See [docs/azd-context.md](docs/azd-context.md) for comprehensive documentation on accessing azd context and environment variables.
319+
See [docs/dev/azd-context-inheritance.md](docs/dev/azd-context-inheritance.md) for comprehensive documentation on accessing azd context and environment variables.
314320

315321
## Development
316322

@@ -350,11 +356,25 @@ azd-app-extension/
350356
│ └── azure/
351357

352358
├── docs/ # Documentation
353-
│ ├── quickstart.md
354-
│ ├── add-command-guide.md
355-
│ ├── command-dependency-chain.md
356-
│ ├── azd-context.md
357-
│ └── reqs-command.md
359+
│ ├── cli-reference.md
360+
│ ├── environment-variables.md
361+
│ ├── environment-variables-quick-reference.md
362+
│ ├── commands/
363+
│ │ ├── reqs.md
364+
│ │ ├── deps.md
365+
│ │ ├── run.md
366+
│ │ ├── logs.md
367+
│ │ ├── info.md
368+
│ │ └── version.md
369+
│ ├── dev/
370+
│ │ ├── azd-context-inheritance.md
371+
│ │ ├── environment-variables.md
372+
│ │ ├── testing.md
373+
│ │ └── release.md
374+
│ ├── design/
375+
│ │ └── ports.md
376+
│ └── schema/
377+
│ └── azure.yaml.md
358378
├── .github/
359379
│ └── workflows/
360380
│ ├── ci.yml # CI pipeline
@@ -523,7 +543,7 @@ azd app deps
523543

524544
## Contributing
525545

526-
We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
546+
We welcome contributions! Please see [CONTRIBUTING.md](../CONTRIBUTING.md) for guidelines.
527547

528548
### Code Quality Requirements
529549

@@ -560,7 +580,7 @@ See [LICENSE](LICENSE) for details.
560580

561581
- **Issues**: [GitHub Issues](https://github.com/jongio/azd-app-extension/issues)
562582
- **Discussions**: [GitHub Discussions](https://github.com/jongio/azd-app-extension/discussions)
563-
- **Contributing**: See [CONTRIBUTING.md](CONTRIBUTING.md)
583+
- **Contributing**: See [CONTRIBUTING.md](../CONTRIBUTING.md)
564584

565585
## Acknowledgments
566586

cli/docs/cli-reference.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,29 @@ Complete reference for all `azd app` commands and flags.
66

77
All commands automatically inherit azd environment context when run through `azd app <command>`. This includes Azure subscription information, resource groups, and environment-specific variables.
88

9-
See [azd-context.md](azd-context.md) for details on accessing azd environment variables.
9+
See [dev/azd-context-inheritance.md](dev/azd-context-inheritance.md) for details on accessing azd environment variables.
10+
11+
### Global Flags
12+
13+
These flags are available for all commands:
14+
15+
| Flag | Short | Type | Default | Description |
16+
|------|-------|------|---------|-------------|
17+
| `--output` | `-o` | string | `default` | Output format (default, json) |
18+
| `--debug` | | bool | `false` | Enable debug logging |
19+
| `--structured-logs` | | bool | `false` | Enable structured JSON logging to stderr |
20+
21+
**Examples:**
22+
```bash
23+
# Output in JSON format
24+
azd app reqs --output json
25+
26+
# Enable debug logging
27+
azd app run --debug
28+
29+
# Enable structured logs for log aggregation
30+
azd app deps --structured-logs
31+
```
1032

1133
## Commands Overview
1234

@@ -56,7 +78,6 @@ azd app reqs --clear-cache
5678
| Flag | Short | Type | Default | Description |
5779
|------|-------|------|---------|-------------|
5880
| `--generate` | `-g` | bool | `false` | Generate reqs from detected project dependencies |
59-
| `--gen` | | bool | `false` | Alias for --generate |
6081
| `--dry-run` | | bool | `false` | Preview changes without modifying azure.yaml |
6182
| `--no-cache` | | bool | `false` | Force fresh reqs check and bypass cached results |
6283
| `--clear-cache` | | bool | `false` | Clear cached reqs results |
@@ -400,7 +421,7 @@ azd app version
400421

401422
Displays the current version of the extension:
402423
```
403-
azd app extension version 0.1.0
424+
azd app extension version 0.5.1
404425
```
405426

406427
**→ [See full version command specification](commands/version.md)** for version format details.
@@ -432,7 +453,7 @@ When running through `azd app <command>`, these variables are automatically avai
432453
- `AZD_SERVER`: gRPC server address for azd communication
433454
- `AZD_ACCESS_TOKEN`: Authentication token for azd API
434455

435-
See [azd-context.md](azd-context.md) for complete details.
456+
See [dev/azd-context-inheritance.md](dev/azd-context-inheritance.md) for complete details.
436457

437458
### Extension-Specific
438459

cli/docs/commands/reqs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ project-root/
316316
"timestamp": "2024-11-04T10:30:00Z",
317317
"results": [
318318
{
319-
"id": "node",
319+
"name": "node",
320320
"installed": true,
321321
"version": "20.11.0",
322322
"required": "18.0.0",
@@ -326,7 +326,7 @@ project-root/
326326
"message": "Satisfied"
327327
},
328328
{
329-
"id": "docker",
329+
"name": "docker",
330330
"installed": true,
331331
"version": "24.0.7",
332332
"required": "20.0.0",
@@ -452,7 +452,7 @@ reqs:
452452
checkRunning: true
453453

454454
# Custom tool configuration
455-
- id: postgres
455+
- name: postgres
456456
minVersion: "15.0.0"
457457
command: "psql"
458458
args: ["--version"]
@@ -467,7 +467,7 @@ reqs:
467467
468468
| Field | Type | Required | Description |
469469
|-------|------|----------|-------------|
470-
| `id` | string | ✅ | Unique tool identifier |
470+
| `name` | string | ✅ | Unique tool identifier |
471471
| `minVersion` | string | ✅ | Minimum version (semantic) |
472472
| `command` | string | ❌ | Override command to execute |
473473
| `args` | []string | ❌ | Override command arguments |

cli/docs/commands/version.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The version follows **semantic versioning** (semver):
4646
```
4747
MAJOR.MINOR.PATCH
4848
49-
Example: 0.1.0
49+
Example: 0.5.1
5050
│ │ │
5151
│ │ └─ Patch: Bug fixes
5252
│ └───── Minor: New features (backward compatible)
@@ -59,15 +59,15 @@ Example: 0.1.0
5959

6060
```bash
6161
$ azd app version
62-
azd app extension version 0.1.0
62+
azd app extension version 0.5.1
6363
```
6464

6565
### JSON Output (future)
6666

6767
```bash
6868
$ azd app version --output json
6969
{
70-
"version": "0.1.0",
70+
"version": "0.5.1",
7171
"commit": "abc1234",
7272
"buildDate": "2024-11-04T10:00:00Z"
7373
}
@@ -79,7 +79,7 @@ $ azd app version --output json
7979

8080
```bash
8181
$ azd app version
82-
azd app extension version 0.1.0
82+
azd app extension version 0.5.1
8383
```
8484

8585
### 2. Verify Installation
@@ -89,7 +89,7 @@ $ which azd-app
8989
/usr/local/bin/azd-app
9090

9191
$ azd app version
92-
azd app extension version 0.1.0
92+
azd app extension version 0.5.1
9393
```
9494

9595
### 3. Troubleshooting
@@ -98,7 +98,7 @@ When reporting issues, include version information:
9898

9999
```bash
100100
$ azd app version
101-
azd app extension version 0.1.0
101+
azd app extension version 0.5.1
102102

103103
# Include in bug report
104104
```
@@ -114,7 +114,7 @@ azd version 1.5.0
114114

115115
# Check azd app version
116116
$ azd app version
117-
azd app extension version 0.1.0
117+
azd app extension version 0.5.1
118118
```
119119

120120
## Version Compatibility
@@ -146,7 +146,7 @@ The extension is designed to be compatible with:
146146

147147
```bash
148148
$ azd app version
149-
azd app extension version 0.1.0
149+
azd app extension version 0.5.1
150150
```
151151

152152
### Example 2: In Scripts
@@ -170,5 +170,5 @@ echo "Using azd app version: $VERSION"
170170
```bash
171171
$ azd version && azd app version
172172
azd version 1.5.0
173-
azd app extension version 0.1.0
173+
azd app extension version 0.5.1
174174
```

0 commit comments

Comments
 (0)