Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

on:
push:
branches: [main, master]
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
check:
name: Check (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-14]

steps:
- uses: actions/checkout@v4

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

- name: Cache cargo
uses: Swatinem/rust-cache@v2

- name: Install protoc (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler

- name: Install protoc (macOS)
if: runner.os == 'macOS'
run: brew install protobuf

- name: Install protoc (Windows)
if: runner.os == 'Windows'
run: choco install protoc -y

- name: cargo check
run: cargo check --workspace

- name: cargo test
run: cargo test --workspace
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ eval/
.vscode/

node_modules/
.codegraph/

# local adapter / import test artifacts
dry-run*.txt
parse-limit*.json
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ gh workflow run release.yml -f tag=v1.0.0
- Linux x86_64 (ubuntu-latest)
- macOS x86_64 (cross-compiled from macos-14 ARM64)
- macOS ARM64 (macos-14)
- Windows x86_64 (if enabled)
- Windows x86_64 — **CI** (`windows-latest` in `.github/workflows/ci.yml`) runs `cargo check` / `cargo test`; **release zip packaging** in `release.yml` is still a follow-up

**Disabled by default (uncomment in workflow if needed):**
- Linux ARM64: Requires `Cross.toml` with OpenSSL configuration
- Windows: May have C runtime mismatch issues with some crates
- Windows release artifacts: enable `x86_64-pc-windows-msvc` in `release.yml` when Scoop/zip distribution is ready

**Platform notes:**
- `macos-13` runner is retired - always use `macos-14`
Expand Down
82 changes: 73 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,25 @@ makepkg -si
cargo install --path crates/hstry-cli
```

### Scoop (Windows)

Once published to the Scoop bucket:

```powershell
scoop bucket add byteowlz https://github.com/byteowlz/scoop-bucket
scoop install hstry
```

Until Scoop packaging ships, build from source (below) or install via Cargo.

### Pre-built Binaries

Download pre-built binaries from the [GitHub Releases](https://github.com/byteowlz/hstry/releases) page.

Available platforms:
- Linux x86_64 and ARM64
- macOS Intel and Apple Silicon
- Windows x86_64 (release artifacts are a follow-up; CI already builds on `windows-latest`)

### Build from Source

Expand All @@ -68,6 +80,57 @@ To install all binaries (CLI, TUI, MCP):
cargo install --path .
```

### Windows (build and usage)

Windows 11 is a first-class target. Paths follow the same `dirs` layout as other platforms:

| Directory | Windows default |
|-----------|-----------------|
| Config / adapters | `%APPDATA%\hstry\` |
| Database | `%LOCALAPPDATA%\hstry\hstry.db` |
| Service state | `%LOCALAPPDATA%\hstry\` |

**Dependencies**

| Dependency | Purpose | Install |
|------------|---------|---------|
| Rust toolchain | Compile | [rustup](https://rustup.rs/) |
| protoc | gRPC proto compile | `winget install Google.Protobuf` |
| Node LTS | Run adapters | `winget install OpenJS.NodeJS.LTS` |
| better-sqlite3 | Cursor / Codex SQLite parsing | In the adapters dir: `npm install` |

**Notes**

- Adapters are executed directly by the Rust runtime via `node` / `bun` / `deno`. **pnpm is not required at runtime.**
- Prefer `js_runtime = "node"` in `config.toml`. Deno cannot load the `better-sqlite3` native module.
- After cloning or updating adapters, copy them into the config directory:

```powershell
# From the repo root
just update-adapters-windows
# or
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/update-adapters.ps1
```

Then install native deps once:

```powershell
cd $env:APPDATA\hstry\adapters
npm install
```

**Build and run**

```powershell
# Needs protoc on PATH (see winget above)
cargo build -p hstry-cli --release
cargo run -p hstry-cli -- scan
cargo run -p hstry-cli -- import $env:USERPROFILE\.codex\sessions
cargo run -p hstry-cli -- search "query"
```

Service uses TCP by default on Windows (`transport = "tcp"`). Do not set `transport = "unix"`.

## Quick Start

```bash
Expand Down Expand Up @@ -235,15 +298,15 @@ Command templates support these placeholders: `{session_path}`, `{session_id}`,

## Configuration

hstry follows XDG Base Directory specifications:
hstry follows XDG Base Directory specifications on Unix, and the platform defaults from the `dirs` crate on Windows:

| Directory | Default | Environment Override |
|-----------|---------|---------------------|
| Config | `~/.config/hstry/` | `$XDG_CONFIG_HOME/hstry/` |
| Data | `~/.local/share/hstry/` | `$XDG_DATA_HOME/hstry/` |
| State | `~/.local/state/hstry/` | `$XDG_STATE_HOME/hstry/` |
| Directory | Unix default | Windows default | Environment Override |
|-----------|--------------|-----------------|---------------------|
| Config | `~/.config/hstry/` | `%APPDATA%\hstry\` | `$XDG_CONFIG_HOME/hstry/` |
| Data | `~/.local/share/hstry/` | `%LOCALAPPDATA%\hstry\` | `$XDG_DATA_HOME/hstry/` |
| State | `~/.local/state/hstry/` | `%LOCALAPPDATA%\hstry\` | `$XDG_STATE_HOME/hstry/` |

Default config: `~/.config/hstry/config.toml`
Default config: `~/.config/hstry/config.toml` (Windows: `%APPDATA%\hstry\config.toml`)

```toml
"$schema" = "https://raw.githubusercontent.com/byteowlz/schemas/refs/heads/main/hstry/hstry.config.schema.json"
Expand Down Expand Up @@ -378,8 +441,8 @@ just check-all # Format, lint, and test
just test # Run tests only
just clippy # Lint only
just update-adapters # Copy latest adapters to ~/.config/hstry/adapters
just update-adapters-windows # Windows: copy to %APPDATA%\hstry\adapters
```

## Contributing

Contributions are welcome! Please see [docs/RELEASE.md](docs/RELEASE.md) for information about the release process.
Expand All @@ -392,9 +455,10 @@ See [CHANGELOG.md](CHANGELOG.md) for the full list of changes.

The release process is fully automated via GitHub Actions:

1. **GitHub Releases**: Automatic builds for Linux (x86_64/ARM64) and macOS (Intel/Apple Silicon)
1. **GitHub Releases**: Automatic builds for Linux (x86_64/ARM64) and macOS (Intel/Apple Silicon); Windows zip packaging is a follow-up
2. **Homebrew**: Automatic formula updates in `byteowlz/homebrew-tap`
3. **AUR**: Automatic PKGBUILD updates
4. **Scoop** (planned): Windows installs via `byteowlz/scoop-bucket`

See [docs/RELEASE.md](docs/RELEASE.md) for detailed release instructions.

Expand Down
2 changes: 1 addition & 1 deletion adapters/.hstry-adapters.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"hstry_version": "0.5.5",
"hstry_version": "0.5.21",
"protocol_version": "1"
}
Loading