Skip to content

Commit d81ad23

Browse files
eamonnfahertyclaude
andcommitted
Document lws init, Claude Code slash commands, Lambda Function URLs, and --background flag
Add Claude Code Integration section to getting-started.html documenting lws init, /lws:mock and /lws:chaos slash commands. Add Lambda Function URL support to services.html (FunctionUrl construct, CORS, invoke modes). Add --background flag and ldk stop command to cli.html. Add lws init command card to CLI reference. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent eb73d7d commit d81ad23

File tree

4 files changed

+78
-3
lines changed

4 files changed

+78
-3
lines changed

cli.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ <h3>ldk dev</h3>
4545
<li><code>--log-level, -l</code> <span>Log level: debug, info, warning, error (default: info)</span></li>
4646
<li><code>--project-dir, -d</code> <span>Project root directory (default: current directory)</span></li>
4747
<li><code>--mode, -m</code> <span>Project mode: cdk or terraform (default: auto-detect from project files)</span></li>
48+
<li><code>--background, -b</code> <span>Run in the background as a detached process. Logs are written to <code>.lws/ldk-dev.log</code>. Stop with <code>ldk stop</code>.</span></li>
49+
</ul>
50+
</div>
51+
52+
<div class="cli-detail">
53+
<div class="code-block"><code>uvx --from local-web-services ldk stop [OPTIONS]</code></div>
54+
<h3>ldk stop</h3>
55+
<p>Stop a background <code>ldk dev</code> session. Sends a graceful shutdown signal via the management API.</p>
56+
<ul class="option-list">
57+
<li><code>--port, -p</code> <span>Port of the running ldk dev instance to stop (default: 3000)</span></li>
4858
</ul>
4959
</div>
5060

@@ -95,6 +105,15 @@ <h2>LWS Commands</h2>
95105
<p class="section-lead">AWS CLI-style commands for interacting with your local services. Requires a running <code>ldk dev</code> instance.</p>
96106

97107
<div class="lws-command-grid">
108+
<div class="lws-command">
109+
<h4>lws init</h4>
110+
<p>Initialize Claude Code integration. Creates CLAUDE.md context and slash commands for AI-assisted mock and chaos workflows.</p>
111+
<div>
112+
<span class="subcmd">--project-dir</span>
113+
</div>
114+
<div class="code-block" style="margin-top: 12px;"><code>uvx --from local-web-services lws init</code></div>
115+
</div>
116+
98117
<div class="lws-command">
99118
<h4>lws status</h4>
100119
<p>Show the status of the running ldk dev instance and all providers.</p>

getting-started.html

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,52 @@ <h3>6. Test the application</h3>
167167
</div>
168168
</section>
169169

170+
<section class="section section-alt">
171+
<div class="container">
172+
<h2>Claude Code Integration</h2>
173+
<p class="section-lead">Set up slash commands and context for AI code editors so Claude can manage your local AWS mocks and chaos testing.</p>
174+
175+
<div class="getting-started-steps">
176+
<div class="gs-step">
177+
<h3>Initialize</h3>
178+
<div class="code-block"><code>uvx --from local-web-services lws init</code></div>
179+
<p>This creates three files in your project:</p>
180+
<ul>
181+
<li><code>CLAUDE.md</code> &mdash; LWS quick reference and CLI commands that Claude reads automatically</li>
182+
<li><code>.claude/commands/lws/mock.md</code> &mdash; The <code>/lws:mock</code> slash command</li>
183+
<li><code>.claude/commands/lws/chaos.md</code> &mdash; The <code>/lws:chaos</code> slash command</li>
184+
</ul>
185+
<p>The command is idempotent &mdash; running it again updates existing files without duplicating content.</p>
186+
</div>
187+
188+
<div class="gs-step">
189+
<h3>Slash Commands</h3>
190+
<p>Once initialized, two slash commands are available in Claude Code:</p>
191+
</div>
192+
</div>
193+
194+
<div class="feature-grid" style="grid-template-columns: 1fr 1fr; max-width: 900px; margin: 0 auto;">
195+
<div class="feature-card">
196+
<div class="feature-icon">/</div>
197+
<h3>/lws:mock</h3>
198+
<p>Guides Claude through creating and configuring AWS operation mocks. Supports file-based mocks (persist across restarts) and runtime mocks (configured on the fly). Includes service-aware helpers for DynamoDB JSON, S3 XML, SQS messages, and more.</p>
199+
</div>
200+
<div class="feature-card">
201+
<div class="feature-icon">/</div>
202+
<h3>/lws:chaos</h3>
203+
<p>Guides Claude through enabling chaos engineering on AWS services. Configure error rates, latency injection, timeouts, and connection resets. Includes common scenarios for testing retry logic, circuit breakers, and timeout handling.</p>
204+
</div>
205+
</div>
206+
207+
<div class="getting-started-steps" style="margin-top: 48px;">
208+
<div class="gs-step">
209+
<h3>What Gets Added to CLAUDE.md</h3>
210+
<p>The <code>CLAUDE.md</code> snippet gives Claude context about your LWS environment, including how to start the dev server, check status, and use mock and chaos commands. This context is read automatically by Claude Code when working in your project.</p>
211+
</div>
212+
</div>
213+
</div>
214+
</section>
215+
170216
<footer class="footer">
171217
<div class="container">
172218
<div class="footer-inner">

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ <h2>Explore the Docs</h2>
242242
<a href="getting-started.html" class="feature-card" style="text-decoration: none;">
243243
<div class="feature-icon">&#128640;</div>
244244
<h3>Get Started</h3>
245-
<p>Install prerequisites, clone a sample project, and run your first local stack in under five minutes.</p>
245+
<p>Install prerequisites, clone a sample project, run your first local stack, and set up Claude Code integration.</p>
246246
</a>
247247
<a href="services.html" class="feature-card" style="text-decoration: none;">
248248
<div class="feature-icon">&#9729;&#65039;</div>

services.html

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,9 @@ <h3>Lambda</h3>
336336
<h4>CDK Constructs</h4>
337337
<div class="service-detail-ops">
338338
<span class="cdk">aws_lambda.Function</span>
339+
<span class="cdk">aws_lambda.FunctionUrl</span>
339340
</div>
340-
<p class="cdk-props"><code>handler</code>, <code>runtime</code>, <code>code</code>, <code>timeout</code>, <code>memorySize</code>, <code>environment</code></p>
341+
<p class="cdk-props"><code>handler</code>, <code>runtime</code>, <code>code</code>, <code>timeout</code>, <code>memorySize</code>, <code>environment</code>, <code>authType</code>, <code>cors</code>, <code>invokeMode</code></p>
341342
</div>
342343
<div class="service-detail-section">
343344
<h4>Management API (Terraform mode)</h4>
@@ -361,7 +362,16 @@ <h4>Management API (Terraform mode)</h4>
361362
<span class="op">ListTags</span>
362363
</div>
363364
</div>
364-
<p class="service-note">Runs functions inside official AWS Lambda Docker images (with AWS SDK pre-installed). Run <code>ldk setup lambda</code> once to pull the images. Supports timeout enforcement, realistic context objects, and environment variable injection. In CDK mode, functions are discovered from the cloud assembly. In Terraform mode, functions are created dynamically via the management API.</p>
365+
<div class="service-detail-section">
366+
<h4>Function URLs</h4>
367+
<div class="service-detail-ops">
368+
<span class="op">CreateFunctionUrlConfig</span>
369+
<span class="op">GetFunctionUrlConfig</span>
370+
<span class="op">UpdateFunctionUrlConfig</span>
371+
<span class="op">DeleteFunctionUrlConfig</span>
372+
</div>
373+
</div>
374+
<p class="service-note">Runs functions inside official AWS Lambda Docker images (with AWS SDK pre-installed). Run <code>ldk setup lambda</code> once to pull the images. Supports timeout enforcement, realistic context objects, environment variable injection, and <strong>Function URLs</strong> &mdash; each function URL gets its own HTTP endpoint on a dedicated port with full CORS support and AWS Lambda payload format 2.0. Supports both BUFFERED and RESPONSE_STREAM invoke modes. In CDK mode, functions and URLs are discovered from the cloud assembly. In Terraform mode, functions are created dynamically via the management API.</p>
365375
</div>
366376

367377
<div class="service-detail" id="apigateway">

0 commit comments

Comments
 (0)