init workflow for a first-time setup. The CLI is the quickest way to create an execution context, configure your embedding model, and save the required settings to a .env file so the SDK and tools work together out of the box.
Install dependencies
Create a virtual environment for SDK dependencies and install the CLI:Using the CLI
Commands are invoked directly from the terminal:xtrace --help to view all available commands:
xtrace prefix (e.g. xvec load ... instead of xtrace xvec load ...).
Initialize the SDK
Runinit to configure the SDK:
init command configures your local SDK repo in the following ways:
- connects your XTrace account via your
API_KEYandORG_ID - creates or loads a local execution context, which is a unique fingerprint from which to interact with your stored data
- loads an embedding model, which embeds data for storage and retrieval in a vector space
init once to persist your configuration, with information automatically being stored in a .env file and a /data directory.
Key concepts
- Execution context — your private cryptographic state. It holds a Paillier key pair (for encrypting vectors) and an AES key (for encrypting content), all locked by a passphrase you choose during
init. Every chunk you store and every query you run uses this context. Losing the passphrase means losing the ability to decrypt your data. - Embedding model — converts text into binary vectors for encrypted storage and search. The model you select during
initmust be the same one used for both uploading and querying. Changing models later requires re-uploading your data. - Knowledge base — a namespace on XTrace where your encrypted chunks live. Create one with
xtrace kb createbefore loading data.
Your first query
After runninginit, four commands take you from an empty knowledge base to search results:
Command groups
Commands are organized by submodule. All subgroups and shared commands are accessible from the samextrace CLI entry point.
Shared
Knowledge base admin — xtrace kb <command>
KB admin commands require
ADMIN_KEY input, entered once per shell session. To save the key to your .env for implicit admin access, run xtrace init --admin.
x-vec — xtrace xvec <command>
x-mem CLI commands (
xtrace xmem <command>) are coming soon.xtrace xvec <command> --help or see the full CLI reference.