diff --git a/CLAUDE.md b/CLAUDE.md index cd2cda7..88e4cd0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,16 +4,16 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Project Overview -Bevy Tasks is a local-first, cross-platform task management app built in Rust. Tasks are stored as markdown files with YAML frontmatter in user-selected folders. The GUI uses Tauri v2 (Svelte 5 + Tailwind CSS 4) in `apps/tauri/`. +Onyx is a local-first, cross-platform task management app built in Rust. Tasks are stored as markdown files with YAML frontmatter in user-selected folders. The GUI uses Tauri v2 (Svelte 5 + Tailwind CSS 4) in `apps/tauri/`. ## Build & Test Commands ```bash cargo build # Build all crates -cargo build -p bevy-tasks-cli # Build CLI only +cargo build -p onyx-cli # Build CLI only cargo test # Run all tests -cargo test -p bevy-tasks-core # Run core library tests only -cargo run -p bevy-tasks-cli -- # Run CLI with arguments +cargo test -p onyx-core # Run core library tests only +cargo run -p onyx-cli -- # Run CLI with arguments # Tauri GUI cd apps/tauri && npm install # Install frontend dependencies @@ -21,7 +21,7 @@ WEBKIT_DISABLE_DMABUF_RENDERER=1 npm run tauri dev # Run Tauri in dev mode (Way npm run tauri build # Build for production ``` -The CLI binary is named `bevy-tasks` (from the `bevy-tasks-cli` crate). +The CLI binary is named `onyx` (from the `onyx-cli` crate). The Tauri dev server runs on port 1422 (`vite.config.ts` and `tauri.conf.json`). @@ -29,9 +29,9 @@ The Tauri dev server runs on port 1422 (`vite.config.ts` and `tauri.conf.json`). Two-crate workspace (`resolver = "2"`, edition 2021) plus a Tauri app: -- **bevy-tasks-core** — Pure Rust library. Storage trait with `FileSystemStorage` implementation, `TaskRepository` (main API), data models, config, error types. No CLI/UI dependencies. -- **bevy-tasks-cli** — CLI frontend using clap. Commands are in `src/commands/` (init, workspace, list, task, group). Output formatting in `src/output.rs`. -- **apps/tauri/** — Tauri v2 GUI. Svelte 5 frontend in `src/`, Rust backend in `src-tauri/` with Tauri commands that call into `bevy-tasks-core`. +- **onyx-core** — Pure Rust library. Storage trait with `FileSystemStorage` implementation, `TaskRepository` (main API), data models, config, error types. No CLI/UI dependencies. +- **onyx-cli** — CLI frontend using clap. Commands are in `src/commands/` (init, workspace, list, task, group). Output formatting in `src/output.rs`. +- **apps/tauri/** — Tauri v2 GUI. Svelte 5 frontend in `src/`, Rust backend in `src-tauri/` with Tauri commands that call into `onyx-core`. ### Key patterns diff --git a/Cargo.lock b/Cargo.lock index f7268ff..d88b146 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -105,11 +105,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] -name = "bevy-tasks-cli" +name = "onyx-cli" version = "0.1.0" dependencies = [ "anyhow", - "bevy-tasks-core", + "onyx-core", "chrono", "clap", "colored", @@ -120,7 +120,7 @@ dependencies = [ ] [[package]] -name = "bevy-tasks-core" +name = "onyx-core" version = "0.1.0" dependencies = [ "chrono", diff --git a/Cargo.toml b/Cargo.toml index 068f1fa..3eda0db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [workspace] members = [ - "crates/bevy-tasks-core", - "crates/bevy-tasks-cli", + "crates/onyx-core", + "crates/onyx-cli", ] exclude = [ "apps/tauri/src-tauri", diff --git a/PLAN.md b/PLAN.md index 1241ee4..ed76fcc 100644 --- a/PLAN.md +++ b/PLAN.md @@ -1,4 +1,4 @@ -# Bevy Tasks - Project Plan +# Onyx - Project Plan ## Vision @@ -41,15 +41,15 @@ A **local-first, cross-platform tasks application** inspired by Google Tasks. Bu #### Cargo Workspace Structure ``` -bevy-tasks/ +onyx/ ├── Cargo.toml # Workspace definition ├── PLAN.md ├── README.md ├── apps/ │ └── tauri/ # Tauri GUI (Svelte + Tailwind) ├── crates/ -│ ├── bevy-tasks-core/ # Core library (backend) -│ └── bevy-tasks-cli/ # CLI frontend +│ ├── onyx-core/ # Core library (backend) +│ └── onyx-cli/ # CLI frontend └── docs/ ``` @@ -162,9 +162,9 @@ WorkspaceConfig { - Tasks without due dates appear at the end when grouping is enabled **App Configuration** (separate from task data, supports multiple workspaces): -- Windows: `%APPDATA%/bevy-tasks/config.json` -- Linux: `~/.config/bevy-tasks/config.json` -- macOS: `~/Library/Application Support/bevy-tasks/config.json` +- Windows: `%APPDATA%/onyx/config.json` +- Linux: `~/.config/onyx/config.json` +- macOS: `~/Library/Application Support/onyx/config.json` ```json { @@ -226,8 +226,8 @@ pub trait Storage { ```toml [workspace] members = [ - "crates/bevy-tasks-core", - "crates/bevy-tasks-cli", + "crates/onyx-core", + "crates/onyx-cli", ] exclude = [ "apps/tauri/src-tauri", @@ -242,10 +242,10 @@ anyhow = "1.0" tokio = { version = "1.40", features = ["full"] } ``` -**bevy-tasks-core/Cargo.toml**: +**onyx-core/Cargo.toml**: ```toml [package] -name = "bevy-tasks-core" +name = "onyx-core" version = "0.1.0" edition = "2021" @@ -261,19 +261,19 @@ directories = "5.0" tempfile = "3.0" ``` -**bevy-tasks-cli/Cargo.toml**: +**onyx-cli/Cargo.toml**: ```toml [package] -name = "bevy-tasks-cli" +name = "onyx-cli" version = "0.1.0" edition = "2021" [[bin]] -name = "bevy-tasks" +name = "onyx" path = "src/main.rs" [dependencies] -bevy-tasks-core = { path = "../bevy-tasks-core" } +onyx-core = { path = "../onyx-core" } clap = { version = "4.5", features = ["derive", "env"] } colored = "2.0" anyhow = { workspace = true } @@ -310,46 +310,46 @@ fs_extra = "1.3" ```bash # First run: initialize a workspace (creates named workspace) -$ bevy-tasks init ~/Documents/Tasks --name personal +$ onyx init ~/Documents/Tasks --name personal ✓ Initialized workspace "personal" at ~/Documents/Tasks ✓ Created default list "My Tasks" ✓ Set "personal" as current workspace # Add more workspaces (e.g., for shared/collaborative tasks) -$ bevy-tasks workspace add shared ~/Dropbox/TeamTasks +$ onyx workspace add shared ~/Dropbox/TeamTasks ✓ Added workspace "shared" at ~/Dropbox/TeamTasks ✓ Created default list "My Tasks" # List all workspaces -$ bevy-tasks workspace list +$ onyx workspace list personal: ~/Documents/Tasks (current) shared: ~/Dropbox/TeamTasks # Switch between workspaces -$ bevy-tasks workspace switch shared +$ onyx workspace switch shared ✓ Switched to workspace "shared" # Create a new task list -$ bevy-tasks list create "Work" +$ onyx list create "Work" ✓ Created list "Work" -$ bevy-tasks list create "Personal Projects" +$ onyx list create "Personal Projects" ✓ Created list "Personal Projects" # Add tasks (uses current workspace by default) -$ bevy-tasks add "Buy groceries" +$ onyx add "Buy groceries" ✓ Created task "Buy groceries" (550e8400-e29b-41d4-a716-446655440000) -$ bevy-tasks add "Review PR #123" --list "Work" --due "2026-11-15" +$ onyx add "Review PR #123" --list "Work" --due "2026-11-15" ✓ Created task "Review PR #123" (7f3a9c21-b8d2-4e5f-9a1c-3d8e7f6a2b1c) Due: 2026-11-15 # Or specify workspace explicitly -$ bevy-tasks add "Team meeting" --workspace shared +$ onyx add "Team meeting" --workspace shared ✓ Created task "Team meeting" in workspace "shared" # List all tasks (from current workspace) -$ bevy-tasks list show +$ onyx list show My Tasks (3 tasks) [ ] Buy groceries [ ] Call dentist @@ -360,37 +360,37 @@ Work (2 tasks) [ ] Team meeting prep # List tasks from specific workspace -$ bevy-tasks list show --workspace shared +$ onyx list show --workspace shared Shared Tasks (2 tasks) [ ] Team meeting [ ] Quarterly planning # List tasks in specific list -$ bevy-tasks list show --list "Work" +$ onyx list show --list "Work" Work (2 tasks) [ ] Review PR #123 (due: 2026-11-15) [ ] Team meeting prep # Complete a task -$ bevy-tasks complete 550e8400-e29b-41d4-a716-446655440000 +$ onyx complete 550e8400-e29b-41d4-a716-446655440000 ✓ Completed task "Buy groceries" # Edit a task (CLI-only: creates temp file, opens $EDITOR, blocks until editor exits, then parses) -$ bevy-tasks edit 7f3a9c21-b8d2-4e5f-9a1c-3d8e7f6a2b1c +$ onyx edit 7f3a9c21-b8d2-4e5f-9a1c-3d8e7f6a2b1c # Opens editor with task markdown file # User edits and saves, then exits editor ✓ Updated task "Review PR #123" # Delete a task -$ bevy-tasks delete 550e8400-e29b-41d4-a716-446655440000 +$ onyx delete 550e8400-e29b-41d4-a716-446655440000 ✓ Deleted task "Buy groceries" # Retarget workspace (files already at new location, just update config) -$ bevy-tasks workspace retarget personal ~/new/path/to/Tasks +$ onyx workspace retarget personal ~/new/path/to/Tasks ✓ Workspace "personal" now points to ~/new/path/to/Tasks # Migrate workspace (move files to new location) -$ bevy-tasks workspace migrate personal ~/Dropbox/Tasks +$ onyx workspace migrate personal ~/Dropbox/Tasks ⚠ This will move all files from ~/Documents/Tasks to ~/Dropbox/Tasks Continue? (y/n): y Moving files... @@ -401,22 +401,22 @@ Moving files... ✓ Workspace "personal" now points to ~/Dropbox/Tasks # Remove a workspace -$ bevy-tasks workspace remove shared +$ onyx workspace remove shared ⚠ Warning: This will delete workspace config (files remain on disk) Continue? (y/n): y ✓ Removed workspace "shared" # Toggle grouping by due date (tasks always use manual task_order within groups) -$ bevy-tasks group enable --list "Work" +$ onyx group enable --list "Work" ✓ Enabled group-by-due-date for list "Work" -$ bevy-tasks group disable --list "Personal" +$ onyx group disable --list "Personal" ✓ Disabled group-by-due-date for list "Personal" ``` ### Deliverables -- [x] `bevy-tasks-core` library with stable API +- [x] `onyx-core` library with stable API - [x] Functional CLI that can manage tasks - [x] Data persists as Obsidian-compatible .md files - [x] Well-tested backend (>80% coverage) @@ -427,17 +427,17 @@ $ bevy-tasks group disable --list "Personal" ```bash # Clone and build git clone -cd bevy-tasks +cd onyx cargo build # Run tests -cargo test -p bevy-tasks-core +cargo test -p onyx-core # Run CLI -cargo run -p bevy-tasks-cli -- init ~/test-tasks --name test -cargo run -p bevy-tasks-cli -- add "Test task" -cargo run -p bevy-tasks-cli -- list -cargo run -p bevy-tasks-cli -- workspace list +cargo run -p onyx-cli -- init ~/test-tasks --name test +cargo run -p onyx-cli -- add "Test task" +cargo run -p onyx-cli -- list +cargo run -p onyx-cli -- workspace list ``` --- @@ -450,7 +450,7 @@ cargo run -p bevy-tasks-cli -- workspace list #### WebDAV Integration -Add WebDAV support to `bevy-tasks-core`: +Add WebDAV support to `onyx-core`: ```rust // Update WorkspaceConfig to include WebDAV @@ -466,7 +466,7 @@ AppConfig { current_workspace: Option, } -// Sync functions in bevy_tasks_core::sync module (standalone, not on TaskRepository) +// Sync functions in onyx_core::sync module (standalone, not on TaskRepository) pub async fn sync_workspace( workspace_path: &Path, webdav_url: &str, @@ -477,7 +477,7 @@ pub async fn sync_workspace( pub fn get_sync_status(workspace_path: &Path) -> Result; -// Credential functions in bevy_tasks_core::webdav module +// Credential functions in onyx_core::webdav module pub fn store_credentials(domain: &str, username: &str, password: &str) -> Result<()>; pub fn load_credentials(domain: &str) -> Result<(String, String)>; pub fn delete_credentials(domain: &str) -> Result<()>; @@ -492,14 +492,14 @@ pub fn delete_credentials(domain: &str) -> Result<()>; **Primary**: Platform Keychain via `keyring` crate - Store WebDAV username + password in system keychain -- Key format: `com.bevy-tasks.webdav.{server-domain}` +- Key format: `com.onyx.webdav.{server-domain}` - Works on: Windows (Credential Manager), macOS (Keychain), Linux (Secret Service), iOS/Android (Keystore) **Fallback**: Encrypted local storage if keychain unavailable ### Dependencies -Add to `bevy-tasks-core/Cargo.toml`: +Add to `onyx-core/Cargo.toml`: ```toml reqwest = { version = "0.12", features = ["json", "rustls-tls"] } keyring = "3.0" @@ -523,7 +523,7 @@ keyring = "3.0" ```bash # Setup WebDAV for current workspace -$ bevy-tasks sync --setup +$ onyx sync --setup WebDAV URL: https://nextcloud.example.com/remote.php/dav/files/username/Tasks Username: myuser Password: ******** @@ -531,7 +531,7 @@ Password: ******** ✓ Connection verified for workspace "personal" # Setup WebDAV for specific workspace -$ bevy-tasks sync --setup --workspace shared +$ onyx sync --setup --workspace shared WebDAV URL: https://nextcloud.example.com/remote.php/dav/files/username/SharedTasks Username: myuser Password: ******** @@ -539,7 +539,7 @@ Password: ******** ✓ Connection verified for workspace "shared" # Push local changes to WebDAV server (current workspace) -$ bevy-tasks sync --push +$ onyx sync --push Syncing workspace "personal" to https://nextcloud.example.com/... Uploading My Tasks/.listdata.json Uploading My Tasks/Buy groceries.md @@ -547,14 +547,14 @@ Syncing workspace "personal" to https://nextcloud.example.com/... ✓ Pushed 3 files to WebDAV server # Pull changes from WebDAV server -$ bevy-tasks sync --pull +$ onyx sync --pull Syncing workspace "personal" from https://nextcloud.example.com/... Downloading Work/Team meeting notes.md Downloading Personal/Call mom.md ✓ Pulled 2 files from WebDAV server # Automatic two-way sync -$ bevy-tasks sync +$ onyx sync Syncing workspace "personal" with https://nextcloud.example.com/... ↑ Uploading My Tasks/New task.md ↓ Downloading Work/Updated task.md @@ -562,12 +562,12 @@ Syncing workspace "personal" with https://nextcloud.example.com/... ✓ Sync complete # Sync specific workspace -$ bevy-tasks sync --workspace shared +$ onyx sync --workspace shared Syncing workspace "shared" with https://nextcloud.example.com/... ✓ Sync complete (no changes) # Check sync status for current workspace -$ bevy-tasks sync --status +$ onyx sync --status Workspace: personal WebDAV Server: https://nextcloud.example.com/remote.php/dav/files/username/Tasks Status: Connected @@ -576,7 +576,7 @@ Local changes: 2 files modified Remote changes: 0 files modified # Check sync status for all workspaces -$ bevy-tasks sync --status --all +$ onyx sync --status --all Workspace: personal WebDAV: https://nextcloud.example.com/.../Tasks Status: Connected @@ -608,7 +608,7 @@ Workspace: shared **Decision**: Use Tauri v2 with Svelte and Tailwind for the GUI **Why Tauri?** -- Native Rust backend — direct integration with `bevy-tasks-core` +- Native Rust backend — direct integration with `onyx-core` - Svelte 5 for reactive, performant UI with minimal boilerplate - Tailwind CSS 4 for rapid, consistent styling - Small binary size (~5-10MB) @@ -715,11 +715,11 @@ WorkspaceConfig { - [x] Settings popup overlay (WebDAV config, dark mode toggle) - [x] Dark mode (GNOME-style neutral theme, cyan-blue accent) - [x] Animated completed section show/hide -- [ ] Move task between lists (needs `move_task(from_list, to_list, task_id)` added to bevy-tasks-core + Tauri command, then wire into task detail kebab menu) +- [ ] Move task between lists (needs `move_task(from_list, to_list, task_id)` added to onyx-core + Tauri command, then wire into task detail kebab menu) - [ ] Optional time on due dates (backend `due_date` is `DateTime` — needs a separate `due_time` field or a nullable time component so date-only tasks don't default to midnight; currently the GUI uses `hours == 0 && minutes == 0` as a heuristic for "no time set" which breaks for actual midnight times) - [ ] Due date picker/editor (backend supports it, needs date input in new task toast + inline editing) - [ ] WebDAV setup flow with credentials (settings panel has fields, triggerSync needs to pull creds from config) -- [ ] List/workspace rename (needs `rename_list` added to bevy-tasks-core first) +- [ ] List/workspace rename (needs `rename_list` added to onyx-core first) - [ ] Keyboard shortcuts (Escape to close drawers/menus, tab navigation, Enter behaviors) - [ ] Sync status indicators (per workspace) - [ ] Push/pull sync mode selection @@ -765,7 +765,7 @@ Tauri v2 supports iOS and Android natively. The same Svelte frontend and Rust ba **iOS**: - Tauri generates Xcode project -- Bundle identifier: `com.bevytasks.app` +- Bundle identifier: `com.onyx.app` - Target: `aarch64-apple-ios` **Android**: @@ -952,7 +952,7 @@ If you want game-like polish after Phase 7: - Migrate GUI from Tauri/Svelte to Bevy - Full control over animations and rendering - Unique, polished look beyond standard apps -- Backend (`bevy-tasks-core`) stays identical +- Backend (`onyx-core`) stays identical - Only rewrite the GUI layer ### Deliverables diff --git a/README.md b/README.md index 6071552..8e9a52d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Bevy Tasks +# Onyx A **local-first, cross-platform tasks application** built with Rust. Inspired by Google Tasks, designed for speed and flexibility. @@ -12,13 +12,13 @@ A **local-first, cross-platform tasks application** built with Rust. Inspired by ## Project Structure ``` -bevy-tasks/ +onyx/ ├── Cargo.toml # Workspace definition ├── PLAN.md # Detailed project plan ├── README.md # This file ├── crates/ -│ ├── bevy-tasks-core/ # Core library (backend) -│ └── bevy-tasks-cli/ # CLI frontend +│ ├── onyx-core/ # Core library (backend) +│ └── onyx-cli/ # CLI frontend ├── apps/ │ └── tauri/ # Tauri v2 GUI (Svelte 5 + Tailwind CSS 4) └── docs/ @@ -30,7 +30,7 @@ bevy-tasks/ - **Phase 2** (WebDAV Sync): Backend and CLI complete, GUI partially wired - **Phase 3** (GUI MVP): In progress — core task CRUD working, UI polished -### Core Library (`bevy-tasks-core`) +### Core Library (`onyx-core`) - Data models (Task, TaskList, AppConfig, WorkspaceConfig) - Markdown file I/O with YAML frontmatter - Local storage with repository pattern @@ -39,7 +39,7 @@ bevy-tasks/ - WebDAV sync with three-way diff and offline queue - Platform keychain credential storage -### CLI (`bevy-tasks-cli`) +### CLI (`onyx-cli`) - Workspace management (init, add, list, switch, remove, retarget, migrate) - Task list management (create, show, delete) - Task operations (add, complete, delete, edit) @@ -66,15 +66,15 @@ bevy-tasks/ ```bash # Clone and build -git clone https://github.com/SteelDynamite/bevy-tasks.git -cd bevy-tasks +git clone https://github.com/SteelDynamite/onyx.git +cd onyx cargo build # Run tests -cargo test -p bevy-tasks-core +cargo test -p onyx-core # Run CLI -cargo run -p bevy-tasks-cli -- --help +cargo run -p onyx-cli -- --help # Run Tauri GUI cd apps/tauri && npm install @@ -87,7 +87,7 @@ npm run tauri dev ```bash # Initialize a new workspace -cargo run -p bevy-tasks-cli -- init ~/Documents/Tasks --name personal +cargo run -p onyx-cli -- init ~/Documents/Tasks --name personal # This creates: # - A workspace named "personal" at ~/Documents/Tasks @@ -99,51 +99,51 @@ cargo run -p bevy-tasks-cli -- init ~/Documents/Tasks --name personal ```bash # Add a task -cargo run -p bevy-tasks-cli -- add "Buy groceries" +cargo run -p onyx-cli -- add "Buy groceries" # Add a task with due date -cargo run -p bevy-tasks-cli -- add "Review PR #123" --list "Work" --due "2026-11-15" +cargo run -p onyx-cli -- add "Review PR #123" --list "Work" --due "2026-11-15" # List all tasks -cargo run -p bevy-tasks-cli -- list show +cargo run -p onyx-cli -- list show # Complete a task -cargo run -p bevy-tasks-cli -- complete +cargo run -p onyx-cli -- complete # Edit a task (opens in $EDITOR) -cargo run -p bevy-tasks-cli -- edit +cargo run -p onyx-cli -- edit # Delete a task -cargo run -p bevy-tasks-cli -- delete +cargo run -p onyx-cli -- delete ``` ### Manage workspaces ```bash # Add another workspace -cargo run -p bevy-tasks-cli -- workspace add shared ~/Dropbox/TeamTasks +cargo run -p onyx-cli -- workspace add shared ~/Dropbox/TeamTasks # List workspaces -cargo run -p bevy-tasks-cli -- workspace list +cargo run -p onyx-cli -- workspace list # Switch workspace -cargo run -p bevy-tasks-cli -- workspace switch shared +cargo run -p onyx-cli -- workspace switch shared # Use specific workspace for a command -cargo run -p bevy-tasks-cli -- add "Team meeting" --workspace shared +cargo run -p onyx-cli -- add "Team meeting" --workspace shared ``` ### Manage task lists ```bash # Create a new list -cargo run -p bevy-tasks-cli -- list create "Work" +cargo run -p onyx-cli -- list create "Work" # Show tasks in a specific list -cargo run -p bevy-tasks-cli -- list show --list "Work" +cargo run -p onyx-cli -- list show --list "Work" # Delete a list -cargo run -p bevy-tasks-cli -- list delete "Work" +cargo run -p onyx-cli -- list delete "Work" ``` ## Data Format @@ -190,7 +190,7 @@ Run the test suite: cargo test # Run tests for specific crate -cargo test -p bevy-tasks-core +cargo test -p onyx-core # Run tests with output cargo test -- --nocapture diff --git a/docs/API.md b/docs/API.md index 3da9156..f3aa738 100644 --- a/docs/API.md +++ b/docs/API.md @@ -1,8 +1,8 @@ -# Bevy Tasks Core - API Documentation +# Onyx Core - API Documentation ## Overview -The `bevy-tasks-core` library provides a complete backend for managing tasks in a local-first manner. Tasks are stored as markdown files with YAML frontmatter, compatible with Obsidian and other markdown editors. +The `onyx-core` library provides a complete backend for managing tasks in a local-first manner. Tasks are stored as markdown files with YAML frontmatter, compatible with Obsidian and other markdown editors. ## Core Concepts @@ -33,7 +33,7 @@ pub enum TaskStatus { **Creating a Task:** ```rust -use bevy_tasks_core::Task; +use onyx_core::Task; // Simple task let task = Task::new("Buy groceries".to_string()); @@ -73,14 +73,14 @@ pub struct AppConfig { ``` **Location:** -- Windows: `%APPDATA%/bevy-tasks/config.json` -- Linux: `~/.config/bevy-tasks/config.json` -- macOS: `~/Library/Application Support/bevy-tasks/config.json` +- Windows: `%APPDATA%/onyx/config.json` +- Linux: `~/.config/onyx/config.json` +- macOS: `~/Library/Application Support/onyx/config.json` **Usage:** ```rust -use bevy_tasks_core::AppConfig; +use onyx_core::AppConfig; // Load config let config_path = AppConfig::get_config_path(); @@ -116,7 +116,7 @@ The main interface for interacting with tasks and lists. ### Initialization ```rust -use bevy_tasks_core::TaskRepository; +use onyx_core::TaskRepository; use std::path::PathBuf; // Open existing repository @@ -280,12 +280,12 @@ The sync module provides bi-directional WebDAV synchronization with three-way di ### Sync Functions -Sync functions live in the `bevy_tasks_core::sync` module as standalone functions (not on `TaskRepository`). +Sync functions live in the `onyx_core::sync` module as standalone functions (not on `TaskRepository`). #### Sync a Workspace ```rust -use bevy_tasks_core::sync::{sync_workspace, SyncMode}; +use onyx_core::sync::{sync_workspace, SyncMode}; use std::path::Path; // Full bi-directional sync @@ -305,7 +305,7 @@ sync_workspace(path, url, user, pass, SyncMode::PullOnly).await?; #### Check Sync Status ```rust -use bevy_tasks_core::sync::get_sync_status; +use onyx_core::sync::get_sync_status; let status = get_sync_status(Path::new("/home/user/tasks"))?; // Returns SyncStatusInfo with last sync time, pending changes, etc. @@ -316,7 +316,7 @@ let status = get_sync_status(Path::new("/home/user/tasks"))?; Credentials are stored in the platform keychain (Windows Credential Manager, macOS Keychain, Linux Secret Service). ```rust -use bevy_tasks_core::webdav::{store_credentials, load_credentials, delete_credentials}; +use onyx_core::webdav::{store_credentials, load_credentials, delete_credentials}; // Store credentials store_credentials("nextcloud.example.com", "username", "password")?; @@ -331,7 +331,7 @@ delete_credentials("nextcloud.example.com")?; ### WebDAV Client ```rust -use bevy_tasks_core::webdav::WebDavClient; +use onyx_core::webdav::WebDavClient; let client = WebDavClient::new( "https://nextcloud.example.com/remote.php/dav/files/user/Tasks", @@ -380,7 +380,7 @@ pub enum Error { ## Example: Complete Workflow ```rust -use bevy_tasks_core::{TaskRepository, Task, AppConfig, WorkspaceConfig}; +use onyx_core::{TaskRepository, Task, AppConfig, WorkspaceConfig}; use std::path::PathBuf; fn main() -> Result<(), Box> { @@ -428,7 +428,7 @@ fn main() -> Result<(), Box> { The core library includes comprehensive tests. Run them with: ```bash -cargo test -p bevy-tasks-core +cargo test -p onyx-core ``` Key test areas: diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 293e46d..d66428d 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -13,8 +13,8 @@ ```bash # Clone the repository -git clone https://github.com/SteelDynamite/bevy-tasks.git -cd bevy-tasks +git clone https://github.com/SteelDynamite/onyx.git +cd onyx # Build the project cargo build @@ -23,7 +23,7 @@ cargo build cargo test # Run the CLI -cargo run -p bevy-tasks-cli -- --help +cargo run -p onyx-cli -- --help # Run the Tauri GUI cd apps/tauri && npm install @@ -33,10 +33,10 @@ npm run tauri dev ## Project Structure ``` -bevy-tasks/ +onyx/ ├── Cargo.toml # Workspace manifest ├── crates/ -│ ├── bevy-tasks-core/ # Core library +│ ├── onyx-core/ # Core library │ │ ├── src/ │ │ │ ├── lib.rs # Library entry point │ │ │ ├── models.rs # Data models (Task, TaskList, etc.) @@ -47,7 +47,7 @@ bevy-tasks/ │ │ │ ├── sync.rs # Three-way sync engine with offline queue │ │ │ └── webdav.rs # WebDAV client and credential storage │ │ └── Cargo.toml -│ ├── bevy-tasks-cli/ # CLI application +│ ├── onyx-cli/ # CLI application │ │ ├── src/ │ │ │ ├── main.rs # CLI entry point and command parsing │ │ │ ├── output.rs # Output formatting utilities @@ -95,10 +95,10 @@ bevy-tasks/ cargo test # Run tests for a specific crate -cargo test -p bevy-tasks-core +cargo test -p onyx-core # Run a specific test -cargo test -p bevy-tasks-core test_create_and_list_tasks +cargo test -p onyx-core test_create_and_list_tasks # Run tests with output cargo test -- --nocapture @@ -114,17 +114,17 @@ cargo build cargo build --release # Build specific crate -cargo build -p bevy-tasks-cli +cargo build -p onyx-cli ``` ### Running the CLI in Development ```bash # Run with cargo (recommended for development) -cargo run -p bevy-tasks-cli -- init ~/test-tasks --name test +cargo run -p onyx-cli -- init ~/test-tasks --name test # Run the compiled binary -./target/debug/bevy-tasks init ~/test-tasks --name test +./target/debug/onyx init ~/test-tasks --name test ``` ## Code Style @@ -155,7 +155,7 @@ cargo clippy -- -W clippy::all ## Architecture Guidelines -### Core Library (`bevy-tasks-core`) +### Core Library (`onyx-core`) **Principles:** - Pure Rust, no CLI dependencies @@ -171,7 +171,7 @@ cargo clippy -- -W clippy::all 4. Write tests 5. Update API documentation -### CLI (`bevy-tasks-cli`) +### CLI (`onyx-cli`) **Principles:** - Thin layer over core library @@ -210,8 +210,8 @@ mod tests { Located in `tests/` directories within each crate: ```rust -// crates/bevy-tasks-core/tests/integration_test.rs -use bevy_tasks_core::*; +// crates/onyx-core/tests/integration_test.rs +use onyx_core::*; #[test] fn test_full_workflow() { @@ -321,13 +321,13 @@ ls -la ~/test-tasks ```bash # Verify workspace configuration -cat ~/.config/bevy-tasks/config.json | jq +cat ~/.config/onyx/config.json | jq # Check current workspace -cargo run -p bevy-tasks-cli -- workspace list +cargo run -p onyx-cli -- workspace list # Initialize if needed -cargo run -p bevy-tasks-cli -- init ~/test-tasks --name test +cargo run -p onyx-cli -- init ~/test-tasks --name test ``` ## Contributing