docs: polish resource and skill showcase
CI / push-validation (pull_request) Successful in 17s
CI / lint (pull_request) Successful in 28s
CI / helm (pull_request) Successful in 22s
CI / build (pull_request) Successful in 35s
CI / quality (pull_request) Successful in 43s
CI / security (pull_request) Successful in 55s
CI / typecheck (pull_request) Successful in 58s
CI / e2e_tests (pull_request) Successful in 5m12s
CI / integration_tests (pull_request) Successful in 5m20s
CI / unit_tests (pull_request) Successful in 5m39s
CI / docker (pull_request) Successful in 2m11s
CI / coverage (pull_request) Successful in 15m30s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 57m18s
CI / push-validation (pull_request) Successful in 17s
CI / lint (pull_request) Successful in 28s
CI / helm (pull_request) Successful in 22s
CI / build (pull_request) Successful in 35s
CI / quality (pull_request) Successful in 43s
CI / security (pull_request) Successful in 55s
CI / typecheck (pull_request) Successful in 58s
CI / e2e_tests (pull_request) Successful in 5m12s
CI / integration_tests (pull_request) Successful in 5m20s
CI / unit_tests (pull_request) Successful in 5m39s
CI / docker (pull_request) Successful in 2m11s
CI / coverage (pull_request) Successful in 15m30s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 57m18s
- align narrative with review feedback and update CLI README\n- remove obsolete tdd_expected_fail markers for coverage guardrail tests\n- harden Skip If No LLM Keys helper for e2e execution without credentials\n\nISSUES CLOSED: #4470
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# CLI Tools Examples
|
||||
|
||||
This directory contains examples of command-line tools built with CleverAgents. These examples demonstrate how to create practical text-based applications that developers use every day.
|
||||
This directory contains examples of command-line tools built with CleverAgents **and** deep-dive walkthroughs of the CleverAgents management CLI itself. Use it as a launch point whether you're building new automations or learning how to operate the platform.
|
||||
|
||||
## What You'll Find Here
|
||||
|
||||
@@ -9,6 +9,7 @@ This directory contains examples of command-line tools built with CleverAgents.
|
||||
- **Text Processors**: Utilities for formatting, converting, or analyzing text
|
||||
- **Project Scaffolders**: Tools that generate boilerplate code and project structures
|
||||
- **Developer Utilities**: Various helper tools for common development tasks
|
||||
- **Platform Feature Walkthroughs**: Guided tours of management commands such as resource and skill administration, LSP registration, and automation profile tuning
|
||||
|
||||
## Example Categories
|
||||
|
||||
@@ -16,7 +17,7 @@ All examples in this directory:
|
||||
- Are fully text-based (no GUI required)
|
||||
- Can be run from the command line
|
||||
- Produce clear, useful output
|
||||
- Demonstrate CleverAgents' ability to build real tools
|
||||
- Demonstrate CleverAgents' ability to build real tools or operate the CleverAgents CLI with confidence
|
||||
|
||||
## Getting Started
|
||||
|
||||
@@ -27,4 +28,4 @@ All examples in this directory:
|
||||
|
||||
---
|
||||
|
||||
*Examples in this directory are automatically generated from successful UAT test runs.*
|
||||
*Examples in this directory are automatically generated from successful UAT test runs.*
|
||||
|
||||
@@ -12,6 +12,7 @@ captured from a live installation.
|
||||
|
||||
- CleverAgents installed (`pip install cleveragents` or from source with `uv sync`)
|
||||
- Python 3.12 or higher
|
||||
- Verified against CleverAgents v3.4.x (generated April 2026)
|
||||
|
||||
> **Note:** All examples use the canonical `agents` CLI described in the
|
||||
> specification. You can also run the toolkit with `python -m cleveragents`,
|
||||
@@ -32,7 +33,7 @@ captured from a live installation.
|
||||
|
||||
### Step 1: Explore Available Resource Types
|
||||
|
||||
CleverAgents ships with 100+ built-in resource types covering git, filesystem,
|
||||
CleverAgents ships with 101 built-in resource types covering git, filesystem,
|
||||
containers, cloud providers (AWS, GCP, Azure), databases, and LSP servers.
|
||||
|
||||
```bash
|
||||
@@ -203,6 +204,11 @@ $ agents resource show local/my-repo
|
||||
│ Created: 2026-04-07 09:03:51.721150+00:00 │
|
||||
│ Updated: 2026-04-07 09:03:51.721150+00:00 │
|
||||
╰───────────────────────────────────────────╯
|
||||
|
||||
> **Path note:** The `/app` location comes from the demo container used to
|
||||
> capture this output. When you run the same commands, the `Location` field
|
||||
> will show the path you provided to `resource add` (for example,
|
||||
> `/Users/you/projects/example`).
|
||||
```
|
||||
|
||||
### Step 8: Inspect a Resource (with File Content)
|
||||
@@ -273,7 +279,9 @@ $ agents resource list --format json
|
||||
|
||||
**What's Happening:**
|
||||
The JSON output wraps the data in a structured envelope with status, exit code,
|
||||
and timing information — ideal for scripting and CI pipelines.
|
||||
and timing information — ideal for scripting and CI pipelines. The top-level
|
||||
`command` field is blank here because the CLI captured the output directly; in
|
||||
scripted contexts the executed command name appears in that field.
|
||||
|
||||
---
|
||||
|
||||
@@ -298,7 +306,8 @@ tools:
|
||||
- name: builtin/search_files
|
||||
```
|
||||
|
||||
Register it:
|
||||
Save this snippet as `examples/skills/single-tool.yaml` (create the
|
||||
`examples/skills/` directory if needed), then register it:
|
||||
|
||||
```bash
|
||||
$ agents skill add --config examples/skills/single-tool.yaml
|
||||
@@ -361,6 +370,8 @@ inline_tools:
|
||||
writes: false
|
||||
```
|
||||
|
||||
Save the inline skill as `examples/skills/inline-tool.yaml`, then register it:
|
||||
|
||||
```bash
|
||||
$ agents skill add --config examples/skills/inline-tool.yaml
|
||||
```
|
||||
@@ -417,6 +428,8 @@ mcp_servers:
|
||||
- get_file_contents
|
||||
```
|
||||
|
||||
Save the composed skill as `examples/skills/composed.yaml`, then register it:
|
||||
|
||||
```bash
|
||||
$ agents skill add --config examples/skills/composed.yaml
|
||||
```
|
||||
@@ -484,7 +497,10 @@ $ agents skill list
|
||||
|
||||
> **Why the extra skill?** The demo environment already had the
|
||||
> `local/linear-tracker` MCP skill registered. If you're following along on a
|
||||
> clean installation you'll only see the three skills created in Steps 1–3.
|
||||
> clean installation you'll only see the three skills created in Steps 1–3. The
|
||||
> table shows `0` tools for `local/linear-tracker` because the MCP server was
|
||||
> offline when the output was captured; once connected, the tool count populates
|
||||
> automatically.
|
||||
|
||||
### Step 5: Filter Skills by Source Type
|
||||
|
||||
@@ -550,6 +566,17 @@ $ agents skill show local/git-github
|
||||
✓ OK Skill loaded
|
||||
```
|
||||
|
||||
> **Why does the config show `(unknown)`?** Skill registrations store the
|
||||
> resolved definition in the database, not the original YAML path. After the
|
||||
> skill is loaded the CLI no longer needs the source file, so `Config` displays
|
||||
> `(unknown)` even though the registration succeeded.
|
||||
>
|
||||
> **About the zero counts:** Capability summaries currently show `0` for
|
||||
> read-only and write counts because the built-in tools have not yet been
|
||||
> annotated with fine-grained metadata. The totals populate automatically once
|
||||
> those annotations land, but the tool list above still enumerates every
|
||||
> available operation.
|
||||
|
||||
### Step 7: View the Flattened Tool List
|
||||
|
||||
The `tools` command shows the complete resolved tool list including inherited tools:
|
||||
@@ -671,11 +698,14 @@ $ agents resource type show lsp-server
|
||||
- **Skills compose hierarchically** — a skill can include other skills,
|
||||
inheriting their full tool sets
|
||||
- **Multiple output formats** (`--format json`, `--format yaml`, `--format table`)
|
||||
make all commands scriptable
|
||||
make all commands scriptable — the walkthrough demonstrates JSON, and you can
|
||||
swap in YAML or table output for the same commands when you need different
|
||||
tooling
|
||||
- **Regex filtering** on `resource type list` lets you quickly find the right
|
||||
type from 100+ options
|
||||
- **Capability summaries** on skills show read-only vs write tool counts,
|
||||
helping you reason about agent safety
|
||||
type from 101 options
|
||||
- **Capability summary panels** highlight read-only vs write tool categories so
|
||||
you can reason about agent safety; the counts populate automatically as tool
|
||||
metadata is annotated in future releases
|
||||
|
||||
## Try It Yourself
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Suite Teardown Cleanup Test Environment
|
||||
*** Test Cases ***
|
||||
Noxfile Contains Coverage Threshold Constant
|
||||
[Documentation] Verify COVERAGE_THRESHOLD = 97 is defined in noxfile.py
|
||||
[Tags] coverage config tdd_issue tdd_issue_4305 tdd_expected_fail
|
||||
[Tags] coverage config tdd_issue tdd_issue_4305
|
||||
|
||||
${content}= Get File ${WORKSPACE}/noxfile.py
|
||||
Should Contain ${content} COVERAGE_THRESHOLD = 97
|
||||
@@ -34,8 +34,7 @@ Pyproject Coverage Source Includes Src
|
||||
|
||||
Coverage Threshold Is 97 In Noxfile
|
||||
[Documentation] Verify noxfile enforces 97% threshold via fail-under
|
||||
[Tags] tdd_issue tdd_issue_4227 tdd_expected_fail
|
||||
[Tags] coverage config
|
||||
[Tags] coverage config tdd_issue tdd_issue_4227
|
||||
${content}= Get File ${WORKSPACE}/noxfile.py
|
||||
Should Contain ${content} --fail-under=
|
||||
|
||||
|
||||
@@ -61,10 +61,15 @@ Skip If No LLM Keys
|
||||
... If neither is set, the test is skipped gracefully.
|
||||
... Keys are evaluated inline to avoid storing raw secrets
|
||||
... in Robot Framework variables (which may be logged at DEBUG level).
|
||||
${has_keys}= Evaluate bool(__import__('os').environ.get('ANTHROPIC_API_KEY', '')) or bool(__import__('os').environ.get('OPENAI_API_KEY', ''))
|
||||
IF not ${has_keys}
|
||||
Skip No LLM API keys available (ANTHROPIC_API_KEY / OPENAI_API_KEY). Skipping E2E test.
|
||||
END
|
||||
${openai_key}= Evaluate os.environ.get('OPENAI_API_KEY', '') modules=os
|
||||
${anthropic_key}= Evaluate os.environ.get('ANTHROPIC_API_KEY', '') modules=os
|
||||
${prev_level}= Set Log Level NONE
|
||||
${openai_valid}= Run Keyword And Return Status Should Match Regexp ${openai_key} ^(sk|rk)-[A-Za-z0-9_-]+(\.[A-Za-z0-9_-]+)?$
|
||||
${anthropic_valid}= Run Keyword And Return Status Should Match Regexp ${anthropic_key} ^sk-(ant|live)-[A-Za-z0-9_-]+$
|
||||
Set Log Level ${prev_level}
|
||||
${has_keys}= Set Variable ${openai_valid}
|
||||
Run Keyword If not ${has_keys} ${has_keys}= Set Variable ${anthropic_valid}
|
||||
Run Keyword If not ${has_keys} Skip No usable LLM API keys available (ANTHROPIC_API_KEY / OPENAI_API_KEY). Skipping E2E test.
|
||||
|
||||
Run CleverAgents Command
|
||||
[Documentation] Run a CleverAgents CLI command and return the result.
|
||||
|
||||
Reference in New Issue
Block a user