Connect to a configured workspace service

Connect to your configured workspace service, inspect experiments and retained files, and apply a reviewed one-file replacement with conflict recovery.

Use Altifigence CLI 0.1.9 on Linux to work with an existing Digital Design Studio workspace service. Your operator supplies the service origin, workspace access and enabled features. Requests address that service’s workspace files and experiments.

Require exit status 0 before reading a saved result. Keep standard error separately and inspect the result fields described below.

Configure the connection

Set ALTI_STUDIO_ENDPOINT to the operator-provided origin. Remote services use HTTPS; IP loopback services may use HTTP. Supply an origin with an empty path and configure the operator-provided ALTI_STUDIO_SERVICE_SECRET when authentication is enabled. The CLI sends this value as x-service-secret. Each command can also select its origin with --endpoint.

Inspect experiments and retained files

With the connection configured, list up to five experiments. An empty workspace returns the illustrative receipt below; HTTP 200 exits with code 0.

alti --json ide service evolve list --limit 5
{"schema":"altifigence.dds.service-receipt.v1","operation":"evolve.list","ok":true,"httpStatus":200,"body":{"runs":[]}}

For a retained result, use its exact service-workspace path. Replace this example path with a file that exists in your authorized workspace. The response body preserves the owner’s file fields, including content.

alti --json ide service evolve read-file evolve/adder/results/report.md

Search and replace one reviewed file

Workspace text search requires a Linux service. Search the same service you will use for replacement, then review the matching file, locations and coverage metadata. Each match carries a contentHash. The CLI preserves truncated and replaceScopeComplete so you can assess the returned scope.

alti --json ide service workspace search --query old_signal --match-case --whole-word

Save the following as replace.json, replacing the illustrative 64-character hash with the selected rtl/top.sv match’s actual contentHash. Keep the query and options consistent with your review. The request targets one file; omitting match applies the replacement to its matching occurrences. The expected hash binds the update to the file version you reviewed.

{
  "query": "old_signal",
  "replacement": "new_signal",
  "options": {
    "matchCase": true,
    "wholeWord": true
  },
  "paths": [
    "rtl/top.sv"
  ],
  "expectedHashes": {
    "rtl/top.sv": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  }
}
alti --json ide service workspace replace --request replace.json

Recover from conflicts and configuration errors

If the file has changed, an illustrative conflict receipt is shown below. HTTP 409 exits with code 1. Run the search again against the same service, review the current matches and file version, then update expectedHashes with the fresh contentHash before submitting a new replacement.

{"schema":"altifigence.dds.service-receipt.v1","operation":"workspace.replace","ok":false,"httpStatus":409,"body":{"ok":false,"code":"search_replace_conflict","conflicts":[{"path":"rtl/top.sv","expectedHash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","actualHash":"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"}],"replacements":0,"files":[]}}

STUDIO_ENDPOINT_REQUIRED with httpStatus: null exits with code 2: configure the operator’s origin and rerun. For HTTP 401, obtain the matching service secret from the operator. A timeout after replacement calls for inspecting the current file and searching again before deciding on another update.