mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 11:02:20 +00:00
Consolidate example install commands
This commit is contained in:
parent
58c54156f1
commit
5a3e185d1c
7 changed files with 35 additions and 34 deletions
|
|
@ -3,6 +3,25 @@
|
|||
* Provides minimal helpers for connecting to and interacting with sandbox-agent servers.
|
||||
*/
|
||||
|
||||
export const SANDBOX_AGENT_INSTALL_VERSION = "0.3.1";
|
||||
|
||||
export type SandboxAgentComponent = "claude" | "codex" | "opencode" | "amp";
|
||||
|
||||
export function generateInstallCommand({
|
||||
version = SANDBOX_AGENT_INSTALL_VERSION,
|
||||
components = [],
|
||||
}: {
|
||||
version?: string;
|
||||
components?: SandboxAgentComponent[];
|
||||
} = {}): string {
|
||||
const uniqueComponents = [...new Set(components)];
|
||||
|
||||
return [
|
||||
`curl -fsSL https://releases.rivet.dev/sandbox-agent/${version}/install.sh | sh`,
|
||||
...uniqueComponents.map((component) => `sandbox-agent install-agent ${component}`),
|
||||
].join(" && ");
|
||||
}
|
||||
|
||||
function normalizeBaseUrl(baseUrl: string): string {
|
||||
return baseUrl.replace(/\/+$/, "");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue