Skip to content

totocaster/things-cli-go

Repository files navigation

th

Release CI Go Version License

th is a short macOS CLI for managing Things 3 tasks from the terminal.

It reads Things data directly from the local Things database in read-only mode for speed. Creates, updates, scheduling, completion, reveal, and trash operations still go through Things' supported AppleScript automation. It never writes directly to the Things database.

Highlights

  • Fast task capture with notes, tags, scheduling, deadlines, and target placement.
  • Fast read commands for individual to-dos, built-in lists, projects, areas, and search.
  • Update commands for names, notes, schedule dates, deadlines, list/project/area moves, completion, cancellation, and app reveal.
  • Script-friendly output with concise text by default, --json when you need structured data, and --quiet when only the exit code matters.
  • Destructive commands require --yes.
  • Built-in diagnostics, shell completions, and macOS-only release artifacts.

Install

Homebrew

brew install --cask totocaster/tap/th

Go install

go install github.com/totocaster/things-cli-go/cmd/th@latest

From source

git clone https://github.com/totocaster/things-cli-go.git
cd things-cli-go
make install

make install builds th and copies it to ~/.local/bin/th.

Requirements

  • macOS.
  • Things 3 installed and scriptable as Things3.
  • A readable local Things database under the Things group container.
  • osascript on PATH.

Check your local setup:

th doctor
th doctor --check-automation

--check-automation runs an explicit read-only AppleScript check and may trigger the macOS Automation permission prompt.

Usage Overview

Common commands

Command Description
th add "Buy milk" Create a to-do in Things.
th add "Buy milk" --today --deadline 2026-05-01 --tag Errand Create with schedule, deadline, and tags.
th today / th inbox Show common Things lists quickly.
th list inbox|today|anytime|upcoming|someday List built-in Things lists.
th list projects / th list areas List project and area IDs for move/create commands.
th get <id> Show one to-do with status, tags, dates, and notes.
th search <query> Search Things to-dos.
th schedule <id> 2026-04-29 / th schedule <id> none Set or clear the scheduled date.
th deadline <id> 2026-05-01 / th deadline <id> none Set or clear the deadline.
th due <id> 2026-05-01 Alias for th deadline.
th move <id> --list today Move a to-do to a built-in list.
th move <id> --project <project-id> Move a to-do to a project.
th complete <id> / th cancel <id> Complete or cancel a to-do.
th show <id> Reveal a to-do in Things.
th delete <id> --yes Move a to-do to Things Trash.
th trash empty --yes Permanently empty all of Things Trash.

Examples

# Capture a task for today
th add "Send invoice" --today --tag Work

# Add a task directly to a project
th add "Draft launch notes" --project JLMPPROJECT123 --deadline 2026-05-01

# Read the day plan as text
th today

# Pipe structured data to jq
th list anytime --json | jq '.[].name'

# Clear dates
th schedule JLMPABC123 none
th due JLMPABC123 none

# Move, complete, or reveal
th move JLMPABC123 --list someday
th complete JLMPABC123 --quiet
th show JLMPABC123

Output

th defaults to compact text output:

th today

Use --json for scripts and agents:

th search invoice --json
th delete JLMPABC123 --yes --json

Use --quiet or -q to suppress successful mutating text output:

th complete JLMPABC123 --quiet

Errors go to stderr and return non-zero exit codes. In JSON mode, errors are emitted as structured JSON on stderr.

Shell Completions

Temporary zsh setup:

source <(th completion zsh)

Persisted setup examples:

th completion zsh > "${fpath[1]}/_th"
th completion bash > ~/.local/share/bash-completion/completions/th
th completion fish > ~/.config/fish/completions/th.fish

Development

make check
make test-race

make check runs formatting, module tidying, unit tests, build, and non-mutating CLI smoke checks. Run make lint too when golangci-lint is installed.

Release packaging checks:

make release-check
make release-snapshot

Project notes live in docs/architecture.md, docs/guidelines.md, and docs/roadmap.md.

License

th is released under the MIT License.

About

A macOS CLI for managing Things 3 tasks from the terminal, with AppleScript-backed create, read, update, schedule, deadline, and trash commands.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors