CLI Quick Start¶
This document is for first-time users of Owl CLI. It explains how to configure Owl CLI, synchronize the tool catalog, and perform a tool invocation.
Prerequisites¶
Before you begin, ensure:
- You have completed either 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 an access token (
OWL_TOKENorOWL_API_KEY), corresponding 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 Owl CLI, you must set them again.
The access token can also be set via OWL_API_KEY. If both OWL_API_KEY and OWL_TOKEN are present, Owl CLI prioritizes OWL_API_KEY.
Method 2: Writing to Local Configuration File¶
Execution explanation:
owl initis used to write the Owl CLI Endpoint.owl 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 use their values first.
Step 2: Synchronize Tool Catalog¶
Before first use of Owl CLI, you need to synchronize the tool catalog:
owl sync synchronizes the currently available categories and tool metadata from Guance to the local cache. After synchronization is complete, you can view and execute tools.
If you only need to synchronize a specific category, use -c to specify it:
Step 3: View Tools¶
View all tool categories:
View tools under a specific category:
View parameter descriptions for a specific tool:
Step 4: Execute a Tool¶
Execute the following command to view the DQL namespaces supported by the current workspace (this is the first step before using owl.data.query):
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 errors.owl category listcan display tool categories.owl list -c datacan display tools under thedatacategory.owl exec owl.data.show_dql_namespacecan return the DQL namespaces supported by the current workspace.
If you encounter issues like authentication failure, tool not found, or empty results, please refer to Troubleshooting.