Skip to content

Water-Run/get

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get -- get anything from your computer

get is a small, simple binary tool that allows you to use natural language to invoke a large language model to generate commands, and attempt to retrieve any information you need from your device. get is open-sourced on GitHub under the AGPL-3.0 license.

Examples:

get "system version"
get "code in the directory"
get "the latest get version at https://github.com/Water-Run/get"

Download: GitHub Release

After downloading, place the get executable alongside the bundled bin/ directory (which contains rg, fd, sg, pmc, tree/treepp, tokei, lua, and others). You can then use get version to verify the installation and get help to get help.

A lightweight edition of get is also available without the bundled bin/ directory. In that case only system-installed tools are available to generated commands.

Prerequisites

Before getting started, you need to configure at least your large language model settings. get is compatible with the OpenAI API specification. Use the following commands to configure:

get set model your-model-name
get set url your-url
get set key your-key

Once done, you can run get isok to verify. To unset a configuration item, simply leave the value empty (i.e., omit the "your-" part above). For example, the following command unsets the Key:

get set key

Model Strength Requirement

get executes shell commands generated by the LLM on your device. A sufficiently capable model is the foundation of safety. At startup, get checks the configured model name against a built-in whitelist of known high-performance models and displays a warning if the model is not recognized.

Known strong models include: GPT 5+ (including CodeX variants), Claude Opus/Sonnet 3.5+, Claude 3.7+ (by version), Gemini 3+, Grok 4+, GLM 4.7+, MiniMax 2.7+, DeepSeek (full versions), and OpenAI o-series 3+. Reduced-capability variants (Mini, Nano, Lite, Haiku, Flash, etc.) and unsupported families trigger the warning. The warning is advisory and does not block execution.

Model names are normalised before comparison — case differences and underscores vs hyphens are handled transparently (Claude_Opus_4.6 and claude-opus-4.6 are equivalent).

System Requirements

get requires a 64-bit platform running Windows 10+ or Linux with kernel 6.0+. A startup warning is shown if the runtime environment does not meet these requirements.

Static Builds

To produce a fully statically linked binary (no dynamic library dependencies), build with the staticBuild flag. This requires static OpenSSL libraries to be available on the system:

nim c -d:release -d:staticBuild src/get.nim

Getting Started

Usage is very straightforward:

get "your query"

get is designed to perform read-only operations only. The LLM is prompted with strict read-only constraints, and every generated command undergoes:

  1. Dangerous-command check — a built-in safety check rejects commands containing known destructive operations (rm, del, mv, cp, mkdir, kill, shutdown, etc.) before they can execute.
  2. Double-check (default: enabled) — a second LLM safety review of the generated command.
  3. Command-pattern validation — optional regex matching via command-pattern.
  4. Manual confirmation — optional interactive y/N prompt via manual-confirm.

Output Mode

By default, get instructs the LLM to indicate whether the command output is self-explanatory (DIRECT) or requires interpretation (INTERPRET). Most queries produce direct output — the raw command result is shown without an additional LLM call. Only when the output needs summarisation or analysis does get invoke the LLM again. In instance mode, output is always shown directly.

Bundled Tools

get ships with several high-performance command-line tools in the bin/ directory. These tools are automatically available to generated commands:

Tool Description
rg ripgrep — ultra-fast regex search in files
fd Fast file/directory finder
sg ast-grep — AST-level structural code search
pmc pack-my-code — code context packaging for LLM prompts
treepp (Win) / tree (Linux) tree++ (Win) / classic Unix tree (Linux) — directory tree
tokei Code statistics (lines of code by language)
lua Lua 5.x interpreter for calculations and text processing

The LLM is made aware of these tools and will prefer them when they fit the task. Write-mode flags on bundled tools (e.g. pmc -o, treepp /O) are explicitly forbidden in the prompt.

Output Style

get supports three output styles, configured via get set style <mode>:

Style Description
simp Plain text, no formatting. Sections separated by blank lines.
std Dividers and basic ANSI colours (default).
vivid Animated spinners, bold colours, Markdown rendering via mdcat.

vivid mode is experimental. It requires the bundled mdcat binary for Markdown rendering; if unavailable, a warning is shown suggesting get set style std. An experimental notice is displayed on each invocation.

Skipping the Cache

By default, get caches results so that repeated identical queries in the same context return instantly without making any API calls. Before caching a result, get asks the LLM whether the output is stable enough to cache; volatile results (e.g. live metrics, current time) are not cached. To bypass the cache for a single query, use the --no-cache flag:

get "your query" --no-cache

set Options Reference

The full list of set options is shown in the table below. Integer options accept false to disable the feature entirely (equivalent to setting the value to 0).

Option Description Value Default
key LLM API key String Empty
url LLM API endpoint URL String (URL) https://api.poe.com/v1
model LLM model name String gpt-5.3-codex
manual-confirm Whether to require manual confirmation before executing generated commands true / false false
double-check Whether to invoke the model for a second safety review of the generated command true / false true
instance Whether to ask the model to reply as quickly as possible true / false false
timeout Timeout for a single API request Positive integer (seconds) / false 300
max-token Maximum token consumption per request Positive integer / false 20480
command-pattern Regex pattern to match against the generated command; execution is rejected if it does not match Regex string Empty (no matching)
system-prompt System prompt used to constrain model behavior, declare available tool calls, etc. String Empty
shell The shell used to execute commands String (shell path or name) Windows: powershell; Linux: bash
log Whether to log each request and execution true / false true
hide-process Whether to hide intermediate steps and only output the final result true / false false
cache Whether to enable response caching true / false true
cache-expiry Number of days before a cache entry expires Positive integer (days) / false 30
cache-max-entries Maximum number of entries retained in the cache Positive integer / false 1000
log-max-entries Maximum number of entries retained in the log Positive integer / false 1000
style Output style simp / std / vivid std

Examples of disabling integer options:

get set timeout false        # no request timeout
get set max-token false      # let the API decide token limit
get set cache-expiry false   # cached entries never expire
get set cache-max-entries false  # no limit on cache size
get set log-max-entries false    # no limit on log entries

Dangerous Command Safety Check

get includes a built-in safety check that rejects commands containing known destructive operations before execution. This check runs independently of any command-pattern configuration.

Blocked commands include: rm, rmdir, del, mv, move, cp, copy, mkdir, touch, chmod, chown, mkfs, dd, format, fdisk, kill, killall, pkill, shutdown, reboot, halt, poweroff, passwd, useradd, userdel, Set-Content, New-Item, Remove-Item, Move-Item, and others.

When setting a custom command-pattern, get checks whether the pattern would allow any of these dangerous commands and displays a warning if so.

Cache Management

get caches the final output of each query keyed by a hash of the query text and execution context (working directory, shell, model, instance mode, system prompt, and command pattern). When the same query is run under the same context, the cached result is returned immediately.

Before storing a new cache entry, get sends a lightweight LLM request to determine whether the result is stable (cacheable) or volatile (not cacheable). Volatile results — such as current time, CPU usage, or running processes — are not cached even when caching is enabled.

Viewing Cache Status

get cache

Displays whether caching is enabled, the number of cached entries, configured limits, and the cache file location.

Clearing All Cache

get cache --clean

Removes every entry from the cache.

Removing a Specific Cached Query

get cache --unset "system version"

Removes all cache entries whose query text matches the given string (case-insensitive).

Disabling the Cache

get set cache false

When disabled, no cache lookups or writes are performed. Existing cache entries are preserved on disk until explicitly cleaned.

Tuning Cache Parameters

get set cache-expiry 7
get set cache-max-entries 500
get set cache-expiry false      # entries never expire
get set cache-max-entries false  # unlimited entries

Log Management

get logs each query execution (query text, generated command, exit code, and output preview) to a local file. When the entry count exceeds the log-max-entries limit (unless disabled with false), the oldest entries are automatically removed.

Viewing Log Status

get log

Displays whether logging is enabled, the configured maximum entries, entry count, file location, and file size.

Clearing the Log

get log --clean

Removes all entries from the log file.

Tuning Log Parameters

get set log-max-entries 500
get set log-max-entries false  # unlimited log entries

Disabling Logging

get set log false

When disabled, no log writes are performed. Existing log content is preserved until explicitly cleaned.

config Command Reference

  • get config: Display the current configuration (all options).
  • get config --reset: Reset all configuration to default values.
  • get config --<option>: Display the current value of a single option.

The --<option> flag accepts every option name from the set table above. Examples:

get config --key
get config --url
get config --model
get config --manual-confirm
get config --double-check
get config --instance
get config --timeout
get config --max-token
get config --command-pattern
get config --system-prompt
get config --shell
get config --log
get config --hide-process
get config --cache
get config --cache-expiry
get config --cache-max-entries
get config --log-max-entries
get config --style

Note: get config --key displays the key status (set/not set) with the value masked for security. Disabled integer options display false.

Other Command Reference

  • get get: Return basic information for get
  • get get --intro: Return introduction for get
  • get get --version: Return version for get (equivalent to get version)
  • get get --license: Return the LICENSE for get
  • get get --github: Return the GitHub link for get
  • get version: Return version for get
  • get isok: Verify whether current configuration is ready to use (checks key, url, model, and sends a probe request)
  • get help: Display usage help
  • get log: Display log status
  • get log --clean: Clear all log entries