CLI commands for user management.
This is the SHELL layer in Functional Core / Imperative Shell architecture. Responsibilities:
All business logic lives in boundary.user.core.* and boundary.user.shell.service. All observability is handled automatically by interceptors.
CLI commands for user management. This is the SHELL layer in Functional Core / Imperative Shell architecture. Responsibilities: - Parse command-line arguments using tools.cli - Orchestrate service calls (no business logic here) - Format output (table or JSON) - Handle errors and exit codes All business logic lives in boundary.user.core.* and boundary.user.shell.service. All observability is handled automatically by interceptors.
(create-cli-interceptor-context operation-type user-service args options)Creates interceptor context for CLI operations with real observability services.
Creates interceptor context for CLI operations with real observability services.
(dispatch-command domain verb opts service)Dispatch command to appropriate executor using interceptor pipeline.
Args: domain: :user or :session verb: :create, :list, :find, :update, :delete, :invalidate opts: Parsed command options service: User service instance
Returns: Map with :status, :entity-type, :data, or :message
Dispatch command to appropriate executor using interceptor pipeline. Args: domain: :user or :session verb: :create, :list, :find, :update, :delete, :invalidate opts: Parsed command options service: User service instance Returns: Map with :status, :entity-type, :data, or :message
(execute-session-create service _error-reporter opts)Execute session create command using interceptor pipeline.
Execute session create command using interceptor pipeline.
(execute-session-invalidate service _error-reporter opts)Execute session invalidate command using interceptor pipeline.
Execute session invalidate command using interceptor pipeline.
(execute-session-list service _error-reporter opts)Execute session list command.
Execute session list command.
(execute-session-validate-v2 service _error-reporter opts)Execute session validate command using interceptor pipeline.
Execute session validate command using interceptor pipeline.
(execute-user-create service _error-reporter opts)Execute user create command using interceptor pipeline.
This version demonstrates the interceptor-based approach that eliminates manual observability boilerplate while providing comprehensive tracking.
Execute user create command using interceptor pipeline. This version demonstrates the interceptor-based approach that eliminates manual observability boilerplate while providing comprehensive tracking.
(execute-user-delete service _error-reporter opts)Execute user delete command using interceptor pipeline.
Execute user delete command using interceptor pipeline.
(execute-user-get service _error-reporter opts)Execute user get command using interceptor pipeline.
Execute user get command using interceptor pipeline.
(execute-user-list service _error-reporter opts)Execute user list command using interceptor pipeline.
Execute user list command using interceptor pipeline.
(execute-user-update service _error-reporter opts)Execute user update command using interceptor pipeline.
Execute user update command using interceptor pipeline.
(extract-observability-services user-service)Extracts observability services from user-service for interceptor context.
Note: Since service layer cleanup removed direct observability dependencies, the interceptor context will obtain these services from the system wiring.
Extracts observability services from user-service for interceptor context. Note: Since service layer cleanup removed direct observability dependencies, the interceptor context will obtain these services from the system wiring.
(format-error format-type error-data)Format error message based on output format.
Format error message based on output format.
(format-instant instant)Format an Instant as a human-readable string.
Format an Instant as a human-readable string.
(format-instant-json instant)Format Instant for JSON output.
Format Instant for JSON output.
(format-json data)Format data as pretty JSON.
Format data as pretty JSON.
(format-session-table sessions)Format sessions as a table.
Format sessions as a table.
(format-success format-type entity-type data)Format successful result based on output format.
Args: format-type: :table or :json entity-type: :user, :user-list, :session, :session-list data: Entity or collection to format
Format successful result based on output format. Args: format-type: :table or :json entity-type: :user, :user-list, :session, :session-list data: Entity or collection to format
(format-table-row row widths)Format a single row with column widths.
Format a single row with column widths.
(format-table-separator widths)Create a table separator line.
Create a table separator line.
(format-user-table users)Format users as a table.
Format users as a table.
(read-hidden-password label)Read a password without echoing input. When called from bb create-admin the password is piped via stdin, so System/console returns null and read-line reads the piped value. When invoked standalone with a real TTY, System/console provides hidden input.
Read a password without echoing input. When called from bb create-admin the password is piped via stdin, so System/console returns null and read-line reads the piped value. When invoked standalone with a real TTY, System/console provides hidden input.
(render-table headers rows)Render data as a formatted table.
Args: headers: Vector of column header strings rows: Vector of vectors containing row data
Returns: Formatted table string
Render data as a formatted table. Args: headers: Vector of column header strings rows: Vector of vectors containing row data Returns: Formatted table string
(run-cli! service args)Main CLI entry point. Parses arguments, executes commands, and returns status.
This is module-scoped (user) CLI: we expect <command> [options] where
<command> is one of: create, list, find, update, delete.
Args: service: User service instance args: Command-line arguments vector
Returns: Exit status: 0 for success, 1 for error
Side effects: Prints to stdout/stderr based on command and format
Main CLI entry point. Parses arguments, executes commands, and returns status. This is module-scoped (user) CLI: we expect `<command> [options]` where `<command>` is one of: create, list, find, update, delete. Args: service: User service instance args: Command-line arguments vector Returns: Exit status: 0 for success, 1 for error Side effects: Prints to stdout/stderr based on command and format
(session->json session)Transform session entity for JSON output.
Transform session entity for JSON output.
(truncate-string s max-length)Truncate string to max-length with ellipsis.
Truncate string to max-length with ellipsis.
(user->json user)Transform user entity for JSON output.
Transform user entity for JSON output.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |