anki-cli

Manage Anki flashcards via AnkiConnect or SQLite with JSON output.

50|2|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/ubermenchh/anki-cli --skill anki-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: anki-cli
Source: https://github.com/ubermenchh/anki-cli/tree/main
Command: npx skills add https://github.com/ubermenchh/anki-cli --skill anki-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Anki CLI provides a scripting-friendly interface to manage flashcards, decks, notes, and tags across both AnkiConnect (for running Anki Desktop) and direct SQLite backends, enabling automation and integration with other tools.

Core Features & Use Cases

  • Create, query, review, and organize cards, notes, decks, tags, and notetypes from the command line.
  • Support for both AnkiConnect and direct SQLite backends, enabling flexible backends depending on the user's setup.
  • Emit structured JSON output for easy integration with automation pipelines and AI agents.

Quick Start

Run anki status --format json to verify backend health and collection state.

Frequently Asked Questions about anki-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Anki flashcard management from the command line?

Anki automation from the command line allows you to create, query, and organize flashcards, decks, and notetypes directly. This Skill interfaces with AnkiConnect or direct SQLite backends and outputs structured JSON for seamless integration into scripting pipelines.

Can I manage Anki decks without opening the desktop app using a CLI?

Yes, you can manage Anki decks without the desktop app by utilizing a direct SQLite backend. This approach enables direct interaction with your collection, allowing you to modify cards and notes while outputting machine-readable JSON without requiring the Anki GUI.

Does the AnkiConnect API support JSON output for querying card notes?

Yes, AnkiConnect supports emitting structured JSON output for queried card notes. By using this CLI, you can request data from your running Anki Desktop instance and receive machine-readable JSON formatted for automation pipelines and AI agents.

What is the best way to integrate Anki flashcard data into an automation pipeline?

The best way to integrate Anki data into automation pipelines is using a CLI that emits structured JSON. This tool queries cards, notes, and tags across AnkiConnect or SQLite backends, providing machine-readable output easily consumed by scripts and AI agents.

Do I need a running AnkiConnect service to use this Anki CLI tool?

You do not strictly need a running AnkiConnect service; the tool supports a direct SQLite backend. However, if you choose the AnkiConnect route, the desktop application and its API service must be active to manage your flashcards successfully.