CLI
The DX CLI is an AI-native command-line tool for interacting with DX from the terminal. With it you can manage your Software Catalog, configure Scorecards, run Data Studio queries, look up DX teams, and more—from a developer’s terminal, an AI agent, or a CI pipeline.
Note: The DX CLI is in beta. DX intends for the CLI to become the primary interface for AI agents and is investing in it as the long-term direction beyond the MCP server. Both interfaces remain supported.
Get started
The DX CLI can be installed via npm:
npm install -g @get-dx/cli
Run dx init to authenticate and optionally install the agent skill:
dx init
Available commands
Each command calls a corresponding Web API method and inherits its scope requirements. Run dx --help for the full command tree, and dx <command> --help for usage and examples on any specific command.
auth
Manage CLI authentication and inspect the active session.
dx auth login
dx auth login --token [TOKEN]
dx auth status
dx auth logout
Required scope: none.
catalog entities
List, inspect, create, update, upsert, and delete entities in the Software Catalog.
dx catalog entities list
dx catalog entities info [identifier]
dx catalog entities create --type service --identifier [identifier]
dx catalog entities upsert --type service --identifier [identifier]
dx catalog entities update [identifier] --property tier=Tier-1
dx catalog entities delete [identifier]
dx catalog entities tasks [identifier]
dx catalog entities scorecards [identifier]
Required scopes: catalog:read for list, info, tasks, scorecards; catalog:write:entities for create, update, upsert, delete.
catalog entityTypes
List, inspect, create, update, and delete entity type definitions, or initialize a YAML template for editing.
dx catalog entityTypes list
dx catalog entityTypes info [identifier]
dx catalog entityTypes init ./my-entity-type.yaml
dx catalog entityTypes create --from-file ./my-entity-type.yaml
dx catalog entityTypes update [identifier] --from-file ./my-entity-type.yaml
dx catalog entityTypes delete [identifier]
Required scopes: catalog:read for list, info, and init with --identifier; catalog:write:entities for create, update, delete.
scorecards
Manage Scorecards as YAML, including listing, inspecting, creating, updating, and deleting.
dx scorecards list
dx scorecards info [id]
dx scorecards init ./my-scorecard.yaml
dx scorecards create --from-file ./my-scorecard.yaml
dx scorecards update [id] --from-file ./my-scorecard.yaml
dx scorecards delete [id]
Required scopes: scorecards:read for list, info, and init with --id; scorecards:write for create, update, delete.
studio query
Run Data Studio SQL queries with parameterized variables and table, JSON, or CSV output.
dx studio query 'SELECT id, name FROM github_repositories LIMIT 10'
dx studio query 'SELECT * FROM github_pulls' --output pulls.csv
dx studio query 'SELECT * FROM github_repositories WHERE id IN ($repo_ids)' --variable repo_ids=1,2,3
Required scope: datacloud:query.
teams
Look up DX teams by ID, by reference ID, or by member emails.
dx teams list
dx teams info --team-id [id]
dx teams info --reference-id [id]
dx teams findByMembers --team-emails person@example.com,another@example.com
Required scope: snapshots:read.
For agents
The DX CLI is designed for headless use from the ground up, ready for integration into your agentic workflows.
Agent skill
dx init offers to install the bundled dx-cli agent skill which teaches skills-compatible agents how and when to invoke the CLI, including the available commands, argument shapes, and DX glossary.
Non-interactive authentication
Agents can authenticate the CLI in one of two ways:
- Set the
DX_API_TOKENenvironment variable for the session or job. The CLI uses this token for all commands without saving it to the OS keyring. - Alternatively, run
dx auth login --token <token>once at the start of the session to store the token in the OS keyring. Subsequent commands use this stored token.
The CLI accepts both Web API tokens and personal access tokens. DX recommends personal access tokens for individuals and agents because they attribute calls to the issuing user in audit logs.
Machine-readable output
Pass --json to any command to receive the raw API response as machine-readable JSON instead of the formatted human view:
dx --json catalog entities list
Dedicated and managed deployments
Pass your hostname to dx init to point the CLI at a DX dedicated or DX managed instance:
dx init --host mycompany.getdx.io
The CLI resolves <account>.getdx.io to a DX dedicated instance automatically. Any other custom domain is treated as DX managed and prompts for the API base URL separately. The same value can be supplied via the DX_HOST environment variable.
Logging
Logs are off by default. Set DX_LOG_LEVEL to one of debug, info, warn, or error to enable them:
DX_LOG_LEVEL=debug dx catalog entities list
Logs are human-readable on a TTY and switch to JSON when --json is passed or when stderr is redirected.