Liking cljdoc? Tell your friends :D

boundary.user.shell.cli

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.

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.
raw docstring

create-cli-interceptor-contextclj

(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.
sourceraw docstring

default-datetime-formatterclj

source

dispatch-commandclj

(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
sourceraw docstring

execute-session-createclj

(execute-session-create service _error-reporter opts)

Execute session create command using interceptor pipeline.

Execute session create command using interceptor pipeline.
sourceraw docstring

execute-session-invalidateclj

(execute-session-invalidate service _error-reporter opts)

Execute session invalidate command using interceptor pipeline.

Execute session invalidate command using interceptor pipeline.
sourceraw docstring

execute-session-listclj

(execute-session-list service _error-reporter opts)

Execute session list command.

Execute session list command.
sourceraw docstring

execute-session-validate-v2clj

(execute-session-validate-v2 service _error-reporter opts)

Execute session validate command using interceptor pipeline.

Execute session validate command using interceptor pipeline.
sourceraw docstring

execute-user-createclj

(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.
sourceraw docstring

execute-user-deleteclj

(execute-user-delete service _error-reporter opts)

Execute user delete command using interceptor pipeline.

Execute user delete command using interceptor pipeline.
sourceraw docstring

execute-user-getclj

(execute-user-get service _error-reporter opts)

Execute user get command using interceptor pipeline.

Execute user get command using interceptor pipeline.
sourceraw docstring

execute-user-listclj

(execute-user-list service _error-reporter opts)

Execute user list command using interceptor pipeline.

Execute user list command using interceptor pipeline.
sourceraw docstring

execute-user-updateclj

(execute-user-update service _error-reporter opts)

Execute user update command using interceptor pipeline.

Execute user update command using interceptor pipeline.
sourceraw docstring

extract-observability-servicesclj

(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.
sourceraw docstring

format-errorclj

(format-error format-type error-data)

Format error message based on output format.

Format error message based on output format.
sourceraw docstring

format-instantclj

(format-instant instant)

Format an Instant as a human-readable string.

Format an Instant as a human-readable string.
sourceraw docstring

format-instant-jsonclj

(format-instant-json instant)

Format Instant for JSON output.

Format Instant for JSON output.
sourceraw docstring

format-jsonclj

(format-json data)

Format data as pretty JSON.

Format data as pretty JSON.
sourceraw docstring

format-session-tableclj

(format-session-table sessions)

Format sessions as a table.

Format sessions as a table.
sourceraw docstring

format-successclj

(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
sourceraw docstring

format-table-rowclj

(format-table-row row widths)

Format a single row with column widths.

Format a single row with column widths.
sourceraw docstring

format-table-separatorclj

(format-table-separator widths)

Create a table separator line.

Create a table separator line.
sourceraw docstring

format-user-tableclj

(format-user-table users)

Format users as a table.

Format users as a table.
sourceraw docstring

global-optionsclj

source

read-hidden-passwordclj

(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.
sourceraw docstring

render-tableclj

(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
sourceraw docstring

root-helpclj

source

run-cli!clj

(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
sourceraw docstring

session->jsonclj

(session->json session)

Transform session entity for JSON output.

Transform session entity for JSON output.
sourceraw docstring

session-create-optionsclj

source

session-helpclj

source

session-invalidate-optionsclj

source

session-list-optionsclj

source

truncate-stringclj

(truncate-string s max-length)

Truncate string to max-length with ellipsis.

Truncate string to max-length with ellipsis.
sourceraw docstring

user->jsonclj

(user->json user)

Transform user entity for JSON output.

Transform user entity for JSON output.
sourceraw docstring

user-create-optionsclj

source

user-delete-optionsclj

source

user-find-optionsclj

source

user-helpclj

source

user-list-optionsclj

source

user-update-optionsclj

source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close