Gateway CLI reference
The Gateway is part of the NeuraFrame Studio™ service, so you drive it with the same neuraframe command. The full command set is below; the sections that follow detail the commands you use to run and inspect the proxy, and the Studio CLI reference details the rest.
Every command
The complete command set. It is one binary, so every command below works on this install; the sections that follow give detail on the ones you use most here, and the Studio CLI reference details the rest.
| Command | What it does |
|---|---|
status | Service health, version, engine or pass-through, gateway state, license validity. |
stats | Reuse counters: served from memory versus forwarded. |
savings | What reuse is buying: calls avoided, reuse rate, estimated tokens saved, by source. Read live from the gateway. |
ask | Ask a question through the reuse stack. On a fresh install with no model connected it introduces itself and says so plainly. |
correct | Teach a correction through the native API, so future answers change. |
pin | Teach the gateway a fixed answer for a matching request: add, list, revoke. Bounded and reversible. May need sudo to save. |
freshness | Reuse in time: windows for time-sensitive answers, volatility detection, self-learning, drift checks. Run bare to list every knob. See the Gateway guide. |
vision | Image and video reuse: mode (exact, near, scene, continuous), thresholds, detector boxes, the continuous video knobs, and the visual memory. Full command set: Vision CLI reference. |
codebook | Complex identification against your own coding standard: check, use, off, reuse on|off, and run (the two-drive batch coder). See Complex identification. |
config | Read or set safe config keys (get / set), including gateway.upstream_url. |
license | Device fingerprint and license validity. license refresh pulls a renewed license. |
trial start | Start the 7-day trial. Needs sudo: it writes a license file. |
activate | Activate a paid license. Needs sudo, same reason. |
enroll | Join an organization's seat pool with the shared token (--token ORG-xxxx), for fleet installs. |
billing | Open the billing portal. |
version | Print the installed version. |
update | Check for a newer release; --apply upgrades in place, keeping memory, config, and license. |
logs | Recent service logs. |
doctor | Preflight plus service and license summary in one shot. |
demo | Run the bundled example workflow. |
uninstall | Remove the product. Keeps learned memory unless --purge. |
codebook
Complex identification: code footage against a standard YOU author (your codes, your grading tables, your rules). A codebook is a pack directory; the shipped example (vision/example_codebook in the install) shows every mechanism. The model classifies from the allowed codes; the engine enforces legality and looks up every grade deterministically. Full guide: Complex identification.
neuraframe codebook # show the current codebook configuration neuraframe codebook check DIR # validate a pack; every problem listed neuraframe codebook use DIR # set the pack for this device neuraframe codebook off # clear it neuraframe codebook reuse on|off # reuse gate while coding (default off) neuraframe codebook run --input F --out D # run the two-drive coder; --stub is free neuraframe codebook run --help # every runner knob (sampling, tracking, dossiers...)
Configure the gateway
neuraframe config set gateway.upstream_url URL # your provider base URL neuraframe config set gateway.profile NAME # openai | anthropic | grok | generic | auto neuraframe config set gateway.listen ADDR:PORT # default 127.0.0.1:8081 neuraframe config get gateway # show the current gateway block
Config changes take effect after a restart: sudo systemctl restart neuraframe-studio.
status
Shows service state, version, whether the engine is active or in pass-through, the gateway listen address, and license validity. Use this first when a request is not being served from memory.
neuraframe status
stats
Reuse counters: how many requests were served from memory versus forwarded upstream. This is where you see the Gateway earning its keep.
neuraframe stats
savings
A plain readout of what reuse is buying you: calls avoided, the reuse rate, an estimate of tokens saved, and a breakdown by source (exact, paraphrase, vision, pins). Call counts are exact; the token figure is an estimate. Read live from the gateway.
neuraframe savings
freshness
The time dimension for reuse: a stable answer is reused as long as it stays true, a time-sensitive one (weather, price, "latest") is re-fetched once its window passes. On and safe by default; it also self-learns how fast each class of query changes and can only ever make answers fresher. Run with no arguments to list every knob. Full detail in the Gateway guide.
neuraframe freshness # list every knob, its default, and what it does neuraframe freshness volatile_ttl 30 # window for time-sensitive answers (seconds) neuraframe freshness stable_paths /classify,/embed neuraframe freshness forget # clear self-learned windows (reversible)
pin
Teach the gateway a fixed answer the bounded, reversible way: a pin returns exactly what you type, for requests matching a rule you write. Not learning and does not generalise; every pin is listed and revocable. Use it to correct a wrong or stale answer, or fix a canonical reply, without touching your model. Saving a pin may need sudo.
sudo neuraframe pin add "refund policy" '{"answer":"Refunds within 30 days."}'
neuraframe pin list
sudo neuraframe pin revoke <id>
logs
Recent service logs (via journalctl when available), useful for diagnosing upstream connection issues or profile mismatches.
neuraframe logs
doctor
Runs the compatibility preflight, then a service and license summary, in one command.
neuraframe doctor
license, trial, activate, billing
Licensing is shared with Studio. When unlicensed or expired, the Gateway forwards everything and serves nothing from memory, so it stays fully transparent. See Licensing & trial for the Gateway view.
sudo neuraframe trial start # start the 7-day trial (needs sudo: writes a license file) sudo neuraframe activate # activate a paid license (needs sudo: writes a license file) neuraframe license # show device fingerprint and validity neuraframe billing # open the billing portal
neuraframe pin (above) is the gateway way: a bounded, reversible override served straight from the proxy, needing no model concept of a correction. neuraframe correct is the deeper, engine-level correction through the native reuse API. Either way you get reuse with zero code change; teaching is an opt-in extra.