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