How looker-open-source/looker-cli works
looker-cli is a Go command-line client for managing Looker API 4.0 resources. Users invoke a command, configure a profile or authentication method, and the command performs Looker operations and presents or exports results. The graph groups the documented resource-management capabilities and sampled health and project workflows; unsampled commands are represented by their exact source files. Source excerpts show several concrete API operations and the executable entry point, while some internal command wiring is not visible, so the graph avoids claiming those specific calls.
Main entry points: client.go API client · config.go Profile config · root.go Command root · session.go Sessions
Components 30
CLI entry
- Command root
internal/cmd/root.go - CLI executable
cmd/looker-cli/main.go
Connection and auth
- Sessions
internal/cmd/session.go - Profiles
internal/cmd/profile.go - API client
internal/client/client.go - OAuth flow
internal/client/oauth.go - Netrc credentials
internal/client/netrc.go - Token storage
internal/client/token_file.go - Profile config
internal/config/config.go
Analytics resources
- Alerts
internal/cmd/alert.go - Dashboards
internal/cmd/dashboard.go - Folders and spaces
internal/cmd/folder.go - Looks
internal/cmd/look.go - Scheduled plans
internal/cmd/plan.go - Queries
internal/cmd/query.go - Models
internal/cmd/model.go
Administration
- User commands
internal/cmd/user.go - User attributes
internal/cmd/attribute.go - Groups
internal/cmd/group.go - Roles
internal/cmd/role.go - Permissions
internal/cmd/permission.go - Connections
internal/cmd/connection.go
Projects and health
- Projects
internal/cmd/project.go - Project files
internal/cmd/project_files.go - Health checks
internal/cmd/health.go - Health analysis
internal/cmd/health_analyze.go - Health vacuum
internal/cmd/health_vacuum.go - Metadata
internal/cmd/meta.go
Other components
- Looker API
- CLI user
Connections 31
- CLI user → CLI executable: runs
README.md - CLI executable → Command root: executes
cmd/looker-cli/main.go - Command root → API client: initializes
internal/cmd/root.go - Command root → Profile config: loads config
internal/cmd/root.go - API client → OAuth flow: performs login
internal/client/client.go - API client → Netrc credentials: gets credentials
internal/client/client.go - API client → Token storage: stores tokens
internal/client/client.go - API client → Profile config: reads and saves
internal/client/client.go - Sessions → API client: initializes login
internal/cmd/session.go - Profiles → Profile config: manages profiles
internal/cmd/profile.go - Sessions → Profile config: stores tokens
internal/cmd/session.go - User attributes → Looker API: updates attributes
internal/cmd/attribute.go - Dashboards → Looker API: imports dashboards
internal/cmd/dashboard.go - Dashboards → Looks: upserts Looks
internal/cmd/dashboard.go - Folders and spaces → Looker API: reads folders
internal/cmd/folder.go - Looks → Looker API: creates Looks
internal/cmd/look.go - Scheduled plans → Looker API: runs plans
internal/cmd/plan.go - Project files → Looker API: manages files
internal/cmd/project_files.go - Health analysis → Looker API: analyzes usage
internal/cmd/health_analyze.go - User commands → Looker API: manages users
README.md - Groups → Looker API: manages groups
README.md - Roles → Looker API: manages roles
README.md - Permissions → Looker API: manages permissions
README.md - Connections → Looker API: manages connections
README.md - Alerts → Looker API: manages alerts
README.md - Queries → Looker API: runs queries
README.md - Models → Looker API: manages models
README.md - Projects → Looker API: manages projects
README.md - Health checks → Looker API: checks health
README.md - Health vacuum → Looker API: cleans resources
README.md - Metadata → Looker API: reads metadata
README.md