@glorioustephan/todoist-autolabel
Auto-classify Todoist Inbox tasks with Claude AI using Structured Outputs — guaranteed-valid label assignments, no retry parsing, no malformed JSON.
npx @glorioustephan/todoist-autolabel
Documentation
- Setup guide — install, configure
.envandlabels.json, get API tokens, first run. - Deployment guide — run as a long-lived daemon with PM2, systemd, or Docker.
- Repository on GitHub — source, issues, CHANGELOG.
What it does
- Polls your Todoist Inbox on an interval.
- Skips completed tasks and anything already labelled.
- Sends each remaining task to Claude with a schema-constrained
output_format. The model can only emit names from your taxonomy — no hallucinated labels, no malformed JSON. - Patches the labels back to Todoist.
- Persists state in a local SQLite DB so retries don’t double-classify.
Getting started in 60 seconds
mkdir my-autolabel && cd my-autolabel
# Scaffold .env + labels.json in the current directory
npx @glorioustephan/todoist-autolabel init
# Edit .env to add your tokens, then run
npx @glorioustephan/todoist-autolabel
See the setup guide for the full walkthrough, model options, and troubleshooting.
Library usage
import {
loadConfig,
initDatabase,
initTodoistApi,
initClassifier,
initSyncManager,
getSyncManager,
} from '@glorioustephan/todoist-autolabel';
const config = loadConfig();
initDatabase(config);
await initTodoistApi(config);
const classifier = await initClassifier(config);
if (!classifier.success) throw new Error(classifier.error);
initSyncManager(config);
await getSyncManager().sync();
Fallible operations return Result<T, E> — there’s no surprise throwing past the SDK boundary.
License
MIT © glorioustephan