mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-27 07:38:51 +00:00
Add packages/cli-rs, an OpenCode client written in Rust on OpenTUI's Rust crates. It is a client only.
15 lines
685 B
Bash
Executable file
15 lines
685 B
Bash
Executable file
#!/bin/sh
|
|
# Runs opencode-native against the elected opencode background service, as the root `dev:live` does for the
|
|
# TypeScript TUI: the dev storage channel, the service's URL, and its private password.
|
|
#
|
|
# Usage: script/live.sh [opencode-native arguments...]
|
|
set -eu
|
|
|
|
rs=$(cd "$(dirname "$0")/.." && pwd)
|
|
server=$(opencode service status)
|
|
OPENCODE_PASSWORD=$(opencode service get password)
|
|
OPENCODE_TUI_CHANNEL=dev
|
|
export OPENCODE_PASSWORD OPENCODE_TUI_CHANNEL
|
|
# Builds from the workspace so cargo reads .cargo/config.toml, then runs in the caller's directory.
|
|
(cd "$rs" && cargo build --quiet --bin opencode-native)
|
|
exec "$rs/target/debug/opencode-native" "$@" --server "$server"
|