Skip to content

Handbook

Context and indexing

Understand files, attachments, context budgets and distinct file-cache and semantic-index actions.

Reviewed CLI source version: 2.4.0 · Editorial update:

Reference files and directories

Type @ in chat and search for a file or directory. ↑/↓ selects, Tab/Enter accepts, Escape closes. An attachment is a context reference, not general permission. Secrets and outside paths still require specific consent.

Explain @src/example.ts and its tests without edits.
/context
/detach 1

Replace example paths with existing files. /context shows context/token breakdown and remaining budget. /detach [index|name/path fragment], alias /drop, removes all references without arguments, otherwise the entry at the specified index (starting at 1) or the first matching reference. Files remain on disk.

With an empty input, Ctrl+D removes all attachments; Backspace removes the last. Meta+Enter creates multiline input. Keyboard/terminal support varies; no promise for every terminal environment.

Clipboard and extra context

/copy copies the last assistant text to the OS clipboard; required platform programs must exist. /paste saves and attaches a clipboard image, not an immediate prompt. The file can remain even if the model does not support the attachment.

lurus chat --add-dir ../shared

--add-dir <dirs...> adds selected directories. Path boundaries and permission rules still apply; this does not grant access to every local file. Check that the model supports the intended image or document attachments, especially PDFs.

Three different maintenance actions

ActionEffect
/compress, alias /compactCompacts conversation context, possibly truncation/no-op/error; detail can be lost.
/refresh, alias /reindexRefreshes the @ file-search cache, not semantic indexing.
/indexing rebuildRebuilds semantic index, only when enabled.
/indexing
/indexing off
/indexing on
/indexing rebuild
/indexing clear
/indexing delete

No argument reports status. On/off writes a project setting and sets a runtime override. Clear/delete removes index data, not the setting. Rebuild is rejected when disabled. No --global flag for this slash command.

After a restart: The project indexing value is not applied when settings are loaded normally. /indexing off therefore does not provide a reliable persistent opt-out. Set global "indexing": false in ~/.lurus/settings.json to disable local indexing persistently. An account-level opt-out can still prevent local activation. Deleting index data is not the same as changing the setting or account policy.

Budget and memory

contextBudget defaults to 15,000 tokens, with 30% reserved for memory. It limits the memory block, not mandatory instructions or the entire model context window. /max toggles between the full model window and the normal limit; compaction may still be needed. /context, /cost and /stats show different information about context, cost and usage.

Advanced workflow: attach relevant files → check /context → detach unnecessary references → compact only with deliberate detail loss → refresh the file cache or semantic index according to the actual problem. Use /task new for a new task, not reindex.

Troubleshooting

If a file is missing from the @ selector, check the project directory, path and permissions, then use /refresh. If semantic search is unavailable, check global settings, account consent and /indexing. If disabling indexing does not survive a restart, see the project-setting limitation above. Detaching an attachment does not delete its file; /paste may have created a file earlier.

Next: settings, sessions, memory.

A deliberate choice

Before your first prompt.

Interactive demo
Lurus Codeprivacy-demo · illustrative workspace

Demo session ready. Your model choice and data route are separate decisions.

Illustrative scenario. No real sign-in, security test or code transmission takes place.

Image preview