npm package: @nasuda/task
Description: シンプルなタスク管理CLIツール
Latest version: 1.0.1

# @nasuda/task

A simple and fast task management CLI tool.

No quotes needed for adding tasks, smart project name matching with typo correction, interactive bulk operations, and more — designed for terminal productivity.

シンプルで高速なタスク管理CLIツール。引用符不要でタスク追加、タイポ補正付きプロジェクト管理、インタラクティブな一括操作など、ターミナルでの作業効率を重視した設計です。

## Features

- **No quotes needed** — `task a buy milk` just works
- **Smart project matching** — case-insensitive, prefix, substring, and fuzzy matching with Levenshtein distance
- **Auto-create projects** — specify a new project name with `-p` and it's created automatically
- **Interactive operations** — checklist-style bulk completion, autocomplete project selection
- **Dashboard with progress bars** — see project progress at a glance
- **zsh tab completion** — dynamic completion for commands, project names, and task IDs
- **4-character short IDs** — easy to type and remember

## Install

```bash
npm install -g @nasuda/task
```

Requires Node.js 18+.

> **Note:** The global command name is `task`. If another tool like [Taskwarrior](https://taskwarrior.org/) already uses the `task` command, they will conflict. In that case, uninstall the other tool first or use `npx @nasuda/task` instead.

## Usage

### Overview

```bash
task                    # project overview (hides done tasks)
task --all              # include done tasks
```

### Task Operations

```bash
# Add (no quotes needed)
task add buy milk
task a implement API -p my-app           # add to project (auto-creates if new)
task a setup env -p proj -d "description" # with description

# List & Search
task list                          # list tasks (hides done)
task ls -p my-app                  # filter by project
task ls -s doing                   # filter by status
task ls --all --sort updated       # show all, sort by updated
task search "bug"                  # search title & description

# Status changes
task start ab12                    # todo → doing
task done ab12                     # → done
task undo ab12                     # → back to todo

# Interactive
task check                         # select tasks to mark done
task check -p my-app               # within a project
task assign my-app                 # bulk-assign unassigned tasks

# Edit, View & Delete
task show ab12                     # task details
task edit ab12 -t "new title"      # change title
task edit ab12 -d none             # remove description
task remove ab12                   # delete (with confirmation)
task rm ab12 -y                    # skip confirmation
```

### Project Operations

```bash
task project add my-app            # create project
task p ls                          # list (with task counts)
task p rm my-app                   # delete (removes related tasks)
```

### Command Aliases

Every command has a short alias.

| Command   | Alias |
|-----------|-------|
| `add`     | `a`   |
| `list`    | `ls`  |
| `search`  | `s`   |
| `check`   | `c`   |
| `edit`    | `e`   |
| `remove`  | `rm`  |
| `assign`  | `mv`  |
| `project` | `p`   |

## zsh Completion

```bash
mkdir -p ~/.zsh/completions
task completion > ~/.zsh/completions/_task

# Add to ~/.zshrc
fpath=(~/.zsh/completions $fpath)
autoload -Uz compinit && compinit

# Restart shell
exec zsh
```

Dynamically completes project names, task IDs (with titles), and option values.

## Data

- Stored at: `~/.task-cli/data.json`
- Format: `{ projects: [...], tasks: [...] }`
- Atomic writes (tmp + rename) prevent data corruption

## License

MIT