replicas-cli 0.3.673 → 0.3.674
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +27 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -26120,7 +26120,7 @@ Every Replicas workspace is a remote Linux VM. Repositories are cloned under \`~
|
|
|
26120
26120
|
|
|
26121
26121
|
Hooks run with \`bash -lc\` from \`~/workspaces\` (the parent of every repository checkout), so start scripts with \`cd ~/workspaces/<repo-name>\`. A repository may also ship its own \`replicas.json\` / \`replicas.yaml\` with \`startHook\`, \`warmHook\`, and \`systemPrompt\`; repository hooks run after the environment hooks. Prefer proposing environment hooks unless the repository already manages its own.
|
|
26122
26122
|
|
|
26123
|
-
Forks inherit everything their parent sets; never propose putting repository-specific setup in an environment other environments fork from.
|
|
26123
|
+
Forks inherit everything their parent sets; never propose putting repository-specific setup in an environment other environments fork from. When asked to move an existing environment into YAML/JSON or Git management, follow *Environment configuration as code* in \`REPLICAS.md\`: export its own settings, preserve inheritance and secrets, then preview before applying. Do not replace that migration with a fresh setup proposal or duplicate its hooks.
|
|
26124
26124
|
|
|
26125
26125
|
## Progress and the setup run
|
|
26126
26126
|
|
|
@@ -28455,7 +28455,7 @@ Use this when:
|
|
|
28455
28455
|
- The user asks you to come back to something later ("check back on this in a week", "remind me tomorrow", "tell me when CI is green") \u2014 schedule a follow-up (see *Follow-ups and reminders*)
|
|
28456
28456
|
- The user asks you to manage environments, environment variables, or environment files
|
|
28457
28457
|
- The user asks "what envs / repos / automations do I have?"
|
|
28458
|
-
- The user asks you to scaffold a \`replicas.json\` / \`replicas.yaml
|
|
28458
|
+
- The user asks you to scaffold a \`replicas.json\` / \`replicas.yaml\`, migrate an existing environment to configuration, or preview/apply its settings
|
|
28459
28459
|
- You need to run a long-lived service (dev server, daemon) \u2014 always use \`replicas service start\` so it survives workspace sleep/wake
|
|
28460
28460
|
- The user asks you to change how their Replicas app looks (theme, colors, accent) \u2014 use \`replicas theme set\` (see *Themes*)`;
|
|
28461
28461
|
REFERENCE13 = `# Replicas (in-workspace CLI)
|
|
@@ -28530,7 +28530,8 @@ In agent mode the CLI hides commands that don't make sense for in-workspace agen
|
|
|
28530
28530
|
| "Also run this PR automation on every push" | \`replicas automation edit <id> --keep-triggers --trigger-github pull_request.synchronize --trigger-github-repos acme/web\` |
|
|
28531
28531
|
| "What repos are connected?" | \`replicas repos\` |
|
|
28532
28532
|
| "Make my Replicas dark / purple / match these colors" | \`replicas theme set ...\` (see *Themes*) |
|
|
28533
|
-
| "Set up a \`replicas.json\` in this repo" | \`replicas init\` (\`-y\` for YAML) |
|
|
28533
|
+
| "Set up a \`replicas.json\` in this repo" | \`replicas init\` (\`-y\` for YAML); preserve existing repository hooks |
|
|
28534
|
+
| "Move my existing environment into code" | Export its own settings first, then use \`replicas environment config preview\` and \`apply\` (see *Environment configuration as code*) |
|
|
28534
28535
|
|
|
28535
28536
|
## Environments
|
|
28536
28537
|
|
|
@@ -28767,7 +28768,28 @@ If the org hasn't connected GitHub or GitLab yet, point the user at the integrat
|
|
|
28767
28768
|
|
|
28768
28769
|
## \`replicas.json\` / \`replicas.yaml\`
|
|
28769
28770
|
|
|
28770
|
-
\`replicas init\` creates a starter config in the current directory. \`-y\` writes YAML, \`-f\` overwrites an existing file.
|
|
28771
|
+
\`replicas init\` creates a starter config in the current directory. \`-y\` writes YAML, \`-f\` overwrites an existing file. Preserve an existing file rather than overwriting it. Supported root filenames are \`replicas.json\`, \`replicas.yaml\`, and \`replicas.yml\`, in that precedence order.
|
|
28772
|
+
|
|
28773
|
+
### Environment configuration as code
|
|
28774
|
+
|
|
28775
|
+
Read https://docs.replicas.dev/features/environment-configuration for the format and migration guide. Check \`replicas environment config --help\` before running commands; there is no CLI \`config export\` command. This feature requires access for the workspace's organization.
|
|
28776
|
+
|
|
28777
|
+
For an existing environment, use \`replicas environment get <env>\` and \`replicas environment config get <env>\` to identify the target and existing source. Export its **own** settings with authenticated \`GET /v1/environments/<id>/config-source/export\`. Do not reconstruct configuration from flattened effective settings, copy inherited parent values, or ask the user to retype settings. The exporter returns \`{ environment, warnings }\`. In a workspace, use the existing workspace authentication for this product API; do not ask for a new API key:
|
|
28778
|
+
|
|
28779
|
+
\`\`\`bash
|
|
28780
|
+
umask 077
|
|
28781
|
+
curl --fail-with-body --silent --show-error \\
|
|
28782
|
+
"\${REPLICAS_MONOLITH_URL:-$MONOLITH_URL}/v1/environments/$environment_id/config-source/export" \\
|
|
28783
|
+
-H "Authorization: Bearer $REPLICAS_ENGINE_SECRET" \\
|
|
28784
|
+
-H "X-Workspace-Id: \${REPLICAS_WORKSPACE_ID:-$WORKSPACE_ID}" \\
|
|
28785
|
+
--output /tmp/environment-export.json
|
|
28786
|
+
\`\`\`
|
|
28787
|
+
|
|
28788
|
+
Set \`environment_id\` from the resolved target, never a guessed ID. Read export warnings and literal values privately before committing; do not print the response or disclose secrets. Follow the canonical guide for file format, preview/apply, Git linking, source transitions, ownership, and hook behavior.
|
|
28789
|
+
|
|
28790
|
+
Apply only within the user's authorized scope. Investigate unexpected updates or removals during adoption, and do not disconnect an existing source unless the user requested that transition. Verify a clean subsequent preview, preserved parent/repository setup steps, and intact unrelated UI-managed settings.
|
|
28791
|
+
|
|
28792
|
+
Request missing secret values through \`replicas environment vars request\`; it loads this workspace only. Store them as sensitive variables on the target environment through its variables API before applying; never put them in configuration or print them.
|
|
28771
28793
|
|
|
28772
28794
|
For linked Git environment configuration, automatic apply is opt-in: \`replicas environment config auto-apply <env> on\` enables applying default-branch pushes, and \`off\` restores manual review/apply. Enable it only when the user asks. Local-file sources do not auto-apply. Validation or missing-secret failures preserve applied settings and appear in \`replicas environment config get <env>\` as \`last_error\`; fix the source/secrets and sync or push again. This uses repository webhook events and applies configuration directly without starting an agent workspace.
|
|
28773
28795
|
|
|
@@ -43522,7 +43544,7 @@ var CLI_VERSION;
|
|
|
43522
43544
|
var init_cli_version = __esm({
|
|
43523
43545
|
"../shared/src/cli-version.ts"() {
|
|
43524
43546
|
"use strict";
|
|
43525
|
-
CLI_VERSION = "0.3.
|
|
43547
|
+
CLI_VERSION = "0.3.674";
|
|
43526
43548
|
}
|
|
43527
43549
|
});
|
|
43528
43550
|
|