CLI Reference¶
Complete command-line interface documentation for SteadyText.
Installation¶
The CLI is automatically installed with SteadyText:
Two commands are available:
- steadytext
- Full command name
- st
- Short alias
Global Options¶
generate¶
Generate deterministic text from a prompt.
Usage¶
# New pipe syntax (recommended)
echo "prompt" | st [OPTIONS]
echo "prompt" | steadytext [OPTIONS]
# Legacy syntax (still supported)
st generate [OPTIONS] PROMPT
steadytext generate [OPTIONS] PROMPT
Options¶
Option | Short | Type | Default | Description |
---|---|---|---|---|
--wait |
-w |
flag | false |
Wait for complete output (disable streaming) |
--json |
-j |
flag | false |
Output as JSON with metadata |
--logprobs |
-l |
flag | false |
Include log probabilities |
--think |
flag | false |
Enable Qwen3 thinking mode (shows reasoning) | |
--eos-string |
-e |
string | "[EOS]" |
Custom end-of-sequence string |
--size |
choice | Model size: small (0.6B), medium (1.7B), large (4B) | ||
--model |
string | Model name from registry (e.g., "qwen2.5-3b") | ||
--model-repo |
string | Custom model repository | ||
--model-filename |
string | Custom model filename | ||
--no-index |
flag | false |
Disable automatic index search | |
--index-file |
path | Use specific index file | ||
--top-k |
int | 3 |
Number of context chunks to retrieve |
Examples¶
Stdin Support¶
Generate from stdin when no prompt provided:
embed¶
Create deterministic embeddings for text.
Usage¶
Options¶
Option | Short | Type | Default | Description |
---|---|---|---|---|
--format |
-f |
choice | json |
Output format: json , numpy , hex |
--output |
-o |
path | - |
Output file (default: stdout) |
Examples¶
Stdin Support¶
Embed text from stdin:
echo "text to embed" | st embed
cat document.txt | st embed --format numpy --output doc_embedding.npy
models¶
Manage SteadyText models.
Usage¶
Options¶
Option | Short | Description |
---|---|---|
--list |
-l |
List available models |
--preload |
-p |
Preload all models |
--cache-dir |
Show model cache directory | |
--cache-info |
Show cache usage information |
Examples¶
vector¶
Perform vector operations on embeddings.
Usage¶
Commands¶
Command | Description |
---|---|
similarity |
Compute similarity between text embeddings |
distance |
Compute distance between text embeddings |
search |
Find most similar texts from candidates |
average |
Compute average of multiple embeddings |
arithmetic |
Perform vector arithmetic operations |
Examples¶
See Vector Operations Documentation for detailed usage.
cache¶
Manage result caches.
Usage¶
Options¶
Option | Short | Description |
---|---|---|
--clear |
-c |
Clear all caches |
--status |
-s |
Show cache status |
--generation-only |
Target only generation cache | |
--embedding-only |
Target only embedding cache |
Examples¶
daemon¶
Manage the SteadyText daemon for persistent model serving.
Usage¶
Commands¶
Command | Description |
---|---|
start |
Start the daemon server |
stop |
Stop the daemon server |
status |
Check daemon status |
restart |
Restart the daemon server |
Options¶
start¶
Option | Type | Default | Description |
---|---|---|---|
--host |
string | 127.0.0.1 |
Bind address |
--port |
int | 5557 |
Port number |
--foreground |
flag | false |
Run in foreground |
stop¶
Option | Type | Default | Description |
---|---|---|---|
--force |
flag | false |
Force kill if graceful shutdown fails |
status¶
Option | Type | Default | Description |
---|---|---|---|
--json |
flag | false |
Output as JSON |
Examples¶
Benefits¶
- 160x faster first request: No model loading overhead
- Persistent cache: Shared across all operations
- Automatic fallback: Operations work without daemon
- Zero configuration: Used by default when available
index¶
Manage FAISS vector indexes for retrieval-augmented generation.
Usage¶
Commands¶
Command | Description |
---|---|
create |
Create index from text files |
search |
Search index for similar chunks |
info |
Show index information |
Options¶
create¶
Option | Type | Default | Description |
---|---|---|---|
--output |
path | required | Output index file |
--chunk-size |
int | 512 |
Chunk size in tokens |
--glob |
string | File glob pattern |
search¶
Option | Type | Default | Description |
---|---|---|---|
--top-k |
int | 5 |
Number of results |
--threshold |
float | Similarity threshold |
Examples¶
Advanced Usage¶
Environment Variables¶
Set these before running CLI commands:
# Cache configuration
export STEADYTEXT_GENERATION_CACHE_CAPACITY=512
export STEADYTEXT_GENERATION_CACHE_MAX_SIZE_MB=100
# Allow model downloads (for development)
export STEADYTEXT_ALLOW_MODEL_DOWNLOADS=true
# Then run commands
st generate "test prompt"
Pipeline Usage¶
Chain commands with other tools:
# Batch processing
cat prompts.txt | while read prompt; do
echo "Prompt: $prompt"
st generate "$prompt" --json | jq '.text'
echo "---"
done
# Generate and embed
text=$(st generate "explain AI")
echo "$text" | st embed --format hex > ai_explanation.hex
Scripting Examples¶
Performance Tips¶
CLI Optimization
- Preload models: Run
st models --preload
once at startup - Use JSON output: Easier to parse in scripts with
--json
- Batch operations: Process multiple items in single session
- Cache warmup: Generate common prompts to populate cache