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
Resolved conflict in packages/b2c-dx-mcp/README.md by keeping the
streamlined version from HEAD, avoiding duplicate Configuration
documentation that was already covered in the Usage section.
Copy file name to clipboardExpand all lines: AGENTS.md
+38-15Lines changed: 38 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,13 +18,41 @@ pnpm run build
18
18
pnpm --filter @salesforce/b2c-cli run build
19
19
pnpm --filter @salesforce/b2c-tooling-sdk run build
20
20
21
-
# Run tests (includes linting)
22
-
pnpm run test
23
-
24
21
# Dev mode for CLI (uses source files directly)
25
22
pnpm --filter @salesforce/b2c-cli run dev
26
23
# or using convenience script
27
24
./cli
25
+
```
26
+
27
+
## Commands for Coding Agents
28
+
29
+
These commands produce condensed output optimized for AI coding agents:
30
+
31
+
```bash
32
+
# Run tests (minimal output - only failures + summary)
33
+
pnpm run test:agent
34
+
35
+
# Run tests for specific package
36
+
pnpm --filter @salesforce/b2c-cli run test:agent
37
+
pnpm --filter @salesforce/b2c-tooling-sdk run test:agent
38
+
39
+
# Lint (errors only, no warnings)
40
+
pnpm run lint:agent
41
+
42
+
# Type-check (single-line errors, no color)
43
+
pnpm run typecheck:agent
44
+
45
+
# Format check (lists only files needing formatting)
46
+
pnpm run -r format:check
47
+
```
48
+
49
+
## Verbose Commands (Debugging/CI)
50
+
51
+
Use these for detailed output during debugging or in CI pipelines:
52
+
53
+
```bash
54
+
# Run tests with full output and coverage
55
+
pnpm run test
28
56
29
57
# Run tests for specific package
30
58
pnpm --filter @salesforce/b2c-cli run test
@@ -33,7 +61,7 @@ pnpm --filter @salesforce/b2c-tooling-sdk run test
33
61
# Format code with prettier
34
62
pnpm run -r format
35
63
36
-
# Lint only (without tests)
64
+
# Lint with full output
37
65
pnpm run -r lint
38
66
```
39
67
@@ -60,6 +88,8 @@ The header is enforced by eslint via `eslint-plugin-header`. The canonical defin
60
88
61
89
## Documentation
62
90
91
+
- Update docs in `./docs/` folder and relevant skills in `./plugins/b2c-cli/skills/` when updating or adding CLI commands.
92
+
63
93
See [documentation skill](./.claude/skills/documentation/SKILL.md) for details on updating user guides, CLI reference, and API docs.
64
94
65
95
```bash
@@ -76,9 +106,9 @@ pnpm run docs:build
76
106
- CLI commands have access to this logger via `this.log` method from oclif Command class
77
107
- CLI commands can write directly to stdout/stderr if their primary purpose is to output or stream data
78
108
79
-
## Table Output
109
+
## CLI Command Development
80
110
81
-
Use `createTable` from `@salesforce/b2c-tooling-sdk/cli` for tabular output. See [CLI command development skill](./.claude/skills/cli-command-development/SKILL.md) for patterns.
111
+
See [CLI command development skill](./.claude/skills/cli-command-development/SKILL.md) for patterns.
82
112
83
113
## Claude Code Skills
84
114
@@ -95,27 +125,20 @@ Use `createTable` from `@salesforce/b2c-tooling-sdk/cli` for tabular output. See
95
125
96
126
See [testing skill](./.claude/skills/testing/SKILL.md) for patterns on writing tests with Mocha, Chai, and MSW.
97
127
98
-
Quick commands:
99
-
```bash
100
-
pnpm run test# Run all tests
101
-
pnpm --filter @salesforce/b2c-tooling-sdk run test# Test specific package
102
-
pnpm mocha "test/clients/webdav.test.ts"# Single file (no coverage)
103
-
```
104
-
105
128
## Changesets
106
129
107
130
This project uses [Changesets](https://github.com/changesets/changesets) for version management. When making changes that affect users, create a changeset:
108
131
109
132
Changeset guidelines:
110
133
- Create a changeset for any user-facing changes (features, bug fixes); typically in new pull requests;
111
-
- a pull request can have multiple changesets
134
+
- a pull request can have multiple changesets; separate files for separate changes
112
135
- Select the appropriate semver bump: `patch` (bug fixes) or `minor` (new features)
113
136
- This is a pre-1.0 preview release, so there are no `major` breaking change bumps yet
114
137
- Good changesets explain:
115
138
- WHAT the change is
116
139
- WHY the change was made
117
140
- HOW a consumer should update their code
118
-
- Good changesets are brief and user-focused (not contributor); they are generally 1 line or a short paragraph for detailed changes; The content of the changeset is used in CHANGELOG and release notes.
141
+
- Good changesets are brief and user-focused (not contributor); they are generally 1 line or two; The content of the changeset is used in CHANGELOG and release notes. You do not need to list internal implementation details or all details of commands; just the high level summary for users.
119
142
120
143
create a changeset file directly in `.changeset/` with a unique filename (e.g., `descriptive-change-name.md`):
- ODS operations (requires `Sandbox API User` role)
117
-
- SLAS operations (requires `SLAS Organization Administrator` or `Sandbox API User` role depending on auth method)
118
-
119
-
### Basic Auth (WebDAV)
120
-
121
-
WebDAV operations support Basic Auth using your Business Manager username and WebDAV access key:
122
-
123
-
```bash
124
-
export SFCC_USERNAME=my-user
125
-
export SFCC_PASSWORD=my-webdav-access-key
126
-
```
127
-
128
-
Used by:
129
-
-`code deploy` (file upload)
130
-
-`code watch` (file upload)
131
-
-`webdav` commands
132
-
133
-
### MRT API Key
134
-
135
-
Managed Runtime commands use a separate API key obtained from the MRT dashboard:
136
-
137
-
```bash
138
-
export SFCC_MRT_API_KEY=your-mrt-api-key
139
-
```
140
-
141
-
See [MRT Commands](./mrt#authentication) for details.
142
-
143
-
### Mixed Authentication
144
-
145
-
Some commands (like `code deploy` with `--reload`) require both OAuth and WebDAV access:
146
-
147
-
```bash
148
-
export SFCC_CLIENT_ID=my-client
149
-
export SFCC_CLIENT_SECRET=my-secret
150
-
export SFCC_USERNAME=my-user
151
-
export SFCC_PASSWORD=my-access-key
152
-
b2c code deploy --reload
153
-
```
154
-
155
-
### Configuration File
156
-
157
-
Credentials can be stored in a `dw.json` file:
158
-
159
-
```json
160
-
{
161
-
"client-id": "my-client",
162
-
"client-secret": "my-secret",
163
-
"username": "my-user",
164
-
"password": "my-access-key"
165
-
}
166
-
```
167
-
168
-
Use `--config` to specify a custom config file path, or `--instance` to select a named instance configuration.
169
-
170
-
### Tenant Scope
171
-
172
-
For ODS and SLAS operations, your API client must have tenant scope configured for the realm/organization you wish to manage. This is set up in Account Manager when creating or editing the API client.
105
+
::: tip
106
+
Each command page below documents its specific authentication requirements including required scopes.
0 commit comments