A comprehensive TypeScript wrapper for the Vikunja API, compatible with both Node.js and Deno environments.
- Complete TypeScript definitions for the Vikunja API
- Support for both Node.js and Deno environments
- Modern ES Modules and CommonJS support
- Comprehensive implementation of all Vikunja API endpoints
- Type-safe, intuitive interface with full IntelliSense support
- Extensive test coverage
npm install node-vikunjaimport { VikunjaClient } from 'node-vikunja';
// Initialize the client
const client = new VikunjaClient('https://your-vikunja-instance.com/api/v1');
// Login with username and password
const authToken = await client.login('username', 'password');
console.log(`Token: ${authToken.token}, Expires: ${authToken.expires_at}`);
// Or initialize with an existing token
const client = new VikunjaClient('https://your-vikunja-instance.com/api/v1', 'your-token');// Get all projects
const projects = await client.projects.getProjects();
console.log(projects);
// Create a new project
const newProject = await client.projects.createProject({
title: 'My new project',
description: 'Project description'
});
// Get a specific project
const project = await client.projects.getProject(projectId);// Get all tasks in a project
const tasks = await client.tasks.getProjectTasks(projectId);
// Create a new task
const newTask = await client.tasks.createTask(projectId, {
title: 'My new task',
description: 'Task description',
due_date: '2025-12-31T23:59:59Z',
});
// Update a task
await client.tasks.updateTask(taskId, {
done: true
});// Get all labels
const labels = await client.labels.getLabels();
// Add a label to a task
await client.tasks.addLabel(taskId, labelId);// Get all teams
const teams = await client.teams.getTeams();
// Add a team to a project
await client.projects.addTeamToProject(projectId, {
team_id: teamId,
right: 2 // Read + write access
});import { VikunjaClient } from 'https://esm.sh/node-vikunja';
// Initialize the client
const client = new VikunjaClient('https://your-vikunja-instance.com/api/v1', 'your-token');
// Example: Get all projects
const projects = await client.projects.getProjects();
console.log(projects);VikunjaClient- Main client class that provides access to all services
client.auth- Authentication and user managementclient.avatar- User avatar managementclient.events- Event logging and retrievalclient.filters- List filter managementclient.labels- Label managementclient.migration- Data migration toolsclient.notifications- User notification managementclient.projects- Project managementclient.shares- Content sharingclient.subscriptions- User subscriptionsclient.system- System informationclient.tables- Table view managementclient.tasks- Task managementclient.teams- Team managementclient.tokens- API token managementclient.users- User management
# Install dependencies
npm install
# Build the library
npm run build
# Run tests
npm test
# Lint the code
npm run lintMIT - See LICENSE for details.