tarcsweb 0.0.0-stage → 0.5.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 tlucas97
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,13 @@
1
- # Temporary Holding Version
1
+ # tarcsweb
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Claude Code and Codex in one browser tab, running on your own computer.
4
+
5
+ ```sh
6
+ npx tarcsweb
7
+ ```
8
+
9
+ This package is the installer. It downloads the latest tarcsweb release from GitHub into `~/.local/share/tarcsweb`, builds it there and runs it as a background service on http://localhost:24816. Running it again updates to the latest release. It works on Linux with a systemd user session, on macOS and on Windows through WSL2.
10
+
11
+ `npx tarcsweb v0.5.1` installs a given version, and `npx tarcsweb --yes` answers yes to the installer's questions.
12
+
13
+ Requirements, screenshots and the uninstall command are in the [README on GitHub](https://github.com/TLucas97/tarcsweb#readme).
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+ // Installs or updates tarcsweb with the get.sh packed next to it; arguments go to get.sh (a version, --yes, --help).
3
+ import { spawnSync } from 'node:child_process';
4
+ import { fileURLToPath } from 'node:url';
5
+
6
+ if (process.platform === 'win32') {
7
+ console.error(
8
+ [
9
+ 'tarcsweb does not run on Windows directly yet. Install it inside WSL2:',
10
+ ' 1. In PowerShell: wsl --install -d Ubuntu',
11
+ ' 2. In the Ubuntu terminal, with Node installed: npx tarcsweb',
12
+ 'Then open http://localhost:24816 in your Windows browser.',
13
+ 'More in the README: https://github.com/TLucas97/tarcsweb#install',
14
+ ].join('\n'),
15
+ );
16
+ process.exit(1);
17
+ }
18
+
19
+ const getSh = fileURLToPath(new URL('../get.sh', import.meta.url));
20
+ const run = spawnSync('bash', [getSh, ...process.argv.slice(2)], { stdio: 'inherit' });
21
+ if (run.error) {
22
+ console.error(run.error.code === 'ENOENT' ? 'tarcsweb needs bash to install' : run.error.message);
23
+ process.exit(1);
24
+ }
25
+ process.exit(run.status ?? 1);
package/get.sh ADDED
@@ -0,0 +1,106 @@
1
+ #!/usr/bin/env bash
2
+ # Installs or updates tarcsweb from a GitHub release, without git, on Linux or macOS. Safe to re-run; bash 3.2 compatible.
3
+ # curl -fsSL https://raw.githubusercontent.com/TLucas97/tarcsweb/main/get.sh | bash
4
+ # bash get.sh [version] [--yes] e.g. bash get.sh v0.1.1
5
+ # Env: TARCSWEB_HOME (install root), TARCSWEB_API (release API base), and install.sh's own (TARCSWEB_PORT, ...).
6
+ set -euo pipefail
7
+
8
+ REPO_SLUG="TLucas97/tarcsweb"
9
+
10
+ API="${TARCSWEB_API:-https://api.github.com}"
11
+ HOME_DIR="${TARCSWEB_HOME:-${XDG_DATA_HOME:-$HOME/.local/share}/tarcsweb}"
12
+ RELEASES="$HOME_DIR/releases"
13
+ TMP=""
14
+
15
+ say() { printf '\n==> %s\n' "$*" >&2; }
16
+ die() { printf 'error: %s\n' "$*" >&2; exit 1; }
17
+ cleanup() { [ -z "$TMP" ] || rm -rf "$TMP"; }
18
+
19
+ usage() {
20
+ cat >&2 << EOF
21
+ Usage: get.sh [version] [--yes]
22
+ Installs the latest tarcsweb release (or the given version) into $HOME_DIR.
23
+ version a release tag such as v0.1.1 (default: the latest release)
24
+ --yes, -y answer yes to install.sh's questions (Node, pnpm, voice)
25
+ EOF
26
+ }
27
+
28
+ # First string value of a JSON key; works on compact and pretty-printed JSON.
29
+ json_str() {
30
+ { grep -o "\"$1\": *\"[^\"]*\"" || true; } | head -n 1 | sed 's/^"[^"]*": *"\(.*\)"$/\1/'
31
+ }
32
+
33
+ # Prints the release JSON for "latest" or a tag.
34
+ fetch_release() {
35
+ local url out code
36
+ if [ "$1" = latest ]; then url="$API/repos/$REPO_SLUG/releases/latest"; else url="$API/repos/$REPO_SLUG/releases/tags/$1"; fi
37
+ out="$(curl -sSL --max-time 30 -H 'Accept: application/vnd.github+json' -w '\n%{http_code}' "$url")" || die "could not reach $API (are you offline?)"
38
+ code="${out##*$'\n'}"
39
+ case "$code" in
40
+ 200) printf '%s' "${out%$'\n'*}" ;;
41
+ 404) if [ "$1" = latest ]; then die "$REPO_SLUG has no published release yet"; else die "release $1 not found in $REPO_SLUG"; fi ;;
42
+ 403 | 429) die "GitHub's API rate limit was reached; try again in an hour" ;;
43
+ *) die "GitHub's API answered HTTP $code for $url" ;;
44
+ esac
45
+ }
46
+
47
+ # Wrapped in a function so `curl | bash` reads the whole script before running any of it.
48
+ main() {
49
+ local want=latest fetch_only=0 arg
50
+ local pass=()
51
+ for arg in "$@"; do
52
+ case "$arg" in
53
+ -h | --help) usage; return 0 ;;
54
+ -y | --yes) pass+=("--yes") ;;
55
+ --fetch-only) fetch_only=1 ;;
56
+ -*) usage; die "unknown option $arg" ;;
57
+ *) want="v${arg#v}" ;;
58
+ esac
59
+ done
60
+
61
+ case "$(uname -s)" in
62
+ Linux | Darwin) ;;
63
+ *) die "tarcsweb supports Linux and macOS only" ;;
64
+ esac
65
+ for arg in curl tar gzip; do command -v "$arg" > /dev/null || die "$arg is required"; done
66
+
67
+ say "Looking up the $want release of $REPO_SLUG"
68
+ local json tag tarball
69
+ json="$(fetch_release "$want")"
70
+ tag="$(printf '%s' "$json" | json_str tag_name)"
71
+ [[ "$tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+([-+][0-9A-Za-z.-]+)?$ ]] || die "unexpected release tag '$tag'"
72
+ tarball="$(printf '%s' "$json" | json_str tarball_url)"
73
+ [[ "$tarball" =~ ^https?:// ]] || tarball="https://github.com/$REPO_SLUG/archive/refs/tags/$tag.tar.gz"
74
+ echo "release $tag" >&2
75
+
76
+ local dest="$RELEASES/$tag"
77
+ if [ -f "$dest/.tarcsweb-release" ]; then
78
+ echo "already downloaded in $dest" >&2
79
+ else
80
+ say "Downloading $tag"
81
+ mkdir -p "$RELEASES"
82
+ TMP="$(mktemp -d "$RELEASES/.get-XXXXXX")"
83
+ trap cleanup EXIT
84
+ curl -fSL --retry 3 --max-time 600 -o "$TMP/src.tar.gz" "$tarball" || die "download of $tarball failed"
85
+ mkdir "$TMP/src"
86
+ tar -xzf "$TMP/src.tar.gz" -C "$TMP/src" --strip-components=1 --no-same-owner || die "could not extract the release archive"
87
+ [ -f "$TMP/src/package.json" ] && [ -f "$TMP/src/install.sh" ] || die "the archive does not look like tarcsweb"
88
+ # Marks a finished extraction; install.sh and the server read it to know this is a release install.
89
+ printf '%s\n' "$tag" > "$TMP/src/.tarcsweb-release"
90
+ rm -rf "$dest"
91
+ mv "$TMP/src" "$dest"
92
+ echo "extracted into $dest" >&2
93
+ fi
94
+
95
+ if [ "$fetch_only" = 1 ]; then
96
+ printf '%s\n' "$dest"
97
+ return 0
98
+ fi
99
+
100
+ # install.sh builds inside the release dir, then points $HOME_DIR/current at it and restarts the service.
101
+ say "Running $tag's install.sh"
102
+ # Bash 3.2 (macOS) treats "${pass[@]}" of an empty array as unbound under set -u.
103
+ TARCSWEB_HOME="$HOME_DIR" bash "$dest/install.sh" ${pass[@]+"${pass[@]}"} < /dev/null
104
+ }
105
+
106
+ main "$@"
package/package.json CHANGED
@@ -1,6 +1,24 @@
1
1
  {
2
2
  "name": "tarcsweb",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.5.1",
4
+ "description": "Installs tarcsweb, Claude Code and Codex in one browser tab, as a background service on Linux, macOS or WSL2",
5
+ "keywords": ["claude-code", "codex", "web-ui", "agents"],
6
+ "license": "MIT",
7
+ "homepage": "https://github.com/TLucas97/tarcsweb#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/TLucas97/tarcsweb.git",
11
+ "directory": "npm"
12
+ },
13
+ "type": "module",
14
+ "bin": {
15
+ "tarcsweb": "bin/tarcsweb.js"
16
+ },
17
+ "files": ["bin", "get.sh"],
18
+ "engines": {
19
+ "node": ">=18"
20
+ },
21
+ "scripts": {
22
+ "prepack": "cp ../get.sh ../LICENSE ."
23
+ }
24
+ }