Command format#
stly <resource> <action> [id] [options]For example, stly apis get <id> looks up one API. Check all commands with stly --help and stly cli list.
Find a command#
Describe what you want to do, and stly cli search finds matching commands. It does not connect to a server.
stly cli search "Endpoint update"Each item in data contains the command, summary, HTTP method and path, and mutates (whether it changes records).
Use the command value as is in your next command.
stly cli search finds commands to run. To find saved Catalog records, use --q on list commands or stly catalog search.
Input schema#
stly schema apis createThe schema shows the command's arguments and options, whether --if-match is required, the structure of the input JSON (request_schema), and the response fields.
It does not connect to a server, and example contains a sample invocation.
Passing input#
Create and edit commands take JSON through --input. Use a file path or - (stdin).
stly apis create --input api.json
echo '{"name": "Payments API", "handle": "payments-api"}' | stly apis create --input -dry-run#
--dry-run shows the Method, Path, body, and authentication of the request to be sent, without sending it to the server.
It does not read your login or files, and it does not mean the request will pass server validation.
stly apis create --input api.json --server https://api.structly.io --dry-runIf you omit --server, the origin in the result is null. To pin the target, specify the same --server for the dry-run and the actual run.
Some Catalogs provide validate commands that check input on the server without saving. Find them with stly cli search "validate".
Output format#
On success, stly prints one JSON value to stdout and exits with code 0.
{"status":200,"etag":null,"location":null,"data":[{"id":"4pkKFh2ojXs","name":"Orders API"}]}| Field | Content |
|---|---|
status | HTTP status. null for commands that do not connect to a server |
etag | The ETag to use for edits and deletes. null if absent |
location | The path of the created entry. null if absent |
data | The server response body |
With --fields id,name, only those top-level fields of data are kept. An empty list is a normal result with data set to [].
Errors and exit codes#
On failure, stdout is empty and stly prints one error JSON value to stderr.
| Exit code | kind | Meaning |
|---|---|---|
| 1 | transport·protocol·io | Connection, timeout, response parsing, or file output failure |
| 2 | usage·config·input | Command, option, configuration, or input error. No request is sent |
| 3 | http | The server rejected the request with 4xx or 5xx |
{"kind":"http","status":409,"error":{"code":"409.000","reason":"ORGANIZATION_REQUIRED","message":"현재 Organization이 선택되지 않았습니다.","data":[]},"outcome":"read_failed","hints":["stly org list --server 'https://api.structly.io' --auth-mode user","stly org select '<id>' --server 'https://api.structly.io' --auth-mode user"]}outcome tells you what happened to the request.
outcome | Meaning |
|---|---|
not_sent | Ended before the request was sent |
read_failed | A lookup failed |
rejected | The server rejected the write and the record did not change |
unknown | The result of the write could not be confirmed. Look it up before sending again |
For common errors, see the FAQ.
Send feedback#
stly feedback submit --type bug --title "Short title" --message "What happened and what you expected" --source user--type, --title, --message, and --source are required. Add the command you ran with --command, the error code with --error-code, and the steps to reproduce with --reproduction-steps. On success data holds the receipt ID, and --fields id returns only the ID.
- Before sending, values such as tokens, passwords, cookies, and Authorization headers are replaced with
[REDACTED]. Masking cannot find every secret, so check the masked content with--dry-runfirst. - To send with
--source ai-agent, the user must add--approvedto the same command or setSTLY_FEEDBACK_AGENT_OPT_IN=true. Otherwise nothing is sent and the command exits with code 2. - For an
unknownoutcome, run the same command again and it is treated as the same submission. For the rate limit (429), run it again after the indicated time. - You cannot call this command directly with
stly api.
Common options#
| Option | Use |
|---|---|
--server <origin> | The server to send requests to |
--timeout <duration> | Request time limit. Default 30s |
--auth-mode agent|user | Pin the authentication method |
--env-file <file> | The configuration file to read |
--if-match <etag> | The ETag the edit or delete is based on |
--fields <field,field> | Top-level fields to output |
--dry-run | Print only the request plan |