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

habityzer-cli

v1.0.5

Published

CLI tool for managing Habityzer tasks from your terminal

Readme

Habityzer CLI

A powerful command-line interface for managing your Habityzer tasks directly from your terminal. Perfect for developers who want to integrate task management into their workflow.

🚀 Installation

Install the Habityzer CLI locally in your project:

npm install habityzer-cli

⚙️ Configuration

Environment Variables

Create a .env file in your project root or set these environment variables:

# Required
HABITYZER_API_TOKEN=your_api_token_here

# Optional (with defaults)
HABITYZER_PROJECT_ID=2                           # Default project ID
HABITYZER_API_BASE_URL=https://s.habityzer.com/api  # API base URL

Getting Your API Token

  1. Log into your Habityzer account
  2. Navigate to API settings
  3. Generate a new API token
  4. Copy the token to your .env file

📖 Usage

Basic Commands

After installation, you can use the CLI with npx:

# List all active tasks
npx habityzer list

# List all tasks (including completed)
npx habityzer list --all

# Create a new task
npx habityzer create "Fix bug in authentication"

# Create a task with description
npx habityzer create "Implement feature X" --description "Add new functionality for user management"

# Update task status
npx habityzer update 123 --status 3  # Move to "In Progress"

# Show task details
npx habityzer show 123

# Delete a task
npx habityzer delete 123

# List all projects
npx habityzer projects

# List task statuses
npx habityzer statuses

NPM Scripts Integration

Add Habityzer commands to your package.json scripts:

{
  "scripts": {
    "tasks": "habityzer list",
    "tasks:all": "habityzer list --all",
    "task:create": "habityzer create",
    "task:show": "habityzer show"
  }
}

Then use them with:

npm run tasks
npm run task:create "New task title"

🎯 Cursor Integration

Method 1: AI Assistant Integration (Recommended)

Copy the .cursorrules file from this repository to your project root. This configures Cursor's AI to automatically use the Habityzer CLI when you ask about tasks.

Quick setup:

  1. Copy .cursorrules to your project root
  2. Ask the AI: "What are my current tasks?"
  3. The AI will automatically run npx habityzer list and show results

Method 2: Terminal Integration

  1. Open Cursor terminal (Ctrl/Cmd + J)
  2. Run Habityzer commands directly:
    npx habityzer list

Method 3: Custom Commands

Add Cursor custom commands by creating .cursor/commands.json:

{
  "commands": [
    {
      "name": "List Habityzer Tasks",
      "command": "npx habityzer list",
      "type": "terminal"
    },
    {
      "name": "Create Habityzer Task",
      "command": "npx habityzer create \"${input:taskTitle}\"",
      "type": "terminal"
    }
  ]
}

Method 4: Workspace Tasks

Add to .vscode/tasks.json (also works in Cursor):

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "List Tasks",
      "type": "shell",
      "command": "npx",
      "args": ["habityzer", "list"],
      "group": "build"
    },
    {
      "label": "Create Task",
      "type": "shell",
      "command": "npx",
      "args": ["habityzer", "create", "${input:taskTitle}"],
      "group": "build"
    }
  ],
  "inputs": [
    {
      "id": "taskTitle",
      "description": "Task title",
      "default": "New task",
      "type": "promptString"
    }
  ]
}

📋 Command Reference

list [options]

List tasks with optional filters.

Options:

  • --all - Include completed tasks
  • --project <id> - Filter by project ID
  • --status <id> - Filter by status ID

Examples:

npx habityzer list                    # Active tasks only
npx habityzer list --all              # All tasks
npx habityzer list --project 1        # Tasks from project 1
npx habityzer list --status 2         # Tasks with status "Todo"

create <title> [options]

Create a new task.

Arguments:

  • <title> - Task title (required)

Options:

  • --description <text> - Task description
  • --status <id> - Initial status (default: 2 = Todo)
  • --priority <level> - Priority level 1-5 (default: 2)

Examples:

npx habityzer create "Fix login bug"
npx habityzer create "New feature" --description "Implement user dashboard" --priority 3

show <taskId>

Display detailed information about a specific task.

Examples:

npx habityzer show 123

update <taskId> [options]

Update an existing task.

Arguments:

  • <taskId> - Task ID to update

Options:

  • --title <text> - New title
  • --description <text> - New description
  • --status <id> - New status ID
  • --priority <level> - New priority level

Examples:

npx habityzer update 123 --status 3              # Move to "In Progress"
npx habityzer update 123 --title "Updated title"
npx habityzer update 123 --priority 4 --status 4 # High priority, completed

delete <taskId>

Delete a task permanently.

Examples:

npx habityzer delete 123

projects

List all available projects.

statuses

List all available task statuses.

🔧 Development Workflow

Quick Task Creation

# Start working on a feature
npx habityzer create "Implement user authentication" --status 3

# Check current tasks
npx habityzer list

# Mark as complete when done
npx habityzer update 123 --status 4

Integration with Git Hooks

Add to .husky/pre-commit:

#!/bin/sh
npx habityzer list --status 3  # Show in-progress tasks before commit

🛠️ Troubleshooting

Common Issues

"API token required" error:

  • Ensure HABITYZER_API_TOKEN is set in your .env file
  • Verify the token is valid and hasn't expired

"Failed to fetch tasks" error:

  • Check your internet connection
  • Verify HABITYZER_API_BASE_URL is correct
  • Ensure your API token has proper permissions

Command not found:

  • Run npm install habityzer-cli to ensure it's installed
  • Use npx habityzer instead of just habityzer

📝 License

MIT License - see LICENSE file for details.

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

🔗 Links

📊 Task Status Reference

Common status IDs:

  • 1 - Idea
  • 2 - Todo
  • 3 - In Progress
  • 4 - Done

Use npx habityzer statuses to see all available statuses for your workspace.