Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
defcb81
chore: commit pending branch work from configure-openai-pattern
gunsleobezerra Oct 26, 2026
f0d7b7c
chore(test): add Vitest, Testing Library and jsdom
gunsleobezerra Oct 26, 2026
f4c80a0
refactor(frontend): split App and shared UI helpers into modules
gunsleobezerra Oct 26, 2026
31a9149
test(frontend): cover formatters, shared components and the app shell
gunsleobezerra Oct 26, 2026
9dba081
refactor(rust): make every module public in the library target
gunsleobezerra Oct 26, 2026
4345513
test(rust): cover ffmpeg progress parsing and ASS filter escaping
gunsleobezerra Oct 26, 2026
254e23e
test(rust): cover transcript normalization and model catalog
gunsleobezerra Oct 26, 2026
3e0da6f
test(rust): cover candidate parsing and SSE streaming in llm
gunsleobezerra Oct 26, 2026
367648a
test(rust): cover caption generation, export formats and slug validation
gunsleobezerra Oct 26, 2026
09fa198
test(rust): add SQLite integration tests for the database layer
gunsleobezerra Oct 26, 2026
e8468ce
ci: gate the release on frontend and Rust tests
gunsleobezerra Oct 26, 2026
edc37cd
docs: document how to run the test suites
gunsleobezerra Oct 26, 2026
6286e6a
refactor(rust): always re-render clips to the same file name
gunsleobezerra Oct 26, 2026
c0c3d11
lib
gunsleobezerra Oct 26, 2026
f6a1a65
FIX TESTE
gunsleobezerra Oct 26, 2026
892f1b8
Fix teste
gunsleobezerra Oct 26, 2026
9b0da94
Merge pull request #1 from gunsleobezerra/configure-openai-pattern
gunsleobezerra Oct 26, 2026
48ff0da
Edit Mode
gunsleobezerra Oct 27, 2026
75c152b
Fix action
gunsleobezerra Oct 27, 2026
b3ad601
fix(ci): stop tauri-action from picking bun
gunsleobezerra Oct 27, 2026
673af86
Fix all
gunsleobezerra Oct 27, 2026
0614ba8
fix(whisper): resolve the venv CLI once and document the in-app install
gunsleobezerra Oct 27, 2026
8d9928c
Only windows,mac,linux realease
gunsleobezerra Oct 27, 2026
46e07a2
build: limitar alvos a Windows, Linux e macOS
gunsleobezerra Oct 27, 2026
a61b705
feat: auto-edit de clipes cortando silêncios e deixando o vídeo mais …
gunsleobezerra Oct 27, 2026
1f48111
ci: publish releases on version tags
gunsleobezerra Oct 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@ ANTHROPIC_API_KEY=your_anthropic_key_here
LLM_PROVIDER=deepseek
DEEPSEEK_API_KEY=
GROQ_API_KEY=

# Any OpenAI-compatible endpoint (LM Studio, vLLM, llama.cpp server, Together, Azure OpenAI, ...)
# Set LLM_PROVIDER=openai-compatible and point OPENAI_BASE_URL at the API root.
# The app appends /chat/completions unless the URL already ends with it.
OPENAI_BASE_URL=
OPENAI_COMPATIBLE_MODEL=
OPENAI_COMPATIBLE_API_KEY=
74 changes: 71 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,61 @@
name: Release App

on:
pull_request:
branches:
["main"]
push:
branches:
["main"]
tags:
- 'v*' # Triggers on release tags like v0.1.0 or v1.0.0

jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4

# jsdom 30 pulls in undici 8, which needs Node >= 22.19 (it uses
# zlib.createZstdDecompress, absent on Node 20).
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri

- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev

- name: Install node modules
run: npm ci

# `tauri::generate_context!` validates `frontendDist: "../dist"`, so the
# frontend bundle has to exist before the Rust tests are compiled.
- name: Build frontend bundle
run: npm run build

- name: Run frontend tests (Vitest)
run: npm test

- name: Run Rust tests (unit + SQLite integration)
run: cargo test --manifest-path src-tauri/Cargo.toml --all-targets

release:
# Only real version tags cut a release. On a push to `main` `github.ref_name`
# is literally "main", which would create a bogus `main` tag/release.
if: startsWith(github.ref, 'refs/tags/v')
needs: test
permissions:
contents: write
strategy:
Expand All @@ -21,7 +70,8 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: npm

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand All @@ -33,6 +83,14 @@ jobs:
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev

# `bun.lock` used to be committed, which made tauri-action pick bun and fail
# with "'bun' is not recognized". package.json now pins npm via packageManager.
- name: Assert npm is the package manager
shell: bash
run: |
test ! -f bun.lock && test ! -f bun.lockb
node -e "const pm=require('./package.json').packageManager||''; if(!pm.startsWith('npm@')) { console.error('packageManager must pin npm, got: '+pm); process.exit(1); }"

- name: Install node modules
run: npm ci

Expand All @@ -41,8 +99,18 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Pinned explicitly: tauri-action picks the runner from lockfiles, and a
# committed `bun.lock` made it run `bun tauri build` on runners without bun.
tauriScript: npm run tauri
tagName: ${{ github.ref_name }}
releaseName: 'AutoShorts ${{ github.ref_name }}'
releaseBody: 'See release notes for installation details.'
releaseDraft: true
# `releaseDraft: true` left every build stuck as a draft that was never
# published. Publish directly and let GitHub generate the notes from
# the commit history.
releaseDraft: false
prerelease: false
generateReleaseNotes: true




4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ src-tauri/target
.env
.DS_Store
*.log
artifacts
# Project builds with npm; a stray bun lockfile makes tauri-action pick bun.
bun.lock
bun.lockb
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"python-envs.defaultEnvManager": "ms-python.python:poetry",
"python-envs.defaultPackageManager": "ms-python.python:poetry"
}
74 changes: 72 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ When you first launch the application, you will be greeted by an **Onboarding Wi

#### Option A: Fully Offline (Ollama + Whisper)
1. **Ollama Setup**: Select a local model card (`llama3.2 3B`, `qwen2.5 3B`, or `qwen2.5 7B`). The application will check if Ollama is running and automatically pull the model weights, showing a downloader progress bar.
2. **Local Whisper**: Follow the prompt instructions to verify Python is installed and run `pip3 install openai-whisper` to enable fully offline transcription.
2. **Local Whisper**: Click **Instalar Whisper**. The app creates a virtualenv under its data directory (`python-venv`) and installs `openai-whisper` into it, so nothing is added to your system Python. The first install downloads PyTorch (~1–2 GB). Only a Python 3 interpreter is required — the Linux packages declare `python3`/`python3-venv` as dependencies.

#### Option B: Cloud API Keys
1. Enter your API credentials for:
Expand All @@ -97,6 +97,14 @@ When you first launch the application, you will be greeted by an **Onboarding Wi
* **Claude**: For premium copywriting, hooks, and moment detection.
2. Click **Save & Start** to immediately load the dashboard.

#### Option C: Any OpenAI-Compatible Endpoint
Select **OpenAI-Compatible (Custom Base URL)** in **API Settings** and provide:
* **Base URL**: the API root, e.g. `http://localhost:1234/v1` (LM Studio), `http://localhost:8000/v1` (vLLM), `http://localhost:8080/v1` (llama.cpp), or a hosted provider URL.
* **Model Name**: the model identifier that endpoint expects.
* **API Key**: optional; leave empty for local servers that do not require auth.

The app calls `POST {Base URL}/chat/completions` and retries without `response_format` if the server rejects JSON mode.

---

### ⚙️ Modifying Settings & Resetting Onboarding
Expand Down Expand Up @@ -125,8 +133,14 @@ DEEPGRAM_API_KEY=your-deepgram-api-key
DEEPSEEK_API_KEY=your-deepseek-api-key
ANTHROPIC_API_KEY=your-anthropic-api-key

# Choose your default AI analysis provider ("deepseek" or "claude")
# Choose your default AI analysis provider
# ("deepseek", "claude", "gemini", "openai", "openrouter", "groq", "local" or "openai-compatible")
LLM_PROVIDER=deepseek

# Only for LLM_PROVIDER=openai-compatible
OPENAI_BASE_URL=http://localhost:1234/v1
OPENAI_COMPATIBLE_MODEL=qwen2.5-7b-instruct
OPENAI_COMPATIBLE_API_KEY=
```

### 2. Run in Development Mode
Expand All @@ -143,6 +157,62 @@ npm run tauri:build
```
The output installers will be built under `src-tauri/target/release/bundle/`.

### 4. Run the Tests
Rust unit tests live next to the code they cover (`#[cfg(test)]` modules in
`src-tauri/src/*.rs`); the SQLite layer is covered end to end from
`src-tauri/tests/db_integration.rs` against a temporary database file:

```bash
cargo test --manifest-path src-tauri/Cargo.toml
# or
npm run test:rust
```

Frontend tests use Vitest + Testing Library with a jsdom environment:

```bash
npm test # single run
npm run test:watch # watch mode
```

Test layout:

| Path | Kind | Covers |
| --- | --- | --- |
| `src-tauri/src/lib.rs` | unit | SRT/ASS caption generation, slug + extension validation |
| `src-tauri/src/media.rs` | unit | ffmpeg progress parsing, ASS filter escaping, path handling |
| `src-tauri/src/transcription.rs` | unit | Whisper/Deepgram normalization, segment building, download progress |
| `src-tauri/src/llm.rs` | unit | LLM response parsing, SSE streaming, URL normalization |
| `src-tauri/tests/db_integration.rs` | integration | projects, transcripts, candidates, clips, cascade deletes, migrations |
| `src/lib/format.test.ts` | unit | duration/size/file-name formatting helpers |
| `src/components/common.test.tsx` | component | `PipelineStep`, `EmptyState`, `StatusPill` |
| `src/App.integration.test.tsx` | integration | onboarding gate, sidebar rendering, project detail loading (Tauri IPC mocked) |

### 5. Multi-Platform Build (Windows + Linux + macOS)
One command attempts every platform the current host can actually target:
```bash
npm run build:all
```
Each platform is detected first; unsupported ones are skipped with the reason instead of aborting the run. Successful bundles are copied to `artifacts/<platform>/`.

```bash
npm run build:linux # .deb / .rpm / .AppImage
npm run build:windows # .msi / NSIS .exe
npm run build:macos # .dmg / .app (macOS only)

npm run build:all -- --only=linux,macos # subset
npm run build:all -- --skip=windows # exclude one
npm run build:all -- --dry-run # print commands only
```

Host capability matrix:

| Target | Requires |
| --- | --- |
| Linux | Linux host + `webkit2gtk-4.1`, `gtk+-3.0`, `libsoup-3.0` (pkg-config) |
| Windows | Windows host, **or** WSL with Windows `cargo.exe` + `node.exe` + MSVC Build Tools. From WSL the source is mirrored to `%USERPROFILE%\autoshorts-build` and built by the Windows toolchain. |
| macOS | macOS + Xcode only. Cannot be produced from Linux/WSL — use a Mac or the `Release App` GitHub workflow. |

<a id="support"></a>

## ❤️ Support AutoShorts
Expand Down
Loading