Liking cljdoc? Tell your friends :D

hyperphor.ellum.extend

Generate Clojure functions on demand via the LLM, caching the generated source so each function is only generated once.

(defextend (update-packages []) "Update all outdated dependencies")

defines update-packages immediately, right there: the body is written by the LLM on the spot, persisted to generated-file, and eval'd into hyperphor.ellum.generated. On a later call to defextend with the same name -- a re-eval of the same form, or a future process once generated-file has loaded -- the cached definition is reused and the LLM isn't consulted again.

Ported from claude-extend (mt-elisp), which shells out to the claude CLI since Emacs has no LLM client of its own; here we just call hyperphor.ellum.core/query directly.

Generate Clojure functions on demand via the LLM, caching the generated
source so each function is only generated once.

(defextend (update-packages []) "Update all outdated dependencies")

defines `update-packages` immediately, right there: the body is written by
the LLM on the spot, persisted to `generated-file`, and eval'd into
`hyperphor.ellum.generated`. On a later call to `defextend` with the same
name -- a re-eval of the same form, or a future process once
`generated-file` has loaded -- the cached definition is reused and the LLM
isn't consulted again.

Ported from `claude-extend` (mt-elisp), which shells out to the `claude`
CLI since Emacs has no LLM client of its own; here we just call
`hyperphor.ellum.core/query` directly.
raw docstring

*model*clj

Model used to generate function bodies, or nil for the provider default.

Model used to generate function bodies, or nil for the provider default.
sourceraw docstring

*provider*clj

Provider used to generate function bodies.

Provider used to generate function bodies.
sourceraw docstring

defextendcljmacro

(defextend signature description)

Define (name arglist) in hyperphor.ellum.generated, generating the body via the LLM right now if it isn't already cached in generated-file. This blocks on the API call. SIGNATURE is (name arglist) exactly as it would appear after defn, e.g. (greet [name]). Returns the resulting var.

Define `(name arglist)` in `hyperphor.ellum.generated`, generating the body
via the LLM right now if it isn't already cached in `generated-file`. This
blocks on the API call. SIGNATURE is `(name arglist)` exactly as it would
appear after `defn`, e.g. `(greet [name])`. Returns the resulting var.
sourceraw docstring

define!clj

(define! name arglist description)

Generate and define NAME/ARGLIST per DESCRIPTION in hyperphor.ellum.generated, unless already generated. Returns the resulting var.

Generate and define NAME/ARGLIST per DESCRIPTION in `hyperphor.ellum.generated`,
unless already generated. Returns the resulting var.
sourceraw docstring

generated-fileclj

File that accumulates functions generated by defextend.

File that accumulates functions generated by `defextend`.
sourceraw docstring

generated-nsclj

Namespace that generated functions are defined in.

Namespace that generated functions are defined in.
sourceraw docstring

load-generated!clj

(load-generated!)

Load generated-file once per process, populating registry. Restores the caller's *ns* afterward -- the file's own ns form would otherwise leave the reader parked in hyperphor.ellum.generated.

Load `generated-file` once per process, populating `registry`.
Restores the caller's `*ns*` afterward -- the file's own `ns` form would
otherwise leave the reader parked in `hyperphor.ellum.generated`.
sourceraw docstring

regenerate!clj

(regenerate! name)

Discard the cached body of defextend function NAME and regenerate it.

Discard the cached body of defextend function NAME and regenerate it.
sourceraw docstring

register!clj

(register! name arglist description)

Record NAME as defextend-generated with ARGLIST/DESCRIPTION. Called both live after generation and from generated-file itself on load.

Record NAME as defextend-generated with ARGLIST/DESCRIPTION.
Called both live after generation and from `generated-file` itself on load.
sourceraw docstring

registryclj

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