diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 8631974..9c47e45 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -5,6 +5,10 @@ on:
branches: [main]
workflow_dispatch:
+concurrency:
+ group: docker-${{ github.ref }}
+ cancel-in-progress: false
+
env:
IMAGE: ghcr.io/${{ github.repository }}
@@ -14,6 +18,7 @@ permissions:
jobs:
detect-version-change:
+ if: github.ref == 'refs/heads/release'
runs-on: ubuntu-latest
outputs:
version_changed: ${{ steps.check.outputs.changed }}
@@ -58,9 +63,8 @@ jobs:
echo "No version change detected"
fi
- build-and-push:
- needs: detect-version-change
- if: needs.detect-version-change.outputs.version_changed == 'true'
+ build-and-push-dev:
+ if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -76,18 +80,55 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- - name: Extract metadata (tags, labels)
+ - name: Extract metadata (dev tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
tags: |
- type=raw,value=latest
- type=raw,value=${{ needs.detect-version-change.outputs.version }}
- type=semver,pattern={{major}}.{{minor}},value=v${{ needs.detect-version-change.outputs.version }}
- type=sha,prefix=
+ type=raw,value=dev
+ type=sha,prefix=dev-
- - name: Build and push
+ - name: Build and push dev image
+ uses: docker/build-push-action@v6
+ with:
+ context: .
+ push: true
+ platforms: linux/amd64,linux/arm64
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
+ cache-from: type=gha
+ cache-to: type=gha,mode=max
+
+ build-and-push-release:
+ needs: detect-version-change
+ if: github.ref == 'refs/heads/release' && needs.detect-version-change.outputs.version_changed == 'true'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Log in to GHCR
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Extract metadata (release tags, labels)
+ id: meta
+ uses: docker/metadata-action@v5
+ with:
+ images: ${{ env.IMAGE }}
+ tags: |
+ type=raw,value=latest
+ type=raw,value=${{ needs.detect-version-change.outputs.version }}
+ type=semver,pattern={{major}}.{{minor}},value=v${{ needs.detect-version-change.outputs.version }}
+
+ - name: Build and push release image
uses: docker/build-push-action@v6
with:
context: .
diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml
new file mode 100644
index 0000000..f9db253
--- /dev/null
+++ b/.github/workflows/pypi.yml
@@ -0,0 +1,114 @@
+name: Publish to PyPI
+
+on:
+ pull_request:
+ types: [closed]
+ branches: [release]
+
+permissions:
+ contents: read
+
+jobs:
+ detect-version-change:
+ if: github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'main'
+ runs-on: ubuntu-latest
+ outputs:
+ version_changed: ${{ steps.check.outputs.changed }}
+ version: ${{ steps.check.outputs.version }}
+ steps:
+ - name: Checkout current commit
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 2 # need parent to diff against
+
+ - name: Check for version bump
+ id: check
+ run: |
+ # Extract version from current commit
+ CURRENT=$(python3 -c "
+ import re, pathlib
+ text = pathlib.Path('pyproject.toml').read_text()
+ m = re.search(r'^version\s*=\s*\"([^\"]+)\"', text, re.M)
+ print(m.group(1))
+ ")
+
+ # Extract version from previous commit
+ git show HEAD~1:pyproject.toml > /tmp/prev_pyproject.toml 2>/dev/null || true
+ if [ -f /tmp/prev_pyproject.toml ]; then
+ PREVIOUS=$(python3 -c "
+ import re, pathlib
+ text = pathlib.Path('/tmp/prev_pyproject.toml').read_text()
+ m = re.search(r'^version\s*=\s*\"([^\"]+)\"', text, re.M)
+ print(m.group(1) if m else '')
+ ")
+ else
+ PREVIOUS=""
+ fi
+
+ echo "current=$CURRENT"
+ echo "previous=$PREVIOUS"
+
+ if [ "$CURRENT" != "$PREVIOUS" ] && [ -n "$CURRENT" ]; then
+ echo "changed=true" >> "$GITHUB_OUTPUT"
+ echo "version=$CURRENT" >> "$GITHUB_OUTPUT"
+ echo "Version changed: $PREVIOUS -> $CURRENT"
+ else
+ echo "changed=false" >> "$GITHUB_OUTPUT"
+ echo "No version change detected"
+ fi
+
+ build:
+ needs: detect-version-change
+ if: needs.detect-version-change.outputs.version_changed == 'true'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: "22"
+ cache: npm
+ cache-dependency-path: cptr/frontend/package-lock.json
+
+ - name: Build frontend
+ working-directory: cptr/frontend
+ run: |
+ npm ci
+ npm run build
+
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install build tools
+ run: pip install hatchling build
+
+ - name: Build package
+ run: python -m build
+
+ - name: Upload dist artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: dist
+ path: dist/
+
+ publish:
+ needs: [detect-version-change, build]
+ runs-on: ubuntu-latest
+ environment: pypi # GitHub environment for deployment protection
+ permissions:
+ id-token: write # required for trusted publishing (OIDC)
+ steps:
+ - name: Download dist artifacts
+ uses: actions/download-artifact@v4
+ with:
+ name: dist
+ path: dist/
+
+ - name: Publish to PyPI
+ uses: pypa/gh-action-pypi-publish@release/v1
+ # No API token needed - uses OIDC trusted publishing.
+ # Configure at: https://pypi.org/manage/project/cptr/settings/publishing/
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..a9a306b
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,104 @@
+# ─────────────────────────────────────────────────────────────────────────────
+# Release — Create GitHub release from CHANGELOG, trigger Docker builds
+# Runs only when main is merged into the release branch and pyproject.toml
+# version changes.
+# ─────────────────────────────────────────────────────────────────────────────
+name: Release
+
+on:
+ pull_request:
+ types: [closed]
+ branches: [release]
+
+concurrency:
+ group: release-${{ github.event.pull_request.base.ref || github.ref }}
+ cancel-in-progress: false
+
+jobs:
+ # ── Detect version bump in pyproject.toml ─────────────────────────────────
+ detect-version-change:
+ if: github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'main'
+ runs-on: ubuntu-latest
+ outputs:
+ version_changed: ${{ steps.check.outputs.changed }}
+ version: ${{ steps.check.outputs.version }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 2
+
+ - name: Check for version bump
+ id: check
+ run: |
+ CURRENT=$(python3 -c "
+ import re, pathlib
+ text = pathlib.Path('pyproject.toml').read_text()
+ m = re.search(r'^version\s*=\s*\"([^\"]+)\"', text, re.M)
+ print(m.group(1))
+ ")
+
+ git show HEAD~1:pyproject.toml > /tmp/prev_pyproject.toml 2>/dev/null || true
+ if [ -f /tmp/prev_pyproject.toml ]; then
+ PREVIOUS=$(python3 -c "
+ import re, pathlib
+ text = pathlib.Path('/tmp/prev_pyproject.toml').read_text()
+ m = re.search(r'^version\s*=\s*\"([^\"]+)\"', text, re.M)
+ print(m.group(1) if m else '')
+ ")
+ else
+ PREVIOUS=""
+ fi
+
+ echo "current=$CURRENT"
+ echo "previous=$PREVIOUS"
+
+ if [ "$CURRENT" != "$PREVIOUS" ] && [ -n "$CURRENT" ]; then
+ echo "changed=true" >> "$GITHUB_OUTPUT"
+ echo "version=$CURRENT" >> "$GITHUB_OUTPUT"
+ echo "Version changed: $PREVIOUS -> $CURRENT"
+ else
+ echo "changed=false" >> "$GITHUB_OUTPUT"
+ echo "No version change detected"
+ fi
+
+ # ── Create release and trigger downstream workflows ──────────────────────
+ publish:
+ needs: detect-version-change
+ if: needs.detect-version-change.outputs.version_changed == 'true'
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ permissions:
+ contents: write
+ actions: write
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Extract release notes from CHANGELOG
+ run: |
+ VER="${{ needs.detect-version-change.outputs.version }}"
+ awk "/^## \[${VER}\]/{found=1; next} /^## \[/{if(found) exit} found{print}" \
+ CHANGELOG.md > /tmp/release-notes.md
+
+ - name: Publish GitHub release
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ if gh release view "v${{ needs.detect-version-change.outputs.version }}" &>/dev/null; then
+ echo "Release v${{ needs.detect-version-change.outputs.version }} already exists — skipping creation"
+ else
+ gh release create "v${{ needs.detect-version-change.outputs.version }}" \
+ --title "v${{ needs.detect-version-change.outputs.version }}" \
+ --notes-file /tmp/release-notes.md
+ fi
+
+ - name: Trigger Docker build
+ uses: actions/github-script@v7
+ with:
+ script: |
+ github.rest.actions.createWorkflowDispatch({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ workflow_id: 'docker.yml',
+ ref: 'release',
+ })
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1f58d93..00c7e42 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,15 +5,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## [0.0.1] - 2026-06-05
+## [0.1.0] - 2026-06-06
### Added
- 🚀 **Initial release.** First public version of cptr: your computer, from anywhere. Code, manage, and control your machine from the web.
- 🖥️ **Terminal emulator.** Full PTY-backed terminal accessible from the browser with support for macOS and Linux.
-- 💬 **AI chat interface.** Built-in chat panel with multi-provider LLM support (OpenAI, Anthropic, Ollama, and OpenAI-compatible endpoints), tool calling, and streaming responses.
-- 🔧 **Tool system.** Extensible tool framework enabling AI agents to interact with the local filesystem, run commands, search the web, and read URLs.
-- 📁 **File browser.** Web-based file explorer with directory navigation, file viewing, and management capabilities.
+- 💬 **AI chat.** Built-in chat panel with multi-provider LLM support (OpenAI, Anthropic, Ollama, and OpenAI-compatible endpoints), model selector, tool calling, and streaming responses.
+- 🔧 **Tool system.** Extensible tool framework enabling AI agents to interact with the local filesystem, run commands, search the web (Brave, DuckDuckGo, Exa, Tavily), and read URLs. Streaming JSON parser for improved tool-calling reliability.
+- 📎 **File mentions.** Type `@` in the chat input to mention files with an inline suggestion popup, giving the AI context about your codebase.
+- 🔄 **Queued messages.** Queue follow-up messages while the AI is responding — they'll be sent automatically when the current response completes.
+- ✏️ **Output editing.** Review and edit AI-generated file changes before applying them.
+- 📁 **File browser.** Web-based file explorer with directory navigation, file viewing, file icons by extension, and management capabilities.
+- ⌨️ **Keyboard shortcuts.** Customizable keybinding system with a dedicated settings panel, including support for new-tab, quick-open, and other common actions.
+- 📐 **Resizable sidebar.** Drag-to-resize sidebar with persistent width and smooth panel resize handles.
+- 🔍 **Quick open.** Cmd+K modal with keyboard pill hints for fast file and command navigation.
+- 🌐 **Proxy middleware.** Reverse-proxy system for forwarding local ports with automatic port detection and notification.
+- 📁 **Workspace management.** Manage multiple project directories from a single instance.
+- 📊 **Chat history.** Persistent chat list with automatic title generation, scrolling, and pagination.
- 🔐 **Authentication.** Username/password authentication with JWT-based session management.
+- 🎨 **Admin settings.** Settings UI for managing AI connections and app configuration.
- 🐳 **Docker support.** Multi-stage Dockerfile and GitHub Actions workflow for building and publishing to GHCR.
- 📦 **PyPI packaging.** Hatchling-based build with frontend assets bundled into the wheel, published via trusted OIDC publishing.
\ No newline at end of file
diff --git a/cptr/__init__.py b/cptr/__init__.py
index d89833c..b22e6cf 100644
--- a/cptr/__init__.py
+++ b/cptr/__init__.py
@@ -1 +1 @@
-"""cptr - your computer, from anywhere."""
+"""Your computer, from anywhere."""
diff --git a/cptr/app.py b/cptr/app.py
index 727fc19..c4b06db 100644
--- a/cptr/app.py
+++ b/cptr/app.py
@@ -41,7 +41,7 @@ async def startup():
async def auth_middleware(request: Request, call_next):
path = request.url.path
# Skip auth for: auth endpoints, health, static assets, HTML pages
- if path.startswith("/api/auth") or path == "/api/health" or path == "/api/config" or path == "/manifest.json":
+ if path.startswith("/api/auth") or path == "/api/health" or path == "/api/config" or path == "/api/changelog" or path == "/manifest.json":
return await call_next(request)
if path.startswith("/_app/") or not path.startswith("/api/"):
return await call_next(request)
@@ -175,6 +175,13 @@ async def health():
return {"status": "ok", "uptime_seconds": int(time.time() - START_TIME), "pid": os.getpid()}
+@app.get("/api/changelog")
+async def get_changelog():
+ """Return parsed CHANGELOG.md as structured JSON (max 5 versions)."""
+ from cptr.utils.changelog import CHANGELOG
+ return {key: CHANGELOG[key] for idx, key in enumerate(CHANGELOG) if idx < 5}
+
+
# PWA manifest (backend-driven so each instance has its own identity)
@app.get("/manifest.json")
async def pwa_manifest():
diff --git a/cptr/cli.py b/cptr/cli.py
index c79a392..3065a53 100644
--- a/cptr/cli.py
+++ b/cptr/cli.py
@@ -4,7 +4,7 @@ import uvicorn
@click.group()
def cli():
- """cptr - your computer, from anywhere."""
+ """Your computer, from anywhere."""
pass
diff --git a/cptr/frontend/package.json b/cptr/frontend/package.json
index 528262c..d5596c6 100644
--- a/cptr/frontend/package.json
+++ b/cptr/frontend/package.json
@@ -1,7 +1,7 @@
{
"name": "frontend",
"private": true,
- "version": "0.0.1",
+ "version": "0.1.0",
"type": "module",
"scripts": {
"dev": "vite dev",
diff --git a/cptr/frontend/src/lib/components/ChangelogModal.svelte b/cptr/frontend/src/lib/components/ChangelogModal.svelte
new file mode 100644
index 0000000..9941ce8
--- /dev/null
+++ b/cptr/frontend/src/lib/components/ChangelogModal.svelte
@@ -0,0 +1,145 @@
+
+
+{#if $showChangelog}
+ v{ver} · {formatDate(data.date)} Couldn't load release notes.What's New
+ {#if selectedData}
+ {@const [ver, data] = selectedData}
+ {section}
+
+ {#each items as entry}
+
+