CLI Quick Start¶
This document is intended for first-time OWL CLI users. It describes how to configure OWL CLI, sync the tool directory, and execute a tool call.
If you want to use OWL CLI directly in agent conversations such as Codex, Claude Code, Cursor, Trae, GitHub Copilot (VS Code), or Windsurf, first install the CLI and its associated Skills using the unified automatic installation process, then complete the first-call verification. This page describes the manual command workflow; the configuration and sync steps already completed by automatic installation do not need to be repeated.
Prerequisites¶
Before you begin, confirm the following:
- You have completed manual OWL installation or automatic OWL installation
- You have obtained the OWL CLI Endpoint corresponding to the site where your Workspace is located. See the Endpoint list
- You have obtained the access token
OWL_TOKENorOWL_API_KEY, corresponding to DF-API-KEY - Your current terminal can access the OWL CLI Endpoint
Step 1: Configure the Endpoint and Access Token¶
OWL CLI supports setting the Endpoint and access token via environment variables, a local configuration file, or a separate Profile. For first-time use, choose one of the first two methods; use a Profile when you need to store multiple accounts or environments.
OWL_REGISTRY_ENDPOINT should contain only the Endpoint root address. Do not manually append /api/v1 or other paths.
Method 1: Use Environment Variables¶
Environment variables only take effect in the current terminal session. If you need to continue using them after closing the terminal, set them again.
This identity override applies to the legacy configuration mode without a selected Profile, or when the deprecated --conf is used alone. If you have previously run owl switch, or 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, OWL CLI uses 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 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. You can also use --from to copy an existing YAML. Adding a Profile only saves its configuration and does not change the current selection; switch saves the default selection for subsequent commands. Each named Profile uses its own configuration, cache, and query file directories.
A single command can temporarily select another configuration without changing the default:
The selection priority is --profile > OWL_PROFILE > persisted selection. For complete usage, see Using Multiple Profiles.
Step 2: Sync the Tool Directory¶
Before using OWL CLI for the first time, you need to sync the tool directory:
owl sync syncs the metadata of categories and tools currently available in Guance to the local cache. After the sync completes, you can view and execute tools.
If you only need to sync a specific category, use -c to specify the category:
Step 3: View Tools¶
View all tool categories:
View tools in a category:
View the parameter description of a tool:
Step 4: Validate Before Execution¶
Validate a tool call without sending 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 achieve the following results:
owl synccompletes normally without returning authentication or network errorsowl category listshows the tool categoriesowl list -c datashows the tools under 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.