CLI Quick Start¶
This document is intended for first-time users of Owl CLI. It explains how to configure Owl CLI, synchronize the tool catalog, and perform a tool execution.
Prerequisites¶
Before you begin, please confirm:
- You have completed Manual Installation of Owl or Automatic Installation of Owl
- You have obtained the Owl CLI Endpoint corresponding to the site of your workspace. Refer to the Endpoint List
- You have obtained the access token
OWL_TOKEN, which corresponds to DF-API-KEY - Your current terminal can access the Owl CLI Endpoint
Step 1: Configure Endpoint and Access Token¶
Owl CLI supports setting the Endpoint and access token via environment variables or a local configuration file.
OWL_REGISTRY_ENDPOINT should only contain the root address of the Endpoint. Do not manually append /api/v1 or other paths.
Method 1: Using Environment Variables¶
Environment variables are only effective for the current terminal session. If you close the terminal and need to continue using them, you must set them again.
Method 2: Writing to a Local Configuration File¶
Execution Notes:
owl initis used to write the Owl CLI Endpointowl loginis used to write the access token
The local configuration is written to the Owl CLI configuration directory and can be used in subsequent new terminal sessions.
Environment variables have higher priority than the configuration file. If environment variables are already set in the current terminal, Owl CLI will prioritize using the values from the environment variables.
Step 2: Synchronize the Tool Catalog¶
Before using Owl CLI for the first time, you need to synchronize the tool catalog:
owl sync synchronizes the currently available categories and tool metadata from TrueWatch to the local cache. After synchronization is complete, you can view and execute tools.
If you only need to synchronize a specific category, you can use -c to specify the category:
Step 3: View Tools¶
View all tool categories:
View tools under a specific category:
View the parameter description for a specific tool:
Step 4: Execute a Tool¶
Execute the following command to query the accessible metric sources in the current workspace:
If machine-readable output is needed, you can specify JSON format:
Complete Example¶
Success Criteria¶
After completing the quick start, you should achieve the following results:
owl synccan complete normally without returning authentication or network errorsowl category listcan display tool categoriesowl list -c metriccan display tools under themetriccategoryowl exec owl.metric.list --mode sourcecan return the currently accessible metric sources
If you encounter issues such as authentication failure, tool not found, or empty results, please refer to Troubleshooting.