oflow-todo 0.4.3

A focused todo CLI
Documentation

Oasis Flow (oflow)

A focused todo CLI tool and Rust library built with Rust.

Features

  • Add Tasks: Quickly add new todo items
  • Finish Tasks: Mark tasks as completed
  • Edit Tasks: Modify existing task content
  • Clean: Remove all finished tasks
  • List Tasks: Display all tasks with completion status
  • TUI Mode: Interactive terminal UI with vim-style keybindings
  • Library API: Use oflow as a Rust library via [TodoManager]

Installation

cargo install oflow-todo

CLI Usage

Global Options

Option Description
--data-dir <PATH> Custom data directory (overrides OS-specific default)

Add a Task

oflow add "Buy groceries"

Finish a Task

oflow finish "Buy groceries"

Edit a Task

oflow edit "Buy groceries" "Buy vegetables"

Clean Finished Tasks

oflow clean

List Tasks

oflow list

TUI Mode

oflow tui

Empty TUI

Input Mode

Launches an interactive terminal UI. Keyboard shortcuts:

Key Action
j / Down Select next item
k / Up Select previous item
Space Toggle finished status
a Add new todo
e Edit selected todo
d Delete selected todo
q Quit TUI

In input mode (Add/Edit):

Key Action
Enter Confirm input
Esc Cancel input

Library Usage

Add oflow to your Cargo.toml:

[dependencies]
oflow = "0.4.0"

Then use the TodoManager API:

use oflow::TodoManager;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut manager = TodoManager::new().await?;

    manager.add("Buy milk").await?;
    manager.add("Read a book").await?;
    manager.finish("Buy milk").await?;

    for todo in manager.list() {
        println!("{}", todo);
    }

    manager.clean().await?;
    Ok(())
}

For custom database path:

let mut manager = TodoManager::with_db_path("path/to/todos.db").await?;

Data Storage

Tasks are stored in:

  • A todos.db SQLite database for persistence
  • A todos.toml file for TOML export
  • In release mode: OS-specific data directory (e.g. ~/.local/share/oflow/ on Linux)
  • In debug mode: current working directory
  • Override with --data-dir <PATH> or TodoManager::with_db_path()

Project Structure

src/
├── main.rs          # CLI entry point
├── lib.rs           # Library root, TodoManager API
├── commands.rs      # CLI argument parsing (clap)
├── models.rs        # Todo and TodoList data types
├── database.rs      # SQLite persistence (sync, load, query)
└── tui/
    ├── mod.rs       # TUI module root
    ├── app.rs       # TUI entry point (run_tui)
    ├── state.rs     # Application state and event handling
    └── ui.rs        # Ratatui rendering
migrations/          # SQLx database migrations

Language

License

This project is licensed under the Mozilla Public License 2.0. See the LICENSE file for details.