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

todoist-nodejs-sdk

v0.0.12

Published

Unofficial Todoist SDK for Node.js

Readme

Todoist Node.js SDK

npm version License: MIT

An unofficial, lightweight TypeScript/JavaScript SDK for integrating with the Todoist API in Node.js applications.

Installation

npm install todoist-nodejs-sdk

Quick Start

1. Get Your API Token

  1. Go to Todoist Settings
  2. Scroll down to "API token" and copy your token

2. Basic Usage

import { Todoist } from 'todoist-nodejs-sdk';

// Initialize the SDK
const todoist = new Todoist({
  apiKey: 'your-api-token-here',
});

// Get all projects
const projects = await todoist.projects.getProjects();
console.log('Your projects:', projects);

// Get a specific project
const project = await todoist.projects.getProjectById('project-id');
console.log('Project details:', project);

Usage Examples

Project Management

// Get all projects
const projects = await todoist.projects.getProjects();

// Get archived projects
const archivedProjects = await todoist.projects.getArchivedProjects();

// Create a new project
const newProject = await todoist.projects.createProject({
  name: 'My New Project',
  description: 'A project for organizing tasks',
  color: 'blue',
  isFavorite: true,
});

// Update a project
const updatedProject = await todoist.projects.updateProject({
  projectId: 'project-id',
  name: 'Updated Project Name',
  description: 'Updated description',
  isFavorite: false,
});

// Get project collaborators
const collaborators = await todoist.projects.getProjectColaborators({
  projectId: 'project-id',
});

// Get project permissions
const permissions = await todoist.projects.getProjectPermissions();

Task Management

// Get tasks by project
const tasks = await todoist.tasks.getTasks({
  projectId: 'project-id',
});

// Get tasks by section
const sectionTasks = await todoist.tasks.getTasks({
  sectionId: 'section-id',
});

// Get tasks by label
const labeledTasks = await todoist.tasks.getTasks({
  label: 'urgent',
});

// Get specific tasks by IDs
const specificTasks = await todoist.tasks.getTasks({
  ids: ['task-id-1', 'task-id-2'],
});

Error Handling

import { Todoist, TodoistError } from 'todoist-nodejs-sdk';

try {
  const projects = await todoist.projects.getProjects();
} catch (error) {
  if (error instanceof TodoistError) {
    console.error('Todoist API Error:', error.message);
    console.error('Cause:', error.cause);
  } else {
    console.error('Unexpected error:', error);
  }
}

API Reference

Todoist Class

The main class for interacting with the Todoist API.

Constructor

new Todoist({ apiKey: string });

Methods

Projects
  • getProjects(request?: GetProjectsRequest): Promise<Project[]>
  • getProjectById(projectId: string): Promise<Project>
  • getArchivedProjects(request?: GetArchivedProjectsRequest): Promise<Project[]>
  • getProjectColaborators(request: GetProjectColaboratorsRequest): Promise<ProjectColaborator[]>
  • getProjectPermissions(): Promise<ProjectPermissions>
  • createProject(request: CreateProjectRequest): Promise<Project>
  • updateProject(request: UpdateProjectRequest): Promise<Project>
Sections
  • getSections(request?: GetSectionsRequest): Promise<Section[]>
  • createSection(request: CreateSectionRequest): Promise<Section>
Tasks
  • getTasks(request: GetAllTasksRequest): Promise<Task[]>

TypeScript Support

This SDK is written in TypeScript and includes comprehensive type definitions:

import {
  Todoist,
  Project,
  Task,
  CreateProjectRequest,
  UpdateProjectRequest,
  GetAllTasksRequest,
} from 'todoist-nodejs-sdk';

Environment Variables

For security, store your API token in environment variables:

# .env file
TODOIST_API_KEY=your-api-token-here
import { Todoist } from 'todoist-nodejs-sdk';

const todoist = new Todoist({
  apiKey: process.env.TODOIST_API_KEY!,
});

Contributing

We welcome contributions! Here's how you can help:

🐛 Bug Reports

Found a bug? Please create an issue with:

  • Clear description of the problem
  • Steps to reproduce
  • Expected vs actual behavior
  • Environment details (Node.js version, etc.)

🚀 Feature Requests

Have an idea? We'd love to hear it! Please create an issue with:

  • Clear description of the feature
  • Use cases and examples
  • Any implementation ideas

💻 Code Contributions

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes:
    • Follow the existing code style
    • Add tests for new functionality
    • Update documentation as needed
  4. Commit your changes: git commit -m 'Add amazing feature'
  5. Push to the branch: git push origin feature/amazing-feature
  6. Open a Pull Request

📝 Development Setup

# Clone the repository
git clone https://github.com/mds2000/todoist-nodejs-sdk.git
cd todoist-nodejs-sdk

# Install dependencies
npm install

# Build the project
npm run build

🧪 Testing

# Run linting
npm run lint

# Build the project
npm run build

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Matías da Silva - GitHub

Support

Changelog

See CHANGELOG.md for a list of changes and version history.


Star this repository if you find it helpful!