npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ofocus/cli

v0.7.0

Published

OmniFocus CLI - Command-line interface for OmniFocus

Readme

@ofocus/cli

Command-line interface for OmniFocus, designed for AI agents.

Installation

pnpm add @ofocus/cli

Usage

Note: The @ofocus/cli package installs as ofocus-cli. For the ofocus command, install the umbrella package: pnpm add ofocus

# Add a task to the inbox
ofocus-cli inbox "Buy groceries" --note "Milk, eggs, bread" --due "tomorrow" --flag

# Query tasks
ofocus-cli tasks --flagged --available

# Query projects
ofocus-cli projects --status active

# Query tags
ofocus-cli tags

# Complete a task
ofocus-cli complete <task-id>

# Update a task
ofocus-cli update <task-id> --title "New title" --due "next week"

# List available commands
ofocus-cli list-commands

Querying Tasks

Use Filters First

Always prefer filtering over fetching everything:

# Get flagged tasks
ofocus-cli tasks --flagged

# Get tasks in a specific project
ofocus-cli tasks --project "Project Name"

# Get tasks with a specific tag
ofocus-cli tasks --tag "urgent"

# Get available (actionable) tasks
ofocus-cli tasks --available

# Combine filters
ofocus-cli tasks --flagged --available

Inbox vs Project Tasks

The tasks command returns both inbox and project tasks:

  • Inbox tasks: projectId is null (not assigned to any project)
  • Project tasks: projectId is set

Pagination

By default, queries return up to 100 items. Use pagination to browse large result sets:

# First page (default limit: 100)
ofocus-cli tasks --flagged

# Smaller pages
ofocus-cli tasks --flagged --limit 20

# Next page
ofocus-cli tasks --flagged --limit 20 --offset 20

Only increase --limit beyond 100 when you specifically need all matching items.

Output Formats

Three output formats are supported:

| Flag | Format | Best for | | --------------- | ------------------------------------------ | ---------------------------------------------- | | (none) | JSON, or TOON when an AI agent is detected | Machine parsing / agent consumption | | --format toon | TOON | LLM/agent consumption (~40% smaller than JSON) | | --human | Human-readable text | Terminal use |

# JSON (default)
ofocus-cli tasks --flagged

# TOON — token-efficient for LLM agents
ofocus-cli tasks --flagged --format toon

# Human-readable
ofocus-cli tasks --flagged --human

The --format option accepts json or toon. Use --human (not --format human) for human-readable output. --human takes precedence over --format when both are specified.

Agent-aware default

When you don't pass --format, the CLI picks a default based on who is calling:

  • If an AI coding agent is detected (Claude Code, Cursor, Gemini CLI, Aider — via is-agentic-tui), the default is TOON — the same envelope in ~40% fewer tokens, so agents don't have to remember --format toon.
  • Otherwise the default is JSON.

The resolution order is: --human → explicit --format--json (shorthand for --format json) → the OFOCUS_FORMAT environment variable (json or toon) → agent detection. An explicit flag or OFOCUS_FORMAT always wins, so set OFOCUS_FORMAT=json (or pass --format json / --json) in a script that runs inside an agent session but pipes output to a JSON tool like jq.

Commands

| Command | Description | | -------------------- | --------------------------- | | inbox <title> | Add a task to the inbox | | tasks | Query tasks with filters | | projects | Query projects with filters | | tags | Query tags with filters | | folders | Query folders with filters | | complete <task-id> | Mark a task as complete | | update <task-id> | Update task properties | | list-commands | List all available commands |

Programmatic Usage

import {
  createCli,
  outputJson,
  outputHuman,
  outputToon,
  type OutputFormat,
} from "@ofocus/cli";

const cli = createCli();
cli.parse(["node", "ofocus", "tasks", "--flagged"]);

License

MIT