Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:23:06 +08:00
commit a9becb81f0
7 changed files with 531 additions and 0 deletions

37
commands/read.md Normal file
View File

@@ -0,0 +1,37 @@
---
description: Read AWS documentation page as markdown
argument-hint: url
---
Read AWS documentation from URL and convert to markdown format.
## Usage
```bash
aws-knowledge-tool read "URL" [--start-index N] [--max-length M] [--json]
```
## Arguments
- `URL`: AWS documentation URL (required)
- `--start-index N` / `-s N`: Starting character index
- `--max-length M` / `-m M`: Maximum characters to fetch
- `--json`: Output JSON format
- `-v/-vv/-vvv`: Verbosity (INFO/DEBUG/TRACE)
## Examples
```bash
# Read full document
aws-knowledge-tool read "https://docs.aws.amazon.com/lambda/latest/dg/welcome.html"
# Read with pagination
aws-knowledge-tool read "https://docs.aws.amazon.com/..." --start-index 5000 --max-length 2000
# Pipeline from search
aws-knowledge-tool search "Lambda" --json | jq -r '.[0].url' | aws-knowledge-tool read --stdin
```
## Output
Returns markdown-formatted documentation content from docs.aws.amazon.com or aws.amazon.com domains.

42
commands/recommend.md Normal file
View File

@@ -0,0 +1,42 @@
---
description: Get related AWS documentation recommendations
argument-hint: url
---
Discover related documentation through four recommendation types.
## Usage
```bash
aws-knowledge-tool recommend "URL" [--type TYPE] [--limit N] [--offset M] [--json]
```
## Arguments
- `URL`: AWS documentation URL (required)
- `--type TYPE` / `-t TYPE`: Filter by type
- `highly_rated`: Popular pages within same service
- `new`: Recently added pages (find new features)
- `similar`: Pages covering similar topics
- `journey`: Pages commonly viewed next
- `--limit N` / `-l N`: Max results per category (default: 5)
- `--offset M` / `-o M`: Skip first M per category (default: 0)
- `--json`: Output JSON format
- `-v/-vv/-vvv`: Verbosity (INFO/DEBUG/TRACE)
## Examples
```bash
# Get all recommendations
aws-knowledge-tool recommend "https://docs.aws.amazon.com/lambda/latest/dg/welcome.html"
# Filter by type to find new features
aws-knowledge-tool recommend "https://docs.aws.amazon.com/..." --type new
# JSON output for processing
aws-knowledge-tool recommend "https://docs.aws.amazon.com/..." --json --limit 3
```
## Output
Returns dict with recommendation categories and their pages (title, url, context).

41
commands/search.md Normal file
View File

@@ -0,0 +1,41 @@
---
description: Search AWS documentation with full-text search
argument-hint: query
---
Search AWS documentation for QUERY and return results with pagination.
## Usage
```bash
aws-knowledge-tool search "QUERY" [--limit N] [--offset M] [--json]
```
## Arguments
- `QUERY`: Search query (required)
- `--limit N` / `-l N`: Max results (default: 10)
- `--offset M` / `-o M`: Skip first M results (default: 0)
- `--json`: Output JSON format
- `-v/-vv/-vvv`: Verbosity (INFO/DEBUG/TRACE)
## Examples
```bash
# Basic search
aws-knowledge-tool search "Lambda function URLs"
# With limit and JSON output
aws-knowledge-tool search "S3 versioning" --limit 5 --json
# Paginated search
aws-knowledge-tool search "DynamoDB" --limit 10 --offset 20
```
## Output
Returns list of search results with:
- `title`: Page title
- `url`: Documentation URL
- `context`: Summary snippet
- `rank_order`: Relevance ranking