Liking cljdoc? Tell your friends :D

wagoe.ai.shell.repl

REPL helper functions for the AI module.

Provides convenient wrappers for use during interactive development:

(require '[wagoe.ai.shell.repl :as ai]) (ai/explain *e) (ai/sql "find active users with orders in the last 7 days")

The service is resolved from a dynamic var that you can bind in your dev/user.clj before using these helpers.

REPL helper functions for the AI module.

Provides convenient wrappers for use during interactive development:

  (require '[wagoe.ai.shell.repl :as ai])
  (ai/explain *e)
  (ai/sql "find active users with orders in the last 7 days")

The service is resolved from a dynamic var that you can bind
in your dev/user.clj before using these helpers.
raw docstring

*ai-service*clj

Dynamic var holding the AI service map. Bind this in your REPL session or dev/user.clj:

(alter-var-root #'wagoe.ai.shell.repl/ai-service (constantly (integrant.repl.state/system :wagoe/ai-service)))

Dynamic var holding the AI service map.
Bind this in your REPL session or dev/user.clj:

  (alter-var-root #'wagoe.ai.shell.repl/*ai-service*
                  (constantly (integrant.repl.state/system :wagoe/ai-service)))
sourceraw docstring

explainclj

(explain exception-or-string)
(explain exception-or-string project-root)

Explain a Clojure exception or stack trace string.

Usage: (ai/explain *e) (ai/explain "clojure.lang.ExceptionInfo: ...\n\tat ...")

Args: exception-or-string - Exception or stack trace string

Returns: Prints explanation to stdout, returns the raw text.

Explain a Clojure exception or stack trace string.

Usage:
  (ai/explain *e)
  (ai/explain "clojure.lang.ExceptionInfo: ...\n\tat ...")

Args:
  exception-or-string - Exception or stack trace string

Returns:
  Prints explanation to stdout, returns the raw text.
sourceraw docstring

gen-testsclj

(gen-tests source-path)

Generate tests for a source file and print to stdout.

Usage: (ai/gen-tests "libs/user/src/wagoe/user/core/validation.clj")

Args: source-path - path to the source file

Returns: Generated test source string.

Generate tests for a source file and print to stdout.

Usage:
  (ai/gen-tests "libs/user/src/wagoe/user/core/validation.clj")

Args:
  source-path - path to the source file

Returns:
  Generated test source string.
sourceraw docstring

helpclj

(help)
source

refactor-fcisclj

(refactor-fcis ns-sym)

AI-guided FC/IS refactoring for a namespace. (ai/refactor-fcis 'wagoe.product.core.validation)

AI-guided FC/IS refactoring for a namespace.
(ai/refactor-fcis 'wagoe.product.core.validation)
sourceraw docstring

reviewclj

(review source-or-path)

AI code review of a source string or file path. (ai/review "(ns my.ns)\n(defn foo [] ...)") (ai/review "libs/user/src/wagoe/user/core/validation.clj")

AI code review of a source string or file path.
(ai/review "(ns my.ns)\n(defn foo [] ...)")
(ai/review "libs/user/src/wagoe/user/core/validation.clj")
sourceraw docstring

set-service!clj

(set-service! service)

Set the global REPL AI service (convenience for REPL sessions).

Args: service - AIService map from Integrant system

Returns: The service map.

Set the global REPL AI service (convenience for REPL sessions).

Args:
  service - AIService map from Integrant system

Returns:
  The service map.
sourceraw docstring

sqlclj

(sql description)
(sql description project-root)

Generate a HoneySQL query from a natural language description.

Usage: (ai/sql "find active users with orders in the last 7 days")

Args: description - NL description string project-root - optional project root path (default ".")

Returns: Prints HoneySQL + explanation, returns the result map.

Generate a HoneySQL query from a natural language description.

Usage:
  (ai/sql "find active users with orders in the last 7 days")

Args:
  description  - NL description string
  project-root - optional project root path (default ".")

Returns:
  Prints HoneySQL + explanation, returns the result map.
sourceraw docstring

test-ideasclj

(test-ideas source-or-path)

Suggest missing test cases for source code or file path. (ai/test-ideas "(ns my.ns)\n(defn foo [] ...)") (ai/test-ideas "libs/user/src/wagoe/user/core/validation.clj")

Suggest missing test cases for source code or file path.
(ai/test-ideas "(ns my.ns)\n(defn foo [] ...)")
(ai/test-ideas "libs/user/src/wagoe/user/core/validation.clj")
sourceraw docstring

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