pub enum Commands {
Show 16 variants
Model {
action: ModelCommands,
},
Generate {Show 17 fields
prompt: Option<String>,
model: String,
model_path: Option<String>,
max_tokens: usize,
temperature: f32,
top_k: Option<usize>,
top_p: Option<f32>,
min_p: Option<f32>,
repetition_penalty: f32,
greedy: bool,
gpu: bool,
no_stream: bool,
quiet: bool,
gguf: bool,
draft: Option<String>,
draft_tokens: usize,
prompt_lookup: Option<usize>,
},
Summarize {
input: Option<String>,
model: String,
model_path: Option<String>,
min_length: Option<usize>,
max_length: Option<usize>,
num_beams: Option<usize>,
length_penalty: Option<f32>,
no_repeat_ngram: Option<usize>,
greedy: bool,
no_stream: bool,
gpu: bool,
quiet: bool,
},
Translate {Show 13 fields
input: Option<String>,
model: Option<String>,
model_path: Option<String>,
src: Option<String>,
dst: Option<String>,
max_length: Option<usize>,
num_beams: Option<usize>,
length_penalty: Option<f32>,
no_repeat_ngram: Option<usize>,
greedy: bool,
no_stream: bool,
gpu: bool,
quiet: bool,
},
Inspect {
path: String,
},
Embed {
input: Option<String>,
model: String,
model_path: Option<String>,
format: String,
no_normalize: bool,
normalize: bool,
pooling: String,
gpu: bool,
quiet: bool,
},
Mcp,
Transcribe {
file: String,
model: String,
model_path: Option<String>,
language: Option<String>,
translate: bool,
timestamps: bool,
max_tokens: Option<usize>,
no_stream: bool,
gpu: bool,
quiet: bool,
},
Classify {Show 13 fields
input: Vec<String>,
model: String,
model_path: Option<String>,
labels: Option<String>,
top_k: usize,
threshold: Option<f32>,
max_length: Option<usize>,
batch_size: Option<usize>,
multi_label: bool,
format: String,
gpu: bool,
dtype: Option<String>,
quiet: bool,
},
Ner {
input: Vec<String>,
model: String,
model_path: Option<String>,
aggregation: String,
format: String,
gpu: bool,
quiet: bool,
},
Rerank {
query: String,
documents: Vec<String>,
model: String,
model_path: Option<String>,
top_k: Option<usize>,
format: String,
gpu: bool,
quiet: bool,
},
Chat {
model: String,
model_path: Option<String>,
system: Option<String>,
temperature: f32,
max_tokens: usize,
gpu: bool,
quiet: bool,
gguf: bool,
draft: Option<String>,
draft_tokens: usize,
},
Index {
action: IndexCommands,
},
Image {
action: ImageCommands,
},
Search {
index_path: String,
query: String,
top_k: usize,
mode: String,
model: Option<String>,
rerank_model: Option<String>,
format: String,
gpu: bool,
quiet: bool,
},
Similarity {
text1: String,
text2: String,
model: String,
gpu: bool,
quiet: bool,
},
}Variants§
Model
Manage models (list, download, info)
Fields
action: ModelCommandsGenerate
Generate text from a prompt
Fields
gguf: boolPrefer quantized GGUF weights when the model has them
Q4_K_M is a fraction of the size and markedly faster to decode: measured on an RTX A2000, llama3.2-3b runs 24.5 tok/s from GGUF against 8.7 from full-precision safetensors. Falls back with a notice when the model has no GGUF published.
draft: Option<String>Draft model for speculative decoding. Must share the target’s vocabulary: a small model of the same family, such as qwen2.5-0.5b-instruct drafting for qwen2.5-1.5b.
Summarize
Summarize text
Fields
Translate
Translate text between languages
Fields
model: Option<String>Model to use. By default opus-mt-en-de or opus-mt-de-en for those two directions, and flan-t5-base, which is much less reliable, for the rest
Inspect
Show a model’s metadata, config and tensor layout
Embed
Generate embeddings for text
Fields
pooling: StringPooling strategy: mean, cls, max
Mean matches what sentence-transformers does for these models, and what the library bindings and presets already default to. Pooling changes the vector itself, so a different choice here does not produce a slightly different answer, it produces one that cannot be compared against the others.
Mcp
Serve Kjarni’s tools to AI agents over MCP (stdio): folder search, photo search, transcription, classification, reranking and similarity
Transcribe
Transcribe audio to text
Fields
Classify
Classify text using a classification model
Fields
Ner
Find names of people, places, organizations and other entities
Several texts go one per line on stdin. –model-path takes any *ForTokenClassification model from the Hugging Face Hub, such as an Icelandic or a medical one.
Fields
Rerank
Rerank documents by relevance to a query
Fields
Chat
Interactive chat mode
Fields
gguf: boolPrefer quantized GGUF weights when the model has them
Q4_K_M is a fraction of the size and markedly faster to decode: measured on an RTX A2000, llama3.2-3b runs 24.5 tok/s from GGUF against 8.7 from full-precision safetensors. Falls back with a notice when the model has no GGUF published.
Index
Create or manage search indexes
Fields
action: IndexCommandsImage
Index and search images by description
Fields
action: ImageCommandsSearch
Search an index
Fields
model: Option<String>Encoder model for semantic search. Defaults to the model the index was built with.
Similarity
Compute similarity between two texts
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.impl StructuralPartialEq for Commands
Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Forget for Commands
impl Freeze for Commands
impl Move for Commands
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnsafeUnpin for Commands
impl UnwindSafe for Commands
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T, U> Imply<T> for U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more