https://github.com/stephendolan/omnifocus-cli
A command-line interface for OmniFocus on macOS
https://github.com/stephendolan/omnifocus-cli
Last synced: 5 months ago
JSON representation
A command-line interface for OmniFocus on macOS
- Host: GitHub
- URL: https://github.com/stephendolan/omnifocus-cli
- Owner: stephendolan
- License: mit
- Created: 2025-10-30T17:39:18.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-01-14T21:46:52.000Z (5 months ago)
- Last Synced: 2026-01-15T02:59:21.966Z (5 months ago)
- Language: TypeScript
- Size: 206 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OmniFocus CLI
[](https://www.npmjs.com/package/@stephendolan/omnifocus-cli)
[](https://opensource.org/licenses/MIT)
A command-line interface for OmniFocus on macOS.
## Installation
```bash
bun install -g @stephendolan/omnifocus-cli
```
Requires [Bun](https://bun.sh) and macOS with OmniFocus installed.
## Quick Start
```bash
of inbox count # Check inbox
of task list --flagged # Flagged tasks
of task create "Buy groceries" # Quick capture
of task update "Buy groceries" --complete # Mark done
```
## Commands
### Tasks
```bash
of task list # List active tasks
of task list --flagged # Flagged tasks only
of task list --project "Work" # Filter by project
of task list --tag "urgent" # Filter by tag
of task list --completed # Include completed
of task create "Name" [options]
--project # Assign to project
--tag # Add tags
--due # Set due date
--defer # Set defer date
--flagged # Flag the task
--estimate # Time estimate
--note # Add note
of task update [options]
--complete # Mark completed
--flag / --unflag # Toggle flag
--name # Rename
--project/--tag/--due/--defer # Same as create
of task view # View details
of task delete # Delete task
```
### Projects
```bash
of project list # List active projects
of project list --folder "Work" # Filter by folder
of project list --status "on hold" # Filter by status
of project list --dropped # Include dropped
of project create "Name" [options]
--folder # Assign to folder
--tag # Add tags
--sequential # Sequential project
--note # Add note
of project view # View details
of project delete # Delete project
```
### Tags
```bash
of tag list # All tags with counts
of tag list --unused-days 30 # Stale tags
of tag list --sort usage # Most used first
of tag list --sort activity # Most recent first
of tag list --active-only # Only count incomplete tasks
of tag stats # Usage statistics
of tag create "Name" # Create tag
of tag create "Child" --parent "Parent" # Nested tag
of tag view # View details
of tag update --name "New" # Rename
of tag update --inactive # Deactivate
of tag delete # Delete tag
```
### Inbox
```bash
of inbox list # List inbox items
of inbox count # Inbox count
of inbox add "Task name" # Add task to inbox
```
### Perspectives
```bash
of perspective list # List all perspectives
of perspective view "Forecast" # View tasks in perspective
```
### Folders
```bash
of folder list # List all folders
of folder list --dropped # Include dropped
of folder view "Work" # View folder details
```
### Statistics
```bash
of task stats # Task statistics
of project stats # Project statistics
of tag stats # Tag statistics
```
### Other
```bash
of search "query" # Search tasks
```
### MCP Server
Run as an MCP server for AI agent integration:
```bash
of mcp
```
## JSON Output
All commands output JSON. Use `--compact` for single-line output.
```bash
of task list | jq 'length' # Count tasks
of task list | jq '.[] | .name' # Task names
of task list --flagged | jq '.[] | {name, due}' # Specific fields
```
## Task Schema
```json
{
"id": "kXu3B-LZfFH",
"name": "Task name",
"completed": false,
"flagged": true,
"project": "Project Name",
"tags": ["tag1", "tag2"],
"due": "2024-01-15T00:00:00.000Z",
"defer": null,
"estimatedMinutes": 30,
"note": "Notes here",
"added": "2024-01-01T10:00:00.000Z",
"modified": "2024-01-10T15:30:00.000Z",
"completionDate": null
}
```
## Troubleshooting
**Permission denied**: Grant automation permission in System Settings > Privacy & Security > Automation.
**Task not found**: Use exact name or ID. IDs appear in JSON output.
**Date format**: Use ISO format `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SS`.
## Development
```bash
git clone https://github.com/stephendolan/omnifocus-cli.git
cd omnifocus-cli
bun install
bun run dev # Watch mode
bun link # Link globally as `of`
```
## License
MIT