CLI Reference
The loxtep CLI ships with @loxtep/sdk. Its customer-facing groups follow
the same application organization as the web app. Run loxtep --help for the
complete command list in your installed version and
loxtep <command> --help for command-specific flags.
Command signature
The CLI uses this general signature.
loxtep <command> [subcommand] [arguments] [options]
Parameters
| Parameter | Type | Description |
|---|---|---|
command | string | Required top-level command group. |
subcommand | string | Optional resource action such as list or get. |
arguments | string[] | Positional resource identifiers or query text. |
options | flags | Command-specific flags; inspect them with --help. |
Returns
Commands return formatted text by default and structured JSON where --json
is supported. A successful command exits with status 0.
Example usage checks the current authenticated identity.
pnpm exec loxtep whoami
Install and authenticate
Install the package and authenticate with these commands.
pnpm add @loxtep/sdk
pnpm exec loxtep login
pnpm exec loxtep whoami
login opens a browser by default. Use --console for the
email/password/TOTP flow. Credentials are project-local under
./.loxtep/credentials.json by default; use --global when you explicitly
want shared credentials.
Workspace lifecycle
Use these commands to create, bind, and inspect a local workspace.
pnpm exec loxtep init
pnpm exec loxtep projects list
pnpm exec loxtep attach --instance <instance-id>
pnpm exec loxtep status
pnpm exec loxtep generate
initcreates or binds a platform project and scaffolds the local workspace.projects list|get|link|clone|pull|pushmanages local/cloud project state.attachbinds the workspace to a runtime Instance. It is not the same as linking a project.statusreports local/cloud/deployed workspace state.observe statusis a different command for runtime health.
Connect
Use the supported connector inspection and sampling commands.
pnpm exec loxtep connectors list
pnpm exec loxtep connectors test <connector-id>
pnpm exec loxtep connectors list-entities <connector-id>
pnpm exec loxtep connectors capture-samples <connector-id> \
--entity-type orders --limit 10
The CLI intentionally does not create connector credentials. Create or authorize credentials in the web app, MCP, or SDK, then use the CLI to inspect, test, and sample them.
Products
Create local workflow packages
Scaffold local ingestion, transformation, and delivery workflow packages.
pnpm exec loxtep ingest create --name app-events --transport-mode default
pnpm exec loxtep transform create --from app-events --name cleaned-events --transport-mode fast
pnpm exec loxtep delivery create \
--from cleaned-events \
--connector-id <connector-id> \
--transport-mode volume
default is durable, balanced, and recommended. fast has the lowest latency
but may cost more. volume is designed for sustained throughput and has
delivery lag. Omitting the flag selects default.
Validate and deploy
Validate, push, and deploy the current local workspace.
pnpm exec loxtep lint
pnpm exec loxtep push
pnpm exec loxtep deploy --dry-run
pnpm exec loxtep deploy
pnpm exec loxtep deployments list
push uploads the local entity bundle. deploy compiles and releases the
workspace. A code-first module that declares an approval node writes that node
onto the flow. The handler is not uploaded. requireApproval prompts only
during loxtep test.
Add an approval after a step that is already on the flow. The following step moves onto the approved path. Decide the waiting event with the Inbox commands below.
pnpm exec loxtep approval add \
--workflow <workflow-id> \
--after <entity-id> \
--name "Order review" \
--channel inbox \
--timeout-hours 24
Use the plural resource groups for direct reads and writes:
The following commands inspect workflows and data products directly.
pnpm exec loxtep workflows list
pnpm exec loxtep workflows get <workflow-id>
pnpm exec loxtep data-products list
pnpm exec loxtep data-products get <data-product-id>
pnpm exec loxtep data-products readiness <data-product-id>
pnpm exec loxtep data-products promote <data-product-id> --target gold
Do not use the retired singular groups project, workflow, connector,
or the retired dp abbreviation.
Meaning and review
Use technical definition commands for Meaning and approval commands for Inbox.
pnpm exec loxtep define status <data-product-id>
pnpm exec loxtep define evidence <data-product-id>
pnpm exec loxtep proposals list --disposition pending
pnpm exec loxtep proposals infer-definitions <proposal-id>
pnpm exec loxtep proposals accept <proposal-id> --definition "Business meaning"
pnpm exec loxtep approvals list
pnpm exec loxtep approvals approve <approval-id>
define remains a technical CLI group for product-definition operations; the
customer area in the application is Meaning. loxtep approvals decides the
same records shown in Inbox. loxtep approval add creates the step on the flow.
Use
List tables and run a query scoped to one data product.
pnpm exec loxtep data-products tables <data-product-id>
pnpm exec loxtep data-products query <data-product-id> \
"SELECT * FROM t LIMIT 10" --receipt
SQL is always scoped to a data product. The retired top-level
loxtep query "SQL" form is not supported.
Observe
Inspect runtime status, deployments, and queues with these commands.
pnpm exec loxtep observe status
pnpm exec loxtep deployments get <deployment-id>
pnpm exec loxtep queue info <data-product-id>
pnpm exec loxtep queue checkpoint <data-product-id> --bot <bot-id>
CI authentication
For interactive or long-lived user JWTs in non-interactive jobs, provide a scoped token and explicit workspace configuration:
export LOXTEP_AUTH_TOKEN="..."
export LOXTEP_API_URL="https://api.loxtep.io"
pnpm exec loxtep status --json
Do not commit credentials or .loxtep/credentials.json.
Deploy tokens (GitHub Actions)
For headless CI that pulls a GitHub commit into an instance workspace and
deploys the same instance, use a project-scoped deploy token (lxdt_…) and
@loxtep/sdk 0.14.10+ (npm dist-tag latest). The CLI exchanges
LOXTEP_DEPLOY_TOKEN for a short-lived access token; do not invent private SDK
imports, S3 copies, or DB writes.
Create the token in the app (Organization → Deploy tokens) for the project you
will deploy. Store the raw lxdt_ key as a GitHub Actions secret. The token
owner must stay active and verified, and must hold live grants that satisfy the
routes you call (including projects:update for Pull).
Platform builds that include #5085
allow projects:update on deploy tokens only for
POST /workflows/projects/{project_id}/github/pull (loxtep projects pull).
Other project administration stays denied. Cross-project and cross-org requests
stay 403.
# .github/workflows/loxtep-deploy.yml
name: Loxtep pull and deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
env:
LOXTEP_API_URL: https://api.loxtep.io # or https://apidev.loxtep.io
LOXTEP_DEPLOY_TOKEN: ${{ secrets.LOXTEP_DEPLOY_TOKEN }}
LOXTEP_PROJECT_ID: ${{ vars.LOXTEP_PROJECT_ID }}
LOXTEP_INSTANCE_ID: ${{ vars.LOXTEP_INSTANCE_ID }}
LOXTEP_ENVIRONMENT_KEY: ${{ vars.LOXTEP_ENVIRONMENT_KEY }} # e.g. stage or prod
LOXTEP_ACTOR: ${{ github.sha }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
- run: npm install -g @loxtep/sdk@latest
- name: Pull commit into instance workspace
run: |
loxtep projects pull \
--project-id "$LOXTEP_PROJECT_ID" \
--instance-id "$LOXTEP_INSTANCE_ID" \
--commit-sha "${{ github.sha }}"
- name: Deploy with environment_key check
id: deploy
run: |
set -euo pipefail
DEPLOY_JSON=$(loxtep workflows deploy \
--project-id "$LOXTEP_PROJECT_ID" \
--instance-id "$LOXTEP_INSTANCE_ID" \
--expected-environment-key "$LOXTEP_ENVIRONMENT_KEY")
printf '%s\n' "$DEPLOY_JSON"
RUN_ID=$(printf '%s\n' "$DEPLOY_JSON" | jq -r '.run_id')
if [ -z "$RUN_ID" ] || [ "$RUN_ID" = "null" ]; then
echo "workflows deploy did not return run_id" >&2
exit 1
fi
echo "run_id=${RUN_ID}" >> "$GITHUB_OUTPUT"
- name: Read deployment status
run: |
loxtep deployments get "${{ steps.deploy.outputs.run_id }}" --project-id "$LOXTEP_PROJECT_ID" --json
Notes:
projects pullrequires--instance-id(or attach so.loxtep/project.jsonhasinstance_id) and a project id. A deploy-token session does not supply project id for this command. Pass--project-id "$LOXTEP_PROJECT_ID", or commit.loxtep/project.json(written byloxtep attach/loxtep init) in the checkout. Optional--branch/--commit-sha.workflows deployrequires--instance-id. Optional--expected-environment-keyfails closed with HTTP 409environment_key_mismatchwhen the instance metadata disagrees (aliases staging→stage, production→prod). The command prints the deploy result as JSON; capture.run_id(the async_runs tracking handle) fordeployments get.deployments getreturns status andruntime_mappingwhen present. Pass--project-idso deploy-token sessions name their project.
Prefer the CLI above for GitHub Actions. For a Node script, exchange the
lxdt_ key at POST /organizations/auth/deploy-token, then call the same
public client methods with the minted JWT. This Node path is unverified
end to end. It compile-checks against @loxtep/sdk 0.14.10, but data-plane
calls may return 403 until the SDK has a SigV4 deploy-token client
(LoxtepInc/loxtep-sdk#129).
The CLI workflow above is the supported CI path:
import { LoxtepClient } from '@loxtep/sdk';
const apiUrl = process.env.LOXTEP_API_URL!;
const projectId = process.env.LOXTEP_PROJECT_ID!;
const instanceId = process.env.LOXTEP_INSTANCE_ID!;
const exchangeRes = await fetch(`${apiUrl}/organizations/auth/deploy-token`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LOXTEP_DEPLOY_TOKEN!}`,
'Content-Type': 'application/json',
...(process.env.LOXTEP_ACTOR
? { 'x-loxtep-actor': process.env.LOXTEP_ACTOR }
: {}),
},
body: JSON.stringify({ project_id: projectId }),
});
if (!exchangeRes.ok) {
throw new Error(`deploy-token exchange failed: ${exchangeRes.status}`);
}
const exchangeJson = await exchangeRes.json();
const accessToken = exchangeJson.data.access_token;
if (typeof accessToken !== 'string' || accessToken.length === 0) {
throw new Error('deploy-token exchange missing data.access_token');
}
const client = new LoxtepClient({
api_url: apiUrl,
auth: { type: 'jwt', token: accessToken },
project_id: projectId,
});
await client.workspace.projects.github_pull(projectId, {
instance_id: instanceId,
commit_sha: process.env.GITHUB_SHA,
});
const deploy = await client.build.workflows.deploy({
project_id: projectId,
instance_id: instanceId,
expected_environment_key: process.env.LOXTEP_ENVIRONMENT_KEY,
});
if (typeof deploy.run_id !== 'string' || deploy.run_id.length === 0) {
throw new Error('workflows deploy did not return run_id');
}
await client.observe.get_deployment(deploy.run_id, {
project_id: projectId,
});