Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

refactor: remove mise

Minh141120fb9bbb66b091
diff --git a/.github/workflows/jan-tauri-build-nightly-external.yaml b/.github/workflows/jan-tauri-build-nightly-external.yaml
index b281cdbc1..167b4d223 100644
--- a/.github/workflows/jan-tauri-build-nightly-external.yaml
+++ b/.github/workflows/jan-tauri-build-nightly-external.yaml
@@ -15,7 +15,6 @@ on:
- 'pre-install/**'
- 'Makefile'
- 'package.json'
- - 'mise.toml'
jobs:
get-update-version:
diff --git a/.github/workflows/jan-tauri-build-nightly.yaml b/.github/workflows/jan-tauri-build-nightly.yaml
index 65a035c38..7949c0723 100644
--- a/.github/workflows/jan-tauri-build-nightly.yaml
+++ b/.github/workflows/jan-tauri-build-nightly.yaml
@@ -35,7 +35,6 @@ on:
- 'pre-install/**'
- 'Makefile'
- 'package.json'
- - 'mise.toml'
jobs:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 16379e575..2876e4598 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -126,8 +126,7 @@ jan/
├── scripts/ # Build utilities
│
├── package.json # Root workspace configuration
-├── Makefile # Build automation commands
-├── mise.toml # Mise tool configuration
+├── Makefile # Build automation commands
├── LICENSE # Apache 2.0 license
└── README.md # Project overview
```
@@ -149,19 +148,6 @@ cd jan
make dev
```
-**Option 2: The Easier Way (Mise)**
-```bash
-git clone https://github.com/menloresearch/jan
-cd jan
-
-# Install mise
-curl https://mise.run | sh
-
-# Let mise handle everything
-mise install # installs Node.js, Rust, and other tools
-mise dev # runs the full development setup
-```
-
## How Can I Contribute?
### Reporting Bugs
diff --git a/README.md b/README.md
index b90cc8907..656917634 100644
--- a/README.md
+++ b/README.md
@@ -93,29 +93,6 @@ This handles everything: installs dependencies, builds core components, and laun
- `make test` - Run tests and linting
- `make clean` - Delete everything and start fresh
-### Run with Mise (easier)
-
-You can also run with [mise](https://mise.jdx.dev/), which is a bit easier as it ensures Node.js, Rust, and other dependency versions are automatically managed:
-
-```bash
-git clone https://github.com/menloresearch/jan
-cd jan
-
-# Install mise (if not already installed)
-curl https://mise.run | sh
-
-# Install tools and start development
-mise install # installs Node.js, Rust, and other tools
-mise dev # runs the full development setup
-```
-
-**Available mise commands:**
-- `mise dev` - Full development setup and launch
-- `mise build` - Production build
-- `mise test` - Run tests and linting
-- `mise clean` - Delete everything and start fresh
-- `mise tasks` - List all available tasks
-
### Manual Commands
```bash
diff --git a/mise.toml b/mise.toml
deleted file mode 100644
index e52d230a8..000000000
--- a/mise.toml
+++ /dev/null
@@ -1,286 +0,0 @@
-[tools]
-node = "20"
-rust = "1.85.1"
-sccache = "latest"
-
-[env]
-_.path = ['./node_modules/.bin']
-RUSTC_WRAPPER="sccache"
-
-
-# ============================================================================
-# CORE SETUP AND CONFIGURATION TASKS
-# ============================================================================
-
-[tasks.config-yarn]
-description = "Configure yarn version and settings"
-run = [
- "corepack enable",
- "corepack prepare [email protected] --activate",
- "yarn --version",
- "yarn config set -H enableImmutableInstalls false"
-]
-
-[tasks.install]
-description = "Install dependencies"
-depends = ["config-yarn"]
-run = "yarn install"
-sources = ['package.json', 'yarn.lock']
-outputs = ['node_modules']
-
-[tasks.build-tauri-plugin-api]
-description = "Build Tauri plugin API"
-depends = ["install"]
-run = "yarn build:tauri:plugin:api"
-sources = ['src-tauri/plugins/**/*']
-outputs = [
- 'src-tauri/plugins/tauri-plugin-hardware/dist-js',
- 'src-tauri/plugins/tauri-plugin-llamacpp/dist-js',
-]
-
-[tasks.build-core]
-description = "Build core package"
-depends = ["build-tauri-plugin-api"]
-run = "yarn build:core"
-sources = ['core/**/*']
-outputs = ['core/dist']
-
-[tasks.build-extensions]
-description = "Build extensions"
-depends = ["build-core"]
-run = "yarn build:extensions && yarn build:extensions-web"
-sources = ['extensions/**/*']
-outputs = ['pre-install/*.tgz']
-
-[tasks.install-and-build]
-description = "Install dependencies and build core and extensions (matches Makefile)"
-depends = ["build-extensions"]
-
-# ============================================================================
-# DEVELOPMENT TASKS
-# ============================================================================
-
-[tasks.dev]
-description = "Start development server (matches Makefile)"
-depends = ["install-and-build"]
-run = [
- "yarn download:bin",
- "yarn dev"
-]
-
-[tasks.dev-tauri]
-description = "Start development server with Tauri (DEPRECATED - matches Makefile)"
-depends = ["install-and-build"]
-run = [
- "yarn download:bin",
- "yarn dev:tauri"
-]
-
-# ============================================================================
-# WEB APPLICATION DEVELOPMENT TASKS
-# ============================================================================
-
-[tasks.dev-web-app]
-description = "Start web application development server (matches Makefile)"
-depends = ["build-core"]
-run = "yarn dev:web-app"
-
-[tasks.build-web-app]
-description = "Build web application (matches Makefile)"
-depends = ["build-core"]
-run = "yarn build:web-app"
-
-[tasks.serve-web-app]
-description = "Serve built web application"
-run = "yarn serve:web-app"
-
-[tasks.build-serve-web-app]
-description = "Build and serve web application (matches Makefile)"
-depends = ["build-web-app"]
-run = "yarn serve:web-app"
-
-# ============================================================================
-# BUILD TASKS
-# ============================================================================
-
-[tasks.install-rust-targets]
-description = "Install required Rust targets for MacOS universal builds"
-run = '''
-#!/usr/bin/env bash
-# Check if we're on macOS
-if [[ "$OSTYPE" == "darwin"* ]]; then
- echo "Detected macOS, installing universal build targets..."
- rustup target add x86_64-apple-darwin
- rustup target add aarch64-apple-darwin
- echo "Rust targets installed successfully!"
-fi
-'''
-
-[tasks.build]
-description = "Build complete application (matches Makefile)"
-depends = ["install-rust-targets", "install-and-build"]
-run = [
- "yarn download:bin",
- "yarn build"
-]
-
-# ============================================================================
-# QUALITY ASSURANCE TASKS
-# ============================================================================
-
-[tasks.lint]
-description = "Run linting (matches Makefile)"
-depends = ["build-extensions"]
-run = "yarn lint"
-
-# ============================================================================
-# RUST TEST COMPONENTS
-# ============================================================================
-
-[tasks.test-rust-main]
-description = "Test main src-tauri package"
-run = "cargo test --manifest-path src-tauri/Cargo.toml --no-default-features --features test-tauri -- --test-threads=1"
-
-[tasks.test-rust-hardware]
-description = "Test hardware plugin"
-run = "cargo test --manifest-path src-tauri/plugins/tauri-plugin-hardware/Cargo.toml"
-
-[tasks.test-rust-llamacpp]
-description = "Test llamacpp plugin"
-run = "cargo test --manifest-path src-tauri/plugins/tauri-plugin-llamacpp/Cargo.toml"
-
-[tasks.test-rust-utils]
-description = "Test utils package"
-run = "cargo test --manifest-path src-tauri/utils/Cargo.toml"
-
-[tasks.test-rust]
-description = "Run all Rust tests"
-depends = ["test-rust-main", "test-rust-hardware", "test-rust-llamacpp", "test-rust-utils"]
-
-# ============================================================================
-# JS TEST COMPONENTS
-# ============================================================================
-
-[tasks.test-js-setup]
-description = "Setup for JS tests"
-run = [
- "yarn download:bin",
- "yarn download:lib",
- "yarn copy:assets:tauri",
- "yarn build:icon"
-]
-
-[tasks.test-js]
-description = "Run JS tests"
-depends = ["test-js-setup"]
-run = "yarn test"
-
-# ============================================================================
-# COMBINED TEST TASKS
-# ============================================================================
-
-[tasks.test]
-description = "Run complete test suite (matches Makefile)"
-depends = ["lint", "test-js", "test-rust"]
-
-# ============================================================================
-# PARALLEL-FRIENDLY QUALITY ASSURANCE TASKS
-# ============================================================================
-
-[tasks.lint-only]
-description = "Run linting only (parallel-friendly)"
-depends = ["build-extensions"]
-run = "yarn lint"
-hide = true
-
-[tasks.test-only]
-description = "Run tests only (parallel-friendly)"
-depends = ["build-extensions", "test-js", "test-rust"]
-hide = true
-
-[tasks.qa-parallel]
-description = "Run linting and testing in parallel"
-depends = ["lint-only", "test-only"]
-
-# ============================================================================
-# UTILITY TASKS
-# ============================================================================
-
-[tasks.clean]
-description = "Clean all build artifacts and dependencies (cross-platform - matches Makefile)"
-run = '''
-#!/usr/bin/env bash
-echo "Cleaning build artifacts and dependencies..."
-
-# Platform detection and cleanup (matches Makefile exactly)
-if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
- # Windows cleanup using PowerShell (matches Makefile)
- powershell -Command "Get-ChildItem -Path . -Include node_modules, .next, dist, build, out, .turbo, .yarn -Recurse -Directory | Remove-Item -Recurse -Force" 2>/dev/null || true
- powershell -Command "Get-ChildItem -Path . -Include package-lock.json, tsconfig.tsbuildinfo -Recurse -File | Remove-Item -Recurse -Force" 2>/dev/null || true
- powershell -Command "Remove-Item -Recurse -Force ./pre-install/*.tgz" 2>/dev/null || true
- powershell -Command "Remove-Item -Recurse -Force ./extensions/*/*.tgz" 2>/dev/null || true
- powershell -Command "Remove-Item -Recurse -Force ./electron/pre-install/*.tgz" 2>/dev/null || true
- powershell -Command "Remove-Item -Recurse -Force ./src-tauri/resources" 2>/dev/null || true
- powershell -Command "Remove-Item -Recurse -Force ./src-tauri/target" 2>/dev/null || true
- powershell -Command "if (Test-Path \"\$(\$env:USERPROFILE)\\jan\\extensions\\\") { Remove-Item -Path \"\$(\$env:USERPROFILE)\\jan\\extensions\" -Recurse -Force }" 2>/dev/null || true
-elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
- # Linux cleanup (matches Makefile)
- find . -name "node_modules" -type d -prune -exec rm -rf '{}' + 2>/dev/null || true
- find . -name ".next" -type d -exec rm -rf '{}' + 2>/dev/null || true
- find . -name "dist" -type d -exec rm -rf '{}' + 2>/dev/null || true
- find . -name "build" -type d -exec rm -rf '{}' + 2>/dev/null || true
- find . -name "out" -type d -exec rm -rf '{}' + 2>/dev/null || true
- find . -name ".turbo" -type d -exec rm -rf '{}' + 2>/dev/null || true
- find . -name ".yarn" -type d -exec rm -rf '{}' + 2>/dev/null || true
- find . -name "package-lock.json" -type f -exec rm -rf '{}' + 2>/dev/null || true
- rm -rf ./pre-install/*.tgz 2>/dev/null || true
- rm -rf ./extensions/*/*.tgz 2>/dev/null || true
- rm -rf ./electron/pre-install/*.tgz 2>/dev/null || true
- rm -rf ./src-tauri/resources 2>/dev/null || true
- rm -rf ./src-tauri/target 2>/dev/null || true
- rm -rf ~/jan/extensions 2>/dev/null || true
- rm -rf "~/.cache/jan*" 2>/dev/null || true
- rm -rf "./.cache" 2>/dev/null || true
-else
- # macOS cleanup (matches Makefile)
- find . -name "node_modules" -type d -prune -exec rm -rf '{}' + 2>/dev/null || true
- find . -name ".next" -type d -exec rm -rf '{}' + 2>/dev/null || true
- find . -name "dist" -type d -exec rm -rf '{}' + 2>/dev/null || true
- find . -name "build" -type d -exec rm -rf '{}' + 2>/dev/null || true
- find . -name "out" -type d -exec rm -rf '{}' + 2>/dev/null || true
- find . -name ".turbo" -type d -exec rm -rf '{}' + 2>/dev/null || true
- find . -name ".yarn" -type d -exec rm -rf '{}' + 2>/dev/null || true
- find . -name "package-lock.json" -type f -exec rm -rf '{}' + 2>/dev/null || true
- rm -rf ./pre-install/*.tgz 2>/dev/null || true
- rm -rf ./extensions/*/*.tgz 2>/dev/null || true
- rm -rf ./electron/pre-install/*.tgz 2>/dev/null || true
- rm -rf ./src-tauri/resources 2>/dev/null || true
- rm -rf ./src-tauri/target 2>/dev/null || true
- rm -rf ~/jan/extensions 2>/dev/null || true
- rm -rf ~/Library/Caches/jan* 2>/dev/null || true
-fi
-
-echo "Clean completed!"
-'''
-
-[tasks.all]
-description = "Default target - shows available commands (matches Makefile)"
-run = "echo 'Specify a target to run. Use: mise tasks'"
-
-# ============================================================================
-# DEVELOPMENT WORKFLOW SHORTCUTS
-# ============================================================================
-
-[tasks.setup]
-description = "Complete development setup"
-depends = ["install-and-build"]
-alias = "init"
-
-[tasks.ci]
-description = "Run CI pipeline (lint + test sequentially)"
-depends = ["test"]
-
-[tasks.ci-parallel]
-description = "Run CI pipeline (lint + test in parallel)"
-depends = ["qa-parallel"]
-alias = "ci-fast"
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 85a90422a..ca75cbd77 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -5323,6 +5323,7 @@ dependencies = [
"sysinfo",
"tauri",
"tauri-plugin",
+ "tauri-plugin-hardware",
"thiserror 2.0.12",
"tokio",
]