CLI Quick Start¶
This document is intended for first-time users of the OWL CLI. It explains how to complete OWL CLI configuration, sync the tool catalog, and execute a tool call.
Prerequisites¶
Before you begin, confirm the following:
- Have completed Manual OWL Installation or Automatic OWL Installation
- Have obtained the OWL CLI Endpoint corresponding to the site of your Workspace. See the Endpoint List
- Have obtained the access token
OWL_TOKENorOWL_API_KEY, which corresponds to DF-API-KEY - Your current terminal can access the OWL CLI Endpoint
Step 1: Configure Endpoint and Access Token¶
The OWL CLI supports setting the Endpoint and access token via environment variables, a local configuration file, or a separate Profile. For first-time use, you can choose either of the first two methods; use a Profile when you need to save multiple accounts or environments.
For OWL_REGISTRY_ENDPOINT, enter only the Endpoint base address. Do not manually append /api/v1 or other paths.
Method 1: Use Environment Variables¶
Environment variables only apply to the current terminal session. After you close the terminal, you must set them again to continue using the CLI.
This identity override applies to the legacy configuration mode where no Profile is selected, or to the standalone use of the deprecated --conf. If you have previously run owl switch, or have set --profile / OWL_PROFILE, OWL uses the Endpoint/Key of the selected Profile. You can use owl profile current to view the current source.
The access token can also be set via OWL_API_KEY; when both OWL_API_KEY and OWL_TOKEN are present, the OWL CLI gives precedence to OWL_API_KEY.
Method 2: Write to a Local Configuration File¶
Notes:
owl initwrites the OWL CLI Endpointowl loginwrites the access token
When no Profile is selected, the local configuration is written to ${OWL_DIR}/config.yaml, which defaults to ~/.owl/config.yaml. After a Profile is selected, init and login write back to the selected configuration.
Identity environment variables take precedence over the configuration file only in legacy configuration mode or when --conf is used alone.
Method 3: Save a Separate Profile¶
owl profile add customer-a
owl profile add customer-b --from ./customer-b.yaml
owl profile list
owl switch customer-a
owl profile current
profile add interactively prompts for the Endpoint and Key, and you can also use --from to copy an existing YAML. Adding a profile only saves the configuration and does not change the current selection; switch saves the default selection for subsequent commands. Each named Profile uses separate configuration, cache, and query file directories.
You can temporarily select another configuration for a single command without changing the default:
The selection priority is --profile > OWL_PROFILE > the persisted selection. For complete usage, see Using Multiple Profiles.
Step 2: Sync the Tool Catalog¶
Before your first use of the OWL CLI, you need to sync the tool catalog:
owl sync syncs the currently available categories and tool metadata from TrueWatch to the local cache. Only after the sync completes can you view and execute tools.
If you only need to sync a particular category, use -c to specify the category:
Step 3: View Tools¶
View all tool categories:
View the tools in a category:
View a tool's parameter descriptions:
Step 4: Validate Before Execution¶
Validate the tool call without issuing an actual query:
In the result, valid should be true and request_executed should be false. If your current CLI does not support validate, upgrade to version 1.2.0 or later.
Step 5: Execute Tools¶
Run the following command to view the DQL namespaces supported by the current Workspace (this is the first step before using owl.data.query):
For machine-readable output, specify the JSON format:
Complete Example¶
Success Criteria¶
After completing the Quick Start, you should be able to achieve the following results:
owl synccompletes normally without authentication or network errorsowl category listshows the tool categoriesowl list -c datashows the tools in thedatacategoryowl validate owl.data.show_dql_namespace -f jsonreturnsvalid: trueandrequest_executed: falseowl exec owl.data.show_dql_namespacereturns the DQL namespaces supported by the current Workspace
If you encounter issues such as authentication failures, missing tools, or empty results, see Troubleshooting.