crest
Reference for org.tomitribe.crest Java CLI framework. TRIGGER when: code imports from org.tomitribe.crest, uses @Command annotations, or user is building annotation-driven command-line tools in Java. DO NOT TRIGGER when: working with picocli, JCommander, or other CLI frameworks.
What this skill does
# Crest - Java CLI Framework
Annotation-driven framework for building command-line tools in Java, styled after JAX-RS.
Methods become commands, parameters become options. Help text, validation, and type conversion are automatic.
**Package:** `org.tomitribe.crest`
## Maven Coordinates
```xml
<dependency>
<groupId>org.tomitribe</groupId>
<artifactId>tomitribe-crest</artifactId>
</dependency>
<dependency>
<groupId>org.tomitribe</groupId>
<artifactId>tomitribe-crest-api</artifactId>
</dependency>
```
## Core Annotations
### @Command (Method or Type)
Marks a method as a CLI command. When placed on a class, it defines a command group (sub-commands).
```java
@Command(value = "config", description = "Manage configuration")
public class ConfigCommands {
@Command(description = "Add a new config value")
public void add(final Name name,
@Required @Option("value") final String value) { ... }
@Command(description = "Remove a config value")
public void remove(final Name name) { ... }
@Command("import")
public void _import(final Config config,
@Option("file") final File file) { ... }
}
```
Parameters:
- `value` -- command name (defaults to method name)
- `description` -- one-line description shown in command listings
- `usage` -- custom usage/synopsis text
- `interceptedBy` -- array of interceptor classes
### Multi-Level Command Groups
Command groups can nest to any depth using space-separated names in `@Command`.
Each token becomes a level in the hierarchy.
```java
/**
* Quote management
*/
@Command("quote")
public class QuoteCommands {
/** Create a quote */
@Command
public void create(@Option("name") final String name) { ... }
/** Remove a quote */
@Command
public void remove(@Option("id") final String id) { ... }
}
/**
* Manage line items
*/
@Command("quote line-item")
public class QuoteLineItemCommands {
/** Create a line item */
@Command
public void create(@Option("product") final String product,
@Option("quantity") final int quantity) { ... }
/** Delete a line item */
@Command
public void delete(@Option("id") final String id) { ... }
/** List line items */
@Command
public void list() { ... }
}
```
CLI usage: `quote create --name="Acme"`, `quote line-item create --product=Widget --quantity=10`
The resulting hierarchy:
```
quote
├── create Create a quote
├── remove Remove a quote
└── line-item
├── create Create a line item
├── delete Delete a line item
└── list List line items
```
#### Method-Level Path Concatenation
Class and method `@Command` values concatenate following the JAX-RS `@Path` model.
A method can contribute additional group levels:
```java
@Command("quote")
public class QuoteCommands {
/** Create a quote */
@Command
public void create(@Option("name") final String name) { ... }
/** Create a line item */
@Command("line-item create")
public void lineItemCreate(@Option("product") final String product) { ... }
/** Delete a line item */
@Command("line-item delete")
public void lineItemDelete(@Option("id") final String id) { ... }
}
```
This produces the same hierarchy as the separate-class example. The two approaches
mix freely — some sub-commands defined inline via method paths, others contributed
by separate classes.
Both class and method paths can be multi-word. `@Command("app server")` on the class
with `@Command("config set")` on a method produces `app server config set`.
#### Intermediate Group Auto-Creation
Intermediate groups are created automatically (mkdir -p style). If
`@Command("quote line-item")` is declared but no class declares `@Command("quote")`,
the `quote` group is auto-created with no description. If a class later provides
`@Command("quote")` with a description, it merges in.
#### Collision Detection
A name cannot be both a leaf command and a group containing sub-commands. If a class
has a method named `setting` (producing a leaf command) and a separate class declares
`@Command("config setting")` (producing a group), the framework throws an error.
Help navigates deep groups: `help quote`, `help quote line-item`,
`help quote line-item create`.
### @Option (Parameter)
Marks a parameter as a named CLI option. Unannotated parameters are positional arguments.
```java
@Command
public void upload(@Option("customer-id") final String customerId,
@Option({"f", "force"}) final boolean force,
@Option("skip") @Default(".DS_Store|cust.*") final Pattern skip,
final URI source) { ... }
```
Parameters:
- `value` -- one or more option names (aliases)
- `description` -- help text
CLI usage: `upload --customer-id acme --force /data`
### @Default (Parameter)
Provides a default value. Supports system property and environment variable substitution.
```java
@Option("host") @Default("localhost") final String host,
@Option("port") @Default("5432") final int port,
@Option("owner") @Default("${user.name}") final String owner,
@Option("dry-run") @Default("true") final Boolean dryRun
```
### @Required (Parameter)
Enforces that an option must be provided. Framework throws a validation error if missing.
```java
@Option("email") @Required final String email
```
## Options Classes
Bundle related options into a reusable class with `@Options`. The constructor parameters define the options.
```java
@Options
public class Config {
public Config(@Option("config") @Default("default") final String name,
@Option("env") @Default("prod") final String env) { ... }
}
@Options
public class CustomerIds {
public CustomerIds(@Option("customer-id") final List<String> customerIds,
@Option("customers") final File customerIdFile) { ... }
}
```
Inject into commands as a plain parameter (no annotation needed):
```java
@Command
public void deploy(final Config config,
final CustomerIds customers,
@Option("version") final String version) { ... }
```
Use `@Options(nillable = true)` to allow null when no values are provided.
### @GlobalOptions
Same as `@Options` but available to every command automatically.
## I/O Streams
Inject stdin, stdout, stderr with `@In`, `@Out`, `@Err`. These are hidden from help text.
```java
@Command
public void deploy(@Out final PrintStream out,
@Err final PrintStream err,
@Option("target") final String target) {
out.println("Deploying to " + target);
}
```
## Return Types
Commands can return several types. The framework handles output automatically.
```java
// String -- printed to stdout
@Command
public String hello(@Option("name") @Default("World") final String name) {
return "Hello, " + name;
}
// StreamingOutput -- write to OutputStream
@Command
public StreamingOutput export(final Config config) {
return outputStream -> {
final PrintWriter pw = new PrintWriter(outputStream);
// ... write output
};
}
// PrintOutput -- write to PrintStream
@Command
public PrintOutput upload(final CustomerIds customerIds,
@Option("dry-run") @Default("true") final Boolean dryRun) {
return out -> {
out.println("Uploading for " + customerIds);
};
}
// Stream/List/Array -- iterable output (or table-formatted with @Table)
@Command
@Table(fields = "name state schedule command", sort = "name")
public Stream<Job> list(final Config config) { ... }
```
## Table Formatting
Annotate commands returning collections with `@Table` for automatic tabular output.
For full details on borders, TableOptions, programmatic table building, and cell formatting, read `references/tables.md`.
## Loader Mechanism
The `Loader` is the central registry for all classes crest needs to discover.
It returns `@Command` classes, `@CrestInterceptor` classes, and `@Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.