This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Projects

Project tree

This tree contains first-party products and reusable project code. All tracked content follows the repository’s public-source policy.

Each project owns its specifications and maintained changes in <project>/openspec/. Use the pinned OpenSpec workflow with that project selected. infra/src/ owns repository evolution.

  • Bazel targets MAY use public visibility when their owner intends external reuse.
  • Project artifacts MAY be published through an explicit release workflow.
  • Project targets MAY be used by production build targets.

Each project has a landing page in the main website at https://alwaldend.com/projects/<name>/. Sites are published with the main site rather than as separate Pages repositories, and repository reference documentation, including each project README, lives under /docs/.

Project Description Landing page
ActivityWatch ingester Android Android accessibility collector that sends browser tabs to ActivityWatch alwaldend.com/projects/activitywatch_ingester_android/
Al Repository command runner and Bazel configuration rules alwaldend.com/projects/al/
Alwaldend.com Main website and project documentation alwaldend.com
Android launcher Text-only Android launcher built with Kotlin and Jetpack Compose alwaldend.com/projects/android_launcher/
Anki as code Export and reconcile Anki collections as TOML alwaldend.com/projects/anki_as_code/
Anki gRPC Rust server exposing Anki over stdio, TCP, and Unix sockets alwaldend.com/projects/anki_grpc/
Ansible collection Ansible collection alwaldend.main with Bazel source packaging alwaldend.com/projects/ansible_collection/
Autoscroll Mouse-driven autoscroll CLI with reloadable configuration alwaldend.com/projects/autoscroll/
Bazel agent Bazel runner for repository agents alwaldend.com/projects/bazel_agent/
Ci platform Abandoned CI platform with a Go backend and Vue frontend alwaldend.com/projects/ci_platform/
Dotfiles Personal configuration files with installation and comparison commands alwaldend.com/projects/dotfiles/
Infinitime InfiniTime firmware fork with a text watchface and Pomodoro app alwaldend.com/projects/infinitime/
Icon generator Configurable random square and circle patterns as PNG icons alwaldend.com/projects/icon_generator/
Kustomization Kubernetes resources for Flux, Traefik, and cert-manager alwaldend.com/projects/kustomization/
Leetcode downloader LeetCode submission export and documentation tools alwaldend.com/projects/leetcode_downloader/
MCP Cordis Workspace-local runtime packages behind a stable MCP server alwaldend.com/projects/mcp_cordis/
Nexus security plugin Security plugin for Sonatype Nexus 3 alwaldend.com/projects/nexus_security_plugin/
Renders Repository-owned render assets and their acceptance evidence alwaldend.com/projects/renders/
Sri Command-line Subresource Integrity calculator using OpenSSL alwaldend.com/projects/sri/
Tf modules Reusable Terraform modules for Vault, virtual machines, and storage alwaldend.com/projects/tf_modules/
Useless QT GUI Desktop GUI application built with C++ and Qt alwaldend.com/projects/useless_qt_gui/

1 - ActivityWatch ingester Android

Accessibility-based Android collector that sends browser URLs to ActivityWatch

ActivityWatch ingester Android

An Android collector that reads supported browser address-bar text through Android accessibility and sends it to an ActivityWatch server. The app holds full accessibility permission only to obtain the URL; it never uses that permission for anything else.

  • Enabling accessibility for this app lets it read the focused address bar.
  • The accessibility service matches browser view IDs (url_bar and common Chrome-derived variants), extracts the current URL, and sends an ActivityWatch heartbeat for the web.tab.current bucket to a configurable server.
  • web.tab.current heartbeats use pulsetime=1.0; consecutive URLs are sent with the time spent on the previous tab as the duration field.
  • Data goes directly from this app to the ActivityWatch HTTP API; it is not uploaded to any other service.

Open the app to configure:

  • ActivityWatch server URL — the base URL of the ActivityWatch server. The default is http://127.0.0.1:5600 for the ActivityWatch Android app on the same device. Changes are saved immediately.
  • API key (optional) — bearer token sent as Authorization: Bearer ... when the ActivityWatch server has API authentication enabled.

The INTERNET permission is required to reach the ActivityWatch HTTP API. The default loopback URL is sent over cleartext HTTP only to 127.0.0.1 and localhost, so no host data leaves the device.

Chrome and Chromium-based browsers that expose the url_bar view ID (including ordinary Chrome and many Chrome-based forks). Firefox, Samsung Internet, Opera, and Edge do not use that view ID yet.

  1. Build the APK: bazel build //projects/activitywatch_ingester_android/main/java:ingester_binary
  2. Verify the APK starts on an already running device or emulator: bazel run //projects/activitywatch_ingester_android/test:ingester_smoke_test This manual smoke test installs the Bazel-built APK, launches the activity, waits for the process, and confirms it stays alive. It is not a CI test.
  3. Install the APK on the device from bazel-bin/projects/activitywatch_ingester_android/main/java/ingester_binary.apk.
  4. Start the app and set the ActivityWatch server URL.
  5. Enable accessibility for the app in Android settings; Android shows the full-access warning, which is the mechanism this collector is built on.
  6. Open a browser. The current URL is re-sent to ActivityWatch whenever the address bar changes.
  • Minimum Android SDK 25 (Android 7.0).
  • Tested against the ActivityWatch v0.13 HTTP API (POST /api/0/buckets and POST /api/0/buckets/web.tab.current/heartbeat).

The landing page is published at activitywatch-ingester-android.alwaldend.com, built from this README by the shared Hugo landing template. The DNS record lives in dnsconfig.json; the project Terraform stage describes its configuration and ownership activation workflow.

1.1 - Releases

Release packaging for the ActivityWatch ingester Android app.

1.1.1 - head

Release head

2 - Al

Repository command runner and Bazel configuration rules

AL is a command runner that prepares credentials and environment variables through plugins, runs your command, and cleans up afterward. Its Bazel rules package commands with their configuration and required plugins.

al tool runs tools declared in AL configuration from a source-keyed executable cache. With no --config, it uses the repository-root al.lua; explicit --config paths replace that default. Cache misses build the tool’s configured Bazel label and publish the selected executable under $XDG_CACHE_HOME/al/tools. AL_TOOL_CACHE or tool --cache-root PATH selects an alternate cache root.

Repository agent skills are written by bazel run //.agents:write_skills and checked by //.agents:write_skills_test.

2.1 - Command and plugin lifecycle

Startup, shutdown, and secret cleanup guarantees

al run starts selected plugins, passes their environment to a command, and keeps plugin resources available until that command exits. On cancellation it asks the command to terminate and waits up to ten seconds before killing it. Plugin shutdown then drains requests, releases resources in reverse registration order, and waits for plugin exit. Startup failure cancels sibling starts and rolls back partially initialized resources. Cleanup errors fail the invocation.

The injector creates secret files with owner-only permissions and removes them after consumers stop. Vault stores revoke AppRole tokens they issue; failed AppRole login attempts destroy their unused single-use SecretID. The role’s bootstrap policy must permit secret-id-accessor/destroy, as declared by projects/tf_modules/vault_approle. The user’s existing token-helper credential is never erased or revoked. Secret inputs and remote response bodies are omitted from diagnostic messages. OIDC authorization uses the configured Vault HTTPS origin and TLS transport, rejecting alternate origins and redirects. Explicit config dumps still contain the requested configuration; file outputs use owner-only permissions and truncate previous contents.

no_auth prevents AL’s Vault client from loading credentials. For environment injection it clears inherited VAULT_TOKEN; it does not sandbox the command or prevent a command from independently reading the user’s token helper. Plugins and invoked commands remain trusted programs with the user’s filesystem access.

Cleanup is observable best effort, not secure erasure. Memory copies are not zeroized. Forced termination, host failure, unresponsive cleanup code, or an unavailable service can prevent deletion or revocation. Subprocess signaling targets direct children, not arbitrary descendants. Credential expiry remains a fallback; service-specific logout requirements are documented with each plugin.

2.2 - Releases

Releases

2.2.1 - head

Release head

2.3 - Rules

Bazel rules

2.3.1 - Bzl

Bazel rules

2.3.1.1 - al_config

al_config

load("@com_alwaldend_src//projects/al/rules/al:al_config.bzl", "al_config")

al_config(name, deps, srcs, data)

Dump al config

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
deps Al configs (targets) List of labels optional []
srcs Al configs (source files) List of labels optional []
data Data List of labels optional []

load("@com_alwaldend_src//projects/al/rules/al:al_config.bzl", "AlConfigInfo")

AlConfigInfo(config)

Config info

FIELDS

Name Description
config Merged config file

2.3.1.2 - al_toolchain

al_toolchain

load("@com_alwaldend_src//projects/al/rules/al:al_toolchain.bzl", "al_toolchain")

al_toolchain(name, al)

Al toolchain

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
al Al binary Label required

2.3.1.3 - al_toolchain_resolved

al_toolchain_resolved

load("@com_alwaldend_src//projects/al/rules/al:al_toolchain_resolved.bzl", "al_toolchain_resolved")

al_toolchain_resolved(name)

Resolved al toolchain (for genrules)

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required

3 - Alwaldend.com

Main website and project documentation

Alwaldend.com is the repository’s main website and documentation site. It uses Hugo with Docsy to publish project documentation on GitHub Pages.

This historical diagram preserves the former Proxmox unikernel deployment; see Deployment for the current website. The Mermaid source is authoritative; Bazel renders its light and dark SVGs.

www architecturewww architecture

The homepage, blog, documentation, and project pages share a flat monochrome theme with white and charcoal color modes, subtle borders, and system fonts. The navigation’s theme menu supports light, dark, and system preferences. Every page uses an “Al” SVG favicon outlined in Architects Daughter. Prose links are underlined, and keyboard focus uses a visible outline. Scrollbars are thin and muted; taxonomy links use small rounded labels shared with the project index. Documentation sidebars use plain action rows, uppercase group headings, compact wrapping taxonomy items, subtle hover and active backgrounds spanning the full tree row, and compact chevrons. Tree labels stay indented; chevrons expand branches independently of the row’s page link. Headings, search fields, code blocks, tables, and callouts follow the same typography and surface styles. Syntax highlighting uses CSS classes so code colors follow the active theme. Documentation Mermaid images use the same light/dark palette and follow the theme menu, including system preference. They use clean, rounded nodes and containers, smooth connectors, embedded sans-serif lettering, and Mermaid’s native Dagre layout, with bordered caption plates for edge labels and container titles. The mermaid_site_svg macro in pkg/mermaid/defs.bzl derives light/dark configurations from the shared Sass palette and renders both SVGs through the native Mermaid API without post-processing. The preset supplies caption styling through themeCSS and places titles on container borders with Mermaid’s subGraphTitleMargin setting. Compact node/rank spacing and the pinned renderer’s edgeSpacing option separate nested title plates. Package both outputs and reference the light .svg; Markdown and the SVG shortcode recognize its .dark.svg sibling. The site theme selects the visible image, and print always uses light. Historical blog diagrams retain their original files and presentation. New raster diagrams can use mermaid_site_webp from the same macro file to encode the native diagram with the site’s palette and sans-serif font for syndication and social previews. Set color_scheme = "dark" to select the dark palette; the default remains light. The homepage panel links to GitHub, GitLab, Blog, Docs, and the project index, followed by permanently visible, indented project links in title order. Each row shows its destination alongside its title; narrow screens place the destination below the title. The panel has space below the fixed header.

Run from the repository root:

bazel_agent bazel build //projects/alwaldend.com:site
bazel_agent bazel test //projects/alwaldend.com:site_test
bazel_agent bazel test //projects/alwaldend.com/test/mermaid:mermaid_test
bazel_agent bazel run //projects/alwaldend.com:site_serve

The preview serves the local build at http://127.0.0.1:1313. The Mermaid browser check writes screenshots and a JSON report to its Bazel test outputs. It exercises the theme menu, saved and system preferences, mobile layout, documentation print output, and blog header and body images. This browser test requires network access for Docsy’s existing, SRI-pinned jQuery and Lunr CDN scripts; its request allowlist permits only those two external URLs. Rendering and loading Mermaid diagrams needs no network. The check honors HTTPS_PROXY (or https_proxy) for those CDN requests; Chromium’s loopback bypass keeps the test site local.

The site publishes dated articles from content/blog. Each post is its own Bazel package with an index.md and a BUILD.bazel declaring its docs_filegroup; the section package aggregates them. The section publishes HTML, an RSS feed, and a print edition, and appears in the main navigation. The section index and its posts carry a github_subdir cascade so the per-page GitHub links point at the content sources.

A post stays unpublished while its front matter declares draft: true. Local builds render drafts for review and the release build excludes them, so the draft state alone withholds a post from the deployed site.

A post selects its opening images with front matter images: [pipeline.webp]. The shared blog template displays every entry in order above the article body, including in the print edition. Hugo’s Open Graph and Twitter card templates use the same resources for social previews. Do not repeat a header image at the start of the Markdown body; later illustrations stay in the body.

Every post is encouraged to have a representative image. Reuse an opening image when available, preferring a raster projection for social cards. Posts without a suitable image can omit this metadata. Bundled resource parameters provide descriptive alternative text and an optional visible caption:

images:
  - pipeline.webp
resources:
  - src: pipeline.webp
    params:
      alt: The uploader pipeline

Set params.caption when an image needs a visible caption. Without params.alt, the image uses the page title as alternative text. Header images use the shared image renderer and scale to the available width.

Header image files use a 5:2 canvas, matching the current X Article cover display. This is a display ratio, not an API upload restriction. Keep the complete illustration inside the canvas without cropping or stretching. Mermaid header renders set aspect_ratio = [5, 2]; arrange their content for a wide canvas before adding the minimum padding needed to reach that ratio. Other body illustrations keep their natural dimensions.

Agent workflow: Add a blog post.

The site publishes each registered project’s visitor-facing landing page at /projects/<name>/, with the section index at /projects/. Each project owns its landing content in projects/<name>/site/content/; this site packages those directories into content/projects/<name>/ from the registry in projects/projects.bzl. Landing content carries no layouts, styles, or build rules, and participates in the shared statuses, languages, and tags taxonomies.

Repository reference documentation, including each project README, stays under /docs/projects/<name>/. Because every landing is part of this one build, a content error in any landing fails the whole site build and the blog deployment.

Markdown links and images resolve relative to their source directory. README.md and _index.md links resolve to generated pages; packaged resources use their published URLs, including when embedded in print pages. Link files that exist only in the repository with explicit GitHub URLs. Unknown internal destinations remain unchanged rather than being silently redirected to GitHub.

Print pages scope IDs and their fragment and control references to each source document, keeping anchors distinct when documents are combined.

During site packaging, plain documentation that starts with an H1 receives a derived Hugo title. Missing ancestor section pages preserve its directory hierarchy, including OpenSpec specifications. Existing front matter and leaf bundles remain authoritative. The title is rendered once and its original heading anchor remains available; canonical Markdown needs no site metadata. Tree disclosure controls support pointer clicks and keyboard toggling. The tag index wraps its items, and /404.html offers links back to the site.

Build a portable website release bundle from the repository root:

tools/versioning/cmd/versioning/versioning.sh bazel -- \
  build --config=release //projects/alwaldend.com:release

The output directory bazel-bin/projects/alwaldend.com/release contains release.json and files/website.tar.gz. The manifest uses STABLE_VERSION from the versioning tool, including 0.0.0-dev for development builds. The archive contains the complete site with index.html at its root and excludes drafts. The release target requires release configuration. Building it does not connect to a host or publish anything.

With administrator SSH access configured, publish the bundle to XCP-ng:

bazel_agent bazel run //infra/download:publish.local -- \
  --release_dir "$PWD/bazel-bin/projects/alwaldend.com/release" \
  --site_archive website.tar.gz --steps upload,extract,link

Use publish.yandex only for an explicitly selected, configured cloud host. The publisher uses ordinary OpenSSH authentication and strict host trust; it does not run Ansible. See the release tool for identity/configuration overrides and independently selecting upload, extraction, or linking. The manifest version selects both the public archive directory and the extracted site release; linking selects the main website. Use a new version for changed site content because an already extracted version is retained. Development 0.0.0-dev is suitable for the first local deployment; subsequent releases should use distinct versions from the versioning workflow.

The bundle is intentionally separate from the generated release documentation: including the website archive in its own documentation would create a build cycle. The Pages commands below remain available during the staged migration.

  • DNS setup: infra/dns
  • This project’s DNS declaration owns the shared pages address. Project landing pages are published by this site under /projects/<name>/, so no project owns a CNAME or a dedicated hostname. The project directory links to every landing page. The apex and www records stay managed centrally.
  • Deploy to the Github Pages repo (the pages branch of alwaldend/alwaldend.github.io, which GitHub Pages serves):
    tools/versioning/cmd/versioning/versioning.sh bazel -- \
      run --config=release //projects/alwaldend.com:deploy
    
    The deploy script clones the pages branch, replaces its contents with the built site, writes .nojekyll, and pushes only when the output changed.
bazel run //projects/alwaldend.com/tf # Apply tf
bazel run //projects/alwaldend.com/tf:update_pve_disk # Update the disk
Taxonomy Meaning
Categories General category
Languages Programming language
Sites Sites
Statuses Project status
Tags Generic tags
{{< alwaldend/alert >}}
Alert body
{{< /alwaldend/alert >}}

Create a link using a bazel label

Usage:

{{% alwaldend/label_link "//tools/qt" %}}

Render common links

Usage:

{{% alwaldend/links %}}

Render a packaged SVG using its published URL. Set alt to describe the image; the page title is the fallback.

Usage:

{{< alwaldend/svg_file file="local_file.svg" alt="Project architecture" >}}

Include a local html file

Usage:

{{< alwaldend/include_html "file.html" >}}

Render books

Usage:

{{< alwaldend/docs_misc_books >}}

3.1 - Releases

Releases

3.1.1 - head

Release head

3.2 - Tf

Terraform

This service stage consumes the project DNS declaration through the shared global DNS module. The DNS workflow uses the project’s AppRole, HTTP state backend, and Cloudflare credentials. This public-only module does not require RouterOS. Ordinary service commands retain their tf=main authentication, including PVE login.

Operational commands require the project AppRole and Vault provider fields in the migration prerequisites. dns_enabled defaults to true after verified adoption. Keep it enabled to retain existing records; disabling it would propose deletion. The zone input remains optional.

The dns.plan, dns.show, and dns.apply targets select only the DNS workflow in this same root and backend. They use dns=1 to load DNS credentials without starting PVE login. Apply requires a reviewed saved plan file. Targeted DNS planning does not establish PVE or other service health.

Follow the DNS migration workflow for continued reconciliation and recovery. The adoption record contains the earlier blocked attempt and completed scoped DNS verification.

Offline formatting is available through //projects/alwaldend.com/tf:tf_tests.fmt_test.

4 - Android launcher

Text-only Android launcher built with Kotlin and Jetpack Compose

A text-only Android launcher built with Kotlin and Jetpack Compose. It lets you hide apps and runs without ads, tracking, or internet access.

  • Android app
  • Kotlin, Jetpack Compose
  • Only text
  • FOSS, no ads, no internet access, no tracking, minimal dependencies
  • Allows you to hide apps

4.1 - Releases

Releases

4.1.1 - head

Release head

5 - Anki as code

Export and reconcile Anki collections as TOML

Anki as code exports collections as protobuf-backed TOML, plans changes, and reconciles them through Anki’s native API. It accepts modern .colpkg archives containing collection.anki21b and offline collection databases such as collection.anki2. Keep Anki and other writers closed during export, state operations, apply, and build. Plan, config dump, and state dump use stdout; status and errors use stderr.

Configuration paths identify objects, similar to Terraform. Native IDs live in Anki and collection-backed state; note GUIDs remain Anki metadata. New files create new objects; explicit moves retain existing identities and review progress. Apply/build leave all configuration files unchanged. New notes and their note types can be created in the same apply, without generating or writing identities into source.

Collection operations live under col (alias collection): col export, col plan, col apply, col build, and col state. The namespace flag --state-key belongs to this group. Text-only operations use config (alias conf), such as conf dump. Collection source flags remain specific to each operation: --collection for existing collections and --base for builds.

The CLI reference has a short index and one child page per root subcommand, each containing its complete nested help, including the generated Anki API tree. Bazel generates these pages from the Cobra definitions with tools/generate_cli_docs and packages the hierarchy with the documentation; generated Markdown is not checked in. Build it with bazel_agent bazel build //projects/anki_as_code/docs:cli_reference.

The Linux x86_64 application links the Rust server into its executable. Collection operations launch the same executable with server serve and communicate over stdio. The installed CLI needs no companion worker, PATH lookup, or executable extraction. bazel_agent bazel build -c opt //projects/anki_as_code produces an optimized executable with final symbol and debug information stripping. It uses the host Linux runtime libraries, including OpenSSL 3.

server shows the available server operations. server run forwards arguments to the linked Rust CLI, which owns native subcommands and their help. server serve invokes App.ServerServe, which delegates to App.ServerRun with serve prepended. Cobra forwards arguments without interpreting native flags:

anki_as_code server run --help
anki_as_code server serve --help
anki_as_code server serve --transport tcp --listen 127.0.0.1:50051
anki_as_code server serve --transport unix --listen ./anki.sock

Stdio is the default and reserves stdout for gRPC. TCP and Unix listeners use plaintext gRPC and require an explicit address. The child process keeps native failures and shutdown separate from the application workflow.

api <service> <method> constructs its command tree from the compiled Go protobuf descriptors for all 25 pinned Anki schemas. Bazel automatically generates the registration imports into internal/rpc from the pinned descriptor set using the project-local tools/generate_anki_schemas generator; no separate generation step or runtime schema files are needed. Service/method names use kebab-case, omit the Service suffix and retain backend- prefixes. Implicit backend methods are included. Help lists request fields and message types; no proto files or server discovery are needed.

anki_as_code api tags all-tags --collection ./collection.colpkg
anki_as_code api notes get-note --collection ./collection.anki2 \
  --input request.toml --input-format toml --output-format json
anki_as_code api notes get-note --backend unix:///path/to/anki.sock \
  --input request.json

Exactly one of --collection and --backend is required. Offline access starts the same executable with server serve and owns the collection lifetime. --backend accepts a TCP host:port, tcp://host:port, unix:///absolute/path or an absolute Unix socket path. It uses the server’s current collection and closes only the client connection. Explicit open/close/import RPCs require connected access. Unix URI paths can be relative, such as unix://anki.sock. App resolves methods, validates payloads and owns remote client connections directly; collection.Store manages only offline collection scopes.

Input defaults to stdin (--input -); JSON is the default input and output encoding. An empty request body is accepted for empty request messages. --timeout bounds input reading, startup and the request, defaulting to 30 seconds. Responses use stdout after cleanup succeeds; request, publication and cleanup errors use stderr and a nonzero exit status. Native error details are preserved.

Offline archive write-back is enabled by default. --write-back enables it and --no-write-back disables it; the last occurrence wins. Explicit boolean values such as --write-back=false are also accepted. Disabling write-back skips automatic .colpkg publication; native RPCs keep their normal effects. .anki2 mutations always commit directly. Requests are not transactions: earlier committed changes can persist even when a later RPC fails.

Export a full .colpkg from Anki, then close Anki and other collection writers. Use a fresh text directory so stale declarations from earlier exports are not included. Export configs and their native bindings together:

bazel_agent bazel run //projects/anki_as_code -- col export \
  --collection /absolute/path/collection.colpkg --output /absolute/path/text \
  --state-output /absolute/path/state.anki.toml
bazel_agent bazel run //projects/anki_as_code -- col state update \
  --collection /absolute/path/collection.colpkg /absolute/path/state.anki.toml
bazel_agent bazel run //projects/anki_as_code -- config dump \
  --text /absolute/path/text
# Edit the TOML files before planning and applying.
bazel_agent bazel run //projects/anki_as_code -- col plan \
  --collection /absolute/path/collection.colpkg --text /absolute/path/text
bazel_agent bazel run //projects/anki_as_code -- col apply \
  --collection /absolute/path/collection.colpkg --text /absolute/path/text
# Alternatively, build a separate archive instead of applying in place.
bazel_agent bazel run //projects/anki_as_code -- col build \
  --base /absolute/path/collection.colpkg --text /absolute/path/text \
  --output /absolute/path/rebuilt.colpkg

The export leaves collection content and its stored state unchanged; source archives may be repackaged. The optional state file contains version-1 TOML bindings for every exported deck, note and note type, including field/template identities and referenced scheduling preset aliases. It uses the exact generated filenames, including collision suffixes and names retained from the selected state namespace. col state update installs those bindings into the same collection before you edit configs. This preserves existing object identities and review progress when you later apply changes. Use the same --state-key for export, state update, plan, apply and build if selecting a custom namespace.

After editing, inspect col plan, then use col apply to update the supplied collection or col build to write a separate archive. After apply, import the updated archive into Anki; after build, import rebuilt.colpkg. Collection-backed bindings travel with the archive.

Omit --state-output for config-only export. Use col state import for selective manual bindings. Generated state belongs to the collection it was exported from; do not install it into an unrelated collection. State update merges bindings and retains omitted entries; col state replace intentionally removes omitted bindings. For an already managed collection, review exported state before installing it, especially if paths have changed.

--state-output names a TOML file, regardless of its extension. Current-user ~ paths are supported. The file may live outside the text directory or inside it under an unrelated name such as state.anki.toml. Export rejects source aliases, config declaration filenames and directories needed by exported configs. State output is atomically replaced after config export succeeds. Filesystem failures may leave partial configs; a failed config export retains the previous state output. The config tree and state file are not published as one filesystem transaction.

Use absolute paths with bazel run, which can start outside the checkout. Current-user ~ and ~/... paths are supported. --text accepts a collection root file or its directory. config dump defaults to JSON; --format toml is also available. The CLI starts its linked server through its own executable path. No Python is required.

config export [FILE] --output DIRECTORY writes a serialized CollectionConfigSet as the fixed TOML hierarchy. Input defaults to JSON; --format toml accepts a TOML-encoded config set. Omit FILE or use - to read stdin. The conf alias works for both dump and export. These commands operate without opening Anki.

anki_as_code config dump --text ./configs > configs.json
anki_as_code config export configs.json --output ./copy
anki_as_code config dump --text ./configs | anki_as_code config export --output ./copy

The caller supplies complete configs with valid, unique collection-relative paths. Schema decoding happens before writes; collection semantics and path validation remain the caller’s responsibility. Export overwrites declared files and retains unrelated entries. Filesystem failures can leave partial output; callers can export to a temporary directory when they need staged publication. Status goes to stderr and stdout stays empty.

App.ConfigExport(ctx, output, configs) exposes the same writer for Go callers through config.Store.Export, without changing the supplied protobuf object.

State commands accept an existing offline .anki2 database or .colpkg archive through --collection. Commands call App’s typed state workflows. App borrows one prepared connection from collection.Store, which reserves the source and constructs the native worker and collection backends. Collection cleanup finishes before transport cleanup and source reservation release. State stores borrow the connection and own no native lifetime or files.

Databases are opened directly and committed writes persist in place, including when a later operation fails. Packages are restored into a temporary directory and written back during cleanup through Anki’s atomic package API, including media. Publication runs independently of request outcomes and may repackage unchanged content. Normal cleanup removes restored files; publication failures or uncertain native completion follow the backend library’s retention/error contract.

Missing files and non-regular inputs fail before startup. Anki validates package contents during restore. Cleanup uses a bounded context independent of command cancellation, and operation and cleanup errors are preserved. Keep Anki and other writers closed during these operations. Collection export and reconciliation use the same native workflow.

anki_as_code col state dump --collection /path/to/collection.anki2 > state.anki.toml
anki_as_code col state import --collection /path/to/collection.anki2 --text /path/to/configs \
  decks/Default/deck.anki.toml=1 notes/example.note.anki.toml=123
anki_as_code col state update --collection /path/to/collection.anki2 state.anki.toml
anki_as_code col state replace --collection /path/to/collection.anki2 state.anki.toml

Dump returns stored bindings without writes or discovery. An absent namespace returns empty version-1 state. TOML is the default; --format json selects JSON. Update and replace read FILE or stdin when omitted/-. Status and errors use stderr; dump uses stdout.

Import accepts multiple PATH=ID arguments, resolves declared config paths before interpreting native identifiers, checks the requested existing objects and saves once after the complete batch succeeds. IDs remain strings at the CLI/Go API boundary; Anki currently requires positive int64 IDs. Note-type imports include native field/template bindings. Existing scheduling presets use presets/<alias> addresses. Import does not edit config files or native objects.

Update merges external version-1 state: omitted map keys remain, supplied keys replace their complete entry, including note-type member maps. Replace installs the whole object and removes omitted bindings. It can repair invalid saved state; invalid replacement input and native read failures still fail before writing. Validation rejects conflicting path/native ownership before writes. Empty updates and identical operations perform no state write. Native notes, cards, scheduling, history, presets and media remain owned by Anki.

Missing or unknown state subcommands fail with nonzero status and stderr output. Explicit col state --help succeeds.

--state-key KEY selects a namespace; the default is anki_as_code/state/v1. Only that key is written. Callers coordinate concurrent writes to the same key. State uses separate typed maps under State.Resources:

version = "1"
[resources.decks."decks/Default/deck.anki.toml"]
id = "1"
[resources.notes."notes/example.note.anki.toml"]
id = "123"
[resources.note_types."note_types/Basic.notetype.anki.toml"]
id = "456"
[resources.note_types."note_types/Basic.notetype.anki.toml".fields.Front]
id = "789"
[resources.presets.Default]
id = "1"

api/ankiascodeapi provides ankiascodeapi.App, the shared interface for configuration, collection, state and server workflows. pkg/ankiascode provides the concrete ankiascode.App. Its zero value supports configuration operations and borrowed connections. Path sources require explicit worker configuration; hosting the server requires an injected ServerRunner. ankiascode.New(ankiascode.Options{BackendBinary: path, BackendArguments: args}) configures an explicit worker executable and arguments. The CLI supplies its own executable and []string{"server", "serve"}. Operations follow the CLI namespaces: ConfigDump, ConfigExport, ColExport, ColPlan, ColApply, ColBuild, and ColStateDump, ColStateImport, ColStateUpdate, ColStateReplace, ServerRun and ServerServe. Each collection operation accepts an ankiascodeapi.CollectionSource from api/ankiascodeapi: a path described by CollectionPath(path) or an already-open connection described by CollectionConnection(connection). Exactly one alternative must be present. Constructors perform no I/O. ColBuild continues accepting a base archive path because it stages and opens an independent copy.

internal/cli owns the complete Cobra tree, flags, binding syntax, formats and streams. Every operation, including server run and server serve, goes through ankiascodeapi.App. The interface uses shared source types, strings, protobuf messages and standard-library types. Commands wrap collection path flags without opening resources. App owns server delegation and composes collection/configuration workflows; the lower-level packages retain their domain and lifecycle responsibilities. CLI does not host native code or construct App.

cmd/anki_as_code constructs App and passes it to cli.New. It injects the linked ankiserver.Run adapter through Options.ServerRunner and supplies process signal handling. App.ServerRun checks startup cancellation, builds the native argument vector and invokes that adapter. Native serving owns the process until return or termination; its context controls entry only. App does not link Rust/cgo or change process-global signals. Missing runner configuration fails before native hosting. Isolated command tests supply one fake without constructing App or starting Anki. Commands pass namespaces explicitly, and App retains no command configuration.

var application ankiascodeapi.App = ankiascode.New(ankiascode.Options{BackendBinary: serverPath, BackendArguments: []string{"serve"}})
source := ankiascodeapi.CollectionPath(absoluteCollectionPath)
// ConfigDump(ctx, path, format) works without a native backend.
value, err := application.ColStateDump(ctx, source, key)
err = application.ColStateImport(ctx, source, absoluteConfigPath, key, bindings)
err = application.ColStateUpdate(ctx, source, key, external)
err = application.ColStateReplace(ctx, source, key, replacement)

App’s path-based operations return after cleanup. Borrowed connections remain owned by their caller, including after failure or cancellation. Operations read fresh collection data and neither close the borrowed connection nor publish a package. Callers coordinate access and decide when to save and close; direct database writes persist immediately and multiple calls are not a transaction. One App can alternate between several open collections:

first := ankiascodeapi.CollectionConnection(firstConnection)
second := ankiascodeapi.CollectionConnection(secondConnection)
err := application.ColStateUpdate(ctx, first, key, external)
report, err := application.ColPlan(ctx, first, absoluteConfigPath, key)
other, err := application.ColStateDump(ctx, second, key)

The protobuf contract lives in api/ankiascodepb, with Go package ankiascodepb and protobuf namespace anki_as_code. Message names and fields retain the existing config and state formats; Go imports and protobuf fully qualified type names use the renamed API.

ColExport(ctx, source, output, stateOutput, stateKey) accepts an empty stateOutput for config-only export or a TOML file path for snapshot bindings. For a borrowed connection, its owner must keep both outputs distinct from native collection files: a connection source carries no filename for alias checks. Config/state output conflict checks still apply.

internal/collection.Store reserves existing sources and owns enabled archive publication. Construct it with explicit process options before collection access. WithCollection injects a prepared grpc.ClientConnInterface into its callback. Construct the services you need on that connection and reuse local instances for several operations.

collection.New(collection.Options{Backend: ankiclient.BackendSTDOptions{Binary: path, Arguments: args}}) configures the worker. No executable or server arguments are discovered by default; missing configuration fails before opening a collection. Callers supply their server executable and runtime inputs. Each scope constructs a fresh stdin/stdout worker and collection backend. It closes native storage before stopping the worker. Collection publication and close have a ten-minute default budget, configurable with Options.CollectionCloseTimeout; transport cleanup has a separate five-second budget independent of callback cancellation; source reservations outlive cleanup.

store := collection.New(collection.Options{Backend: ankiclient.BackendSTDOptions{Binary: serverPath, Arguments: []string{"serve"}}})
err := store.WithCollection(ctx, collection.CollectionOptions{Path: path, WriteBack: true}, func(connection grpc.ClientConnInterface) (bool, error) {
    resources := resource.New(connection)
    states := state.New(connection, key)
    exporter := export.New(resources, states)
    if err := exporter.Export(ctx, directory, ""); err != nil {
        return false, fmt.Errorf("export configs: %w", err)
    }
    changed, err := states.Replace(ctx, replacement)
    if err != nil {
        return false, fmt.Errorf("replace bindings: %w", err)
    }
    return changed, nil
})

Callbacks finish all work sequentially before returning. Retained connections reject calls after cleanup. Resource/state stores and exporters borrow the connection; each operation reads fresh data. A Store or App must not be copied after use. Duplicate canonical paths and file aliases are rejected within one Store; callers coordinate access across different stores and external writers.

CollectionOptions selects the source path and WriteBack policy. Enabled write-back publishes the source archive during cleanup independently of callback results, errors and cancellation. Application workflows explicitly enable it; API flags select it. Database writes persist immediately, including before later errors; the scope is not a transaction. To export another archive destination, use Anki’s ExportCollectionPackage with the injected connection as the final operation and disable WriteBack when source publication is unwanted. Native export consumes the open collection; backend cleanup handles it.

App.APICall(ctx, ankiascodeapi.APIRequest{...}) exposes the same generic operation without per-method wrappers. Supply a fully qualified gRPC Method, Input bytes and JSON/TOML encodings. Collection accepts the shared path or borrowed-connection source; Backend selects an app-owned connection to a running server. Exactly one is required. WriteBack defaults to false for Go callers; the CLI explicitly selects true. Borrowed native connections retain caller-owned cleanup and publication. Request validation precedes native startup.

State store operations and Anki storageState store operations and Anki storage

internal/state borrows a prepared connection and owns no process, collection lifecycle or files. The selected namespace defaults when the key is empty:

store := state.New(connection, "")
value, err := store.Dump(ctx)
changed, err := store.Import(ctx, configs, map[string]string{
    "notes/example.note.anki.toml": "123",
})
changed, err = store.Update(ctx, external)
changed, err = store.Replace(ctx, replacement)

Dump, Update and Replace exchange *ankiascodepb.State. Import accepts a parsed *ankiascodepb.CollectionConfigSet and path/ID strings. Multiple calls reuse the same prepared connection. The changed flag reports whether state was written. State.Resources groups typed deck, note, note-type and preset maps; note types own field/template maps.

state.Export(configs, snapshot, identities) generates version-1 bindings from projected configs, their path-to-native-ID map and the same native snapshot. State owns construction and validation of resource and member bindings, including scheduling preset aliases. This pure operation performs no backend calls and installs no state. Collection export owns config paths and file output.

For path sources, App delegates native access to collection.Store.WithCollection. The store reserves the source and constructs BackendSTD and BackendCollection, using only the explicitly configured executable and arguments. BackendCollection restores packages into temporary storage or opens databases directly. Callbacks receive the prepared connection and construct their own services. Store closes the collection before stopping the worker, including after callback errors, cancellation and panic unwinding.

BackendCollection owns readiness, native import/open/close and restore cleanup. Its failure contract can retain restore files when native completion is uncertain, reporting their path. The CLI and App add no restore owner or lifecycle state machine.

Store reserves each source before startup and retains that reservation through cleanup. When WriteBack is enabled, BackendCollection publishes its source archive through Anki independently of callback outcomes. Anki writes and atomically replaces that archive. Database operations persist in place. Build separately copies its base to a temporary directory beside the destination, applies to that copy and atomically replaces the destination after success. Failed builds remove staging and leave the destination untouched. Callers own exclusive access to the base and destination. State, export and reconciliation borrow prepared services without owning lifetime.

Export writes configuration TOML without changing the source collection. --state-output optionally writes matching snapshot bindings for onboarding. Existing stored bindings retain note and note-type filenames on re-export. New note types receive unused filenames with numeric suffixes when their names collide with tracked paths, including case-only differences and fallback names. Without bindings, native edits can change content-derived filenames.

Export selects a note’s directory from its first regular card. Card generation or changed destinations can therefore change an exported path, including when Anki chooses a deck for a new root note. When adopting these new paths, declare [[moved]] entries from their stored paths before applying. Export does not rewrite bindings. Applying the same root-note configs again preserves native identity and converges; Anki owns their initial deck selection.

Follow onboarding to bind the whole export before the first reconciliation, or use col state import for selective bindings. New configs without bindings describe new objects. State dump exports stored bindings separately; it does not discover bindings for an untracked config tree:

bazel_agent bazel run //projects/anki_as_code -- col state dump \
  --collection /absolute/path/collection.colpkg > /absolute/path/state.anki.toml

Export writes declared files directly through config.Store.Export and does not reload generated files. Other entries remain untouched, including old configs and state files other than an explicit --state-output destination. The destination must not contain the source collection. Filesystem errors may leave partial output.

Use a fresh destination for a clean snapshot. For directory cleanup or synchronization, export to a temporary directory and use rsync or another external tool; those policies belong to the caller.

To rename or move a resource without replacing it, move its file/directory and add a root [[moved]] pair. Directory moves include descendant notes/decks; type moves include their members. Fields/templates use addresses such as note_types/Basic.notetype.anki.toml#fields/Front. Update readable references in the same edit. Moves require independent, nonoverlapping endpoints, reject occupied destinations, and are idempotent when retained. The old source must no longer be declared. Remove a completed move before reusing its old path.

  • Notes: add/remove tracked notes; edit exact named fields and tags shared by their generated cards. Only tracked notes missing from configs are removed.
  • Regular-deck assignments: move generated cards using note defaults and template/cloze ordinals. Card entries assign decks and do not declare existence. Before deleting a deck containing retained cards, declare a surviving destination for them. An omitted assignment keeps the card and its existing deck.
  • Decks: create, rename/move, remove, and edit normal or filtered configuration. Titles derive from the fixed hierarchy. A deck must be empty in Anki before conversion between normal and filtered kinds. Native APIs must support the requested removal; required native objects cannot silently become untracked.
  • Note types: create, rename, remove, and edit ordered fields, templates, CSS, browser fonts, and upstream presentation settings. Explicit member moves preserve field/template identities. Edit affected named note fields together. Existing notes cannot switch to another native note type through this CLI.

These are excluded from editable desired state:

  • Resident filtered cards: membership, home decks, and temporary scheduling belong to Anki. Their assignments are omitted. Empty the filtered deck before removing referenced resources or changing a resident card’s template structure.
  • Scheduling presets: referenced by readable names; never created, deleted, or edited. The CLI calls no preset-writing API.
  • Existing card scheduling/state and review history: preserved in the database to retain study progress. Anki initializes cards it generates for new notes/templates.
  • Media payloads: preserved through Anki’s native package APIs. Field references are editable; media creation/deletion is outside the workflow.
  • Collection/UI/sync settings and native metadata: owned by Anki and omitted from text. API operations update their normal bookkeeping as needed.
  • Untracked objects: preserved during apply. Import them before edits that would destroy their references, such as deleting a deck with untracked cards, renaming a parent with untracked children, or changing shared field/card structure.

Plan reads an API snapshot, resolves config references and moves, checks owned relationships, and compares requested resources in memory. It performs no native mutations, writes no bindings and creates no database copy. It reports paths, resource changes and known card deck assignments. card_generation_deferred indicates that Anki determines generated-card effects during apply; the planner does not claim exact creation/removal counts for those effects.

Anki performs final template validation, normalization and card generation during apply. Planning can therefore accept a template that apply rejects. Source values that Anki normalizes can remain different from stored values in subsequent plans; accepted values are never written back into TOML.

Database apply updates the supplied collection directly. Anki commits each native operation, so later errors can leave earlier operations committed. Archive apply uses Anki’s atomic package export during cleanup. Earlier committed changes can persist after later request failures; read operations may repackage unchanged content. Build requires a distinct archive output and stages its copy before Apply, publishing the completed archive atomically after success. Keep other writers closed while using a collection; the CLI does not detect concurrent archive replacement.

Collection export writes its declared config files in place. It does not traverse, clean or replace the destination directory. Other entries remain untouched, and filesystem errors may leave partial output. Callers can export to a temporary directory and synchronize it externally when required. Converged database apply leaves source bytes unchanged. Note-type comparison ignores runtime ordinal hints and unmanaged metadata while retaining explicit field/template identity changes. New notes use Anki’s batch creation API. Export neither writes source state nor produces a state file. Failed native reads or projection leave existing output unchanged.

collection.anki.toml
note_types/
  Basic.notetype.anki.toml
notes/
  unattached.note.anki.toml
decks/
  Languages/
    deck.anki.toml
    notes/
      introduction.note.anki.toml
    decks/
      French/
        deck.anki.toml
        notes/
          greeting.note.anki.toml

The root contains version, currently 1. Optional moves describe file, directory, or nested definition address changes for reconciliation:

version = "1"
[[moved]]
from = 'decks/Old'
to = 'decks/Languages'

decks/Languages/decks/French/ declares Languages::French. Every deck directory requires deck.anki.toml. Titles come from the hierarchy and are absent from markers. A normal deck references an existing scheduling preset by readable name:

preset = 'Default'
[normal]
description = 'Language lessons'

Notes reference note types by configuration path and contain exact named fields:

note_type = 'note_types/Basic.notetype.anki.toml'
[fields]
Front = 'Bonjour'
Back = 'Hello'
[[cards]]
ordinal = "0"

An omitted card deck inherits its declaring deck’s marker path. Explicit card and template overrides use paths such as decks/Languages/deck.anki.toml. Note types declare names, upstream configuration, ordered fields and templates. sort_field selects a field by name; template target_deck references a deck path. Array order determines field/template positions.

Paths identify resources. Editable configs contain no top-level Anki IDs or note GUIDs. A note at a new path declares a new resource; identity-preserving moves belong in the root’s moved list. Explicit state operations install bindings inside the collection; export writes configs only. The identity generation command has been removed.

The loader lists immediate files in notes/ and note_types/, descending only through child decks/. Other files and deeper note directories are ignored. Missing resource directories are empty sets. Empty markers are parseable; business logic determines whether they are usable. Symlinks, non-directory resource roots, and missing deck markers fail.

The format is unreleased and stays version 1 while the schema evolves. Only the current schema is supported. Normal/filtered settings and note-type presentation reuse Anki messages. Native-only fields in reused messages are omitted by collection export and rejected by reconciliation; pure dump/export retains supplied protobuf values without semantic checks.

Load, Dump, and Export configuration processesLoad, Dump, and Export configuration processes

These operations work with configuration files and protobuf objects without opening Anki. Load checks syntax, schema, version, and filesystem layout; callers own collection semantics. Dump calls Load and serializes the complete parsed set. Export can write a caller-supplied object directly without loading it first. Read, encoding, and filesystem failures end the operation with an error. Export may leave partial output; it does not validate relationships or clean up files.

Configuration modelConfiguration model

The class diagram shows root and resource configuration messages. References use paths; card and template deck references target normal decks. Each note stores shared field content and tags, while note types define ordered fields, templates, and presentation. The root marker contains the version and explicit moves. Attached notes identify each file’s location in the fixed hierarchy. In Load, each file is decoded as it is read, and deck titles and omitted card deck paths are derived inside the deck loop. Dump selects JSON or TOML encoding for the complete configuration set.

TOML decodes to generic values, then JSON, then protobuf using ProtoJSON. Unknown keys and incompatible values fail. Unquoted TOML dates/times fail rather than silently becoming strings; quote dates used as note text. Output converts ProtoJSON directly to TOML, preserving optional presence and exact text values. 64-bit values use quoted decimal strings, including version = "1".

config.New(root) returns a *config.Store bound to a configuration path without accessing the filesystem. Use a directory for writing; reads also accept a root config file. The store exposes:

  • Load() (*ankiascodepb.CollectionConfigSet, error) parses the hierarchy.
  • Dump(format string) ([]byte, error) loads and encodes JSON or TOML.
  • Export(configs *ankiascodepb.CollectionConfigSet) error writes the root marker and supplied path/config pairs as TOML files beneath its directory.
store := config.New(absoluteDirectory)
configs, err := store.Load()
data, err := store.Dump("json")
err = store.Export(configs)

Stores retain no parsed messages or open files. Each Load reads fresh values; callers own filesystem coordination and the returned messages. config.Version supplies the supported schema version to collection exporters.

Export writes directly, preserves input messages, overwrites declared files, and leaves unrelated/stale files alone. Callers own valid, unique paths, layout, validation, staging, cleanup, and publication. Export does not load or normalize its output; failures may leave partial files. Consumers use the store; the layout package remains an implementation API with restricted Bazel visibility.

config/layout owns the fixed hierarchy, discovery, file I/O, and direct file export. internal/codec converts TOML/JSON through protobuf without filesystem access. Config layout, config dump, state CLI commands, and collection export reuse its format dispatch; TOML/JSON helpers are private. Dependencies flow from config to layout/codec and from layout to codec. State stores have no serialization dependency. Collection relationship validation and native operations remain outside them.

Anki as code runtime architectureAnki as code runtime architecture

The outer box shows the executable’s components: the CLI, App, and the linked Rust server library. The CLI invokes App, which reads and writes text Configs. Run (C ABI) invokes the library through the injected server runner. Path-based workflows launch another instance of anki_as_code as a server subprocess and use gRPC over stdio to communicate with its Server. The Server delegates storage operations to the Anki API. Both server variants access Anki storage, which holds native resources and the application’s persisted state.

The external-server gRPC edge is used by api --backend with an explicit TCP or Unix address. App owns only its client connection. Go callers can also prepare external connections through ankiclient.BackendGRPC and pass them to App through ankiascodeapi.CollectionConnection.

The project keeps one Go module with focused packages. Configs and state are protobuf contracts. Runtime resolution models stay private to internal/plan; packages expose only operations used by their consumers.

Anki CLI package dependenciesAnki CLI package dependencies

Each package’s doc.go describes its responsibilities and boundaries; this diagram shows how the packages compose.

Dotted edges show calls through injected contracts. Solid edges show component dependencies.

Package Responsibility
cmd/anki_as_code App construction, CLI invocation and process signals
internal/cli Cobra commands, application dispatch and streams
internal/collection Source reservations and archive publication
api/ankiascodepb Generated config, plan, and persisted-state contracts
api/ankiascodeapi Shared application interface and collection source contracts
pkg/ankiascode Application workflows and service composition
internal/export Native-to-config projection and direct file output
internal/plan Pure resolution, comparison, ownership and prepared operations
internal/reconcile Execute protobuf plans, bind native IDs and persist state
internal/rebuild Apply to a staged archive copy and publish it atomically
internal/resource Native generated clients and fresh resource snapshots
internal/config Root-bound configuration Store for Load, Dump, and Export
internal/config/layout Fixed hierarchy, discovery, file I/O, and direct export
internal/rpc Compiled upstream descriptor catalog and protobuf RPC execution
internal/codec Filesystem-independent protobuf/TOML/JSON conversion
internal/state Stored-state dump, import, update, and replacement

The command entry point injects App into internal/cli through ankiascodeapi.App, checking compatibility during compilation. Commands use the shared interface without importing the implementation. Shared API types do not depend on native backend ownership. App obtains a prepared connection from the supplied source and constructs its services locally. Path sources use collection.Store; borrowed sources retain caller-owned lifetime. export.New(resources, states) constructs an Exporter using caller-provided resource and state stores. Its Export(ctx, output) method owns native-to-config projection, filenames and direct config output. State operations remain separate. Export has no dependency on reconciliation.

plan.Build(configs, snapshot, stored) constructs prepared protobuf operations without I/O. reconcile.New(resources, states) constructs a Reconciler whose Apply(ctx, compiled) method executes them and returns whether native data or bindings changed. App shares config loading, capture and plan preparation between plan and apply within one collection scope. Planning owns reference resolution, comparison and ownership; execution owns native calls and returned identities.

Config and codec have no Anki runtime dependency. State owns stored path bindings, not lifecycle or serialization. App uses the Go backends in projects/anki_grpc and Anki’s collection/package services; Resource owns generated resource clients and fresh native snapshots. The executor borrows resource/state stores and owns no process or filesystem resources. There is no archive facade or handwritten ZIP/Zstandard handling. Anki owns storage compatibility, normalization, structural migrations, field caches, and card generation. No HTML cache rebuilding or SQLite driver is implemented in Go. The application does not force Check Database after import; normal Anki API updates maintain their caches.

Planning orchestration and pure plan constructionPlanning orchestration and pure plan construction

plan.Build(configs, snapshot, stored) returns an executable protobuf CollectionPlan from caller-supplied configs, a resource snapshot and stored bindings. It performs no I/O and leaves all inputs unchanged. Callers capture fresh inputs under exclusive offline access to the same collection and namespace. Backend lifetime belongs to the caller; planning can run with the backend open or closed.

The plan separates expected_state from proposed_bindings and contains a change report, prepared deck/type/note operations, name releases, tracked deletions and card destinations. New objects have zero native IDs; prepared note-type and template-deck references use configuration paths. Resource comparison produces operations and report entries together. Converged plans have no native operations. Card destinations are included only for known changes or relevant native generation. Planning indexes native protobufs directly and resolves desired configs into the prepared protobufs used for comparison and execution. Returned payloads are independent of supplied inputs; path/ID indexes and ownership checks stay private to internal/plan. Member moves rename fields or templates within one note type; cross-type identity transfers are rejected. Stable native member IDs are authoritative. Without IDs, matching uses original stored names, including before explicit renames; stale ordinals cannot claim another current member. Ambiguous bindings fail before a plan is returned. Untracked resources and resident filtered cards stay unmanaged, including deck targets referenced by untracked templates. All cloze card ordinals share template zero; resident cards block template replacement or removal, while explicit template moves that preserve identity remain allowed.

Anki owns native validation, normalization, structural migrations and card generation. The report compares current card destinations and cards removed with deleted notes; template-driven additions, removals and migrations remain deferred through card_generation_deferred. Prepared operations do not simulate those native effects. The CLI and App’s ColPlan return the report; Go services pass the complete plan to reconcile.New(resources, states).Apply(ctx, compiled).

The executor checks expected stored state before writes, executes prepared operations, resolves new native IDs and persists bindings. It never loads configs, captures a resource snapshot, matches members or recomputes the plan. Native metadata and newly generated cards are read only as needed to execute it. A private applier reads the supplied plan unchanged, clones the proposed bindings, and copies only note-type requests whose native identities or presentation need updating. Reports, expected state and note bodies are not cloned. Callers retain exclusive access and own freshness beyond stored-state checks.

compiled, err := plan.Build(configs, snapshot, stored)
changed, err := reconcile.New(resources, states).Apply(ctx, compiled)

internal/rebuild stages a separate collection archive using an injected apply operation:

builder := rebuild.New(apply)
err := builder.Build(ctx, baseArchive, outputArchive)

The non-nil callback receives a private .colpkg path and must finish all native work and close its session before returning. Builder knows nothing about configs, Anki clients or reconciliation. Callers own home-path expansion and exclusive source/destination access; the destination parent must already exist.

Builder checks the regular source file and rejects source/destination aliases, copies into a private directory beside the destination, then publishes the completed archive with an atomic rename. Apply errors, cancellation observed before publication and publication failures leave the original and existing destination intact. Staging is removed on return, including panic unwinding; cleanup errors are retained. Cancellation preserves both the context error and its custom cause for errors.Is. Atomic publication does not guarantee power-loss durability. The App callback delegates to ColApply.

Run bazel_agent bazel test //projects/anki_as_code/internal/rebuild:rebuild_test. The native E2E changes real Anki state in the staged archive and emits original, changed and unchanged .colpkg files plus a decoded JSON state object.

internal/resource shares generated native clients and complete snapshots on a caller-owned prepared connection:

resources := resource.New(connection)
snapshot, err := resources.Snapshot(ctx)
note, err := resources.Notes.GetNote(ctx, &notes.NoteId{Nid: noteID})

Store exposes the generated deck, note-type, note, card, search, preset and rendering clients without forwarding wrappers. Snapshot returns upstream protobuf objects, including unmanaged resources and resident filtered cards, plus preset names. Decks are ordered by title; note types, notes and cards by native ID. Each call reads fresh values and returns caller-owned results. There is no cache or atomic snapshot guarantee; callers provide exclusive offline access.

The resource store owns no backend lifecycle, state bindings, configs, projection, planning or mutation order. Export and reconciliation retain those policies. No SQL or duplicate storage logic is involved.

Export data flowExport data flow

internal/export borrows resource and state stores for the same prepared collection:

resources := resource.New(connection)
states := state.New(connection, key)
exporter := export.New(resources, states)
err := exporter.Export(ctx, absoluteOutputDirectory, absoluteStateFile)

Stored bindings retain filenames and preset aliases. Export(ctx, directory, stateFile) writes configs and optional bindings from the same snapshot as TOML. An empty state destination selects config-only behavior. Export never installs state; state operations remain separate. The destination must not contain the source collection.

New note filenames use Anki’s HtmlToTextLine result for the configured sort field. Go only sanitizes that text into a bounded Unicode filename. Bound names are reused from state; filename conversion never changes stored note fields.

Export owns config projection and readable filenames and delegates file output to config.Store.Export. It overwrites declared configs in place and leaves other entries untouched, including stale configs and caller-owned state files. Filesystem errors may leave partial output. For cleanup or publication policies, export to a temporary directory and synchronize it externally, for example with rsync. The caller also owns exclusive offline access, backend startup, collection preparation and shutdown.

Export and reconciliation share resource.Store for generated clients and fresh native snapshots; their projection and policy remain separate.

The reusable Go backend and Rust server belong to projects/anki_grpc. The Go package owns the server process and exposes a managed gRPC connection. Callers use Anki’s generated service clients for typed methods. Anki owns collection validation, note updates, card generation, and persistence; this CLI owns TOML and reconciliation.

Direct storage editing has the simplest integration: an application edits SQLite and protobuf itself, taking responsibility for Anki’s data invariants and business logic. The API-based approaches are Python with Anki’s official SDK, Rust with Anki’s Rust API, and another language with a translation layer around the Rust API. The two Rust API approaches require building Anki from source. A translation layer can be a C ABI or a gRPC sidecar; it does not remove that build requirement.

This project uses a translation layer: the Go CLI calls the Rust server in projects/anki_grpc, which forwards operations to Anki’s Rust API. Go owns the server process and its failures.

Anki backend integration approachesAnki backend integration approaches

The maintained Mermaid source is rendered by the :backend_approaches Bazel target and published with the project documentation.

bazel_agent bazel build //projects/anki_as_code
bazel_agent bazel test //projects/anki_as_code/pkg/ankiascode:ankiascode_test \
  //projects/anki_as_code/internal/export:export_test \
  //projects/anki_as_code/internal/config:store_test \
  //projects/anki_as_code/internal/cli:command_test \
  //projects/anki_as_code/cmd/anki_as_code:cli_workflow_test

Synthetic native E2E verifies reviewed-card/history/preset/media retention, filtered cards, field/template migrations, copied notes, config-only export and independent state operations, import/moves, untracked-object safety, read-only configs, convergence, rejected publication, large fields/archives, and Anki’s actual full-package round trip. CLI E2E verifies streams, flags, removed generation, and pure config behavior. Repeatable TOML, JSON, and collection artifacts are emitted through Bazel’s undeclared test outputs. Exact-candidate delivery receipts own validation status.

The independent exporter E2E uses a caller-managed native backend and collection. It checks exact Unicode/multiline fields, presentation, member bindings, stable bound/discovered paths, native filename text conversion, filtered-card exclusion, read-only state namespaces, untouched existing entries, cancellation and partial output after filesystem errors. It emits a complete text tree and a native .colpkg artifact. Run bazel_agent bazel test //projects/anki_as_code/internal/export:export_test.

5.1 - CLI reference

Export and reconcile Anki collections as TOML

Choose a command to see its usage, options, and complete nested help.

  • api — Invoke upstream Anki services using protobuf JSON or TOML
  • col — Inspect and manage Anki collections
  • config — Inspect and manipulate collection configuration files
  • help — Help about any command
  • server — Manage the native Anki server

5.1.1 - api

Invoke upstream Anki services using protobuf JSON or TOML
Invoke upstream Anki services using protobuf JSON or TOML

Usage:
  anki_as_code api [command]

Available Commands:
  ankidroid               anki.ankidroid.AnkidroidService
  backend-anki-hub        anki.ankihub.BackendAnkiHubService
  backend-ankidroid       anki.ankidroid.BackendAnkidroidService
  backend-ankiweb         anki.ankiweb.BackendAnkiwebService
  backend-card-rendering  anki.card_rendering.BackendCardRenderingService
  backend-cards           anki.cards.BackendCardsService
  backend-collection      anki.collection.BackendCollectionService
  backend-config          anki.config.BackendConfigService
  backend-deck-config     anki.deck_config.BackendDeckConfigService
  backend-decks           anki.decks.BackendDecksService
  backend-frontend        anki.frontend.BackendFrontendService
  backend-github          anki.github.BackendGithubService
  backend-i18n            anki.i18n.BackendI18nService
  backend-image-occlusion anki.image_occlusion.BackendImageOcclusionService
  backend-import-export   anki.import_export.BackendImportExportService
  backend-links           anki.links.BackendLinksService
  backend-media           anki.media.BackendMediaService
  backend-notes           anki.notes.BackendNotesService
  backend-notetypes       anki.notetypes.BackendNotetypesService
  backend-scheduler       anki.scheduler.BackendSchedulerService
  backend-search          anki.search.BackendSearchService
  backend-stats           anki.stats.BackendStatsService
  backend-sync            anki.sync.BackendSyncService
  backend-tags            anki.tags.BackendTagsService
  card-rendering          anki.card_rendering.CardRenderingService
  cards                   anki.cards.CardsService
  collection              anki.collection.CollectionService
  config                  anki.config.ConfigService
  deck-config             anki.deck_config.DeckConfigService
  decks                   anki.decks.DecksService
  frontend                anki.frontend.FrontendService
  i18n                    anki.i18n.I18nService
  image-occlusion         anki.image_occlusion.ImageOcclusionService
  import-export           anki.import_export.ImportExportService
  links                   anki.links.LinksService
  media                   anki.media.MediaService
  notes                   anki.notes.NotesService
  notetypes               anki.notetypes.NotetypesService
  scheduler               anki.scheduler.SchedulerService
  search                  anki.search.SearchService
  stats                   anki.stats.StatsService
  tags                    anki.tags.TagsService

Flags:
  -h, --help   help for api

Additional help topics:
  anki_as_code api anki-hub   anki.ankihub.AnkiHubService
  anki_as_code api ankiweb    anki.ankiweb.AnkiwebService
  anki_as_code api github     anki.github.GithubService
  anki_as_code api sync       anki.sync.SyncService

Use "anki_as_code api [command] --help" for more information about a command.
anki.ankihub.AnkiHubService
anki.ankidroid.AnkidroidService

Usage:
  anki_as_code api ankidroid [command]

Available Commands:
  flush-all-queries            /anki.ankidroid.AnkidroidService/FlushAllQueries
  flush-query                  /anki.ankidroid.AnkidroidService/FlushQuery
  get-active-sequence-numbers  /anki.ankidroid.AnkidroidService/GetActiveSequenceNumbers
  get-column-names-from-query  /anki.ankidroid.AnkidroidService/GetColumnNamesFromQuery
  get-next-result-page         /anki.ankidroid.AnkidroidService/GetNextResultPage
  insert-for-id                /anki.ankidroid.AnkidroidService/InsertForId
  run-db-command               /anki.ankidroid.AnkidroidService/RunDbCommand
  run-db-command-for-row-count /anki.ankidroid.AnkidroidService/RunDbCommandForRowCount
  run-db-command-proto         /anki.ankidroid.AnkidroidService/RunDbCommandProto

Flags:
  -h, --help   help for ankidroid

Use "anki_as_code api ankidroid [command] --help" for more information about a command.
/anki.ankidroid.AnkidroidService/FlushAllQueries

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api ankidroid flush-all-queries [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for flush-all-queries
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.AnkidroidService/FlushQuery

Request: anki.generic.Int32
Response: anki.generic.Empty

Request fields:
  val: optional sint32

Usage:
  anki_as_code api ankidroid flush-query [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for flush-query
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.AnkidroidService/GetActiveSequenceNumbers

Request: anki.generic.Empty
Response: anki.ankidroid.GetActiveSequenceNumbersResponse

Usage:
  anki_as_code api ankidroid get-active-sequence-numbers [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-active-sequence-numbers
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.AnkidroidService/GetColumnNamesFromQuery

Request: anki.generic.String
Response: anki.generic.StringList

Request fields:
  val: optional string

Usage:
  anki_as_code api ankidroid get-column-names-from-query [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-column-names-from-query
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.AnkidroidService/GetNextResultPage

Request: anki.ankidroid.GetNextResultPageRequest
Response: anki.ankidroid.DbResponse

Request fields:
  sequence: optional int32
  index: optional int64

Usage:
  anki_as_code api ankidroid get-next-result-page [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-next-result-page
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.AnkidroidService/InsertForId

Request: anki.generic.Json
Response: anki.generic.Int64

Request fields:
  json: optional bytes

Usage:
  anki_as_code api ankidroid insert-for-id [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for insert-for-id
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.AnkidroidService/RunDbCommand

Request: anki.generic.Json
Response: anki.generic.Json

Request fields:
  json: optional bytes

Usage:
  anki_as_code api ankidroid run-db-command [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for run-db-command
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.AnkidroidService/RunDbCommandForRowCount

Request: anki.generic.Json
Response: anki.generic.Int64

Request fields:
  json: optional bytes

Usage:
  anki_as_code api ankidroid run-db-command-for-row-count [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for run-db-command-for-row-count
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.AnkidroidService/RunDbCommandProto

Request: anki.generic.Json
Response: anki.ankidroid.DbResponse

Request fields:
  json: optional bytes

Usage:
  anki_as_code api ankidroid run-db-command-proto [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for run-db-command-proto
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.ankiweb.AnkiwebService
anki.ankihub.BackendAnkiHubService

Usage:
  anki_as_code api backend-anki-hub [command]

Available Commands:
  ankihub-login  /anki.ankihub.BackendAnkiHubService/AnkihubLogin
  ankihub-logout /anki.ankihub.BackendAnkiHubService/AnkihubLogout

Flags:
  -h, --help   help for backend-anki-hub

Use "anki_as_code api backend-anki-hub [command] --help" for more information about a command.
/anki.ankihub.BackendAnkiHubService/AnkihubLogin

Request: anki.ankihub.LoginRequest
Response: anki.ankihub.LoginResponse

Request fields:
  id: optional string
  password: optional string

Usage:
  anki_as_code api backend-anki-hub ankihub-login [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for ankihub-login
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankihub.BackendAnkiHubService/AnkihubLogout

Request: anki.ankihub.LogoutRequest
Response: anki.generic.Empty

Request fields:
  token: optional string

Usage:
  anki_as_code api backend-anki-hub ankihub-logout [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for ankihub-logout
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.ankidroid.BackendAnkidroidService

Usage:
  anki_as_code api backend-ankidroid [command]

Available Commands:
  debug-produce-error          /anki.ankidroid.BackendAnkidroidService/DebugProduceError
  flush-all-queries            /anki.ankidroid.BackendAnkidroidService/FlushAllQueries
  flush-query                  /anki.ankidroid.BackendAnkidroidService/FlushQuery
  get-active-sequence-numbers  /anki.ankidroid.BackendAnkidroidService/GetActiveSequenceNumbers
  get-column-names-from-query  /anki.ankidroid.BackendAnkidroidService/GetColumnNamesFromQuery
  get-next-result-page         /anki.ankidroid.BackendAnkidroidService/GetNextResultPage
  insert-for-id                /anki.ankidroid.BackendAnkidroidService/InsertForId
  local-minutes-west-legacy    /anki.ankidroid.BackendAnkidroidService/LocalMinutesWestLegacy
  run-db-command               /anki.ankidroid.BackendAnkidroidService/RunDbCommand
  run-db-command-for-row-count /anki.ankidroid.BackendAnkidroidService/RunDbCommandForRowCount
  run-db-command-proto         /anki.ankidroid.BackendAnkidroidService/RunDbCommandProto
  sched-timing-today-legacy    /anki.ankidroid.BackendAnkidroidService/SchedTimingTodayLegacy
  set-page-size                /anki.ankidroid.BackendAnkidroidService/SetPageSize

Flags:
  -h, --help   help for backend-ankidroid

Use "anki_as_code api backend-ankidroid [command] --help" for more information about a command.
/anki.ankidroid.BackendAnkidroidService/DebugProduceError

Request: anki.generic.String
Response: anki.generic.Empty

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-ankidroid debug-produce-error [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for debug-produce-error
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.BackendAnkidroidService/FlushAllQueries

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-ankidroid flush-all-queries [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for flush-all-queries
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.BackendAnkidroidService/FlushQuery

Request: anki.generic.Int32
Response: anki.generic.Empty

Request fields:
  val: optional sint32

Usage:
  anki_as_code api backend-ankidroid flush-query [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for flush-query
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.BackendAnkidroidService/GetActiveSequenceNumbers

Request: anki.generic.Empty
Response: anki.ankidroid.GetActiveSequenceNumbersResponse

Usage:
  anki_as_code api backend-ankidroid get-active-sequence-numbers [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-active-sequence-numbers
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.BackendAnkidroidService/GetColumnNamesFromQuery

Request: anki.generic.String
Response: anki.generic.StringList

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-ankidroid get-column-names-from-query [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-column-names-from-query
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.BackendAnkidroidService/GetNextResultPage

Request: anki.ankidroid.GetNextResultPageRequest
Response: anki.ankidroid.DbResponse

Request fields:
  sequence: optional int32
  index: optional int64

Usage:
  anki_as_code api backend-ankidroid get-next-result-page [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-next-result-page
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.BackendAnkidroidService/InsertForId

Request: anki.generic.Json
Response: anki.generic.Int64

Request fields:
  json: optional bytes

Usage:
  anki_as_code api backend-ankidroid insert-for-id [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for insert-for-id
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.BackendAnkidroidService/LocalMinutesWestLegacy

Request: anki.generic.Int64
Response: anki.generic.Int32

Request fields:
  val: optional int64

Usage:
  anki_as_code api backend-ankidroid local-minutes-west-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for local-minutes-west-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.BackendAnkidroidService/RunDbCommand

Request: anki.generic.Json
Response: anki.generic.Json

Request fields:
  json: optional bytes

Usage:
  anki_as_code api backend-ankidroid run-db-command [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for run-db-command
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.BackendAnkidroidService/RunDbCommandForRowCount

Request: anki.generic.Json
Response: anki.generic.Int64

Request fields:
  json: optional bytes

Usage:
  anki_as_code api backend-ankidroid run-db-command-for-row-count [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for run-db-command-for-row-count
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.BackendAnkidroidService/RunDbCommandProto

Request: anki.generic.Json
Response: anki.ankidroid.DbResponse

Request fields:
  json: optional bytes

Usage:
  anki_as_code api backend-ankidroid run-db-command-proto [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for run-db-command-proto
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.BackendAnkidroidService/SchedTimingTodayLegacy

Request: anki.ankidroid.SchedTimingTodayLegacyRequest
Response: anki.scheduler.SchedTimingTodayResponse

Request fields:
  created_secs: optional int64
  created_mins_west: optional sint32
  now_secs: optional int64
  now_mins_west: optional sint32
  rollover_hour: optional sint32

Usage:
  anki_as_code api backend-ankidroid sched-timing-today-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for sched-timing-today-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankidroid.BackendAnkidroidService/SetPageSize

Request: anki.generic.Int64
Response: anki.generic.Empty

Request fields:
  val: optional int64

Usage:
  anki_as_code api backend-ankidroid set-page-size [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-page-size
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.ankiweb.BackendAnkiwebService

Usage:
  anki_as_code api backend-ankiweb [command]

Available Commands:
  check-for-update /anki.ankiweb.BackendAnkiwebService/CheckForUpdate
  get-addon-info   /anki.ankiweb.BackendAnkiwebService/GetAddonInfo

Flags:
  -h, --help   help for backend-ankiweb

Use "anki_as_code api backend-ankiweb [command] --help" for more information about a command.
/anki.ankiweb.BackendAnkiwebService/CheckForUpdate

Request: anki.ankiweb.CheckForUpdateRequest
Response: anki.ankiweb.CheckForUpdateResponse

Request fields:
  version: optional uint32
  buildhash: optional string
  os: optional string
  install_id: optional int64
  last_message_id: optional uint32

Usage:
  anki_as_code api backend-ankiweb check-for-update [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for check-for-update
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.ankiweb.BackendAnkiwebService/GetAddonInfo

Request: anki.ankiweb.GetAddonInfoRequest
Response: anki.ankiweb.GetAddonInfoResponse

Request fields:
  client_version: optional uint32
  addon_ids: repeated uint32

Usage:
  anki_as_code api backend-ankiweb get-addon-info [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-addon-info
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.card_rendering.BackendCardRenderingService

Usage:
  anki_as_code api backend-card-rendering [command]

Available Commands:
  all-tts-voices                 /anki.card_rendering.BackendCardRenderingService/AllTtsVoices
  compare-answer                 /anki.card_rendering.BackendCardRenderingService/CompareAnswer
  decode-iri-paths               /anki.card_rendering.BackendCardRenderingService/DecodeIriPaths
  encode-iri-paths               /anki.card_rendering.BackendCardRenderingService/EncodeIriPaths
  extract-av-tags                /anki.card_rendering.BackendCardRenderingService/ExtractAvTags
  extract-cloze-for-typing       /anki.card_rendering.BackendCardRenderingService/ExtractClozeForTyping
  extract-latex                  /anki.card_rendering.BackendCardRenderingService/ExtractLatex
  get-empty-cards                /anki.card_rendering.BackendCardRenderingService/GetEmptyCards
  html-to-text-line              /anki.card_rendering.BackendCardRenderingService/HtmlToTextLine
  render-existing-card           /anki.card_rendering.BackendCardRenderingService/RenderExistingCard
  render-markdown                /anki.card_rendering.BackendCardRenderingService/RenderMarkdown
  render-uncommitted-card        /anki.card_rendering.BackendCardRenderingService/RenderUncommittedCard
  render-uncommitted-card-legacy /anki.card_rendering.BackendCardRenderingService/RenderUncommittedCardLegacy
  strip-av-tags                  /anki.card_rendering.BackendCardRenderingService/StripAvTags
  strip-html                     /anki.card_rendering.BackendCardRenderingService/StripHtml
  write-tts-stream               /anki.card_rendering.BackendCardRenderingService/WriteTtsStream

Flags:
  -h, --help   help for backend-card-rendering

Use "anki_as_code api backend-card-rendering [command] --help" for more information about a command.
/anki.card_rendering.BackendCardRenderingService/AllTtsVoices

Request: anki.card_rendering.AllTtsVoicesRequest
Response: anki.card_rendering.AllTtsVoicesResponse

Request fields:
  validate: optional bool

Usage:
  anki_as_code api backend-card-rendering all-tts-voices [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for all-tts-voices
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.BackendCardRenderingService/CompareAnswer

Request: anki.card_rendering.CompareAnswerRequest
Response: anki.generic.String

Request fields:
  expected: optional string
  provided: optional string
  combining: optional bool

Usage:
  anki_as_code api backend-card-rendering compare-answer [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for compare-answer
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.BackendCardRenderingService/DecodeIriPaths

Request: anki.generic.String
Response: anki.generic.String

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-card-rendering decode-iri-paths [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for decode-iri-paths
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.BackendCardRenderingService/EncodeIriPaths

Request: anki.generic.String
Response: anki.generic.String

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-card-rendering encode-iri-paths [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for encode-iri-paths
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.BackendCardRenderingService/ExtractAvTags

Request: anki.card_rendering.ExtractAvTagsRequest
Response: anki.card_rendering.ExtractAvTagsResponse

Request fields:
  text: optional string
  question_side: optional bool

Usage:
  anki_as_code api backend-card-rendering extract-av-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for extract-av-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.BackendCardRenderingService/ExtractClozeForTyping

Request: anki.card_rendering.ExtractClozeForTypingRequest
Response: anki.generic.String

Request fields:
  text: optional string
  ordinal: optional uint32

Usage:
  anki_as_code api backend-card-rendering extract-cloze-for-typing [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for extract-cloze-for-typing
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.BackendCardRenderingService/ExtractLatex

Request: anki.card_rendering.ExtractLatexRequest
Response: anki.card_rendering.ExtractLatexResponse

Request fields:
  text: optional string
  svg: optional bool
  expand_clozes: optional bool

Usage:
  anki_as_code api backend-card-rendering extract-latex [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for extract-latex
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.BackendCardRenderingService/GetEmptyCards

Request: anki.generic.Empty
Response: anki.card_rendering.EmptyCardsReport

Usage:
  anki_as_code api backend-card-rendering get-empty-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-empty-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.BackendCardRenderingService/HtmlToTextLine

Request: anki.card_rendering.HtmlToTextLineRequest
Response: anki.generic.String

Request fields:
  text: optional string
  preserve_media_filenames: optional bool

Usage:
  anki_as_code api backend-card-rendering html-to-text-line [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for html-to-text-line
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.BackendCardRenderingService/RenderExistingCard

Request: anki.card_rendering.RenderExistingCardRequest
Response: anki.card_rendering.RenderCardResponse

Request fields:
  card_id: optional int64
  browser: optional bool
  partial_render: optional bool

Usage:
  anki_as_code api backend-card-rendering render-existing-card [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for render-existing-card
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.BackendCardRenderingService/RenderMarkdown

Request: anki.card_rendering.RenderMarkdownRequest
Response: anki.generic.String

Request fields:
  markdown: optional string
  sanitize: optional bool

Usage:
  anki_as_code api backend-card-rendering render-markdown [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for render-markdown
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.BackendCardRenderingService/RenderUncommittedCard

Request: anki.card_rendering.RenderUncommittedCardRequest
Response: anki.card_rendering.RenderCardResponse

Request fields:
  note: optional anki.notes.Note
  card_ord: optional uint32
  template: optional anki.notetypes.Notetype.Template
  fill_empty: optional bool
  partial_render: optional bool

Usage:
  anki_as_code api backend-card-rendering render-uncommitted-card [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for render-uncommitted-card
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.BackendCardRenderingService/RenderUncommittedCardLegacy

Request: anki.card_rendering.RenderUncommittedCardLegacyRequest
Response: anki.card_rendering.RenderCardResponse

Request fields:
  note: optional anki.notes.Note
  card_ord: optional uint32
  template: optional bytes
  fill_empty: optional bool
  partial_render: optional bool

Usage:
  anki_as_code api backend-card-rendering render-uncommitted-card-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for render-uncommitted-card-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.BackendCardRenderingService/StripAvTags

Request: anki.generic.String
Response: anki.generic.String

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-card-rendering strip-av-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for strip-av-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.BackendCardRenderingService/StripHtml

Request: anki.card_rendering.StripHtmlRequest
Response: anki.generic.String

Request fields:
  text: optional string
  mode: optional anki.card_rendering.StripHtmlRequest.Mode

Usage:
  anki_as_code api backend-card-rendering strip-html [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for strip-html
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.BackendCardRenderingService/WriteTtsStream

Request: anki.card_rendering.WriteTtsStreamRequest
Response: anki.generic.Empty

Request fields:
  path: optional string
  voice_id: optional string
  speed: optional float
  text: optional string

Usage:
  anki_as_code api backend-card-rendering write-tts-stream [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for write-tts-stream
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.cards.BackendCardsService

Usage:
  anki_as_code api backend-cards [command]

Available Commands:
  get-card     /anki.cards.BackendCardsService/GetCard
  remove-cards /anki.cards.BackendCardsService/RemoveCards
  set-deck     /anki.cards.BackendCardsService/SetDeck
  set-flag     /anki.cards.BackendCardsService/SetFlag
  update-cards /anki.cards.BackendCardsService/UpdateCards

Flags:
  -h, --help   help for backend-cards

Use "anki_as_code api backend-cards [command] --help" for more information about a command.
/anki.cards.BackendCardsService/GetCard

Request: anki.cards.CardId
Response: anki.cards.Card

Request fields:
  cid: optional int64

Usage:
  anki_as_code api backend-cards get-card [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-card
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.cards.BackendCardsService/RemoveCards

Request: anki.cards.RemoveCardsRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  card_ids: repeated int64

Usage:
  anki_as_code api backend-cards remove-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.cards.BackendCardsService/SetDeck

Request: anki.cards.SetDeckRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  card_ids: repeated int64
  deck_id: optional int64

Usage:
  anki_as_code api backend-cards set-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.cards.BackendCardsService/SetFlag

Request: anki.cards.SetFlagRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  card_ids: repeated int64
  flag: optional uint32

Usage:
  anki_as_code api backend-cards set-flag [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-flag
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.cards.BackendCardsService/UpdateCards

Request: anki.cards.UpdateCardsRequest
Response: anki.collection.OpChanges

Request fields:
  cards: repeated anki.cards.Card
  skip_undo_entry: optional bool

Usage:
  anki_as_code api backend-cards update-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.collection.BackendCollectionService

Usage:
  anki_as_code api backend-collection [command]

Available Commands:
  add-custom-undo-entry     /anki.collection.BackendCollectionService/AddCustomUndoEntry
  await-backup-completion   /anki.collection.BackendCollectionService/AwaitBackupCompletion
  check-database            /anki.collection.BackendCollectionService/CheckDatabase
  close-collection          /anki.collection.BackendCollectionService/CloseCollection
  create-backup             /anki.collection.BackendCollectionService/CreateBackup
  get-custom-colours        /anki.collection.BackendCollectionService/GetCustomColours
  get-undo-status           /anki.collection.BackendCollectionService/GetUndoStatus
  latest-progress           /anki.collection.BackendCollectionService/LatestProgress
  merge-undo-entries        /anki.collection.BackendCollectionService/MergeUndoEntries
  open-collection           /anki.collection.BackendCollectionService/OpenCollection
  redo                      /anki.collection.BackendCollectionService/Redo
  set-load-balancer-enabled /anki.collection.BackendCollectionService/SetLoadBalancerEnabled
  set-wants-abort           /anki.collection.BackendCollectionService/SetWantsAbort
  undo                      /anki.collection.BackendCollectionService/Undo

Flags:
  -h, --help   help for backend-collection

Use "anki_as_code api backend-collection [command] --help" for more information about a command.

anki_as_code api backend-collection add-custom-undo-entry

/anki.collection.BackendCollectionService/AddCustomUndoEntry

Request: anki.generic.String
Response: anki.generic.UInt32

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-collection add-custom-undo-entry [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-custom-undo-entry
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.BackendCollectionService/AwaitBackupCompletion

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-collection await-backup-completion [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for await-backup-completion
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.BackendCollectionService/CheckDatabase

Request: anki.generic.Empty
Response: anki.collection.CheckDatabaseResponse

Usage:
  anki_as_code api backend-collection check-database [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for check-database
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.BackendCollectionService/CloseCollection

Request: anki.collection.CloseCollectionRequest
Response: anki.generic.Empty

Request fields:
  downgrade_to_schema11: optional bool

Usage:
  anki_as_code api backend-collection close-collection [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for close-collection
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.BackendCollectionService/CreateBackup

Request: anki.collection.CreateBackupRequest
Response: anki.generic.Bool

Request fields:
  backup_folder: optional string
  force: optional bool
  wait_for_completion: optional bool

Usage:
  anki_as_code api backend-collection create-backup [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for create-backup
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.BackendCollectionService/GetCustomColours

Request: anki.generic.Empty
Response: anki.collection.GetCustomColoursResponse

Usage:
  anki_as_code api backend-collection get-custom-colours [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-custom-colours
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.BackendCollectionService/GetUndoStatus

Request: anki.generic.Empty
Response: anki.collection.UndoStatus

Usage:
  anki_as_code api backend-collection get-undo-status [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-undo-status
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.BackendCollectionService/LatestProgress

Request: anki.generic.Empty
Response: anki.collection.Progress

Usage:
  anki_as_code api backend-collection latest-progress [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for latest-progress
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.BackendCollectionService/MergeUndoEntries

Request: anki.generic.UInt32
Response: anki.collection.OpChanges

Request fields:
  val: optional uint32

Usage:
  anki_as_code api backend-collection merge-undo-entries [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for merge-undo-entries
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.BackendCollectionService/OpenCollection

Request: anki.collection.OpenCollectionRequest
Response: anki.generic.Empty

Request fields:
  collection_path: optional string
  media_folder_path: optional string
  media_db_path: optional string

Usage:
  anki_as_code api backend-collection open-collection [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for open-collection
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.BackendCollectionService/Redo

Request: anki.generic.Empty
Response: anki.collection.OpChangesAfterUndo

Usage:
  anki_as_code api backend-collection redo [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for redo
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.BackendCollectionService/SetLoadBalancerEnabled

Request: anki.generic.Bool
Response: anki.collection.OpChanges

Request fields:
  val: optional bool

Usage:
  anki_as_code api backend-collection set-load-balancer-enabled [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-load-balancer-enabled
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.BackendCollectionService/SetWantsAbort

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-collection set-wants-abort [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-wants-abort
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.BackendCollectionService/Undo

Request: anki.generic.Empty
Response: anki.collection.OpChangesAfterUndo

Usage:
  anki_as_code api backend-collection undo [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for undo
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.config.BackendConfigService

Usage:
  anki_as_code api backend-config [command]

Available Commands:
  get-all-config          /anki.config.BackendConfigService/GetAllConfig
  get-config-bool         /anki.config.BackendConfigService/GetConfigBool
  get-config-json         /anki.config.BackendConfigService/GetConfigJson
  get-config-string       /anki.config.BackendConfigService/GetConfigString
  get-preferences         /anki.config.BackendConfigService/GetPreferences
  remove-config           /anki.config.BackendConfigService/RemoveConfig
  set-config-bool         /anki.config.BackendConfigService/SetConfigBool
  set-config-json         /anki.config.BackendConfigService/SetConfigJson
  set-config-json-no-undo /anki.config.BackendConfigService/SetConfigJsonNoUndo
  set-config-string       /anki.config.BackendConfigService/SetConfigString
  set-preferences         /anki.config.BackendConfigService/SetPreferences

Flags:
  -h, --help   help for backend-config

Use "anki_as_code api backend-config [command] --help" for more information about a command.
/anki.config.BackendConfigService/GetAllConfig

Request: anki.generic.Empty
Response: anki.generic.Json

Usage:
  anki_as_code api backend-config get-all-config [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-all-config
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.BackendConfigService/GetConfigBool

Request: anki.config.GetConfigBoolRequest
Response: anki.generic.Bool

Request fields:
  key: optional anki.config.ConfigKey.Bool

Usage:
  anki_as_code api backend-config get-config-bool [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-config-bool
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.BackendConfigService/GetConfigJson

Request: anki.generic.String
Response: anki.generic.Json

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-config get-config-json [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-config-json
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.BackendConfigService/GetConfigString

Request: anki.config.GetConfigStringRequest
Response: anki.generic.String

Request fields:
  key: optional anki.config.ConfigKey.String

Usage:
  anki_as_code api backend-config get-config-string [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-config-string
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.BackendConfigService/GetPreferences

Request: anki.generic.Empty
Response: anki.config.Preferences

Usage:
  anki_as_code api backend-config get-preferences [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-preferences
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.BackendConfigService/RemoveConfig

Request: anki.generic.String
Response: anki.collection.OpChanges

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-config remove-config [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-config
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.BackendConfigService/SetConfigBool

Request: anki.config.SetConfigBoolRequest
Response: anki.collection.OpChanges

Request fields:
  key: optional anki.config.ConfigKey.Bool
  value: optional bool
  undoable: optional bool

Usage:
  anki_as_code api backend-config set-config-bool [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-config-bool
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.BackendConfigService/SetConfigJson

Request: anki.config.SetConfigJsonRequest
Response: anki.collection.OpChanges

Request fields:
  key: optional string
  value_json: optional bytes
  undoable: optional bool

Usage:
  anki_as_code api backend-config set-config-json [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-config-json
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.BackendConfigService/SetConfigJsonNoUndo

Request: anki.config.SetConfigJsonRequest
Response: anki.generic.Empty

Request fields:
  key: optional string
  value_json: optional bytes
  undoable: optional bool

Usage:
  anki_as_code api backend-config set-config-json-no-undo [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-config-json-no-undo
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.BackendConfigService/SetConfigString

Request: anki.config.SetConfigStringRequest
Response: anki.collection.OpChanges

Request fields:
  key: optional anki.config.ConfigKey.String
  value: optional string
  undoable: optional bool

Usage:
  anki_as_code api backend-config set-config-string [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-config-string
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.BackendConfigService/SetPreferences

Request: anki.config.Preferences
Response: anki.collection.OpChanges

Request fields:
  scheduling: optional anki.config.Preferences.Scheduling
  reviewing: optional anki.config.Preferences.Reviewing
  editing: optional anki.config.Preferences.Editing
  backups: optional anki.config.Preferences.BackupLimits

Usage:
  anki_as_code api backend-config set-preferences [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-preferences
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.deck_config.BackendDeckConfigService

Usage:
  anki_as_code api backend-deck-config [command]

Available Commands:
  add-or-update-deck-config-legacy /anki.deck_config.BackendDeckConfigService/AddOrUpdateDeckConfigLegacy
  all-deck-config-legacy           /anki.deck_config.BackendDeckConfigService/AllDeckConfigLegacy
  get-deck-config                  /anki.deck_config.BackendDeckConfigService/GetDeckConfig
  get-deck-config-legacy           /anki.deck_config.BackendDeckConfigService/GetDeckConfigLegacy
  get-deck-configs-for-update      /anki.deck_config.BackendDeckConfigService/GetDeckConfigsForUpdate
  get-ignored-before-count         /anki.deck_config.BackendDeckConfigService/GetIgnoredBeforeCount
  get-retention-workload           /anki.deck_config.BackendDeckConfigService/GetRetentionWorkload
  new-deck-config-legacy           /anki.deck_config.BackendDeckConfigService/NewDeckConfigLegacy
  remove-deck-config               /anki.deck_config.BackendDeckConfigService/RemoveDeckConfig
  update-deck-configs              /anki.deck_config.BackendDeckConfigService/UpdateDeckConfigs

Flags:
  -h, --help   help for backend-deck-config

Use "anki_as_code api backend-deck-config [command] --help" for more information about a command.
/anki.deck_config.BackendDeckConfigService/AddOrUpdateDeckConfigLegacy

Request: anki.generic.Json
Response: anki.deck_config.DeckConfigId

Request fields:
  json: optional bytes

Usage:
  anki_as_code api backend-deck-config add-or-update-deck-config-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-or-update-deck-config-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.BackendDeckConfigService/AllDeckConfigLegacy

Request: anki.generic.Empty
Response: anki.generic.Json

Usage:
  anki_as_code api backend-deck-config all-deck-config-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for all-deck-config-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.BackendDeckConfigService/GetDeckConfig

Request: anki.deck_config.DeckConfigId
Response: anki.deck_config.DeckConfig

Request fields:
  dcid: optional int64

Usage:
  anki_as_code api backend-deck-config get-deck-config [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck-config
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.BackendDeckConfigService/GetDeckConfigLegacy

Request: anki.deck_config.DeckConfigId
Response: anki.generic.Json

Request fields:
  dcid: optional int64

Usage:
  anki_as_code api backend-deck-config get-deck-config-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck-config-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.BackendDeckConfigService/GetDeckConfigsForUpdate

Request: anki.decks.DeckId
Response: anki.deck_config.DeckConfigsForUpdate

Request fields:
  did: optional int64

Usage:
  anki_as_code api backend-deck-config get-deck-configs-for-update [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck-configs-for-update
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.BackendDeckConfigService/GetIgnoredBeforeCount

Request: anki.deck_config.GetIgnoredBeforeCountRequest
Response: anki.deck_config.GetIgnoredBeforeCountResponse

Request fields:
  ignore_revlogs_before_date: optional string
  search: optional string

Usage:
  anki_as_code api backend-deck-config get-ignored-before-count [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-ignored-before-count
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.BackendDeckConfigService/GetRetentionWorkload

Request: anki.deck_config.GetRetentionWorkloadRequest
Response: anki.deck_config.GetRetentionWorkloadResponse

Request fields:
  w: repeated float
  search: optional string

Usage:
  anki_as_code api backend-deck-config get-retention-workload [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-retention-workload
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.BackendDeckConfigService/NewDeckConfigLegacy

Request: anki.generic.Empty
Response: anki.generic.Json

Usage:
  anki_as_code api backend-deck-config new-deck-config-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for new-deck-config-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.BackendDeckConfigService/RemoveDeckConfig

Request: anki.deck_config.DeckConfigId
Response: anki.generic.Empty

Request fields:
  dcid: optional int64

Usage:
  anki_as_code api backend-deck-config remove-deck-config [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-deck-config
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.BackendDeckConfigService/UpdateDeckConfigs

Request: anki.deck_config.UpdateDeckConfigsRequest
Response: anki.collection.OpChanges

Request fields:
  target_deck_id: optional int64
  configs: repeated anki.deck_config.DeckConfig
  removed_config_ids: repeated int64
  mode: optional anki.deck_config.UpdateDeckConfigsMode
  card_state_customizer: optional string
  limits: optional anki.deck_config.DeckConfigsForUpdate.CurrentDeck.Limits
  new_cards_ignore_review_limit: optional bool
  fsrs: optional bool
  apply_all_parent_limits: optional bool
  fsrs_reschedule: optional bool
  fsrs_health_check: optional bool

Usage:
  anki_as_code api backend-deck-config update-deck-configs [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-deck-configs
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.decks.BackendDecksService

Usage:
  anki_as_code api backend-decks [command]

Available Commands:
  add-deck                    /anki.decks.BackendDecksService/AddDeck
  add-deck-legacy             /anki.decks.BackendDecksService/AddDeckLegacy
  add-or-update-deck-legacy   /anki.decks.BackendDecksService/AddOrUpdateDeckLegacy
  add-or-update-filtered-deck /anki.decks.BackendDecksService/AddOrUpdateFilteredDeck
  deck-tree                   /anki.decks.BackendDecksService/DeckTree
  deck-tree-legacy            /anki.decks.BackendDecksService/DeckTreeLegacy
  filtered-deck-order-labels  /anki.decks.BackendDecksService/FilteredDeckOrderLabels
  get-all-decks-legacy        /anki.decks.BackendDecksService/GetAllDecksLegacy
  get-current-deck            /anki.decks.BackendDecksService/GetCurrentDeck
  get-deck                    /anki.decks.BackendDecksService/GetDeck
  get-deck-and-child-names    /anki.decks.BackendDecksService/GetDeckAndChildNames
  get-deck-id-by-name         /anki.decks.BackendDecksService/GetDeckIdByName
  get-deck-legacy             /anki.decks.BackendDecksService/GetDeckLegacy
  get-deck-names              /anki.decks.BackendDecksService/GetDeckNames
  get-or-create-filtered-deck /anki.decks.BackendDecksService/GetOrCreateFilteredDeck
  new-deck                    /anki.decks.BackendDecksService/NewDeck
  new-deck-legacy             /anki.decks.BackendDecksService/NewDeckLegacy
  remove-decks                /anki.decks.BackendDecksService/RemoveDecks
  rename-deck                 /anki.decks.BackendDecksService/RenameDeck
  reparent-decks              /anki.decks.BackendDecksService/ReparentDecks
  set-current-deck            /anki.decks.BackendDecksService/SetCurrentDeck
  set-deck-collapsed          /anki.decks.BackendDecksService/SetDeckCollapsed
  update-deck                 /anki.decks.BackendDecksService/UpdateDeck
  update-deck-legacy          /anki.decks.BackendDecksService/UpdateDeckLegacy

Flags:
  -h, --help   help for backend-decks

Use "anki_as_code api backend-decks [command] --help" for more information about a command.
/anki.decks.BackendDecksService/AddDeck

Request: anki.decks.Deck
Response: anki.collection.OpChangesWithId

Request fields:
  id: optional int64
  name: optional string
  mtime_secs: optional int64
  usn: optional int32
  common: optional anki.decks.Deck.Common
  normal: optional anki.decks.Deck.Normal
  filtered: optional anki.decks.Deck.Filtered

Usage:
  anki_as_code api backend-decks add-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/AddDeckLegacy

Request: anki.generic.Json
Response: anki.collection.OpChangesWithId

Request fields:
  json: optional bytes

Usage:
  anki_as_code api backend-decks add-deck-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-deck-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/AddOrUpdateDeckLegacy

Request: anki.decks.AddOrUpdateDeckLegacyRequest
Response: anki.decks.DeckId

Request fields:
  deck: optional bytes
  preserve_usn_and_mtime: optional bool

Usage:
  anki_as_code api backend-decks add-or-update-deck-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-or-update-deck-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/AddOrUpdateFilteredDeck

Request: anki.decks.FilteredDeckForUpdate
Response: anki.collection.OpChangesWithId

Request fields:
  id: optional int64
  name: optional string
  config: optional anki.decks.Deck.Filtered
  allow_empty: optional bool

Usage:
  anki_as_code api backend-decks add-or-update-filtered-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-or-update-filtered-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/DeckTree

Request: anki.decks.DeckTreeRequest
Response: anki.decks.DeckTreeNode

Request fields:
  now: optional int64

Usage:
  anki_as_code api backend-decks deck-tree [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for deck-tree
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/DeckTreeLegacy

Request: anki.generic.Empty
Response: anki.generic.Json

Usage:
  anki_as_code api backend-decks deck-tree-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for deck-tree-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/FilteredDeckOrderLabels

Request: anki.generic.Empty
Response: anki.generic.StringList

Usage:
  anki_as_code api backend-decks filtered-deck-order-labels [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for filtered-deck-order-labels
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/GetAllDecksLegacy

Request: anki.generic.Empty
Response: anki.generic.Json

Usage:
  anki_as_code api backend-decks get-all-decks-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-all-decks-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/GetCurrentDeck

Request: anki.generic.Empty
Response: anki.decks.Deck

Usage:
  anki_as_code api backend-decks get-current-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-current-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/GetDeck

Request: anki.decks.DeckId
Response: anki.decks.Deck

Request fields:
  did: optional int64

Usage:
  anki_as_code api backend-decks get-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/GetDeckAndChildNames

Request: anki.decks.DeckId
Response: anki.decks.DeckNames

Request fields:
  did: optional int64

Usage:
  anki_as_code api backend-decks get-deck-and-child-names [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck-and-child-names
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/GetDeckIdByName

Request: anki.generic.String
Response: anki.decks.DeckId

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-decks get-deck-id-by-name [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck-id-by-name
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/GetDeckLegacy

Request: anki.decks.DeckId
Response: anki.generic.Json

Request fields:
  did: optional int64

Usage:
  anki_as_code api backend-decks get-deck-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/GetDeckNames

Request: anki.decks.GetDeckNamesRequest
Response: anki.decks.DeckNames

Request fields:
  skip_empty_default: optional bool
  include_filtered: optional bool

Usage:
  anki_as_code api backend-decks get-deck-names [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck-names
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/GetOrCreateFilteredDeck

Request: anki.decks.DeckId
Response: anki.decks.FilteredDeckForUpdate

Request fields:
  did: optional int64

Usage:
  anki_as_code api backend-decks get-or-create-filtered-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-or-create-filtered-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/NewDeck

Request: anki.generic.Empty
Response: anki.decks.Deck

Usage:
  anki_as_code api backend-decks new-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for new-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/NewDeckLegacy

Request: anki.generic.Bool
Response: anki.generic.Json

Request fields:
  val: optional bool

Usage:
  anki_as_code api backend-decks new-deck-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for new-deck-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/RemoveDecks

Request: anki.decks.DeckIds
Response: anki.collection.OpChangesWithCount

Request fields:
  dids: repeated int64

Usage:
  anki_as_code api backend-decks remove-decks [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-decks
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/RenameDeck

Request: anki.decks.RenameDeckRequest
Response: anki.collection.OpChanges

Request fields:
  deck_id: optional int64
  new_name: optional string

Usage:
  anki_as_code api backend-decks rename-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for rename-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/ReparentDecks

Request: anki.decks.ReparentDecksRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  deck_ids: repeated int64
  new_parent: optional int64

Usage:
  anki_as_code api backend-decks reparent-decks [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for reparent-decks
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/SetCurrentDeck

Request: anki.decks.DeckId
Response: anki.collection.OpChanges

Request fields:
  did: optional int64

Usage:
  anki_as_code api backend-decks set-current-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-current-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/SetDeckCollapsed

Request: anki.decks.SetDeckCollapsedRequest
Response: anki.collection.OpChanges

Request fields:
  deck_id: optional int64
  collapsed: optional bool
  scope: optional anki.decks.SetDeckCollapsedRequest.Scope

Usage:
  anki_as_code api backend-decks set-deck-collapsed [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-deck-collapsed
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/UpdateDeck

Request: anki.decks.Deck
Response: anki.collection.OpChanges

Request fields:
  id: optional int64
  name: optional string
  mtime_secs: optional int64
  usn: optional int32
  common: optional anki.decks.Deck.Common
  normal: optional anki.decks.Deck.Normal
  filtered: optional anki.decks.Deck.Filtered

Usage:
  anki_as_code api backend-decks update-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.BackendDecksService/UpdateDeckLegacy

Request: anki.generic.Json
Response: anki.collection.OpChanges

Request fields:
  json: optional bytes

Usage:
  anki_as_code api backend-decks update-deck-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-deck-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.frontend.BackendFrontendService

Usage:
  anki_as_code api backend-frontend [command]

Available Commands:
  ask-user                           /anki.frontend.BackendFrontendService/AskUser
  close-add-cards                    /anki.frontend.BackendFrontendService/CloseAddCards
  close-edit-current                 /anki.frontend.BackendFrontendService/CloseEditCurrent
  convert-pasted-image               /anki.frontend.BackendFrontendService/ConvertPastedImage
  deck-options-ready                 /anki.frontend.BackendFrontendService/deckOptionsReady
  deck-options-require-close         /anki.frontend.BackendFrontendService/deckOptionsRequireClose
  get-meta-json                      /anki.frontend.BackendFrontendService/GetMetaJson
  get-profile-config-json            /anki.frontend.BackendFrontendService/GetProfileConfigJson
  get-scheduling-states-with-context /anki.frontend.BackendFrontendService/GetSchedulingStatesWithContext
  import-dialog-require-close        /anki.frontend.BackendFrontendService/ImportDialogRequireClose
  import-done                        /anki.frontend.BackendFrontendService/ImportDone
  open-cards-dialog                  /anki.frontend.BackendFrontendService/OpenCardsDialog
  open-fields-dialog                 /anki.frontend.BackendFrontendService/OpenFieldsDialog
  open-file-picker                   /anki.frontend.BackendFrontendService/OpenFilePicker
  open-link                          /anki.frontend.BackendFrontendService/OpenLink
  open-media                         /anki.frontend.BackendFrontendService/OpenMedia
  play-file                          /anki.frontend.BackendFrontendService/PlayFile
  read-clipboard                     /anki.frontend.BackendFrontendService/ReadClipboard
  record-audio                       /anki.frontend.BackendFrontendService/RecordAudio
  save-custom-colours                /anki.frontend.BackendFrontendService/SaveCustomColours
  search-in-browser                  /anki.frontend.BackendFrontendService/SearchInBrowser
  set-meta-json                      /anki.frontend.BackendFrontendService/SetMetaJson
  set-profile-config-json            /anki.frontend.BackendFrontendService/SetProfileConfigJson
  set-scheduling-states              /anki.frontend.BackendFrontendService/SetSchedulingStates
  show-in-media-folder               /anki.frontend.BackendFrontendService/ShowInMediaFolder
  show-message-box                   /anki.frontend.BackendFrontendService/ShowMessageBox
  write-clipboard                    /anki.frontend.BackendFrontendService/WriteClipboard

Flags:
  -h, --help   help for backend-frontend

Use "anki_as_code api backend-frontend [command] --help" for more information about a command.
/anki.frontend.BackendFrontendService/AskUser

Request: anki.frontend.AskUserRequest
Response: anki.generic.Bool

Request fields:
  text: optional string
  help: optional anki.frontend.Help
  title: optional string
  default_no: optional bool

Usage:
  anki_as_code api backend-frontend ask-user [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for ask-user
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/CloseAddCards

Request: anki.generic.Bool
Response: anki.generic.Empty

Request fields:
  val: optional bool

Usage:
  anki_as_code api backend-frontend close-add-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for close-add-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/CloseEditCurrent

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-frontend close-edit-current [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for close-edit-current
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/ConvertPastedImage

Request: anki.frontend.ConvertPastedImageRequest
Response: anki.frontend.ConvertPastedImageResponse

Request fields:
  data: optional bytes
  ext: optional string

Usage:
  anki_as_code api backend-frontend convert-pasted-image [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for convert-pasted-image
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/deckOptionsReady

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-frontend deck-options-ready [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for deck-options-ready
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/deckOptionsRequireClose

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-frontend deck-options-require-close [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for deck-options-require-close
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/GetMetaJson

Request: anki.generic.String
Response: anki.generic.Json

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-frontend get-meta-json [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-meta-json
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/GetProfileConfigJson

Request: anki.generic.String
Response: anki.generic.Json

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-frontend get-profile-config-json [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-profile-config-json
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/GetSchedulingStatesWithContext

Request: anki.generic.Empty
Response: anki.frontend.SchedulingStatesWithContext

Usage:
  anki_as_code api backend-frontend get-scheduling-states-with-context [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-scheduling-states-with-context
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/ImportDialogRequireClose

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-frontend import-dialog-require-close [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for import-dialog-require-close
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/ImportDone

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-frontend import-done [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for import-done
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/OpenCardsDialog

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-frontend open-cards-dialog [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for open-cards-dialog
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/OpenFieldsDialog

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-frontend open-fields-dialog [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for open-fields-dialog
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/OpenFilePicker

Request: anki.frontend.openFilePickerRequest
Response: anki.generic.String

Request fields:
  title: optional string
  key: optional string
  filter_description: optional string
  extensions: repeated string

Usage:
  anki_as_code api backend-frontend open-file-picker [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for open-file-picker
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/OpenLink

Request: anki.generic.String
Response: anki.generic.Empty

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-frontend open-link [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for open-link
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/OpenMedia

Request: anki.generic.String
Response: anki.generic.Empty

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-frontend open-media [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for open-media
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/PlayFile

Request: anki.generic.String
Response: anki.generic.Empty

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-frontend play-file [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for play-file
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/ReadClipboard

Request: anki.frontend.ReadClipboardRequest
Response: anki.frontend.ReadClipboardResponse

Request fields:
  types: repeated string

Usage:
  anki_as_code api backend-frontend read-clipboard [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for read-clipboard
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/RecordAudio

Request: anki.generic.Empty
Response: anki.generic.String

Usage:
  anki_as_code api backend-frontend record-audio [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for record-audio
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/SaveCustomColours

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-frontend save-custom-colours [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for save-custom-colours
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/SearchInBrowser

Request: anki.search.SearchNode
Response: anki.generic.Empty

Request fields:
  group: optional anki.search.SearchNode.Group
  negated: optional anki.search.SearchNode
  parsable_text: optional string
  template: optional uint32
  nid: optional int64
  dupe: optional anki.search.SearchNode.Dupe
  field_name: optional string
  rated: optional anki.search.SearchNode.Rated
  added_in_days: optional uint32
  due_in_days: optional int32
  flag: optional anki.search.SearchNode.Flag
  card_state: optional anki.search.SearchNode.CardState
  nids: optional anki.search.SearchNode.IdList
  edited_in_days: optional uint32
  deck: optional string
  due_on_day: optional int32
  tag: optional string
  note: optional string
  introduced_in_days: optional uint32
  field: optional anki.search.SearchNode.Field
  literal_text: optional string

Usage:
  anki_as_code api backend-frontend search-in-browser [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for search-in-browser
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/SetMetaJson

Request: anki.frontend.SetSettingJsonRequest
Response: anki.generic.Empty

Request fields:
  key: optional string
  value_json: optional bytes

Usage:
  anki_as_code api backend-frontend set-meta-json [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-meta-json
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/SetProfileConfigJson

Request: anki.frontend.SetSettingJsonRequest
Response: anki.generic.Empty

Request fields:
  key: optional string
  value_json: optional bytes

Usage:
  anki_as_code api backend-frontend set-profile-config-json [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-profile-config-json
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/SetSchedulingStates

Request: anki.frontend.SetSchedulingStatesRequest
Response: anki.generic.Empty

Request fields:
  key: optional string
  states: optional anki.scheduler.SchedulingStates

Usage:
  anki_as_code api backend-frontend set-scheduling-states [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-scheduling-states
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/ShowInMediaFolder

Request: anki.generic.String
Response: anki.generic.Empty

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-frontend show-in-media-folder [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for show-in-media-folder
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/ShowMessageBox

Request: anki.frontend.ShowMessageBoxRequest
Response: anki.generic.Empty

Request fields:
  text: optional string
  type: optional anki.frontend.MessageBoxType
  help: optional anki.frontend.Help
  title: optional string
  text_format: optional string

Usage:
  anki_as_code api backend-frontend show-message-box [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for show-message-box
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.BackendFrontendService/WriteClipboard

Request: anki.frontend.WriteClipboardRequest
Response: anki.generic.Empty

Request fields:
  data: repeated anki.frontend.WriteClipboardRequest.DataEntry

Usage:
  anki_as_code api backend-frontend write-clipboard [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for write-clipboard
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.github.BackendGithubService

Usage:
  anki_as_code api backend-github [command]

Available Commands:
  download-release   /anki.github.BackendGithubService/DownloadRelease
  get-latest-release /anki.github.BackendGithubService/GetLatestRelease

Flags:
  -h, --help   help for backend-github

Use "anki_as_code api backend-github [command] --help" for more information about a command.
/anki.github.BackendGithubService/DownloadRelease

Request: anki.github.GithubRelease
Response: anki.generic.String

Request fields:
  tag_name: optional string
  filename: optional string
  url: optional string
  checksum: optional string

Usage:
  anki_as_code api backend-github download-release [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for download-release
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.github.BackendGithubService/GetLatestRelease

Request: anki.github.LatestReleaseRequest
Response: anki.github.GithubRelease

Request fields:
  include_prerelease: optional bool

Usage:
  anki_as_code api backend-github get-latest-release [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-latest-release
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.i18n.BackendI18nService

Usage:
  anki_as_code api backend-i18n [command]

Available Commands:
  format-timespan  /anki.i18n.BackendI18nService/FormatTimespan
  i18n-resources   /anki.i18n.BackendI18nService/I18nResources
  translate-string /anki.i18n.BackendI18nService/TranslateString

Flags:
  -h, --help   help for backend-i18n

Use "anki_as_code api backend-i18n [command] --help" for more information about a command.
/anki.i18n.BackendI18nService/FormatTimespan

Request: anki.i18n.FormatTimespanRequest
Response: anki.generic.String

Request fields:
  seconds: optional float
  context: optional anki.i18n.FormatTimespanRequest.Context

Usage:
  anki_as_code api backend-i18n format-timespan [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for format-timespan
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.i18n.BackendI18nService/I18nResources

Request: anki.i18n.I18nResourcesRequest
Response: anki.generic.Json

Request fields:
  modules: repeated string

Usage:
  anki_as_code api backend-i18n i18n-resources [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for i18n-resources
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.i18n.BackendI18nService/TranslateString

Request: anki.i18n.TranslateStringRequest
Response: anki.generic.String

Request fields:
  module_index: optional uint32
  message_index: optional uint32
  args: repeated anki.i18n.TranslateStringRequest.ArgsEntry

Usage:
  anki_as_code api backend-i18n translate-string [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for translate-string
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.image_occlusion.BackendImageOcclusionService

Usage:
  anki_as_code api backend-image-occlusion [command]

Available Commands:
  add-image-occlusion-note     /anki.image_occlusion.BackendImageOcclusionService/AddImageOcclusionNote
  add-image-occlusion-notetype /anki.image_occlusion.BackendImageOcclusionService/AddImageOcclusionNotetype
  get-image-for-occlusion      /anki.image_occlusion.BackendImageOcclusionService/GetImageForOcclusion
  get-image-occlusion-fields   /anki.image_occlusion.BackendImageOcclusionService/GetImageOcclusionFields
  get-image-occlusion-note     /anki.image_occlusion.BackendImageOcclusionService/GetImageOcclusionNote
  update-image-occlusion-note  /anki.image_occlusion.BackendImageOcclusionService/UpdateImageOcclusionNote

Flags:
  -h, --help   help for backend-image-occlusion

Use "anki_as_code api backend-image-occlusion [command] --help" for more information about a command.
/anki.image_occlusion.BackendImageOcclusionService/AddImageOcclusionNote

Request: anki.image_occlusion.AddImageOcclusionNoteRequest
Response: anki.collection.OpChanges

Request fields:
  image_path: optional string
  occlusions: optional string
  header: optional string
  back_extra: optional string
  tags: repeated string
  notetype_id: optional int64

Usage:
  anki_as_code api backend-image-occlusion add-image-occlusion-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-image-occlusion-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.image_occlusion.BackendImageOcclusionService/AddImageOcclusionNotetype

Request: anki.generic.Empty
Response: anki.collection.OpChanges

Usage:
  anki_as_code api backend-image-occlusion add-image-occlusion-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-image-occlusion-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.image_occlusion.BackendImageOcclusionService/GetImageForOcclusion

Request: anki.image_occlusion.GetImageForOcclusionRequest
Response: anki.image_occlusion.GetImageForOcclusionResponse

Request fields:
  path: optional string

Usage:
  anki_as_code api backend-image-occlusion get-image-for-occlusion [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-image-for-occlusion
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.image_occlusion.BackendImageOcclusionService/GetImageOcclusionFields

Request: anki.image_occlusion.GetImageOcclusionFieldsRequest
Response: anki.image_occlusion.GetImageOcclusionFieldsResponse

Request fields:
  notetype_id: optional int64

Usage:
  anki_as_code api backend-image-occlusion get-image-occlusion-fields [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-image-occlusion-fields
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.image_occlusion.BackendImageOcclusionService/GetImageOcclusionNote

Request: anki.image_occlusion.GetImageOcclusionNoteRequest
Response: anki.image_occlusion.GetImageOcclusionNoteResponse

Request fields:
  note_id: optional int64

Usage:
  anki_as_code api backend-image-occlusion get-image-occlusion-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-image-occlusion-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.image_occlusion.BackendImageOcclusionService/UpdateImageOcclusionNote

Request: anki.image_occlusion.UpdateImageOcclusionNoteRequest
Response: anki.collection.OpChanges

Request fields:
  note_id: optional int64
  occlusions: optional string
  header: optional string
  back_extra: optional string
  tags: repeated string

Usage:
  anki_as_code api backend-image-occlusion update-image-occlusion-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-image-occlusion-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.import_export.BackendImportExportService

Usage:
  anki_as_code api backend-import-export [command]

Available Commands:
  export-anki-package             /anki.import_export.BackendImportExportService/ExportAnkiPackage
  export-card-csv                 /anki.import_export.BackendImportExportService/ExportCardCsv
  export-collection-package       /anki.import_export.BackendImportExportService/ExportCollectionPackage
  export-note-csv                 /anki.import_export.BackendImportExportService/ExportNoteCsv
  get-csv-metadata                /anki.import_export.BackendImportExportService/GetCsvMetadata
  get-import-anki-package-presets /anki.import_export.BackendImportExportService/GetImportAnkiPackagePresets
  import-anki-package             /anki.import_export.BackendImportExportService/ImportAnkiPackage
  import-collection-package       /anki.import_export.BackendImportExportService/ImportCollectionPackage
  import-csv                      /anki.import_export.BackendImportExportService/ImportCsv
  import-json-file                /anki.import_export.BackendImportExportService/ImportJsonFile
  import-json-string              /anki.import_export.BackendImportExportService/ImportJsonString

Flags:
  -h, --help   help for backend-import-export

Use "anki_as_code api backend-import-export [command] --help" for more information about a command.
/anki.import_export.BackendImportExportService/ExportAnkiPackage

Request: anki.import_export.ExportAnkiPackageRequest
Response: anki.generic.UInt32

Request fields:
  out_path: optional string
  options: optional anki.import_export.ExportAnkiPackageOptions
  limit: optional anki.import_export.ExportLimit

Usage:
  anki_as_code api backend-import-export export-anki-package [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for export-anki-package
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.BackendImportExportService/ExportCardCsv

Request: anki.import_export.ExportCardCsvRequest
Response: anki.generic.UInt32

Request fields:
  out_path: optional string
  with_html: optional bool
  limit: optional anki.import_export.ExportLimit

Usage:
  anki_as_code api backend-import-export export-card-csv [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for export-card-csv
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.BackendImportExportService/ExportCollectionPackage

Request: anki.import_export.ExportCollectionPackageRequest
Response: anki.generic.Empty

Request fields:
  out_path: optional string
  include_media: optional bool
  legacy: optional bool

Usage:
  anki_as_code api backend-import-export export-collection-package [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for export-collection-package
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.BackendImportExportService/ExportNoteCsv

Request: anki.import_export.ExportNoteCsvRequest
Response: anki.generic.UInt32

Request fields:
  out_path: optional string
  with_html: optional bool
  with_tags: optional bool
  with_deck: optional bool
  with_notetype: optional bool
  with_guid: optional bool
  limit: optional anki.import_export.ExportLimit

Usage:
  anki_as_code api backend-import-export export-note-csv [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for export-note-csv
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.BackendImportExportService/GetCsvMetadata

Request: anki.import_export.CsvMetadataRequest
Response: anki.import_export.CsvMetadata

Request fields:
  path: optional string
  delimiter: optional anki.import_export.CsvMetadata.Delimiter
  notetype_id: optional int64
  deck_id: optional int64
  is_html: optional bool

Usage:
  anki_as_code api backend-import-export get-csv-metadata [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-csv-metadata
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.BackendImportExportService/GetImportAnkiPackagePresets

Request: anki.generic.Empty
Response: anki.import_export.ImportAnkiPackageOptions

Usage:
  anki_as_code api backend-import-export get-import-anki-package-presets [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-import-anki-package-presets
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.BackendImportExportService/ImportAnkiPackage

Request: anki.import_export.ImportAnkiPackageRequest
Response: anki.import_export.ImportResponse

Request fields:
  package_path: optional string
  options: optional anki.import_export.ImportAnkiPackageOptions

Usage:
  anki_as_code api backend-import-export import-anki-package [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for import-anki-package
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.BackendImportExportService/ImportCollectionPackage

Request: anki.import_export.ImportCollectionPackageRequest
Response: anki.generic.Empty

Request fields:
  col_path: optional string
  backup_path: optional string
  media_folder: optional string
  media_db: optional string

Usage:
  anki_as_code api backend-import-export import-collection-package [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for import-collection-package
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.BackendImportExportService/ImportCsv

Request: anki.import_export.ImportCsvRequest
Response: anki.import_export.ImportResponse

Request fields:
  path: optional string
  metadata: optional anki.import_export.CsvMetadata

Usage:
  anki_as_code api backend-import-export import-csv [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for import-csv
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.BackendImportExportService/ImportJsonFile

Request: anki.generic.String
Response: anki.import_export.ImportResponse

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-import-export import-json-file [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for import-json-file
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.BackendImportExportService/ImportJsonString

Request: anki.generic.String
Response: anki.import_export.ImportResponse

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-import-export import-json-string [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for import-json-string
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.links.BackendLinksService

Usage:
  anki_as_code api backend-links [command]

Available Commands:
  help-page-link /anki.links.BackendLinksService/HelpPageLink

Flags:
  -h, --help   help for backend-links

Use "anki_as_code api backend-links [command] --help" for more information about a command.
/anki.links.BackendLinksService/HelpPageLink

Request: anki.links.HelpPageLinkRequest
Response: anki.generic.String

Request fields:
  page: optional anki.links.HelpPageLinkRequest.HelpPage

Usage:
  anki_as_code api backend-links help-page-link [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for help-page-link
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.media.BackendMediaService

Usage:
  anki_as_code api backend-media [command]

Available Commands:
  add-media-file             /anki.media.BackendMediaService/AddMediaFile
  add-media-from-path        /anki.media.BackendMediaService/AddMediaFromPath
  add-media-from-url         /anki.media.BackendMediaService/AddMediaFromUrl
  check-media                /anki.media.BackendMediaService/CheckMedia
  empty-trash                /anki.media.BackendMediaService/EmptyTrash
  extract-media-files        /anki.media.BackendMediaService/ExtractMediaFiles
  extract-static-media-files /anki.media.BackendMediaService/ExtractStaticMediaFiles
  get-absolute-media-path    /anki.media.BackendMediaService/GetAbsoluteMediaPath
  restore-trash              /anki.media.BackendMediaService/RestoreTrash
  trash-media-files          /anki.media.BackendMediaService/TrashMediaFiles

Flags:
  -h, --help   help for backend-media

Use "anki_as_code api backend-media [command] --help" for more information about a command.
/anki.media.BackendMediaService/AddMediaFile

Request: anki.media.AddMediaFileRequest
Response: anki.generic.String

Request fields:
  desired_name: optional string
  data: optional bytes

Usage:
  anki_as_code api backend-media add-media-file [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-media-file
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.BackendMediaService/AddMediaFromPath

Request: anki.media.AddMediaFromPathRequest
Response: anki.generic.String

Request fields:
  path: optional string

Usage:
  anki_as_code api backend-media add-media-from-path [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-media-from-path
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.BackendMediaService/AddMediaFromUrl

Request: anki.media.AddMediaFromUrlRequest
Response: anki.media.AddMediaFromUrlResponse

Request fields:
  url: optional string

Usage:
  anki_as_code api backend-media add-media-from-url [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-media-from-url
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.BackendMediaService/CheckMedia

Request: anki.generic.Empty
Response: anki.media.CheckMediaResponse

Usage:
  anki_as_code api backend-media check-media [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for check-media
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.BackendMediaService/EmptyTrash

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-media empty-trash [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for empty-trash
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.BackendMediaService/ExtractMediaFiles

Request: anki.generic.String
Response: anki.generic.StringList

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-media extract-media-files [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for extract-media-files
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.BackendMediaService/ExtractStaticMediaFiles

Request: anki.notetypes.NotetypeId
Response: anki.generic.StringList

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api backend-media extract-static-media-files [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for extract-static-media-files
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.BackendMediaService/GetAbsoluteMediaPath

Request: anki.generic.String
Response: anki.generic.String

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-media get-absolute-media-path [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-absolute-media-path
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.BackendMediaService/RestoreTrash

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-media restore-trash [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for restore-trash
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.BackendMediaService/TrashMediaFiles

Request: anki.media.TrashMediaFilesRequest
Response: anki.generic.Empty

Request fields:
  fnames: repeated string

Usage:
  anki_as_code api backend-media trash-media-files [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for trash-media-files
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.notes.BackendNotesService

Usage:
  anki_as_code api backend-notes [command]

Available Commands:
  add-note                     /anki.notes.BackendNotesService/AddNote
  add-notes                    /anki.notes.BackendNotesService/AddNotes
  after-note-updates           /anki.notes.BackendNotesService/AfterNoteUpdates
  cards-of-note                /anki.notes.BackendNotesService/CardsOfNote
  cloze-numbers-in-note        /anki.notes.BackendNotesService/ClozeNumbersInNote
  default-deck-for-notetype    /anki.notes.BackendNotesService/DefaultDeckForNotetype
  defaults-for-adding          /anki.notes.BackendNotesService/DefaultsForAdding
  field-names-for-notes        /anki.notes.BackendNotesService/FieldNamesForNotes
  get-note                     /anki.notes.BackendNotesService/GetNote
  get-single-notetype-of-notes /anki.notes.BackendNotesService/GetSingleNotetypeOfNotes
  new-note                     /anki.notes.BackendNotesService/NewNote
  note-fields-check            /anki.notes.BackendNotesService/NoteFieldsCheck
  remove-notes                 /anki.notes.BackendNotesService/RemoveNotes
  update-notes                 /anki.notes.BackendNotesService/UpdateNotes

Flags:
  -h, --help   help for backend-notes

Use "anki_as_code api backend-notes [command] --help" for more information about a command.
/anki.notes.BackendNotesService/AddNote

Request: anki.notes.AddNoteRequest
Response: anki.notes.AddNoteResponse

Request fields:
  note: optional anki.notes.Note
  deck_id: optional int64

Usage:
  anki_as_code api backend-notes add-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.BackendNotesService/AddNotes

Request: anki.notes.AddNotesRequest
Response: anki.notes.AddNotesResponse

Request fields:
  requests: repeated anki.notes.AddNoteRequest

Usage:
  anki_as_code api backend-notes add-notes [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-notes
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.BackendNotesService/AfterNoteUpdates

Request: anki.notes.AfterNoteUpdatesRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  nids: repeated int64
  mark_notes_modified: optional bool
  generate_cards: optional bool

Usage:
  anki_as_code api backend-notes after-note-updates [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for after-note-updates
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.BackendNotesService/CardsOfNote

Request: anki.notes.NoteId
Response: anki.cards.CardIds

Request fields:
  nid: optional int64

Usage:
  anki_as_code api backend-notes cards-of-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for cards-of-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.BackendNotesService/ClozeNumbersInNote

Request: anki.notes.Note
Response: anki.notes.ClozeNumbersInNoteResponse

Request fields:
  id: optional int64
  guid: optional string
  notetype_id: optional int64
  mtime_secs: optional uint32
  usn: optional int32
  tags: repeated string
  fields: repeated string

Usage:
  anki_as_code api backend-notes cloze-numbers-in-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for cloze-numbers-in-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.BackendNotesService/DefaultDeckForNotetype

Request: anki.notetypes.NotetypeId
Response: anki.decks.DeckId

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api backend-notes default-deck-for-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for default-deck-for-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.BackendNotesService/DefaultsForAdding

Request: anki.notes.DefaultsForAddingRequest
Response: anki.notes.DeckAndNotetype

Request fields:
  home_deck_of_current_review_card: optional int64

Usage:
  anki_as_code api backend-notes defaults-for-adding [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for defaults-for-adding
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.BackendNotesService/FieldNamesForNotes

Request: anki.notes.FieldNamesForNotesRequest
Response: anki.notes.FieldNamesForNotesResponse

Request fields:
  nids: repeated int64

Usage:
  anki_as_code api backend-notes field-names-for-notes [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for field-names-for-notes
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.BackendNotesService/GetNote

Request: anki.notes.NoteId
Response: anki.notes.Note

Request fields:
  nid: optional int64

Usage:
  anki_as_code api backend-notes get-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.BackendNotesService/GetSingleNotetypeOfNotes

Request: anki.notes.NoteIds
Response: anki.notetypes.NotetypeId

Request fields:
  note_ids: repeated int64

Usage:
  anki_as_code api backend-notes get-single-notetype-of-notes [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-single-notetype-of-notes
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.BackendNotesService/NewNote

Request: anki.notetypes.NotetypeId
Response: anki.notes.Note

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api backend-notes new-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for new-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.BackendNotesService/NoteFieldsCheck

Request: anki.notes.Note
Response: anki.notes.NoteFieldsCheckResponse

Request fields:
  id: optional int64
  guid: optional string
  notetype_id: optional int64
  mtime_secs: optional uint32
  usn: optional int32
  tags: repeated string
  fields: repeated string

Usage:
  anki_as_code api backend-notes note-fields-check [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for note-fields-check
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.BackendNotesService/RemoveNotes

Request: anki.notes.RemoveNotesRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  note_ids: repeated int64
  card_ids: repeated int64

Usage:
  anki_as_code api backend-notes remove-notes [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-notes
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.BackendNotesService/UpdateNotes

Request: anki.notes.UpdateNotesRequest
Response: anki.collection.OpChanges

Request fields:
  notes: repeated anki.notes.Note
  skip_undo_entry: optional bool

Usage:
  anki_as_code api backend-notes update-notes [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-notes
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.notetypes.BackendNotetypesService

Usage:
  anki_as_code api backend-notetypes [command]

Available Commands:
  add-notetype                  /anki.notetypes.BackendNotetypesService/AddNotetype
  add-notetype-legacy           /anki.notetypes.BackendNotetypesService/AddNotetypeLegacy
  add-or-update-notetype        /anki.notetypes.BackendNotetypesService/AddOrUpdateNotetype
  change-notetype               /anki.notetypes.BackendNotetypesService/ChangeNotetype
  get-aux-notetype-config-key   /anki.notetypes.BackendNotetypesService/GetAuxNotetypeConfigKey
  get-aux-template-config-key   /anki.notetypes.BackendNotetypesService/GetAuxTemplateConfigKey
  get-change-notetype-info      /anki.notetypes.BackendNotetypesService/GetChangeNotetypeInfo
  get-cloze-field-ords          /anki.notetypes.BackendNotetypesService/GetClozeFieldOrds
  get-field-names               /anki.notetypes.BackendNotetypesService/GetFieldNames
  get-notetype                  /anki.notetypes.BackendNotetypesService/GetNotetype
  get-notetype-id-by-name       /anki.notetypes.BackendNotetypesService/GetNotetypeIdByName
  get-notetype-legacy           /anki.notetypes.BackendNotetypesService/GetNotetypeLegacy
  get-notetype-names            /anki.notetypes.BackendNotetypesService/GetNotetypeNames
  get-notetype-names-and-counts /anki.notetypes.BackendNotetypesService/GetNotetypeNamesAndCounts
  get-stock-notetype-legacy     /anki.notetypes.BackendNotetypesService/GetStockNotetypeLegacy
  remove-notetype               /anki.notetypes.BackendNotetypesService/RemoveNotetype
  restore-notetype-to-stock     /anki.notetypes.BackendNotetypesService/RestoreNotetypeToStock
  update-notetype               /anki.notetypes.BackendNotetypesService/UpdateNotetype
  update-notetype-legacy        /anki.notetypes.BackendNotetypesService/UpdateNotetypeLegacy

Flags:
  -h, --help   help for backend-notetypes

Use "anki_as_code api backend-notetypes [command] --help" for more information about a command.
/anki.notetypes.BackendNotetypesService/AddNotetype

Request: anki.notetypes.Notetype
Response: anki.collection.OpChangesWithId

Request fields:
  id: optional int64
  name: optional string
  mtime_secs: optional int64
  usn: optional sint32
  config: optional anki.notetypes.Notetype.Config
  fields: repeated anki.notetypes.Notetype.Field
  templates: repeated anki.notetypes.Notetype.Template

Usage:
  anki_as_code api backend-notetypes add-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/AddNotetypeLegacy

Request: anki.generic.Json
Response: anki.collection.OpChangesWithId

Request fields:
  json: optional bytes

Usage:
  anki_as_code api backend-notetypes add-notetype-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-notetype-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/AddOrUpdateNotetype

Request: anki.notetypes.AddOrUpdateNotetypeRequest
Response: anki.notetypes.NotetypeId

Request fields:
  json: optional bytes
  preserve_usn_and_mtime: optional bool
  skip_checks: optional bool

Usage:
  anki_as_code api backend-notetypes add-or-update-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-or-update-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/ChangeNotetype

Request: anki.notetypes.ChangeNotetypeRequest
Response: anki.collection.OpChanges

Request fields:
  note_ids: repeated int64
  new_fields: repeated int32
  new_templates: repeated int32
  old_notetype_id: optional int64
  new_notetype_id: optional int64
  current_schema: optional int64
  old_notetype_name: optional string
  is_cloze: optional bool

Usage:
  anki_as_code api backend-notetypes change-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for change-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/GetAuxNotetypeConfigKey

Request: anki.notetypes.GetAuxConfigKeyRequest
Response: anki.generic.String

Request fields:
  id: optional int64
  key: optional string

Usage:
  anki_as_code api backend-notetypes get-aux-notetype-config-key [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-aux-notetype-config-key
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/GetAuxTemplateConfigKey

Request: anki.notetypes.GetAuxTemplateConfigKeyRequest
Response: anki.generic.String

Request fields:
  notetype_id: optional int64
  card_ordinal: optional uint32
  key: optional string

Usage:
  anki_as_code api backend-notetypes get-aux-template-config-key [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-aux-template-config-key
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/GetChangeNotetypeInfo

Request: anki.notetypes.GetChangeNotetypeInfoRequest
Response: anki.notetypes.ChangeNotetypeInfo

Request fields:
  old_notetype_id: optional int64
  new_notetype_id: optional int64

Usage:
  anki_as_code api backend-notetypes get-change-notetype-info [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-change-notetype-info
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/GetClozeFieldOrds

Request: anki.notetypes.NotetypeId
Response: anki.notetypes.GetClozeFieldOrdsResponse

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api backend-notetypes get-cloze-field-ords [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-cloze-field-ords
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/GetFieldNames

Request: anki.notetypes.NotetypeId
Response: anki.generic.StringList

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api backend-notetypes get-field-names [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-field-names
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/GetNotetype

Request: anki.notetypes.NotetypeId
Response: anki.notetypes.Notetype

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api backend-notetypes get-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/GetNotetypeIdByName

Request: anki.generic.String
Response: anki.notetypes.NotetypeId

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-notetypes get-notetype-id-by-name [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-notetype-id-by-name
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/GetNotetypeLegacy

Request: anki.notetypes.NotetypeId
Response: anki.generic.Json

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api backend-notetypes get-notetype-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-notetype-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/GetNotetypeNames

Request: anki.generic.Empty
Response: anki.notetypes.NotetypeNames

Usage:
  anki_as_code api backend-notetypes get-notetype-names [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-notetype-names
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/GetNotetypeNamesAndCounts

Request: anki.generic.Empty
Response: anki.notetypes.NotetypeUseCounts

Usage:
  anki_as_code api backend-notetypes get-notetype-names-and-counts [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-notetype-names-and-counts
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/GetStockNotetypeLegacy

Request: anki.notetypes.StockNotetype
Response: anki.generic.Json

Request fields:
  kind: optional anki.notetypes.StockNotetype.Kind

Usage:
  anki_as_code api backend-notetypes get-stock-notetype-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-stock-notetype-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/RemoveNotetype

Request: anki.notetypes.NotetypeId
Response: anki.collection.OpChanges

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api backend-notetypes remove-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/RestoreNotetypeToStock

Request: anki.notetypes.RestoreNotetypeToStockRequest
Response: anki.collection.OpChanges

Request fields:
  notetype_id: optional anki.notetypes.NotetypeId
  force_kind: optional anki.notetypes.StockNotetype.Kind

Usage:
  anki_as_code api backend-notetypes restore-notetype-to-stock [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for restore-notetype-to-stock
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/UpdateNotetype

Request: anki.notetypes.Notetype
Response: anki.collection.OpChanges

Request fields:
  id: optional int64
  name: optional string
  mtime_secs: optional int64
  usn: optional sint32
  config: optional anki.notetypes.Notetype.Config
  fields: repeated anki.notetypes.Notetype.Field
  templates: repeated anki.notetypes.Notetype.Template

Usage:
  anki_as_code api backend-notetypes update-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.BackendNotetypesService/UpdateNotetypeLegacy

Request: anki.notetypes.UpdateNotetypeLegacyRequest
Response: anki.collection.OpChanges

Request fields:
  json: optional bytes
  skip_checks: optional bool

Usage:
  anki_as_code api backend-notetypes update-notetype-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-notetype-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.scheduler.BackendSchedulerService

Usage:
  anki_as_code api backend-scheduler [command]

Available Commands:
  answer-card                        /anki.scheduler.BackendSchedulerService/AnswerCard
  bury-or-suspend-cards              /anki.scheduler.BackendSchedulerService/BuryOrSuspendCards
  compute-fsrs-params                /anki.scheduler.BackendSchedulerService/ComputeFsrsParams
  compute-fsrs-params-from-items     /anki.scheduler.BackendSchedulerService/ComputeFsrsParamsFromItems
  compute-memory-state               /anki.scheduler.BackendSchedulerService/ComputeMemoryState
  compute-optimal-retention          /anki.scheduler.BackendSchedulerService/ComputeOptimalRetention
  congrats-info                      /anki.scheduler.BackendSchedulerService/CongratsInfo
  counts-for-deck-today              /anki.scheduler.BackendSchedulerService/CountsForDeckToday
  custom-study                       /anki.scheduler.BackendSchedulerService/CustomStudy
  custom-study-defaults              /anki.scheduler.BackendSchedulerService/CustomStudyDefaults
  describe-next-states               /anki.scheduler.BackendSchedulerService/DescribeNextStates
  empty-filtered-deck                /anki.scheduler.BackendSchedulerService/EmptyFilteredDeck
  evaluate-params                    /anki.scheduler.BackendSchedulerService/EvaluateParams
  evaluate-params-legacy             /anki.scheduler.BackendSchedulerService/EvaluateParamsLegacy
  export-dataset                     /anki.scheduler.BackendSchedulerService/ExportDataset
  extend-limits                      /anki.scheduler.BackendSchedulerService/ExtendLimits
  fsrs-benchmark                     /anki.scheduler.BackendSchedulerService/FsrsBenchmark
  fuzz-delta                         /anki.scheduler.BackendSchedulerService/FuzzDelta
  get-optimal-retention-parameters   /anki.scheduler.BackendSchedulerService/GetOptimalRetentionParameters
  get-queued-cards                   /anki.scheduler.BackendSchedulerService/GetQueuedCards
  get-scheduling-states              /anki.scheduler.BackendSchedulerService/GetSchedulingStates
  grade-now                          /anki.scheduler.BackendSchedulerService/GradeNow
  rebuild-filtered-deck              /anki.scheduler.BackendSchedulerService/RebuildFilteredDeck
  reposition-defaults                /anki.scheduler.BackendSchedulerService/RepositionDefaults
  restore-buried-and-suspended-cards /anki.scheduler.BackendSchedulerService/RestoreBuriedAndSuspendedCards
  sched-timing-today                 /anki.scheduler.BackendSchedulerService/SchedTimingToday
  schedule-cards-as-new              /anki.scheduler.BackendSchedulerService/ScheduleCardsAsNew
  schedule-cards-as-new-defaults     /anki.scheduler.BackendSchedulerService/ScheduleCardsAsNewDefaults
  set-due-date                       /anki.scheduler.BackendSchedulerService/SetDueDate
  simulate-fsrs-review               /anki.scheduler.BackendSchedulerService/SimulateFsrsReview
  simulate-fsrs-workload             /anki.scheduler.BackendSchedulerService/SimulateFsrsWorkload
  sort-cards                         /anki.scheduler.BackendSchedulerService/SortCards
  sort-deck                          /anki.scheduler.BackendSchedulerService/SortDeck
  state-is-leech                     /anki.scheduler.BackendSchedulerService/StateIsLeech
  studied-today                      /anki.scheduler.BackendSchedulerService/StudiedToday
  studied-today-message              /anki.scheduler.BackendSchedulerService/StudiedTodayMessage
  unbury-deck                        /anki.scheduler.BackendSchedulerService/UnburyDeck
  update-stats                       /anki.scheduler.BackendSchedulerService/UpdateStats
  upgrade-scheduler                  /anki.scheduler.BackendSchedulerService/UpgradeScheduler

Flags:
  -h, --help   help for backend-scheduler

Use "anki_as_code api backend-scheduler [command] --help" for more information about a command.
/anki.scheduler.BackendSchedulerService/AnswerCard

Request: anki.scheduler.CardAnswer
Response: anki.collection.OpChanges

Request fields:
  card_id: optional int64
  current_state: optional anki.scheduler.SchedulingState
  new_state: optional anki.scheduler.SchedulingState
  rating: optional anki.scheduler.CardAnswer.Rating
  answered_at_millis: optional int64
  milliseconds_taken: optional uint32

Usage:
  anki_as_code api backend-scheduler answer-card [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for answer-card
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/BuryOrSuspendCards

Request: anki.scheduler.BuryOrSuspendCardsRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  card_ids: repeated int64
  note_ids: repeated int64
  mode: optional anki.scheduler.BuryOrSuspendCardsRequest.Mode

Usage:
  anki_as_code api backend-scheduler bury-or-suspend-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for bury-or-suspend-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/ComputeFsrsParams

Request: anki.scheduler.ComputeFsrsParamsRequest
Response: anki.scheduler.ComputeFsrsParamsResponse

Request fields:
  search: optional string
  current_params: repeated float
  ignore_revlogs_before_ms: optional int64
  num_of_relearning_steps: optional uint32
  health_check: optional bool

Usage:
  anki_as_code api backend-scheduler compute-fsrs-params [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for compute-fsrs-params
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/ComputeFsrsParamsFromItems

Request: anki.scheduler.ComputeFsrsParamsFromItemsRequest
Response: anki.scheduler.ComputeFsrsParamsResponse

Request fields:
  items: repeated anki.scheduler.FsrsItem

Usage:
  anki_as_code api backend-scheduler compute-fsrs-params-from-items [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for compute-fsrs-params-from-items
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/ComputeMemoryState

Request: anki.cards.CardId
Response: anki.scheduler.ComputeMemoryStateResponse

Request fields:
  cid: optional int64

Usage:
  anki_as_code api backend-scheduler compute-memory-state [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for compute-memory-state
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/ComputeOptimalRetention

Request: anki.scheduler.SimulateFsrsReviewRequest
Response: anki.scheduler.ComputeOptimalRetentionResponse

Request fields:
  params: repeated float
  desired_retention: optional float
  deck_size: optional uint32
  days_to_simulate: optional uint32
  new_limit: optional uint32
  review_limit: optional uint32
  max_interval: optional uint32
  search: optional string
  new_cards_ignore_review_limit: optional bool
  easy_days_percentages: repeated float
  review_order: optional anki.deck_config.DeckConfig.Config.ReviewCardOrder
  suspend_after_lapse_count: optional uint32
  historical_retention: optional float
  learning_step_count: optional uint32
  relearning_step_count: optional uint32

Usage:
  anki_as_code api backend-scheduler compute-optimal-retention [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for compute-optimal-retention
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/CongratsInfo

Request: anki.generic.Empty
Response: anki.scheduler.CongratsInfoResponse

Usage:
  anki_as_code api backend-scheduler congrats-info [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for congrats-info
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/CountsForDeckToday

Request: anki.decks.DeckId
Response: anki.scheduler.CountsForDeckTodayResponse

Request fields:
  did: optional int64

Usage:
  anki_as_code api backend-scheduler counts-for-deck-today [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for counts-for-deck-today
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/CustomStudy

Request: anki.scheduler.CustomStudyRequest
Response: anki.collection.OpChanges

Request fields:
  deck_id: optional int64
  new_limit_delta: optional int32
  review_limit_delta: optional int32
  forgot_days: optional uint32
  review_ahead_days: optional uint32
  preview_days: optional uint32
  cram: optional anki.scheduler.CustomStudyRequest.Cram

Usage:
  anki_as_code api backend-scheduler custom-study [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for custom-study
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/CustomStudyDefaults

Request: anki.scheduler.CustomStudyDefaultsRequest
Response: anki.scheduler.CustomStudyDefaultsResponse

Request fields:
  deck_id: optional int64

Usage:
  anki_as_code api backend-scheduler custom-study-defaults [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for custom-study-defaults
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/DescribeNextStates

Request: anki.scheduler.SchedulingStates
Response: anki.generic.StringList

Request fields:
  current: optional anki.scheduler.SchedulingState
  again: optional anki.scheduler.SchedulingState
  hard: optional anki.scheduler.SchedulingState
  good: optional anki.scheduler.SchedulingState
  easy: optional anki.scheduler.SchedulingState

Usage:
  anki_as_code api backend-scheduler describe-next-states [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for describe-next-states
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/EmptyFilteredDeck

Request: anki.decks.DeckId
Response: anki.collection.OpChanges

Request fields:
  did: optional int64

Usage:
  anki_as_code api backend-scheduler empty-filtered-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for empty-filtered-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/EvaluateParams

Request: anki.scheduler.EvaluateParamsRequest
Response: anki.scheduler.EvaluateParamsResponse

Request fields:
  search: optional string
  ignore_revlogs_before_ms: optional int64
  num_of_relearning_steps: optional uint32

Usage:
  anki_as_code api backend-scheduler evaluate-params [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for evaluate-params
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/EvaluateParamsLegacy

Request: anki.scheduler.EvaluateParamsLegacyRequest
Response: anki.scheduler.EvaluateParamsResponse

Request fields:
  params: repeated float
  search: optional string
  ignore_revlogs_before_ms: optional int64

Usage:
  anki_as_code api backend-scheduler evaluate-params-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for evaluate-params-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/ExportDataset

Request: anki.scheduler.ExportDatasetRequest
Response: anki.generic.Empty

Request fields:
  min_entries: optional uint32
  target_path: optional string

Usage:
  anki_as_code api backend-scheduler export-dataset [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for export-dataset
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/ExtendLimits

Request: anki.scheduler.ExtendLimitsRequest
Response: anki.generic.Empty

Request fields:
  deck_id: optional int64
  new_delta: optional int32
  review_delta: optional int32

Usage:
  anki_as_code api backend-scheduler extend-limits [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for extend-limits
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/FsrsBenchmark

Request: anki.scheduler.FsrsBenchmarkRequest
Response: anki.scheduler.FsrsBenchmarkResponse

Request fields:
  train_set: repeated anki.scheduler.FsrsItem

Usage:
  anki_as_code api backend-scheduler fsrs-benchmark [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for fsrs-benchmark
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/FuzzDelta

Request: anki.scheduler.FuzzDeltaRequest
Response: anki.scheduler.FuzzDeltaResponse

Request fields:
  card_id: optional int64
  interval: optional uint32

Usage:
  anki_as_code api backend-scheduler fuzz-delta [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for fuzz-delta
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/GetOptimalRetentionParameters

Request: anki.scheduler.GetOptimalRetentionParametersRequest
Response: anki.scheduler.GetOptimalRetentionParametersResponse

Request fields:
  search: optional string

Usage:
  anki_as_code api backend-scheduler get-optimal-retention-parameters [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-optimal-retention-parameters
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/GetQueuedCards

Request: anki.scheduler.GetQueuedCardsRequest
Response: anki.scheduler.QueuedCards

Request fields:
  fetch_limit: optional uint32
  intraday_learning_only: optional bool

Usage:
  anki_as_code api backend-scheduler get-queued-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-queued-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/GetSchedulingStates

Request: anki.cards.CardId
Response: anki.scheduler.SchedulingStates

Request fields:
  cid: optional int64

Usage:
  anki_as_code api backend-scheduler get-scheduling-states [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-scheduling-states
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/GradeNow

Request: anki.scheduler.GradeNowRequest
Response: anki.collection.OpChanges

Request fields:
  card_ids: repeated int64
  rating: optional anki.scheduler.CardAnswer.Rating

Usage:
  anki_as_code api backend-scheduler grade-now [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for grade-now
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/RebuildFilteredDeck

Request: anki.decks.DeckId
Response: anki.collection.OpChangesWithCount

Request fields:
  did: optional int64

Usage:
  anki_as_code api backend-scheduler rebuild-filtered-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for rebuild-filtered-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/RepositionDefaults

Request: anki.generic.Empty
Response: anki.scheduler.RepositionDefaultsResponse

Usage:
  anki_as_code api backend-scheduler reposition-defaults [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for reposition-defaults
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/RestoreBuriedAndSuspendedCards

Request: anki.cards.CardIds
Response: anki.collection.OpChanges

Request fields:
  cids: repeated int64

Usage:
  anki_as_code api backend-scheduler restore-buried-and-suspended-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for restore-buried-and-suspended-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/SchedTimingToday

Request: anki.generic.Empty
Response: anki.scheduler.SchedTimingTodayResponse

Usage:
  anki_as_code api backend-scheduler sched-timing-today [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for sched-timing-today
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/ScheduleCardsAsNew

Request: anki.scheduler.ScheduleCardsAsNewRequest
Response: anki.collection.OpChanges

Request fields:
  card_ids: repeated int64
  log: optional bool
  restore_position: optional bool
  reset_counts: optional bool
  context: optional anki.scheduler.ScheduleCardsAsNewRequest.Context

Usage:
  anki_as_code api backend-scheduler schedule-cards-as-new [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for schedule-cards-as-new
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/ScheduleCardsAsNewDefaults

Request: anki.scheduler.ScheduleCardsAsNewDefaultsRequest
Response: anki.scheduler.ScheduleCardsAsNewDefaultsResponse

Request fields:
  context: optional anki.scheduler.ScheduleCardsAsNewRequest.Context

Usage:
  anki_as_code api backend-scheduler schedule-cards-as-new-defaults [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for schedule-cards-as-new-defaults
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/SetDueDate

Request: anki.scheduler.SetDueDateRequest
Response: anki.collection.OpChanges

Request fields:
  card_ids: repeated int64
  days: optional string
  config_key: optional anki.config.OptionalStringConfigKey

Usage:
  anki_as_code api backend-scheduler set-due-date [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-due-date
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/SimulateFsrsReview

Request: anki.scheduler.SimulateFsrsReviewRequest
Response: anki.scheduler.SimulateFsrsReviewResponse

Request fields:
  params: repeated float
  desired_retention: optional float
  deck_size: optional uint32
  days_to_simulate: optional uint32
  new_limit: optional uint32
  review_limit: optional uint32
  max_interval: optional uint32
  search: optional string
  new_cards_ignore_review_limit: optional bool
  easy_days_percentages: repeated float
  review_order: optional anki.deck_config.DeckConfig.Config.ReviewCardOrder
  suspend_after_lapse_count: optional uint32
  historical_retention: optional float
  learning_step_count: optional uint32
  relearning_step_count: optional uint32

Usage:
  anki_as_code api backend-scheduler simulate-fsrs-review [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for simulate-fsrs-review
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/SimulateFsrsWorkload

Request: anki.scheduler.SimulateFsrsReviewRequest
Response: anki.scheduler.SimulateFsrsWorkloadResponse

Request fields:
  params: repeated float
  desired_retention: optional float
  deck_size: optional uint32
  days_to_simulate: optional uint32
  new_limit: optional uint32
  review_limit: optional uint32
  max_interval: optional uint32
  search: optional string
  new_cards_ignore_review_limit: optional bool
  easy_days_percentages: repeated float
  review_order: optional anki.deck_config.DeckConfig.Config.ReviewCardOrder
  suspend_after_lapse_count: optional uint32
  historical_retention: optional float
  learning_step_count: optional uint32
  relearning_step_count: optional uint32

Usage:
  anki_as_code api backend-scheduler simulate-fsrs-workload [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for simulate-fsrs-workload
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/SortCards

Request: anki.scheduler.SortCardsRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  card_ids: repeated int64
  starting_from: optional uint32
  step_size: optional uint32
  randomize: optional bool
  shift_existing: optional bool

Usage:
  anki_as_code api backend-scheduler sort-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for sort-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/SortDeck

Request: anki.scheduler.SortDeckRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  deck_id: optional int64
  randomize: optional bool

Usage:
  anki_as_code api backend-scheduler sort-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for sort-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/StateIsLeech

Request: anki.scheduler.SchedulingState
Response: anki.generic.Bool

Request fields:
  normal: optional anki.scheduler.SchedulingState.Normal
  filtered: optional anki.scheduler.SchedulingState.Filtered
  custom_data: optional string

Usage:
  anki_as_code api backend-scheduler state-is-leech [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for state-is-leech
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/StudiedToday

Request: anki.generic.Empty
Response: anki.generic.String

Usage:
  anki_as_code api backend-scheduler studied-today [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for studied-today
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/StudiedTodayMessage

Request: anki.scheduler.StudiedTodayMessageRequest
Response: anki.generic.String

Request fields:
  cards: optional uint32
  seconds: optional double

Usage:
  anki_as_code api backend-scheduler studied-today-message [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for studied-today-message
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/UnburyDeck

Request: anki.scheduler.UnburyDeckRequest
Response: anki.collection.OpChanges

Request fields:
  deck_id: optional int64
  mode: optional anki.scheduler.UnburyDeckRequest.Mode

Usage:
  anki_as_code api backend-scheduler unbury-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for unbury-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/UpdateStats

Request: anki.scheduler.UpdateStatsRequest
Response: anki.generic.Empty

Request fields:
  deck_id: optional int64
  new_delta: optional int32
  review_delta: optional int32
  millisecond_delta: optional int32

Usage:
  anki_as_code api backend-scheduler update-stats [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-stats
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.BackendSchedulerService/UpgradeScheduler

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-scheduler upgrade-scheduler [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for upgrade-scheduler
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.search.BackendSearchService

Usage:
  anki_as_code api backend-search [command]

Available Commands:
  all-browser-columns        /anki.search.BackendSearchService/AllBrowserColumns
  browser-row-for-id         /anki.search.BackendSearchService/BrowserRowForId
  build-search-string        /anki.search.BackendSearchService/BuildSearchString
  find-and-replace           /anki.search.BackendSearchService/FindAndReplace
  join-search-nodes          /anki.search.BackendSearchService/JoinSearchNodes
  replace-search-node        /anki.search.BackendSearchService/ReplaceSearchNode
  search-cards               /anki.search.BackendSearchService/SearchCards
  search-notes               /anki.search.BackendSearchService/SearchNotes
  set-active-browser-columns /anki.search.BackendSearchService/SetActiveBrowserColumns

Flags:
  -h, --help   help for backend-search

Use "anki_as_code api backend-search [command] --help" for more information about a command.
/anki.search.BackendSearchService/AllBrowserColumns

Request: anki.generic.Empty
Response: anki.search.BrowserColumns

Usage:
  anki_as_code api backend-search all-browser-columns [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for all-browser-columns
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.BackendSearchService/BrowserRowForId

Request: anki.generic.Int64
Response: anki.search.BrowserRow

Request fields:
  val: optional int64

Usage:
  anki_as_code api backend-search browser-row-for-id [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for browser-row-for-id
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.BackendSearchService/BuildSearchString

Request: anki.search.SearchNode
Response: anki.generic.String

Request fields:
  group: optional anki.search.SearchNode.Group
  negated: optional anki.search.SearchNode
  parsable_text: optional string
  template: optional uint32
  nid: optional int64
  dupe: optional anki.search.SearchNode.Dupe
  field_name: optional string
  rated: optional anki.search.SearchNode.Rated
  added_in_days: optional uint32
  due_in_days: optional int32
  flag: optional anki.search.SearchNode.Flag
  card_state: optional anki.search.SearchNode.CardState
  nids: optional anki.search.SearchNode.IdList
  edited_in_days: optional uint32
  deck: optional string
  due_on_day: optional int32
  tag: optional string
  note: optional string
  introduced_in_days: optional uint32
  field: optional anki.search.SearchNode.Field
  literal_text: optional string

Usage:
  anki_as_code api backend-search build-search-string [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for build-search-string
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.BackendSearchService/FindAndReplace

Request: anki.search.FindAndReplaceRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  nids: repeated int64
  search: optional string
  replacement: optional string
  regex: optional bool
  match_case: optional bool
  field_name: optional string

Usage:
  anki_as_code api backend-search find-and-replace [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for find-and-replace
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.BackendSearchService/JoinSearchNodes

Request: anki.search.JoinSearchNodesRequest
Response: anki.generic.String

Request fields:
  joiner: optional anki.search.SearchNode.Group.Joiner
  existing_node: optional anki.search.SearchNode
  additional_node: optional anki.search.SearchNode

Usage:
  anki_as_code api backend-search join-search-nodes [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for join-search-nodes
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.BackendSearchService/ReplaceSearchNode

Request: anki.search.ReplaceSearchNodeRequest
Response: anki.generic.String

Request fields:
  existing_node: optional anki.search.SearchNode
  replacement_node: optional anki.search.SearchNode

Usage:
  anki_as_code api backend-search replace-search-node [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for replace-search-node
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.BackendSearchService/SearchCards

Request: anki.search.SearchRequest
Response: anki.search.SearchResponse

Request fields:
  search: optional string
  order: optional anki.search.SortOrder

Usage:
  anki_as_code api backend-search search-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for search-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.BackendSearchService/SearchNotes

Request: anki.search.SearchRequest
Response: anki.search.SearchResponse

Request fields:
  search: optional string
  order: optional anki.search.SortOrder

Usage:
  anki_as_code api backend-search search-notes [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for search-notes
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.BackendSearchService/SetActiveBrowserColumns

Request: anki.generic.StringList
Response: anki.generic.Empty

Request fields:
  vals: repeated string

Usage:
  anki_as_code api backend-search set-active-browser-columns [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-active-browser-columns
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.stats.BackendStatsService

Usage:
  anki_as_code api backend-stats [command]

Available Commands:
  card-stats            /anki.stats.BackendStatsService/CardStats
  get-graph-preferences /anki.stats.BackendStatsService/GetGraphPreferences
  get-review-logs       /anki.stats.BackendStatsService/GetReviewLogs
  graphs                /anki.stats.BackendStatsService/Graphs
  set-graph-preferences /anki.stats.BackendStatsService/SetGraphPreferences

Flags:
  -h, --help   help for backend-stats

Use "anki_as_code api backend-stats [command] --help" for more information about a command.
/anki.stats.BackendStatsService/CardStats

Request: anki.cards.CardId
Response: anki.stats.CardStatsResponse

Request fields:
  cid: optional int64

Usage:
  anki_as_code api backend-stats card-stats [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for card-stats
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.stats.BackendStatsService/GetGraphPreferences

Request: anki.generic.Empty
Response: anki.stats.GraphPreferences

Usage:
  anki_as_code api backend-stats get-graph-preferences [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-graph-preferences
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.stats.BackendStatsService/GetReviewLogs

Request: anki.cards.CardId
Response: anki.stats.ReviewLogs

Request fields:
  cid: optional int64

Usage:
  anki_as_code api backend-stats get-review-logs [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-review-logs
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.stats.BackendStatsService/Graphs

Request: anki.stats.GraphsRequest
Response: anki.stats.GraphsResponse

Request fields:
  search: optional string
  days: optional uint32

Usage:
  anki_as_code api backend-stats graphs [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for graphs
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.stats.BackendStatsService/SetGraphPreferences

Request: anki.stats.GraphPreferences
Response: anki.generic.Empty

Request fields:
  calendar_first_day_of_week: optional anki.stats.GraphPreferences.Weekday
  card_counts_separate_inactive: optional bool
  browser_links_supported: optional bool
  future_due_show_backlog: optional bool

Usage:
  anki_as_code api backend-stats set-graph-preferences [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-graph-preferences
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.sync.BackendSyncService

Usage:
  anki_as_code api backend-sync [command]

Available Commands:
  abort-media-sync        /anki.sync.BackendSyncService/AbortMediaSync
  abort-sync              /anki.sync.BackendSyncService/AbortSync
  full-upload-or-download /anki.sync.BackendSyncService/FullUploadOrDownload
  media-sync-status       /anki.sync.BackendSyncService/MediaSyncStatus
  set-custom-certificate  /anki.sync.BackendSyncService/SetCustomCertificate
  sync-collection         /anki.sync.BackendSyncService/SyncCollection
  sync-login              /anki.sync.BackendSyncService/SyncLogin
  sync-media              /anki.sync.BackendSyncService/SyncMedia
  sync-status             /anki.sync.BackendSyncService/SyncStatus

Flags:
  -h, --help   help for backend-sync

Use "anki_as_code api backend-sync [command] --help" for more information about a command.
/anki.sync.BackendSyncService/AbortMediaSync

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-sync abort-media-sync [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for abort-media-sync
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.sync.BackendSyncService/AbortSync

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api backend-sync abort-sync [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for abort-sync
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.sync.BackendSyncService/FullUploadOrDownload

Request: anki.sync.FullUploadOrDownloadRequest
Response: anki.generic.Empty

Request fields:
  auth: optional anki.sync.SyncAuth
  upload: optional bool
  server_usn: optional int32

Usage:
  anki_as_code api backend-sync full-upload-or-download [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for full-upload-or-download
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.sync.BackendSyncService/MediaSyncStatus

Request: anki.generic.Empty
Response: anki.sync.MediaSyncStatusResponse

Usage:
  anki_as_code api backend-sync media-sync-status [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for media-sync-status
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.sync.BackendSyncService/SetCustomCertificate

Request: anki.generic.String
Response: anki.generic.Bool

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-sync set-custom-certificate [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-custom-certificate
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.sync.BackendSyncService/SyncCollection

Request: anki.sync.SyncCollectionRequest
Response: anki.sync.SyncCollectionResponse

Request fields:
  auth: optional anki.sync.SyncAuth
  sync_media: optional bool

Usage:
  anki_as_code api backend-sync sync-collection [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for sync-collection
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.sync.BackendSyncService/SyncLogin

Request: anki.sync.SyncLoginRequest
Response: anki.sync.SyncAuth

Request fields:
  username: optional string
  password: optional string
  endpoint: optional string

Usage:
  anki_as_code api backend-sync sync-login [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for sync-login
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.sync.BackendSyncService/SyncMedia

Request: anki.sync.SyncAuth
Response: anki.generic.Empty

Request fields:
  hkey: optional string
  endpoint: optional string
  io_timeout_secs: optional uint32

Usage:
  anki_as_code api backend-sync sync-media [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for sync-media
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.sync.BackendSyncService/SyncStatus

Request: anki.sync.SyncAuth
Response: anki.sync.SyncStatusResponse

Request fields:
  hkey: optional string
  endpoint: optional string
  io_timeout_secs: optional uint32

Usage:
  anki_as_code api backend-sync sync-status [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for sync-status
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.tags.BackendTagsService

Usage:
  anki_as_code api backend-tags [command]

Available Commands:
  add-note-tags        /anki.tags.BackendTagsService/AddNoteTags
  all-tags             /anki.tags.BackendTagsService/AllTags
  clear-unused-tags    /anki.tags.BackendTagsService/ClearUnusedTags
  complete-tag         /anki.tags.BackendTagsService/CompleteTag
  find-and-replace-tag /anki.tags.BackendTagsService/FindAndReplaceTag
  remove-note-tags     /anki.tags.BackendTagsService/RemoveNoteTags
  remove-tags          /anki.tags.BackendTagsService/RemoveTags
  rename-tags          /anki.tags.BackendTagsService/RenameTags
  reparent-tags        /anki.tags.BackendTagsService/ReparentTags
  set-tag-collapsed    /anki.tags.BackendTagsService/SetTagCollapsed
  tag-tree             /anki.tags.BackendTagsService/TagTree

Flags:
  -h, --help   help for backend-tags

Use "anki_as_code api backend-tags [command] --help" for more information about a command.
/anki.tags.BackendTagsService/AddNoteTags

Request: anki.tags.NoteIdsAndTagsRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  note_ids: repeated int64
  tags: optional string

Usage:
  anki_as_code api backend-tags add-note-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-note-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.BackendTagsService/AllTags

Request: anki.generic.Empty
Response: anki.generic.StringList

Usage:
  anki_as_code api backend-tags all-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for all-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.BackendTagsService/ClearUnusedTags

Request: anki.generic.Empty
Response: anki.collection.OpChangesWithCount

Usage:
  anki_as_code api backend-tags clear-unused-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for clear-unused-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.BackendTagsService/CompleteTag

Request: anki.tags.CompleteTagRequest
Response: anki.tags.CompleteTagResponse

Request fields:
  input: optional string
  match_limit: optional uint32

Usage:
  anki_as_code api backend-tags complete-tag [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for complete-tag
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.BackendTagsService/FindAndReplaceTag

Request: anki.tags.FindAndReplaceTagRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  note_ids: repeated int64
  search: optional string
  replacement: optional string
  regex: optional bool
  match_case: optional bool

Usage:
  anki_as_code api backend-tags find-and-replace-tag [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for find-and-replace-tag
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.BackendTagsService/RemoveNoteTags

Request: anki.tags.NoteIdsAndTagsRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  note_ids: repeated int64
  tags: optional string

Usage:
  anki_as_code api backend-tags remove-note-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-note-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.BackendTagsService/RemoveTags

Request: anki.generic.String
Response: anki.collection.OpChangesWithCount

Request fields:
  val: optional string

Usage:
  anki_as_code api backend-tags remove-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.BackendTagsService/RenameTags

Request: anki.tags.RenameTagsRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  current_prefix: optional string
  new_prefix: optional string

Usage:
  anki_as_code api backend-tags rename-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for rename-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.BackendTagsService/ReparentTags

Request: anki.tags.ReparentTagsRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  tags: repeated string
  new_parent: optional string

Usage:
  anki_as_code api backend-tags reparent-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for reparent-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.BackendTagsService/SetTagCollapsed

Request: anki.tags.SetTagCollapsedRequest
Response: anki.collection.OpChanges

Request fields:
  name: optional string
  collapsed: optional bool

Usage:
  anki_as_code api backend-tags set-tag-collapsed [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-tag-collapsed
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.BackendTagsService/TagTree

Request: anki.generic.Empty
Response: anki.tags.TagTreeNode

Usage:
  anki_as_code api backend-tags tag-tree [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for tag-tree
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.card_rendering.CardRenderingService

Usage:
  anki_as_code api card-rendering [command]

Available Commands:
  compare-answer                 /anki.card_rendering.CardRenderingService/CompareAnswer
  decode-iri-paths               /anki.card_rendering.CardRenderingService/DecodeIriPaths
  encode-iri-paths               /anki.card_rendering.CardRenderingService/EncodeIriPaths
  extract-av-tags                /anki.card_rendering.CardRenderingService/ExtractAvTags
  extract-cloze-for-typing       /anki.card_rendering.CardRenderingService/ExtractClozeForTyping
  extract-latex                  /anki.card_rendering.CardRenderingService/ExtractLatex
  get-empty-cards                /anki.card_rendering.CardRenderingService/GetEmptyCards
  html-to-text-line              /anki.card_rendering.CardRenderingService/HtmlToTextLine
  render-existing-card           /anki.card_rendering.CardRenderingService/RenderExistingCard
  render-markdown                /anki.card_rendering.CardRenderingService/RenderMarkdown
  render-uncommitted-card        /anki.card_rendering.CardRenderingService/RenderUncommittedCard
  render-uncommitted-card-legacy /anki.card_rendering.CardRenderingService/RenderUncommittedCardLegacy
  strip-av-tags                  /anki.card_rendering.CardRenderingService/StripAvTags
  strip-html                     /anki.card_rendering.CardRenderingService/StripHtml

Flags:
  -h, --help   help for card-rendering

Use "anki_as_code api card-rendering [command] --help" for more information about a command.
/anki.card_rendering.CardRenderingService/CompareAnswer

Request: anki.card_rendering.CompareAnswerRequest
Response: anki.generic.String

Request fields:
  expected: optional string
  provided: optional string
  combining: optional bool

Usage:
  anki_as_code api card-rendering compare-answer [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for compare-answer
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.CardRenderingService/DecodeIriPaths

Request: anki.generic.String
Response: anki.generic.String

Request fields:
  val: optional string

Usage:
  anki_as_code api card-rendering decode-iri-paths [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for decode-iri-paths
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.CardRenderingService/EncodeIriPaths

Request: anki.generic.String
Response: anki.generic.String

Request fields:
  val: optional string

Usage:
  anki_as_code api card-rendering encode-iri-paths [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for encode-iri-paths
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.CardRenderingService/ExtractAvTags

Request: anki.card_rendering.ExtractAvTagsRequest
Response: anki.card_rendering.ExtractAvTagsResponse

Request fields:
  text: optional string
  question_side: optional bool

Usage:
  anki_as_code api card-rendering extract-av-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for extract-av-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.CardRenderingService/ExtractClozeForTyping

Request: anki.card_rendering.ExtractClozeForTypingRequest
Response: anki.generic.String

Request fields:
  text: optional string
  ordinal: optional uint32

Usage:
  anki_as_code api card-rendering extract-cloze-for-typing [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for extract-cloze-for-typing
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.CardRenderingService/ExtractLatex

Request: anki.card_rendering.ExtractLatexRequest
Response: anki.card_rendering.ExtractLatexResponse

Request fields:
  text: optional string
  svg: optional bool
  expand_clozes: optional bool

Usage:
  anki_as_code api card-rendering extract-latex [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for extract-latex
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.CardRenderingService/GetEmptyCards

Request: anki.generic.Empty
Response: anki.card_rendering.EmptyCardsReport

Usage:
  anki_as_code api card-rendering get-empty-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-empty-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.CardRenderingService/HtmlToTextLine

Request: anki.card_rendering.HtmlToTextLineRequest
Response: anki.generic.String

Request fields:
  text: optional string
  preserve_media_filenames: optional bool

Usage:
  anki_as_code api card-rendering html-to-text-line [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for html-to-text-line
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.CardRenderingService/RenderExistingCard

Request: anki.card_rendering.RenderExistingCardRequest
Response: anki.card_rendering.RenderCardResponse

Request fields:
  card_id: optional int64
  browser: optional bool
  partial_render: optional bool

Usage:
  anki_as_code api card-rendering render-existing-card [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for render-existing-card
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.CardRenderingService/RenderMarkdown

Request: anki.card_rendering.RenderMarkdownRequest
Response: anki.generic.String

Request fields:
  markdown: optional string
  sanitize: optional bool

Usage:
  anki_as_code api card-rendering render-markdown [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for render-markdown
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.CardRenderingService/RenderUncommittedCard

Request: anki.card_rendering.RenderUncommittedCardRequest
Response: anki.card_rendering.RenderCardResponse

Request fields:
  note: optional anki.notes.Note
  card_ord: optional uint32
  template: optional anki.notetypes.Notetype.Template
  fill_empty: optional bool
  partial_render: optional bool

Usage:
  anki_as_code api card-rendering render-uncommitted-card [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for render-uncommitted-card
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.CardRenderingService/RenderUncommittedCardLegacy

Request: anki.card_rendering.RenderUncommittedCardLegacyRequest
Response: anki.card_rendering.RenderCardResponse

Request fields:
  note: optional anki.notes.Note
  card_ord: optional uint32
  template: optional bytes
  fill_empty: optional bool
  partial_render: optional bool

Usage:
  anki_as_code api card-rendering render-uncommitted-card-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for render-uncommitted-card-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.CardRenderingService/StripAvTags

Request: anki.generic.String
Response: anki.generic.String

Request fields:
  val: optional string

Usage:
  anki_as_code api card-rendering strip-av-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for strip-av-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.card_rendering.CardRenderingService/StripHtml

Request: anki.card_rendering.StripHtmlRequest
Response: anki.generic.String

Request fields:
  text: optional string
  mode: optional anki.card_rendering.StripHtmlRequest.Mode

Usage:
  anki_as_code api card-rendering strip-html [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for strip-html
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.cards.CardsService

Usage:
  anki_as_code api cards [command]

Available Commands:
  get-card     /anki.cards.CardsService/GetCard
  remove-cards /anki.cards.CardsService/RemoveCards
  set-deck     /anki.cards.CardsService/SetDeck
  set-flag     /anki.cards.CardsService/SetFlag
  update-cards /anki.cards.CardsService/UpdateCards

Flags:
  -h, --help   help for cards

Use "anki_as_code api cards [command] --help" for more information about a command.
/anki.cards.CardsService/GetCard

Request: anki.cards.CardId
Response: anki.cards.Card

Request fields:
  cid: optional int64

Usage:
  anki_as_code api cards get-card [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-card
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.cards.CardsService/RemoveCards

Request: anki.cards.RemoveCardsRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  card_ids: repeated int64

Usage:
  anki_as_code api cards remove-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.cards.CardsService/SetDeck

Request: anki.cards.SetDeckRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  card_ids: repeated int64
  deck_id: optional int64

Usage:
  anki_as_code api cards set-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.cards.CardsService/SetFlag

Request: anki.cards.SetFlagRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  card_ids: repeated int64
  flag: optional uint32

Usage:
  anki_as_code api cards set-flag [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-flag
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.cards.CardsService/UpdateCards

Request: anki.cards.UpdateCardsRequest
Response: anki.collection.OpChanges

Request fields:
  cards: repeated anki.cards.Card
  skip_undo_entry: optional bool

Usage:
  anki_as_code api cards update-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.collection.CollectionService

Usage:
  anki_as_code api collection [command]

Available Commands:
  add-custom-undo-entry     /anki.collection.CollectionService/AddCustomUndoEntry
  check-database            /anki.collection.CollectionService/CheckDatabase
  get-custom-colours        /anki.collection.CollectionService/GetCustomColours
  get-undo-status           /anki.collection.CollectionService/GetUndoStatus
  latest-progress           /anki.collection.CollectionService/LatestProgress
  merge-undo-entries        /anki.collection.CollectionService/MergeUndoEntries
  redo                      /anki.collection.CollectionService/Redo
  set-load-balancer-enabled /anki.collection.CollectionService/SetLoadBalancerEnabled
  set-wants-abort           /anki.collection.CollectionService/SetWantsAbort
  undo                      /anki.collection.CollectionService/Undo

Flags:
  -h, --help   help for collection

Use "anki_as_code api collection [command] --help" for more information about a command.

anki_as_code api collection add-custom-undo-entry

/anki.collection.CollectionService/AddCustomUndoEntry

Request: anki.generic.String
Response: anki.generic.UInt32

Request fields:
  val: optional string

Usage:
  anki_as_code api collection add-custom-undo-entry [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-custom-undo-entry
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.CollectionService/CheckDatabase

Request: anki.generic.Empty
Response: anki.collection.CheckDatabaseResponse

Usage:
  anki_as_code api collection check-database [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for check-database
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.CollectionService/GetCustomColours

Request: anki.generic.Empty
Response: anki.collection.GetCustomColoursResponse

Usage:
  anki_as_code api collection get-custom-colours [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-custom-colours
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.CollectionService/GetUndoStatus

Request: anki.generic.Empty
Response: anki.collection.UndoStatus

Usage:
  anki_as_code api collection get-undo-status [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-undo-status
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.CollectionService/LatestProgress

Request: anki.generic.Empty
Response: anki.collection.Progress

Usage:
  anki_as_code api collection latest-progress [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for latest-progress
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.CollectionService/MergeUndoEntries

Request: anki.generic.UInt32
Response: anki.collection.OpChanges

Request fields:
  val: optional uint32

Usage:
  anki_as_code api collection merge-undo-entries [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for merge-undo-entries
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.CollectionService/Redo

Request: anki.generic.Empty
Response: anki.collection.OpChangesAfterUndo

Usage:
  anki_as_code api collection redo [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for redo
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.CollectionService/SetLoadBalancerEnabled

Request: anki.generic.Bool
Response: anki.collection.OpChanges

Request fields:
  val: optional bool

Usage:
  anki_as_code api collection set-load-balancer-enabled [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-load-balancer-enabled
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.CollectionService/SetWantsAbort

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api collection set-wants-abort [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-wants-abort
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.collection.CollectionService/Undo

Request: anki.generic.Empty
Response: anki.collection.OpChangesAfterUndo

Usage:
  anki_as_code api collection undo [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for undo
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.config.ConfigService

Usage:
  anki_as_code api config [command]

Available Commands:
  get-all-config          /anki.config.ConfigService/GetAllConfig
  get-config-bool         /anki.config.ConfigService/GetConfigBool
  get-config-json         /anki.config.ConfigService/GetConfigJson
  get-config-string       /anki.config.ConfigService/GetConfigString
  get-preferences         /anki.config.ConfigService/GetPreferences
  remove-config           /anki.config.ConfigService/RemoveConfig
  set-config-bool         /anki.config.ConfigService/SetConfigBool
  set-config-json         /anki.config.ConfigService/SetConfigJson
  set-config-json-no-undo /anki.config.ConfigService/SetConfigJsonNoUndo
  set-config-string       /anki.config.ConfigService/SetConfigString
  set-preferences         /anki.config.ConfigService/SetPreferences

Flags:
  -h, --help   help for config

Use "anki_as_code api config [command] --help" for more information about a command.
/anki.config.ConfigService/GetAllConfig

Request: anki.generic.Empty
Response: anki.generic.Json

Usage:
  anki_as_code api config get-all-config [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-all-config
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.ConfigService/GetConfigBool

Request: anki.config.GetConfigBoolRequest
Response: anki.generic.Bool

Request fields:
  key: optional anki.config.ConfigKey.Bool

Usage:
  anki_as_code api config get-config-bool [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-config-bool
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.ConfigService/GetConfigJson

Request: anki.generic.String
Response: anki.generic.Json

Request fields:
  val: optional string

Usage:
  anki_as_code api config get-config-json [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-config-json
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.ConfigService/GetConfigString

Request: anki.config.GetConfigStringRequest
Response: anki.generic.String

Request fields:
  key: optional anki.config.ConfigKey.String

Usage:
  anki_as_code api config get-config-string [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-config-string
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.ConfigService/GetPreferences

Request: anki.generic.Empty
Response: anki.config.Preferences

Usage:
  anki_as_code api config get-preferences [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-preferences
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.ConfigService/RemoveConfig

Request: anki.generic.String
Response: anki.collection.OpChanges

Request fields:
  val: optional string

Usage:
  anki_as_code api config remove-config [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-config
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.ConfigService/SetConfigBool

Request: anki.config.SetConfigBoolRequest
Response: anki.collection.OpChanges

Request fields:
  key: optional anki.config.ConfigKey.Bool
  value: optional bool
  undoable: optional bool

Usage:
  anki_as_code api config set-config-bool [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-config-bool
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.ConfigService/SetConfigJson

Request: anki.config.SetConfigJsonRequest
Response: anki.collection.OpChanges

Request fields:
  key: optional string
  value_json: optional bytes
  undoable: optional bool

Usage:
  anki_as_code api config set-config-json [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-config-json
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.ConfigService/SetConfigJsonNoUndo

Request: anki.config.SetConfigJsonRequest
Response: anki.generic.Empty

Request fields:
  key: optional string
  value_json: optional bytes
  undoable: optional bool

Usage:
  anki_as_code api config set-config-json-no-undo [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-config-json-no-undo
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.ConfigService/SetConfigString

Request: anki.config.SetConfigStringRequest
Response: anki.collection.OpChanges

Request fields:
  key: optional anki.config.ConfigKey.String
  value: optional string
  undoable: optional bool

Usage:
  anki_as_code api config set-config-string [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-config-string
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.config.ConfigService/SetPreferences

Request: anki.config.Preferences
Response: anki.collection.OpChanges

Request fields:
  scheduling: optional anki.config.Preferences.Scheduling
  reviewing: optional anki.config.Preferences.Reviewing
  editing: optional anki.config.Preferences.Editing
  backups: optional anki.config.Preferences.BackupLimits

Usage:
  anki_as_code api config set-preferences [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-preferences
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.deck_config.DeckConfigService

Usage:
  anki_as_code api deck-config [command]

Available Commands:
  add-or-update-deck-config-legacy /anki.deck_config.DeckConfigService/AddOrUpdateDeckConfigLegacy
  all-deck-config-legacy           /anki.deck_config.DeckConfigService/AllDeckConfigLegacy
  get-deck-config                  /anki.deck_config.DeckConfigService/GetDeckConfig
  get-deck-config-legacy           /anki.deck_config.DeckConfigService/GetDeckConfigLegacy
  get-deck-configs-for-update      /anki.deck_config.DeckConfigService/GetDeckConfigsForUpdate
  get-ignored-before-count         /anki.deck_config.DeckConfigService/GetIgnoredBeforeCount
  get-retention-workload           /anki.deck_config.DeckConfigService/GetRetentionWorkload
  new-deck-config-legacy           /anki.deck_config.DeckConfigService/NewDeckConfigLegacy
  remove-deck-config               /anki.deck_config.DeckConfigService/RemoveDeckConfig
  update-deck-configs              /anki.deck_config.DeckConfigService/UpdateDeckConfigs

Flags:
  -h, --help   help for deck-config

Use "anki_as_code api deck-config [command] --help" for more information about a command.
/anki.deck_config.DeckConfigService/AddOrUpdateDeckConfigLegacy

Request: anki.generic.Json
Response: anki.deck_config.DeckConfigId

Request fields:
  json: optional bytes

Usage:
  anki_as_code api deck-config add-or-update-deck-config-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-or-update-deck-config-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.DeckConfigService/AllDeckConfigLegacy

Request: anki.generic.Empty
Response: anki.generic.Json

Usage:
  anki_as_code api deck-config all-deck-config-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for all-deck-config-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.DeckConfigService/GetDeckConfig

Request: anki.deck_config.DeckConfigId
Response: anki.deck_config.DeckConfig

Request fields:
  dcid: optional int64

Usage:
  anki_as_code api deck-config get-deck-config [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck-config
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.DeckConfigService/GetDeckConfigLegacy

Request: anki.deck_config.DeckConfigId
Response: anki.generic.Json

Request fields:
  dcid: optional int64

Usage:
  anki_as_code api deck-config get-deck-config-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck-config-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.DeckConfigService/GetDeckConfigsForUpdate

Request: anki.decks.DeckId
Response: anki.deck_config.DeckConfigsForUpdate

Request fields:
  did: optional int64

Usage:
  anki_as_code api deck-config get-deck-configs-for-update [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck-configs-for-update
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.DeckConfigService/GetIgnoredBeforeCount

Request: anki.deck_config.GetIgnoredBeforeCountRequest
Response: anki.deck_config.GetIgnoredBeforeCountResponse

Request fields:
  ignore_revlogs_before_date: optional string
  search: optional string

Usage:
  anki_as_code api deck-config get-ignored-before-count [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-ignored-before-count
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.DeckConfigService/GetRetentionWorkload

Request: anki.deck_config.GetRetentionWorkloadRequest
Response: anki.deck_config.GetRetentionWorkloadResponse

Request fields:
  w: repeated float
  search: optional string

Usage:
  anki_as_code api deck-config get-retention-workload [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-retention-workload
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.DeckConfigService/NewDeckConfigLegacy

Request: anki.generic.Empty
Response: anki.generic.Json

Usage:
  anki_as_code api deck-config new-deck-config-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for new-deck-config-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.DeckConfigService/RemoveDeckConfig

Request: anki.deck_config.DeckConfigId
Response: anki.generic.Empty

Request fields:
  dcid: optional int64

Usage:
  anki_as_code api deck-config remove-deck-config [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-deck-config
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.deck_config.DeckConfigService/UpdateDeckConfigs

Request: anki.deck_config.UpdateDeckConfigsRequest
Response: anki.collection.OpChanges

Request fields:
  target_deck_id: optional int64
  configs: repeated anki.deck_config.DeckConfig
  removed_config_ids: repeated int64
  mode: optional anki.deck_config.UpdateDeckConfigsMode
  card_state_customizer: optional string
  limits: optional anki.deck_config.DeckConfigsForUpdate.CurrentDeck.Limits
  new_cards_ignore_review_limit: optional bool
  fsrs: optional bool
  apply_all_parent_limits: optional bool
  fsrs_reschedule: optional bool
  fsrs_health_check: optional bool

Usage:
  anki_as_code api deck-config update-deck-configs [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-deck-configs
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.decks.DecksService

Usage:
  anki_as_code api decks [command]

Available Commands:
  add-deck                    /anki.decks.DecksService/AddDeck
  add-deck-legacy             /anki.decks.DecksService/AddDeckLegacy
  add-or-update-deck-legacy   /anki.decks.DecksService/AddOrUpdateDeckLegacy
  add-or-update-filtered-deck /anki.decks.DecksService/AddOrUpdateFilteredDeck
  deck-tree                   /anki.decks.DecksService/DeckTree
  deck-tree-legacy            /anki.decks.DecksService/DeckTreeLegacy
  filtered-deck-order-labels  /anki.decks.DecksService/FilteredDeckOrderLabels
  get-all-decks-legacy        /anki.decks.DecksService/GetAllDecksLegacy
  get-current-deck            /anki.decks.DecksService/GetCurrentDeck
  get-deck                    /anki.decks.DecksService/GetDeck
  get-deck-and-child-names    /anki.decks.DecksService/GetDeckAndChildNames
  get-deck-id-by-name         /anki.decks.DecksService/GetDeckIdByName
  get-deck-legacy             /anki.decks.DecksService/GetDeckLegacy
  get-deck-names              /anki.decks.DecksService/GetDeckNames
  get-or-create-filtered-deck /anki.decks.DecksService/GetOrCreateFilteredDeck
  new-deck                    /anki.decks.DecksService/NewDeck
  new-deck-legacy             /anki.decks.DecksService/NewDeckLegacy
  remove-decks                /anki.decks.DecksService/RemoveDecks
  rename-deck                 /anki.decks.DecksService/RenameDeck
  reparent-decks              /anki.decks.DecksService/ReparentDecks
  set-current-deck            /anki.decks.DecksService/SetCurrentDeck
  set-deck-collapsed          /anki.decks.DecksService/SetDeckCollapsed
  update-deck                 /anki.decks.DecksService/UpdateDeck
  update-deck-legacy          /anki.decks.DecksService/UpdateDeckLegacy

Flags:
  -h, --help   help for decks

Use "anki_as_code api decks [command] --help" for more information about a command.
/anki.decks.DecksService/AddDeck

Request: anki.decks.Deck
Response: anki.collection.OpChangesWithId

Request fields:
  id: optional int64
  name: optional string
  mtime_secs: optional int64
  usn: optional int32
  common: optional anki.decks.Deck.Common
  normal: optional anki.decks.Deck.Normal
  filtered: optional anki.decks.Deck.Filtered

Usage:
  anki_as_code api decks add-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/AddDeckLegacy

Request: anki.generic.Json
Response: anki.collection.OpChangesWithId

Request fields:
  json: optional bytes

Usage:
  anki_as_code api decks add-deck-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-deck-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/AddOrUpdateDeckLegacy

Request: anki.decks.AddOrUpdateDeckLegacyRequest
Response: anki.decks.DeckId

Request fields:
  deck: optional bytes
  preserve_usn_and_mtime: optional bool

Usage:
  anki_as_code api decks add-or-update-deck-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-or-update-deck-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/AddOrUpdateFilteredDeck

Request: anki.decks.FilteredDeckForUpdate
Response: anki.collection.OpChangesWithId

Request fields:
  id: optional int64
  name: optional string
  config: optional anki.decks.Deck.Filtered
  allow_empty: optional bool

Usage:
  anki_as_code api decks add-or-update-filtered-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-or-update-filtered-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/DeckTree

Request: anki.decks.DeckTreeRequest
Response: anki.decks.DeckTreeNode

Request fields:
  now: optional int64

Usage:
  anki_as_code api decks deck-tree [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for deck-tree
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/DeckTreeLegacy

Request: anki.generic.Empty
Response: anki.generic.Json

Usage:
  anki_as_code api decks deck-tree-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for deck-tree-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/FilteredDeckOrderLabels

Request: anki.generic.Empty
Response: anki.generic.StringList

Usage:
  anki_as_code api decks filtered-deck-order-labels [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for filtered-deck-order-labels
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/GetAllDecksLegacy

Request: anki.generic.Empty
Response: anki.generic.Json

Usage:
  anki_as_code api decks get-all-decks-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-all-decks-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/GetCurrentDeck

Request: anki.generic.Empty
Response: anki.decks.Deck

Usage:
  anki_as_code api decks get-current-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-current-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/GetDeck

Request: anki.decks.DeckId
Response: anki.decks.Deck

Request fields:
  did: optional int64

Usage:
  anki_as_code api decks get-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/GetDeckAndChildNames

Request: anki.decks.DeckId
Response: anki.decks.DeckNames

Request fields:
  did: optional int64

Usage:
  anki_as_code api decks get-deck-and-child-names [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck-and-child-names
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/GetDeckIdByName

Request: anki.generic.String
Response: anki.decks.DeckId

Request fields:
  val: optional string

Usage:
  anki_as_code api decks get-deck-id-by-name [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck-id-by-name
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/GetDeckLegacy

Request: anki.decks.DeckId
Response: anki.generic.Json

Request fields:
  did: optional int64

Usage:
  anki_as_code api decks get-deck-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/GetDeckNames

Request: anki.decks.GetDeckNamesRequest
Response: anki.decks.DeckNames

Request fields:
  skip_empty_default: optional bool
  include_filtered: optional bool

Usage:
  anki_as_code api decks get-deck-names [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-deck-names
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/GetOrCreateFilteredDeck

Request: anki.decks.DeckId
Response: anki.decks.FilteredDeckForUpdate

Request fields:
  did: optional int64

Usage:
  anki_as_code api decks get-or-create-filtered-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-or-create-filtered-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/NewDeck

Request: anki.generic.Empty
Response: anki.decks.Deck

Usage:
  anki_as_code api decks new-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for new-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/NewDeckLegacy

Request: anki.generic.Bool
Response: anki.generic.Json

Request fields:
  val: optional bool

Usage:
  anki_as_code api decks new-deck-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for new-deck-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/RemoveDecks

Request: anki.decks.DeckIds
Response: anki.collection.OpChangesWithCount

Request fields:
  dids: repeated int64

Usage:
  anki_as_code api decks remove-decks [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-decks
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/RenameDeck

Request: anki.decks.RenameDeckRequest
Response: anki.collection.OpChanges

Request fields:
  deck_id: optional int64
  new_name: optional string

Usage:
  anki_as_code api decks rename-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for rename-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/ReparentDecks

Request: anki.decks.ReparentDecksRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  deck_ids: repeated int64
  new_parent: optional int64

Usage:
  anki_as_code api decks reparent-decks [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for reparent-decks
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/SetCurrentDeck

Request: anki.decks.DeckId
Response: anki.collection.OpChanges

Request fields:
  did: optional int64

Usage:
  anki_as_code api decks set-current-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-current-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/SetDeckCollapsed

Request: anki.decks.SetDeckCollapsedRequest
Response: anki.collection.OpChanges

Request fields:
  deck_id: optional int64
  collapsed: optional bool
  scope: optional anki.decks.SetDeckCollapsedRequest.Scope

Usage:
  anki_as_code api decks set-deck-collapsed [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-deck-collapsed
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/UpdateDeck

Request: anki.decks.Deck
Response: anki.collection.OpChanges

Request fields:
  id: optional int64
  name: optional string
  mtime_secs: optional int64
  usn: optional int32
  common: optional anki.decks.Deck.Common
  normal: optional anki.decks.Deck.Normal
  filtered: optional anki.decks.Deck.Filtered

Usage:
  anki_as_code api decks update-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.decks.DecksService/UpdateDeckLegacy

Request: anki.generic.Json
Response: anki.collection.OpChanges

Request fields:
  json: optional bytes

Usage:
  anki_as_code api decks update-deck-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-deck-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.frontend.FrontendService

Usage:
  anki_as_code api frontend [command]

Available Commands:
  ask-user                           /anki.frontend.FrontendService/AskUser
  close-add-cards                    /anki.frontend.FrontendService/CloseAddCards
  close-edit-current                 /anki.frontend.FrontendService/CloseEditCurrent
  convert-pasted-image               /anki.frontend.FrontendService/ConvertPastedImage
  deck-options-ready                 /anki.frontend.FrontendService/deckOptionsReady
  deck-options-require-close         /anki.frontend.FrontendService/deckOptionsRequireClose
  get-meta-json                      /anki.frontend.FrontendService/GetMetaJson
  get-profile-config-json            /anki.frontend.FrontendService/GetProfileConfigJson
  get-scheduling-states-with-context /anki.frontend.FrontendService/GetSchedulingStatesWithContext
  import-dialog-require-close        /anki.frontend.FrontendService/ImportDialogRequireClose
  import-done                        /anki.frontend.FrontendService/ImportDone
  open-cards-dialog                  /anki.frontend.FrontendService/OpenCardsDialog
  open-fields-dialog                 /anki.frontend.FrontendService/OpenFieldsDialog
  open-file-picker                   /anki.frontend.FrontendService/OpenFilePicker
  open-link                          /anki.frontend.FrontendService/OpenLink
  open-media                         /anki.frontend.FrontendService/OpenMedia
  play-file                          /anki.frontend.FrontendService/PlayFile
  read-clipboard                     /anki.frontend.FrontendService/ReadClipboard
  record-audio                       /anki.frontend.FrontendService/RecordAudio
  save-custom-colours                /anki.frontend.FrontendService/SaveCustomColours
  search-in-browser                  /anki.frontend.FrontendService/SearchInBrowser
  set-meta-json                      /anki.frontend.FrontendService/SetMetaJson
  set-profile-config-json            /anki.frontend.FrontendService/SetProfileConfigJson
  set-scheduling-states              /anki.frontend.FrontendService/SetSchedulingStates
  show-in-media-folder               /anki.frontend.FrontendService/ShowInMediaFolder
  show-message-box                   /anki.frontend.FrontendService/ShowMessageBox
  write-clipboard                    /anki.frontend.FrontendService/WriteClipboard

Flags:
  -h, --help   help for frontend

Use "anki_as_code api frontend [command] --help" for more information about a command.
/anki.frontend.FrontendService/AskUser

Request: anki.frontend.AskUserRequest
Response: anki.generic.Bool

Request fields:
  text: optional string
  help: optional anki.frontend.Help
  title: optional string
  default_no: optional bool

Usage:
  anki_as_code api frontend ask-user [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for ask-user
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/CloseAddCards

Request: anki.generic.Bool
Response: anki.generic.Empty

Request fields:
  val: optional bool

Usage:
  anki_as_code api frontend close-add-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for close-add-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/CloseEditCurrent

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api frontend close-edit-current [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for close-edit-current
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/ConvertPastedImage

Request: anki.frontend.ConvertPastedImageRequest
Response: anki.frontend.ConvertPastedImageResponse

Request fields:
  data: optional bytes
  ext: optional string

Usage:
  anki_as_code api frontend convert-pasted-image [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for convert-pasted-image
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/deckOptionsReady

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api frontend deck-options-ready [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for deck-options-ready
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/deckOptionsRequireClose

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api frontend deck-options-require-close [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for deck-options-require-close
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/GetMetaJson

Request: anki.generic.String
Response: anki.generic.Json

Request fields:
  val: optional string

Usage:
  anki_as_code api frontend get-meta-json [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-meta-json
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/GetProfileConfigJson

Request: anki.generic.String
Response: anki.generic.Json

Request fields:
  val: optional string

Usage:
  anki_as_code api frontend get-profile-config-json [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-profile-config-json
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/GetSchedulingStatesWithContext

Request: anki.generic.Empty
Response: anki.frontend.SchedulingStatesWithContext

Usage:
  anki_as_code api frontend get-scheduling-states-with-context [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-scheduling-states-with-context
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/ImportDialogRequireClose

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api frontend import-dialog-require-close [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for import-dialog-require-close
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/ImportDone

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api frontend import-done [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for import-done
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/OpenCardsDialog

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api frontend open-cards-dialog [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for open-cards-dialog
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/OpenFieldsDialog

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api frontend open-fields-dialog [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for open-fields-dialog
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/OpenFilePicker

Request: anki.frontend.openFilePickerRequest
Response: anki.generic.String

Request fields:
  title: optional string
  key: optional string
  filter_description: optional string
  extensions: repeated string

Usage:
  anki_as_code api frontend open-file-picker [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for open-file-picker
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/OpenLink

Request: anki.generic.String
Response: anki.generic.Empty

Request fields:
  val: optional string

Usage:
  anki_as_code api frontend open-link [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for open-link
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/OpenMedia

Request: anki.generic.String
Response: anki.generic.Empty

Request fields:
  val: optional string

Usage:
  anki_as_code api frontend open-media [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for open-media
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/PlayFile

Request: anki.generic.String
Response: anki.generic.Empty

Request fields:
  val: optional string

Usage:
  anki_as_code api frontend play-file [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for play-file
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/ReadClipboard

Request: anki.frontend.ReadClipboardRequest
Response: anki.frontend.ReadClipboardResponse

Request fields:
  types: repeated string

Usage:
  anki_as_code api frontend read-clipboard [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for read-clipboard
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/RecordAudio

Request: anki.generic.Empty
Response: anki.generic.String

Usage:
  anki_as_code api frontend record-audio [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for record-audio
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/SaveCustomColours

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api frontend save-custom-colours [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for save-custom-colours
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/SearchInBrowser

Request: anki.search.SearchNode
Response: anki.generic.Empty

Request fields:
  group: optional anki.search.SearchNode.Group
  negated: optional anki.search.SearchNode
  parsable_text: optional string
  template: optional uint32
  nid: optional int64
  dupe: optional anki.search.SearchNode.Dupe
  field_name: optional string
  rated: optional anki.search.SearchNode.Rated
  added_in_days: optional uint32
  due_in_days: optional int32
  flag: optional anki.search.SearchNode.Flag
  card_state: optional anki.search.SearchNode.CardState
  nids: optional anki.search.SearchNode.IdList
  edited_in_days: optional uint32
  deck: optional string
  due_on_day: optional int32
  tag: optional string
  note: optional string
  introduced_in_days: optional uint32
  field: optional anki.search.SearchNode.Field
  literal_text: optional string

Usage:
  anki_as_code api frontend search-in-browser [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for search-in-browser
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/SetMetaJson

Request: anki.frontend.SetSettingJsonRequest
Response: anki.generic.Empty

Request fields:
  key: optional string
  value_json: optional bytes

Usage:
  anki_as_code api frontend set-meta-json [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-meta-json
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/SetProfileConfigJson

Request: anki.frontend.SetSettingJsonRequest
Response: anki.generic.Empty

Request fields:
  key: optional string
  value_json: optional bytes

Usage:
  anki_as_code api frontend set-profile-config-json [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-profile-config-json
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/SetSchedulingStates

Request: anki.frontend.SetSchedulingStatesRequest
Response: anki.generic.Empty

Request fields:
  key: optional string
  states: optional anki.scheduler.SchedulingStates

Usage:
  anki_as_code api frontend set-scheduling-states [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-scheduling-states
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/ShowInMediaFolder

Request: anki.generic.String
Response: anki.generic.Empty

Request fields:
  val: optional string

Usage:
  anki_as_code api frontend show-in-media-folder [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for show-in-media-folder
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/ShowMessageBox

Request: anki.frontend.ShowMessageBoxRequest
Response: anki.generic.Empty

Request fields:
  text: optional string
  type: optional anki.frontend.MessageBoxType
  help: optional anki.frontend.Help
  title: optional string
  text_format: optional string

Usage:
  anki_as_code api frontend show-message-box [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for show-message-box
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.frontend.FrontendService/WriteClipboard

Request: anki.frontend.WriteClipboardRequest
Response: anki.generic.Empty

Request fields:
  data: repeated anki.frontend.WriteClipboardRequest.DataEntry

Usage:
  anki_as_code api frontend write-clipboard [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for write-clipboard
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.github.GithubService
anki.i18n.I18nService

Usage:
  anki_as_code api i18n [command]

Available Commands:
  format-timespan  /anki.i18n.I18nService/FormatTimespan
  i18n-resources   /anki.i18n.I18nService/I18nResources
  translate-string /anki.i18n.I18nService/TranslateString

Flags:
  -h, --help   help for i18n

Use "anki_as_code api i18n [command] --help" for more information about a command.
/anki.i18n.I18nService/FormatTimespan

Request: anki.i18n.FormatTimespanRequest
Response: anki.generic.String

Request fields:
  seconds: optional float
  context: optional anki.i18n.FormatTimespanRequest.Context

Usage:
  anki_as_code api i18n format-timespan [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for format-timespan
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.i18n.I18nService/I18nResources

Request: anki.i18n.I18nResourcesRequest
Response: anki.generic.Json

Request fields:
  modules: repeated string

Usage:
  anki_as_code api i18n i18n-resources [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for i18n-resources
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.i18n.I18nService/TranslateString

Request: anki.i18n.TranslateStringRequest
Response: anki.generic.String

Request fields:
  module_index: optional uint32
  message_index: optional uint32
  args: repeated anki.i18n.TranslateStringRequest.ArgsEntry

Usage:
  anki_as_code api i18n translate-string [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for translate-string
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.image_occlusion.ImageOcclusionService

Usage:
  anki_as_code api image-occlusion [command]

Available Commands:
  add-image-occlusion-note     /anki.image_occlusion.ImageOcclusionService/AddImageOcclusionNote
  add-image-occlusion-notetype /anki.image_occlusion.ImageOcclusionService/AddImageOcclusionNotetype
  get-image-for-occlusion      /anki.image_occlusion.ImageOcclusionService/GetImageForOcclusion
  get-image-occlusion-fields   /anki.image_occlusion.ImageOcclusionService/GetImageOcclusionFields
  get-image-occlusion-note     /anki.image_occlusion.ImageOcclusionService/GetImageOcclusionNote
  update-image-occlusion-note  /anki.image_occlusion.ImageOcclusionService/UpdateImageOcclusionNote

Flags:
  -h, --help   help for image-occlusion

Use "anki_as_code api image-occlusion [command] --help" for more information about a command.
/anki.image_occlusion.ImageOcclusionService/AddImageOcclusionNote

Request: anki.image_occlusion.AddImageOcclusionNoteRequest
Response: anki.collection.OpChanges

Request fields:
  image_path: optional string
  occlusions: optional string
  header: optional string
  back_extra: optional string
  tags: repeated string
  notetype_id: optional int64

Usage:
  anki_as_code api image-occlusion add-image-occlusion-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-image-occlusion-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.image_occlusion.ImageOcclusionService/AddImageOcclusionNotetype

Request: anki.generic.Empty
Response: anki.collection.OpChanges

Usage:
  anki_as_code api image-occlusion add-image-occlusion-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-image-occlusion-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.image_occlusion.ImageOcclusionService/GetImageForOcclusion

Request: anki.image_occlusion.GetImageForOcclusionRequest
Response: anki.image_occlusion.GetImageForOcclusionResponse

Request fields:
  path: optional string

Usage:
  anki_as_code api image-occlusion get-image-for-occlusion [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-image-for-occlusion
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.image_occlusion.ImageOcclusionService/GetImageOcclusionFields

Request: anki.image_occlusion.GetImageOcclusionFieldsRequest
Response: anki.image_occlusion.GetImageOcclusionFieldsResponse

Request fields:
  notetype_id: optional int64

Usage:
  anki_as_code api image-occlusion get-image-occlusion-fields [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-image-occlusion-fields
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.image_occlusion.ImageOcclusionService/GetImageOcclusionNote

Request: anki.image_occlusion.GetImageOcclusionNoteRequest
Response: anki.image_occlusion.GetImageOcclusionNoteResponse

Request fields:
  note_id: optional int64

Usage:
  anki_as_code api image-occlusion get-image-occlusion-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-image-occlusion-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.image_occlusion.ImageOcclusionService/UpdateImageOcclusionNote

Request: anki.image_occlusion.UpdateImageOcclusionNoteRequest
Response: anki.collection.OpChanges

Request fields:
  note_id: optional int64
  occlusions: optional string
  header: optional string
  back_extra: optional string
  tags: repeated string

Usage:
  anki_as_code api image-occlusion update-image-occlusion-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-image-occlusion-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.import_export.ImportExportService

Usage:
  anki_as_code api import-export [command]

Available Commands:
  export-anki-package             /anki.import_export.ImportExportService/ExportAnkiPackage
  export-card-csv                 /anki.import_export.ImportExportService/ExportCardCsv
  export-note-csv                 /anki.import_export.ImportExportService/ExportNoteCsv
  get-csv-metadata                /anki.import_export.ImportExportService/GetCsvMetadata
  get-import-anki-package-presets /anki.import_export.ImportExportService/GetImportAnkiPackagePresets
  import-anki-package             /anki.import_export.ImportExportService/ImportAnkiPackage
  import-csv                      /anki.import_export.ImportExportService/ImportCsv
  import-json-file                /anki.import_export.ImportExportService/ImportJsonFile
  import-json-string              /anki.import_export.ImportExportService/ImportJsonString

Flags:
  -h, --help   help for import-export

Use "anki_as_code api import-export [command] --help" for more information about a command.
/anki.import_export.ImportExportService/ExportAnkiPackage

Request: anki.import_export.ExportAnkiPackageRequest
Response: anki.generic.UInt32

Request fields:
  out_path: optional string
  options: optional anki.import_export.ExportAnkiPackageOptions
  limit: optional anki.import_export.ExportLimit

Usage:
  anki_as_code api import-export export-anki-package [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for export-anki-package
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.ImportExportService/ExportCardCsv

Request: anki.import_export.ExportCardCsvRequest
Response: anki.generic.UInt32

Request fields:
  out_path: optional string
  with_html: optional bool
  limit: optional anki.import_export.ExportLimit

Usage:
  anki_as_code api import-export export-card-csv [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for export-card-csv
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.ImportExportService/ExportNoteCsv

Request: anki.import_export.ExportNoteCsvRequest
Response: anki.generic.UInt32

Request fields:
  out_path: optional string
  with_html: optional bool
  with_tags: optional bool
  with_deck: optional bool
  with_notetype: optional bool
  with_guid: optional bool
  limit: optional anki.import_export.ExportLimit

Usage:
  anki_as_code api import-export export-note-csv [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for export-note-csv
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.ImportExportService/GetCsvMetadata

Request: anki.import_export.CsvMetadataRequest
Response: anki.import_export.CsvMetadata

Request fields:
  path: optional string
  delimiter: optional anki.import_export.CsvMetadata.Delimiter
  notetype_id: optional int64
  deck_id: optional int64
  is_html: optional bool

Usage:
  anki_as_code api import-export get-csv-metadata [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-csv-metadata
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.ImportExportService/GetImportAnkiPackagePresets

Request: anki.generic.Empty
Response: anki.import_export.ImportAnkiPackageOptions

Usage:
  anki_as_code api import-export get-import-anki-package-presets [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-import-anki-package-presets
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.ImportExportService/ImportAnkiPackage

Request: anki.import_export.ImportAnkiPackageRequest
Response: anki.import_export.ImportResponse

Request fields:
  package_path: optional string
  options: optional anki.import_export.ImportAnkiPackageOptions

Usage:
  anki_as_code api import-export import-anki-package [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for import-anki-package
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.ImportExportService/ImportCsv

Request: anki.import_export.ImportCsvRequest
Response: anki.import_export.ImportResponse

Request fields:
  path: optional string
  metadata: optional anki.import_export.CsvMetadata

Usage:
  anki_as_code api import-export import-csv [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for import-csv
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.ImportExportService/ImportJsonFile

Request: anki.generic.String
Response: anki.import_export.ImportResponse

Request fields:
  val: optional string

Usage:
  anki_as_code api import-export import-json-file [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for import-json-file
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.import_export.ImportExportService/ImportJsonString

Request: anki.generic.String
Response: anki.import_export.ImportResponse

Request fields:
  val: optional string

Usage:
  anki_as_code api import-export import-json-string [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for import-json-string
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.links.LinksService

Usage:
  anki_as_code api links [command]

Available Commands:
  help-page-link /anki.links.LinksService/HelpPageLink

Flags:
  -h, --help   help for links

Use "anki_as_code api links [command] --help" for more information about a command.
/anki.links.LinksService/HelpPageLink

Request: anki.links.HelpPageLinkRequest
Response: anki.generic.String

Request fields:
  page: optional anki.links.HelpPageLinkRequest.HelpPage

Usage:
  anki_as_code api links help-page-link [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for help-page-link
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.media.MediaService

Usage:
  anki_as_code api media [command]

Available Commands:
  add-media-file             /anki.media.MediaService/AddMediaFile
  add-media-from-path        /anki.media.MediaService/AddMediaFromPath
  check-media                /anki.media.MediaService/CheckMedia
  empty-trash                /anki.media.MediaService/EmptyTrash
  extract-media-files        /anki.media.MediaService/ExtractMediaFiles
  extract-static-media-files /anki.media.MediaService/ExtractStaticMediaFiles
  get-absolute-media-path    /anki.media.MediaService/GetAbsoluteMediaPath
  restore-trash              /anki.media.MediaService/RestoreTrash
  trash-media-files          /anki.media.MediaService/TrashMediaFiles

Flags:
  -h, --help   help for media

Use "anki_as_code api media [command] --help" for more information about a command.
/anki.media.MediaService/AddMediaFile

Request: anki.media.AddMediaFileRequest
Response: anki.generic.String

Request fields:
  desired_name: optional string
  data: optional bytes

Usage:
  anki_as_code api media add-media-file [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-media-file
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.MediaService/AddMediaFromPath

Request: anki.media.AddMediaFromPathRequest
Response: anki.generic.String

Request fields:
  path: optional string

Usage:
  anki_as_code api media add-media-from-path [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-media-from-path
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.MediaService/CheckMedia

Request: anki.generic.Empty
Response: anki.media.CheckMediaResponse

Usage:
  anki_as_code api media check-media [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for check-media
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.MediaService/EmptyTrash

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api media empty-trash [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for empty-trash
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.MediaService/ExtractMediaFiles

Request: anki.generic.String
Response: anki.generic.StringList

Request fields:
  val: optional string

Usage:
  anki_as_code api media extract-media-files [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for extract-media-files
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.MediaService/ExtractStaticMediaFiles

Request: anki.notetypes.NotetypeId
Response: anki.generic.StringList

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api media extract-static-media-files [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for extract-static-media-files
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.MediaService/GetAbsoluteMediaPath

Request: anki.generic.String
Response: anki.generic.String

Request fields:
  val: optional string

Usage:
  anki_as_code api media get-absolute-media-path [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-absolute-media-path
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.MediaService/RestoreTrash

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api media restore-trash [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for restore-trash
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.media.MediaService/TrashMediaFiles

Request: anki.media.TrashMediaFilesRequest
Response: anki.generic.Empty

Request fields:
  fnames: repeated string

Usage:
  anki_as_code api media trash-media-files [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for trash-media-files
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.notes.NotesService

Usage:
  anki_as_code api notes [command]

Available Commands:
  add-note                     /anki.notes.NotesService/AddNote
  add-notes                    /anki.notes.NotesService/AddNotes
  after-note-updates           /anki.notes.NotesService/AfterNoteUpdates
  cards-of-note                /anki.notes.NotesService/CardsOfNote
  cloze-numbers-in-note        /anki.notes.NotesService/ClozeNumbersInNote
  default-deck-for-notetype    /anki.notes.NotesService/DefaultDeckForNotetype
  defaults-for-adding          /anki.notes.NotesService/DefaultsForAdding
  field-names-for-notes        /anki.notes.NotesService/FieldNamesForNotes
  get-note                     /anki.notes.NotesService/GetNote
  get-single-notetype-of-notes /anki.notes.NotesService/GetSingleNotetypeOfNotes
  new-note                     /anki.notes.NotesService/NewNote
  note-fields-check            /anki.notes.NotesService/NoteFieldsCheck
  remove-notes                 /anki.notes.NotesService/RemoveNotes
  update-notes                 /anki.notes.NotesService/UpdateNotes

Flags:
  -h, --help   help for notes

Use "anki_as_code api notes [command] --help" for more information about a command.
/anki.notes.NotesService/AddNote

Request: anki.notes.AddNoteRequest
Response: anki.notes.AddNoteResponse

Request fields:
  note: optional anki.notes.Note
  deck_id: optional int64

Usage:
  anki_as_code api notes add-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.NotesService/AddNotes

Request: anki.notes.AddNotesRequest
Response: anki.notes.AddNotesResponse

Request fields:
  requests: repeated anki.notes.AddNoteRequest

Usage:
  anki_as_code api notes add-notes [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-notes
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.NotesService/AfterNoteUpdates

Request: anki.notes.AfterNoteUpdatesRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  nids: repeated int64
  mark_notes_modified: optional bool
  generate_cards: optional bool

Usage:
  anki_as_code api notes after-note-updates [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for after-note-updates
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.NotesService/CardsOfNote

Request: anki.notes.NoteId
Response: anki.cards.CardIds

Request fields:
  nid: optional int64

Usage:
  anki_as_code api notes cards-of-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for cards-of-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.NotesService/ClozeNumbersInNote

Request: anki.notes.Note
Response: anki.notes.ClozeNumbersInNoteResponse

Request fields:
  id: optional int64
  guid: optional string
  notetype_id: optional int64
  mtime_secs: optional uint32
  usn: optional int32
  tags: repeated string
  fields: repeated string

Usage:
  anki_as_code api notes cloze-numbers-in-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for cloze-numbers-in-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.NotesService/DefaultDeckForNotetype

Request: anki.notetypes.NotetypeId
Response: anki.decks.DeckId

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api notes default-deck-for-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for default-deck-for-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.NotesService/DefaultsForAdding

Request: anki.notes.DefaultsForAddingRequest
Response: anki.notes.DeckAndNotetype

Request fields:
  home_deck_of_current_review_card: optional int64

Usage:
  anki_as_code api notes defaults-for-adding [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for defaults-for-adding
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.NotesService/FieldNamesForNotes

Request: anki.notes.FieldNamesForNotesRequest
Response: anki.notes.FieldNamesForNotesResponse

Request fields:
  nids: repeated int64

Usage:
  anki_as_code api notes field-names-for-notes [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for field-names-for-notes
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.NotesService/GetNote

Request: anki.notes.NoteId
Response: anki.notes.Note

Request fields:
  nid: optional int64

Usage:
  anki_as_code api notes get-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.NotesService/GetSingleNotetypeOfNotes

Request: anki.notes.NoteIds
Response: anki.notetypes.NotetypeId

Request fields:
  note_ids: repeated int64

Usage:
  anki_as_code api notes get-single-notetype-of-notes [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-single-notetype-of-notes
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.NotesService/NewNote

Request: anki.notetypes.NotetypeId
Response: anki.notes.Note

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api notes new-note [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for new-note
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.NotesService/NoteFieldsCheck

Request: anki.notes.Note
Response: anki.notes.NoteFieldsCheckResponse

Request fields:
  id: optional int64
  guid: optional string
  notetype_id: optional int64
  mtime_secs: optional uint32
  usn: optional int32
  tags: repeated string
  fields: repeated string

Usage:
  anki_as_code api notes note-fields-check [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for note-fields-check
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.NotesService/RemoveNotes

Request: anki.notes.RemoveNotesRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  note_ids: repeated int64
  card_ids: repeated int64

Usage:
  anki_as_code api notes remove-notes [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-notes
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notes.NotesService/UpdateNotes

Request: anki.notes.UpdateNotesRequest
Response: anki.collection.OpChanges

Request fields:
  notes: repeated anki.notes.Note
  skip_undo_entry: optional bool

Usage:
  anki_as_code api notes update-notes [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-notes
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.notetypes.NotetypesService

Usage:
  anki_as_code api notetypes [command]

Available Commands:
  add-notetype                  /anki.notetypes.NotetypesService/AddNotetype
  add-notetype-legacy           /anki.notetypes.NotetypesService/AddNotetypeLegacy
  add-or-update-notetype        /anki.notetypes.NotetypesService/AddOrUpdateNotetype
  change-notetype               /anki.notetypes.NotetypesService/ChangeNotetype
  get-aux-notetype-config-key   /anki.notetypes.NotetypesService/GetAuxNotetypeConfigKey
  get-aux-template-config-key   /anki.notetypes.NotetypesService/GetAuxTemplateConfigKey
  get-change-notetype-info      /anki.notetypes.NotetypesService/GetChangeNotetypeInfo
  get-cloze-field-ords          /anki.notetypes.NotetypesService/GetClozeFieldOrds
  get-field-names               /anki.notetypes.NotetypesService/GetFieldNames
  get-notetype                  /anki.notetypes.NotetypesService/GetNotetype
  get-notetype-id-by-name       /anki.notetypes.NotetypesService/GetNotetypeIdByName
  get-notetype-legacy           /anki.notetypes.NotetypesService/GetNotetypeLegacy
  get-notetype-names            /anki.notetypes.NotetypesService/GetNotetypeNames
  get-notetype-names-and-counts /anki.notetypes.NotetypesService/GetNotetypeNamesAndCounts
  get-stock-notetype-legacy     /anki.notetypes.NotetypesService/GetStockNotetypeLegacy
  remove-notetype               /anki.notetypes.NotetypesService/RemoveNotetype
  restore-notetype-to-stock     /anki.notetypes.NotetypesService/RestoreNotetypeToStock
  update-notetype               /anki.notetypes.NotetypesService/UpdateNotetype
  update-notetype-legacy        /anki.notetypes.NotetypesService/UpdateNotetypeLegacy

Flags:
  -h, --help   help for notetypes

Use "anki_as_code api notetypes [command] --help" for more information about a command.
/anki.notetypes.NotetypesService/AddNotetype

Request: anki.notetypes.Notetype
Response: anki.collection.OpChangesWithId

Request fields:
  id: optional int64
  name: optional string
  mtime_secs: optional int64
  usn: optional sint32
  config: optional anki.notetypes.Notetype.Config
  fields: repeated anki.notetypes.Notetype.Field
  templates: repeated anki.notetypes.Notetype.Template

Usage:
  anki_as_code api notetypes add-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/AddNotetypeLegacy

Request: anki.generic.Json
Response: anki.collection.OpChangesWithId

Request fields:
  json: optional bytes

Usage:
  anki_as_code api notetypes add-notetype-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-notetype-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/AddOrUpdateNotetype

Request: anki.notetypes.AddOrUpdateNotetypeRequest
Response: anki.notetypes.NotetypeId

Request fields:
  json: optional bytes
  preserve_usn_and_mtime: optional bool
  skip_checks: optional bool

Usage:
  anki_as_code api notetypes add-or-update-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-or-update-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/ChangeNotetype

Request: anki.notetypes.ChangeNotetypeRequest
Response: anki.collection.OpChanges

Request fields:
  note_ids: repeated int64
  new_fields: repeated int32
  new_templates: repeated int32
  old_notetype_id: optional int64
  new_notetype_id: optional int64
  current_schema: optional int64
  old_notetype_name: optional string
  is_cloze: optional bool

Usage:
  anki_as_code api notetypes change-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for change-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/GetAuxNotetypeConfigKey

Request: anki.notetypes.GetAuxConfigKeyRequest
Response: anki.generic.String

Request fields:
  id: optional int64
  key: optional string

Usage:
  anki_as_code api notetypes get-aux-notetype-config-key [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-aux-notetype-config-key
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/GetAuxTemplateConfigKey

Request: anki.notetypes.GetAuxTemplateConfigKeyRequest
Response: anki.generic.String

Request fields:
  notetype_id: optional int64
  card_ordinal: optional uint32
  key: optional string

Usage:
  anki_as_code api notetypes get-aux-template-config-key [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-aux-template-config-key
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/GetChangeNotetypeInfo

Request: anki.notetypes.GetChangeNotetypeInfoRequest
Response: anki.notetypes.ChangeNotetypeInfo

Request fields:
  old_notetype_id: optional int64
  new_notetype_id: optional int64

Usage:
  anki_as_code api notetypes get-change-notetype-info [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-change-notetype-info
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/GetClozeFieldOrds

Request: anki.notetypes.NotetypeId
Response: anki.notetypes.GetClozeFieldOrdsResponse

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api notetypes get-cloze-field-ords [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-cloze-field-ords
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/GetFieldNames

Request: anki.notetypes.NotetypeId
Response: anki.generic.StringList

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api notetypes get-field-names [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-field-names
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/GetNotetype

Request: anki.notetypes.NotetypeId
Response: anki.notetypes.Notetype

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api notetypes get-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/GetNotetypeIdByName

Request: anki.generic.String
Response: anki.notetypes.NotetypeId

Request fields:
  val: optional string

Usage:
  anki_as_code api notetypes get-notetype-id-by-name [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-notetype-id-by-name
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/GetNotetypeLegacy

Request: anki.notetypes.NotetypeId
Response: anki.generic.Json

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api notetypes get-notetype-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-notetype-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/GetNotetypeNames

Request: anki.generic.Empty
Response: anki.notetypes.NotetypeNames

Usage:
  anki_as_code api notetypes get-notetype-names [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-notetype-names
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/GetNotetypeNamesAndCounts

Request: anki.generic.Empty
Response: anki.notetypes.NotetypeUseCounts

Usage:
  anki_as_code api notetypes get-notetype-names-and-counts [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-notetype-names-and-counts
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/GetStockNotetypeLegacy

Request: anki.notetypes.StockNotetype
Response: anki.generic.Json

Request fields:
  kind: optional anki.notetypes.StockNotetype.Kind

Usage:
  anki_as_code api notetypes get-stock-notetype-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-stock-notetype-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/RemoveNotetype

Request: anki.notetypes.NotetypeId
Response: anki.collection.OpChanges

Request fields:
  ntid: optional int64

Usage:
  anki_as_code api notetypes remove-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/RestoreNotetypeToStock

Request: anki.notetypes.RestoreNotetypeToStockRequest
Response: anki.collection.OpChanges

Request fields:
  notetype_id: optional anki.notetypes.NotetypeId
  force_kind: optional anki.notetypes.StockNotetype.Kind

Usage:
  anki_as_code api notetypes restore-notetype-to-stock [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for restore-notetype-to-stock
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/UpdateNotetype

Request: anki.notetypes.Notetype
Response: anki.collection.OpChanges

Request fields:
  id: optional int64
  name: optional string
  mtime_secs: optional int64
  usn: optional sint32
  config: optional anki.notetypes.Notetype.Config
  fields: repeated anki.notetypes.Notetype.Field
  templates: repeated anki.notetypes.Notetype.Template

Usage:
  anki_as_code api notetypes update-notetype [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-notetype
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.notetypes.NotetypesService/UpdateNotetypeLegacy

Request: anki.notetypes.UpdateNotetypeLegacyRequest
Response: anki.collection.OpChanges

Request fields:
  json: optional bytes
  skip_checks: optional bool

Usage:
  anki_as_code api notetypes update-notetype-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-notetype-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.scheduler.SchedulerService

Usage:
  anki_as_code api scheduler [command]

Available Commands:
  answer-card                        /anki.scheduler.SchedulerService/AnswerCard
  bury-or-suspend-cards              /anki.scheduler.SchedulerService/BuryOrSuspendCards
  compute-fsrs-params                /anki.scheduler.SchedulerService/ComputeFsrsParams
  compute-memory-state               /anki.scheduler.SchedulerService/ComputeMemoryState
  compute-optimal-retention          /anki.scheduler.SchedulerService/ComputeOptimalRetention
  congrats-info                      /anki.scheduler.SchedulerService/CongratsInfo
  counts-for-deck-today              /anki.scheduler.SchedulerService/CountsForDeckToday
  custom-study                       /anki.scheduler.SchedulerService/CustomStudy
  custom-study-defaults              /anki.scheduler.SchedulerService/CustomStudyDefaults
  describe-next-states               /anki.scheduler.SchedulerService/DescribeNextStates
  empty-filtered-deck                /anki.scheduler.SchedulerService/EmptyFilteredDeck
  evaluate-params                    /anki.scheduler.SchedulerService/EvaluateParams
  evaluate-params-legacy             /anki.scheduler.SchedulerService/EvaluateParamsLegacy
  extend-limits                      /anki.scheduler.SchedulerService/ExtendLimits
  fuzz-delta                         /anki.scheduler.SchedulerService/FuzzDelta
  get-optimal-retention-parameters   /anki.scheduler.SchedulerService/GetOptimalRetentionParameters
  get-queued-cards                   /anki.scheduler.SchedulerService/GetQueuedCards
  get-scheduling-states              /anki.scheduler.SchedulerService/GetSchedulingStates
  grade-now                          /anki.scheduler.SchedulerService/GradeNow
  rebuild-filtered-deck              /anki.scheduler.SchedulerService/RebuildFilteredDeck
  reposition-defaults                /anki.scheduler.SchedulerService/RepositionDefaults
  restore-buried-and-suspended-cards /anki.scheduler.SchedulerService/RestoreBuriedAndSuspendedCards
  sched-timing-today                 /anki.scheduler.SchedulerService/SchedTimingToday
  schedule-cards-as-new              /anki.scheduler.SchedulerService/ScheduleCardsAsNew
  schedule-cards-as-new-defaults     /anki.scheduler.SchedulerService/ScheduleCardsAsNewDefaults
  set-due-date                       /anki.scheduler.SchedulerService/SetDueDate
  simulate-fsrs-review               /anki.scheduler.SchedulerService/SimulateFsrsReview
  simulate-fsrs-workload             /anki.scheduler.SchedulerService/SimulateFsrsWorkload
  sort-cards                         /anki.scheduler.SchedulerService/SortCards
  sort-deck                          /anki.scheduler.SchedulerService/SortDeck
  state-is-leech                     /anki.scheduler.SchedulerService/StateIsLeech
  studied-today                      /anki.scheduler.SchedulerService/StudiedToday
  studied-today-message              /anki.scheduler.SchedulerService/StudiedTodayMessage
  unbury-deck                        /anki.scheduler.SchedulerService/UnburyDeck
  update-stats                       /anki.scheduler.SchedulerService/UpdateStats
  upgrade-scheduler                  /anki.scheduler.SchedulerService/UpgradeScheduler

Flags:
  -h, --help   help for scheduler

Use "anki_as_code api scheduler [command] --help" for more information about a command.
/anki.scheduler.SchedulerService/AnswerCard

Request: anki.scheduler.CardAnswer
Response: anki.collection.OpChanges

Request fields:
  card_id: optional int64
  current_state: optional anki.scheduler.SchedulingState
  new_state: optional anki.scheduler.SchedulingState
  rating: optional anki.scheduler.CardAnswer.Rating
  answered_at_millis: optional int64
  milliseconds_taken: optional uint32

Usage:
  anki_as_code api scheduler answer-card [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for answer-card
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/BuryOrSuspendCards

Request: anki.scheduler.BuryOrSuspendCardsRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  card_ids: repeated int64
  note_ids: repeated int64
  mode: optional anki.scheduler.BuryOrSuspendCardsRequest.Mode

Usage:
  anki_as_code api scheduler bury-or-suspend-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for bury-or-suspend-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/ComputeFsrsParams

Request: anki.scheduler.ComputeFsrsParamsRequest
Response: anki.scheduler.ComputeFsrsParamsResponse

Request fields:
  search: optional string
  current_params: repeated float
  ignore_revlogs_before_ms: optional int64
  num_of_relearning_steps: optional uint32
  health_check: optional bool

Usage:
  anki_as_code api scheduler compute-fsrs-params [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for compute-fsrs-params
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/ComputeMemoryState

Request: anki.cards.CardId
Response: anki.scheduler.ComputeMemoryStateResponse

Request fields:
  cid: optional int64

Usage:
  anki_as_code api scheduler compute-memory-state [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for compute-memory-state
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/ComputeOptimalRetention

Request: anki.scheduler.SimulateFsrsReviewRequest
Response: anki.scheduler.ComputeOptimalRetentionResponse

Request fields:
  params: repeated float
  desired_retention: optional float
  deck_size: optional uint32
  days_to_simulate: optional uint32
  new_limit: optional uint32
  review_limit: optional uint32
  max_interval: optional uint32
  search: optional string
  new_cards_ignore_review_limit: optional bool
  easy_days_percentages: repeated float
  review_order: optional anki.deck_config.DeckConfig.Config.ReviewCardOrder
  suspend_after_lapse_count: optional uint32
  historical_retention: optional float
  learning_step_count: optional uint32
  relearning_step_count: optional uint32

Usage:
  anki_as_code api scheduler compute-optimal-retention [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for compute-optimal-retention
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/CongratsInfo

Request: anki.generic.Empty
Response: anki.scheduler.CongratsInfoResponse

Usage:
  anki_as_code api scheduler congrats-info [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for congrats-info
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/CountsForDeckToday

Request: anki.decks.DeckId
Response: anki.scheduler.CountsForDeckTodayResponse

Request fields:
  did: optional int64

Usage:
  anki_as_code api scheduler counts-for-deck-today [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for counts-for-deck-today
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/CustomStudy

Request: anki.scheduler.CustomStudyRequest
Response: anki.collection.OpChanges

Request fields:
  deck_id: optional int64
  new_limit_delta: optional int32
  review_limit_delta: optional int32
  forgot_days: optional uint32
  review_ahead_days: optional uint32
  preview_days: optional uint32
  cram: optional anki.scheduler.CustomStudyRequest.Cram

Usage:
  anki_as_code api scheduler custom-study [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for custom-study
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/CustomStudyDefaults

Request: anki.scheduler.CustomStudyDefaultsRequest
Response: anki.scheduler.CustomStudyDefaultsResponse

Request fields:
  deck_id: optional int64

Usage:
  anki_as_code api scheduler custom-study-defaults [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for custom-study-defaults
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/DescribeNextStates

Request: anki.scheduler.SchedulingStates
Response: anki.generic.StringList

Request fields:
  current: optional anki.scheduler.SchedulingState
  again: optional anki.scheduler.SchedulingState
  hard: optional anki.scheduler.SchedulingState
  good: optional anki.scheduler.SchedulingState
  easy: optional anki.scheduler.SchedulingState

Usage:
  anki_as_code api scheduler describe-next-states [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for describe-next-states
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/EmptyFilteredDeck

Request: anki.decks.DeckId
Response: anki.collection.OpChanges

Request fields:
  did: optional int64

Usage:
  anki_as_code api scheduler empty-filtered-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for empty-filtered-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/EvaluateParams

Request: anki.scheduler.EvaluateParamsRequest
Response: anki.scheduler.EvaluateParamsResponse

Request fields:
  search: optional string
  ignore_revlogs_before_ms: optional int64
  num_of_relearning_steps: optional uint32

Usage:
  anki_as_code api scheduler evaluate-params [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for evaluate-params
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/EvaluateParamsLegacy

Request: anki.scheduler.EvaluateParamsLegacyRequest
Response: anki.scheduler.EvaluateParamsResponse

Request fields:
  params: repeated float
  search: optional string
  ignore_revlogs_before_ms: optional int64

Usage:
  anki_as_code api scheduler evaluate-params-legacy [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for evaluate-params-legacy
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/ExtendLimits

Request: anki.scheduler.ExtendLimitsRequest
Response: anki.generic.Empty

Request fields:
  deck_id: optional int64
  new_delta: optional int32
  review_delta: optional int32

Usage:
  anki_as_code api scheduler extend-limits [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for extend-limits
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/FuzzDelta

Request: anki.scheduler.FuzzDeltaRequest
Response: anki.scheduler.FuzzDeltaResponse

Request fields:
  card_id: optional int64
  interval: optional uint32

Usage:
  anki_as_code api scheduler fuzz-delta [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for fuzz-delta
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/GetOptimalRetentionParameters

Request: anki.scheduler.GetOptimalRetentionParametersRequest
Response: anki.scheduler.GetOptimalRetentionParametersResponse

Request fields:
  search: optional string

Usage:
  anki_as_code api scheduler get-optimal-retention-parameters [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-optimal-retention-parameters
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/GetQueuedCards

Request: anki.scheduler.GetQueuedCardsRequest
Response: anki.scheduler.QueuedCards

Request fields:
  fetch_limit: optional uint32
  intraday_learning_only: optional bool

Usage:
  anki_as_code api scheduler get-queued-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-queued-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/GetSchedulingStates

Request: anki.cards.CardId
Response: anki.scheduler.SchedulingStates

Request fields:
  cid: optional int64

Usage:
  anki_as_code api scheduler get-scheduling-states [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-scheduling-states
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/GradeNow

Request: anki.scheduler.GradeNowRequest
Response: anki.collection.OpChanges

Request fields:
  card_ids: repeated int64
  rating: optional anki.scheduler.CardAnswer.Rating

Usage:
  anki_as_code api scheduler grade-now [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for grade-now
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/RebuildFilteredDeck

Request: anki.decks.DeckId
Response: anki.collection.OpChangesWithCount

Request fields:
  did: optional int64

Usage:
  anki_as_code api scheduler rebuild-filtered-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for rebuild-filtered-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/RepositionDefaults

Request: anki.generic.Empty
Response: anki.scheduler.RepositionDefaultsResponse

Usage:
  anki_as_code api scheduler reposition-defaults [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for reposition-defaults
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/RestoreBuriedAndSuspendedCards

Request: anki.cards.CardIds
Response: anki.collection.OpChanges

Request fields:
  cids: repeated int64

Usage:
  anki_as_code api scheduler restore-buried-and-suspended-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for restore-buried-and-suspended-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/SchedTimingToday

Request: anki.generic.Empty
Response: anki.scheduler.SchedTimingTodayResponse

Usage:
  anki_as_code api scheduler sched-timing-today [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for sched-timing-today
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/ScheduleCardsAsNew

Request: anki.scheduler.ScheduleCardsAsNewRequest
Response: anki.collection.OpChanges

Request fields:
  card_ids: repeated int64
  log: optional bool
  restore_position: optional bool
  reset_counts: optional bool
  context: optional anki.scheduler.ScheduleCardsAsNewRequest.Context

Usage:
  anki_as_code api scheduler schedule-cards-as-new [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for schedule-cards-as-new
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/ScheduleCardsAsNewDefaults

Request: anki.scheduler.ScheduleCardsAsNewDefaultsRequest
Response: anki.scheduler.ScheduleCardsAsNewDefaultsResponse

Request fields:
  context: optional anki.scheduler.ScheduleCardsAsNewRequest.Context

Usage:
  anki_as_code api scheduler schedule-cards-as-new-defaults [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for schedule-cards-as-new-defaults
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/SetDueDate

Request: anki.scheduler.SetDueDateRequest
Response: anki.collection.OpChanges

Request fields:
  card_ids: repeated int64
  days: optional string
  config_key: optional anki.config.OptionalStringConfigKey

Usage:
  anki_as_code api scheduler set-due-date [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-due-date
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/SimulateFsrsReview

Request: anki.scheduler.SimulateFsrsReviewRequest
Response: anki.scheduler.SimulateFsrsReviewResponse

Request fields:
  params: repeated float
  desired_retention: optional float
  deck_size: optional uint32
  days_to_simulate: optional uint32
  new_limit: optional uint32
  review_limit: optional uint32
  max_interval: optional uint32
  search: optional string
  new_cards_ignore_review_limit: optional bool
  easy_days_percentages: repeated float
  review_order: optional anki.deck_config.DeckConfig.Config.ReviewCardOrder
  suspend_after_lapse_count: optional uint32
  historical_retention: optional float
  learning_step_count: optional uint32
  relearning_step_count: optional uint32

Usage:
  anki_as_code api scheduler simulate-fsrs-review [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for simulate-fsrs-review
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/SimulateFsrsWorkload

Request: anki.scheduler.SimulateFsrsReviewRequest
Response: anki.scheduler.SimulateFsrsWorkloadResponse

Request fields:
  params: repeated float
  desired_retention: optional float
  deck_size: optional uint32
  days_to_simulate: optional uint32
  new_limit: optional uint32
  review_limit: optional uint32
  max_interval: optional uint32
  search: optional string
  new_cards_ignore_review_limit: optional bool
  easy_days_percentages: repeated float
  review_order: optional anki.deck_config.DeckConfig.Config.ReviewCardOrder
  suspend_after_lapse_count: optional uint32
  historical_retention: optional float
  learning_step_count: optional uint32
  relearning_step_count: optional uint32

Usage:
  anki_as_code api scheduler simulate-fsrs-workload [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for simulate-fsrs-workload
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/SortCards

Request: anki.scheduler.SortCardsRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  card_ids: repeated int64
  starting_from: optional uint32
  step_size: optional uint32
  randomize: optional bool
  shift_existing: optional bool

Usage:
  anki_as_code api scheduler sort-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for sort-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/SortDeck

Request: anki.scheduler.SortDeckRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  deck_id: optional int64
  randomize: optional bool

Usage:
  anki_as_code api scheduler sort-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for sort-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/StateIsLeech

Request: anki.scheduler.SchedulingState
Response: anki.generic.Bool

Request fields:
  normal: optional anki.scheduler.SchedulingState.Normal
  filtered: optional anki.scheduler.SchedulingState.Filtered
  custom_data: optional string

Usage:
  anki_as_code api scheduler state-is-leech [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for state-is-leech
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/StudiedToday

Request: anki.generic.Empty
Response: anki.generic.String

Usage:
  anki_as_code api scheduler studied-today [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for studied-today
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/StudiedTodayMessage

Request: anki.scheduler.StudiedTodayMessageRequest
Response: anki.generic.String

Request fields:
  cards: optional uint32
  seconds: optional double

Usage:
  anki_as_code api scheduler studied-today-message [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for studied-today-message
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/UnburyDeck

Request: anki.scheduler.UnburyDeckRequest
Response: anki.collection.OpChanges

Request fields:
  deck_id: optional int64
  mode: optional anki.scheduler.UnburyDeckRequest.Mode

Usage:
  anki_as_code api scheduler unbury-deck [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for unbury-deck
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/UpdateStats

Request: anki.scheduler.UpdateStatsRequest
Response: anki.generic.Empty

Request fields:
  deck_id: optional int64
  new_delta: optional int32
  review_delta: optional int32
  millisecond_delta: optional int32

Usage:
  anki_as_code api scheduler update-stats [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for update-stats
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.scheduler.SchedulerService/UpgradeScheduler

Request: anki.generic.Empty
Response: anki.generic.Empty

Usage:
  anki_as_code api scheduler upgrade-scheduler [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for upgrade-scheduler
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.search.SearchService

Usage:
  anki_as_code api search [command]

Available Commands:
  all-browser-columns        /anki.search.SearchService/AllBrowserColumns
  browser-row-for-id         /anki.search.SearchService/BrowserRowForId
  build-search-string        /anki.search.SearchService/BuildSearchString
  find-and-replace           /anki.search.SearchService/FindAndReplace
  join-search-nodes          /anki.search.SearchService/JoinSearchNodes
  replace-search-node        /anki.search.SearchService/ReplaceSearchNode
  search-cards               /anki.search.SearchService/SearchCards
  search-notes               /anki.search.SearchService/SearchNotes
  set-active-browser-columns /anki.search.SearchService/SetActiveBrowserColumns

Flags:
  -h, --help   help for search

Use "anki_as_code api search [command] --help" for more information about a command.
/anki.search.SearchService/AllBrowserColumns

Request: anki.generic.Empty
Response: anki.search.BrowserColumns

Usage:
  anki_as_code api search all-browser-columns [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for all-browser-columns
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.SearchService/BrowserRowForId

Request: anki.generic.Int64
Response: anki.search.BrowserRow

Request fields:
  val: optional int64

Usage:
  anki_as_code api search browser-row-for-id [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for browser-row-for-id
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.SearchService/BuildSearchString

Request: anki.search.SearchNode
Response: anki.generic.String

Request fields:
  group: optional anki.search.SearchNode.Group
  negated: optional anki.search.SearchNode
  parsable_text: optional string
  template: optional uint32
  nid: optional int64
  dupe: optional anki.search.SearchNode.Dupe
  field_name: optional string
  rated: optional anki.search.SearchNode.Rated
  added_in_days: optional uint32
  due_in_days: optional int32
  flag: optional anki.search.SearchNode.Flag
  card_state: optional anki.search.SearchNode.CardState
  nids: optional anki.search.SearchNode.IdList
  edited_in_days: optional uint32
  deck: optional string
  due_on_day: optional int32
  tag: optional string
  note: optional string
  introduced_in_days: optional uint32
  field: optional anki.search.SearchNode.Field
  literal_text: optional string

Usage:
  anki_as_code api search build-search-string [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for build-search-string
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.SearchService/FindAndReplace

Request: anki.search.FindAndReplaceRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  nids: repeated int64
  search: optional string
  replacement: optional string
  regex: optional bool
  match_case: optional bool
  field_name: optional string

Usage:
  anki_as_code api search find-and-replace [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for find-and-replace
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.SearchService/JoinSearchNodes

Request: anki.search.JoinSearchNodesRequest
Response: anki.generic.String

Request fields:
  joiner: optional anki.search.SearchNode.Group.Joiner
  existing_node: optional anki.search.SearchNode
  additional_node: optional anki.search.SearchNode

Usage:
  anki_as_code api search join-search-nodes [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for join-search-nodes
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.SearchService/ReplaceSearchNode

Request: anki.search.ReplaceSearchNodeRequest
Response: anki.generic.String

Request fields:
  existing_node: optional anki.search.SearchNode
  replacement_node: optional anki.search.SearchNode

Usage:
  anki_as_code api search replace-search-node [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for replace-search-node
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.SearchService/SearchCards

Request: anki.search.SearchRequest
Response: anki.search.SearchResponse

Request fields:
  search: optional string
  order: optional anki.search.SortOrder

Usage:
  anki_as_code api search search-cards [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for search-cards
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.SearchService/SearchNotes

Request: anki.search.SearchRequest
Response: anki.search.SearchResponse

Request fields:
  search: optional string
  order: optional anki.search.SortOrder

Usage:
  anki_as_code api search search-notes [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for search-notes
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.search.SearchService/SetActiveBrowserColumns

Request: anki.generic.StringList
Response: anki.generic.Empty

Request fields:
  vals: repeated string

Usage:
  anki_as_code api search set-active-browser-columns [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-active-browser-columns
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.stats.StatsService

Usage:
  anki_as_code api stats [command]

Available Commands:
  card-stats            /anki.stats.StatsService/CardStats
  get-graph-preferences /anki.stats.StatsService/GetGraphPreferences
  get-review-logs       /anki.stats.StatsService/GetReviewLogs
  graphs                /anki.stats.StatsService/Graphs
  set-graph-preferences /anki.stats.StatsService/SetGraphPreferences

Flags:
  -h, --help   help for stats

Use "anki_as_code api stats [command] --help" for more information about a command.
/anki.stats.StatsService/CardStats

Request: anki.cards.CardId
Response: anki.stats.CardStatsResponse

Request fields:
  cid: optional int64

Usage:
  anki_as_code api stats card-stats [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for card-stats
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.stats.StatsService/GetGraphPreferences

Request: anki.generic.Empty
Response: anki.stats.GraphPreferences

Usage:
  anki_as_code api stats get-graph-preferences [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-graph-preferences
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.stats.StatsService/GetReviewLogs

Request: anki.cards.CardId
Response: anki.stats.ReviewLogs

Request fields:
  cid: optional int64

Usage:
  anki_as_code api stats get-review-logs [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for get-review-logs
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.stats.StatsService/Graphs

Request: anki.stats.GraphsRequest
Response: anki.stats.GraphsResponse

Request fields:
  search: optional string
  days: optional uint32

Usage:
  anki_as_code api stats graphs [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for graphs
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.stats.StatsService/SetGraphPreferences

Request: anki.stats.GraphPreferences
Response: anki.generic.Empty

Request fields:
  calendar_first_day_of_week: optional anki.stats.GraphPreferences.Weekday
  card_counts_separate_inactive: optional bool
  browser_links_supported: optional bool
  future_due_show_backlog: optional bool

Usage:
  anki_as_code api stats set-graph-preferences [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-graph-preferences
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
anki.sync.SyncService
anki.tags.TagsService

Usage:
  anki_as_code api tags [command]

Available Commands:
  add-note-tags        /anki.tags.TagsService/AddNoteTags
  all-tags             /anki.tags.TagsService/AllTags
  clear-unused-tags    /anki.tags.TagsService/ClearUnusedTags
  complete-tag         /anki.tags.TagsService/CompleteTag
  find-and-replace-tag /anki.tags.TagsService/FindAndReplaceTag
  remove-note-tags     /anki.tags.TagsService/RemoveNoteTags
  remove-tags          /anki.tags.TagsService/RemoveTags
  rename-tags          /anki.tags.TagsService/RenameTags
  reparent-tags        /anki.tags.TagsService/ReparentTags
  set-tag-collapsed    /anki.tags.TagsService/SetTagCollapsed
  tag-tree             /anki.tags.TagsService/TagTree

Flags:
  -h, --help   help for tags

Use "anki_as_code api tags [command] --help" for more information about a command.
/anki.tags.TagsService/AddNoteTags

Request: anki.tags.NoteIdsAndTagsRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  note_ids: repeated int64
  tags: optional string

Usage:
  anki_as_code api tags add-note-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for add-note-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.TagsService/AllTags

Request: anki.generic.Empty
Response: anki.generic.StringList

Usage:
  anki_as_code api tags all-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for all-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.TagsService/ClearUnusedTags

Request: anki.generic.Empty
Response: anki.collection.OpChangesWithCount

Usage:
  anki_as_code api tags clear-unused-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for clear-unused-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.TagsService/CompleteTag

Request: anki.tags.CompleteTagRequest
Response: anki.tags.CompleteTagResponse

Request fields:
  input: optional string
  match_limit: optional uint32

Usage:
  anki_as_code api tags complete-tag [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for complete-tag
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.TagsService/FindAndReplaceTag

Request: anki.tags.FindAndReplaceTagRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  note_ids: repeated int64
  search: optional string
  replacement: optional string
  regex: optional bool
  match_case: optional bool

Usage:
  anki_as_code api tags find-and-replace-tag [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for find-and-replace-tag
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.TagsService/RemoveNoteTags

Request: anki.tags.NoteIdsAndTagsRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  note_ids: repeated int64
  tags: optional string

Usage:
  anki_as_code api tags remove-note-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-note-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.TagsService/RemoveTags

Request: anki.generic.String
Response: anki.collection.OpChangesWithCount

Request fields:
  val: optional string

Usage:
  anki_as_code api tags remove-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for remove-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.TagsService/RenameTags

Request: anki.tags.RenameTagsRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  current_prefix: optional string
  new_prefix: optional string

Usage:
  anki_as_code api tags rename-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for rename-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.TagsService/ReparentTags

Request: anki.tags.ReparentTagsRequest
Response: anki.collection.OpChangesWithCount

Request fields:
  tags: repeated string
  new_parent: optional string

Usage:
  anki_as_code api tags reparent-tags [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for reparent-tags
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.TagsService/SetTagCollapsed

Request: anki.tags.SetTagCollapsedRequest
Response: anki.collection.OpChanges

Request fields:
  name: optional string
  collapsed: optional bool

Usage:
  anki_as_code api tags set-tag-collapsed [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for set-tag-collapsed
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)
/anki.tags.TagsService/TagTree

Request: anki.generic.Empty
Response: anki.tags.TagTreeNode

Usage:
  anki_as_code api tags tag-tree [flags]

Flags:
      --backend string         Existing backend TCP endpoint or Unix socket path
      --collection string      Offline .anki2 database or .colpkg archive
  -h, --help                   help for tag-tree
      --input string           Request file, or - for stdin (default "-")
      --input-format string    Request encoding: json or toml (default "json")
      --no-write-back          Disable offline archive write-back
      --output-format string   Response encoding: json or toml (default "json")
      --timeout duration       Input, startup and request timeout (default 30s)
      --write-back             Write offline archives back on close (default true)

5.1.2 - col

Inspect and manage Anki collections
Inspect and manage Anki collections

Usage:
  anki_as_code col [flags]
  anki_as_code col [command]

Aliases:
  col, collection

Available Commands:
  apply       Reconcile an offline collection in place
  build       Build a new archive from the original and desired text
  export      Export a collection to editable TOML
  plan        Inspect desired collection changes
  state       Inspect and manage collection-backed path bindings

Flags:
  -h, --help               help for col
      --state-key string   Collection state namespace key (default "anki_as_code/state/v1")

Use "anki_as_code col [command] --help" for more information about a command.
Reconcile an offline collection in place

Usage:
  anki_as_code col apply [flags]

Flags:
      --collection string   Anki .colpkg archive or offline .anki2 database
  -h, --help                help for apply
      --text string         Collection root config or its containing directory

Global Flags:
      --state-key string   Collection state namespace key (default "anki_as_code/state/v1")
Build a new archive from the original and desired text

Usage:
  anki_as_code col build [flags]

Flags:
      --base string     Original collection archive
  -h, --help            help for build
      --output string   Destination text directory (export) or collection archive (build)
      --text string     Collection root config or its containing directory

Global Flags:
      --state-key string   Collection state namespace key (default "anki_as_code/state/v1")
Export a collection to editable TOML

Usage:
  anki_as_code col export [flags]

Flags:
      --collection string     Anki .colpkg archive or offline .anki2 database
  -h, --help                  help for export
      --output string         Destination text directory (export) or collection archive (build)
      --state-output string   Optional destination file for exported TOML state bindings

Global Flags:
      --state-key string   Collection state namespace key (default "anki_as_code/state/v1")
Inspect desired collection changes

Usage:
  anki_as_code col plan [flags]

Flags:
      --collection string   Anki .colpkg archive or offline .anki2 database
  -h, --help                help for plan
      --text string         Collection root config or its containing directory

Global Flags:
      --state-key string   Collection state namespace key (default "anki_as_code/state/v1")
Inspect and manage collection-backed path bindings

Usage:
  anki_as_code col state [flags]
  anki_as_code col state [command]

Available Commands:
  dump        Dump the stored state object
  import      Bind external objects to configuration paths
  replace     Replace the whole stored state object
  update      Merge an external state object into stored state

Flags:
      --collection string   Anki .colpkg archive or offline .anki2 database
  -h, --help                help for state

Global Flags:
      --state-key string   Collection state namespace key (default "anki_as_code/state/v1")

Use "anki_as_code col state [command] --help" for more information about a command.
Dump the stored state object

Usage:
  anki_as_code col state dump [flags]

Flags:
      --format string   State format: toml or json (default "toml")
  -h, --help            help for dump

Global Flags:
      --collection string   Anki .colpkg archive or offline .anki2 database
      --state-key string    Collection state namespace key (default "anki_as_code/state/v1")
Bind external objects to configuration paths

Usage:
  anki_as_code col state import PATH=ID [PATH=ID...] [flags]

Flags:
  -h, --help          help for import
      --text string   Collection root config or its containing directory

Global Flags:
      --collection string   Anki .colpkg archive or offline .anki2 database
      --state-key string    Collection state namespace key (default "anki_as_code/state/v1")
Replace the whole stored state object

Usage:
  anki_as_code col state replace [FILE] [flags]

Flags:
      --format string   State format: toml or json (default "toml")
  -h, --help            help for replace

Global Flags:
      --collection string   Anki .colpkg archive or offline .anki2 database
      --state-key string    Collection state namespace key (default "anki_as_code/state/v1")
Merge an external state object into stored state

Usage:
  anki_as_code col state update [FILE] [flags]

Flags:
      --format string   State format: toml or json (default "toml")
  -h, --help            help for update

Global Flags:
      --collection string   Anki .colpkg archive or offline .anki2 database
      --state-key string    Collection state namespace key (default "anki_as_code/state/v1")

5.1.3 - config

Inspect and manipulate collection configuration files
Inspect and manipulate collection configuration files

Usage:
  anki_as_code config [flags]
  anki_as_code config [command]

Aliases:
  config, conf

Available Commands:
  dump        Print parsed collection configurations
  export      Write a configuration set as TOML files

Flags:
  -h, --help   help for config

Use "anki_as_code config [command] --help" for more information about a command.
Print parsed collection configurations

Usage:
  anki_as_code config dump [flags]

Flags:
      --format string   Output format: json or toml (default "json")
  -h, --help            help for dump
      --text string     Collection root config or its containing directory
Write a configuration set as TOML files

Usage:
  anki_as_code config export [FILE] [flags]

Flags:
      --format string   Input format: json or toml (default "json")
  -h, --help            help for export
      --output string   Destination text directory (export) or collection archive (build)

5.1.4 - help

Help about any command
Help provides help for any command in the application.
Simply type anki_as_code help [path to command] for full details.

Usage:
  anki_as_code help [command] [flags]

Flags:
  -h, --help   help for help

5.1.5 - server

Manage the native Anki server
Manage the native Anki server

Usage:
  anki_as_code server [flags]
  anki_as_code server [command]

Available Commands:
  run         Run the linked native Anki CLI
  serve       Run the native Anki gRPC server

Flags:
  -h, --help   help for server

Use "anki_as_code server [command] --help" for more information about a command.

Arguments and flags are forwarded to the native CLI. Run anki_as_code server run --help for native options.

Run the linked native Anki CLI

Usage:
  anki_as_code server run [flags]

Flags:
  -h, --help   help for run

Arguments and flags are forwarded to the native CLI. Run anki_as_code server serve --help for native options.

Run the native Anki gRPC server

Usage:
  anki_as_code server serve [flags]

Flags:
  -h, --help   help for serve

6 - Anki gRPC

Rust CLI exposing Anki’s backend over stdio, TCP, or Unix sockets

Anki gRPC architectureAnki gRPC architecture

Anki gRPC is a Rust CLI that forwards upstream protobuf commands to Anki’s native backend. It initializes one backend at startup using Anki’s default options. Anki owns collection semantics; the caller owns process lifetime and crash handling. Stdin/stdout is the default transport. TCP and Unix sockets are also supported. Diagnostics use stderr.

From the repository root:

bazel_agent bazel build //projects/anki_grpc:anki_grpc //projects/anki_grpc:clippy

Build an optimized worker with bazel_agent bazel build -c opt //projects/anki_grpc. Optimized builds strip the final Rust executable’s debugging information and static symbols; development builds retain them.

The third-party Anki package owns and builds the upstream native library, source pins, schemas, and single Cargo dependency lock. Its native build consumes no project implementation sources or build rules. projects/anki_grpc builds our server executable and depends on //third_party/com_github_ankitects_anki:native. Both use standard rules_rust targets. Compilation is offline and sandboxed; supported native builds target Linux x86_64.

The built executable lists commands when invoked without arguments or with --help. The serve subcommand starts the server:

anki_grpc --help
anki_grpc serve
anki_grpc serve --transport stdio
anki_grpc serve --transport tcp --listen 127.0.0.1:50051
anki_grpc serve --transport unix --listen ./anki.sock

Stdio serves one gRPC HTTP/2 connection on the process pipes, reserving stdout for protocol traffic. TCP and Unix listeners accept connections until the process exits. They require an explicit listen address or socket path; stdio rejects --listen. Listener startup prints Listening on tcp://ADDRESS or Listening on unix://PATH to stderr, including the allocated port when TCP port zero is requested. An existing Unix socket path causes startup to fail; the caller owns removal of its socket after the server exits.

Network transports use plaintext gRPC. All connections share one initialized backend and its open collection. Close a collection through Anki before reopening it or shutting down the process. Disconnecting a network client leaves the backend available to later clients.

pkg/ankiserver exposes the same Rust entry point to Go through cgo and one C ABI argument-vector function. ankiserver.Run(arguments) takes a full argument vector, including the program name, executes the native CLI and reports native failures. The serve subcommand blocks until shutdown and owns the process’s protocol streams. There are no per-RPC FFI bindings: clients continue to use ordinary gRPC and generated Anki messages.

The generic anki_as_code server run command forwards arguments to this library. anki_as_code server serve delegates to server run serve, selecting the Rust serve subcommand. Its collection workflows launch that command in a child process, retaining independent termination and crash isolation without extracting or finding another executable. The standalone anki_grpc executable remains a thin adapter over the shared Rust library. Both builds currently target Linux x86_64 and require the repository’s native Rust/C toolchains; linking introduces no new external dependencies.

  • cmd/anki_grpc/main.rs: Standalone executable adapter.
  • pkg/ankiserver/lib.rs: Transport listeners, opaque protobuf codec, and Anki dispatch.
  • pkg/ankiserver/cli.rs: Shared CLI help and transport argument validation.
  • pkg/ankiserver/build.rs: Command lookup generated from Anki’s own descriptors.
  • pkg/ankiserver/ffi.rs and server.go: C ABI entry point and Go wrapper.
  • pkg/ankiclient/: Reusable Go owner of the server process and gRPC connection.
  • docs/architecture.mmd: Client, server, and storage diagram source.
  • test/transport/: CLI and network transport E2E using official Anki messages.
  • rustfmt.toml: Rust 2021 formatting settings for the project.
  • releases/: Standard binary metadata for the repository release registry.

RPC paths use upstream service and method names, such as /anki.collection.BackendCollectionService/OpenCollection and /anki.notes.NotesService/GetNote. Anki decodes requests and encodes responses using its own schema bindings. Clients can call upstream operations immediately after connecting; initialization belongs to the server and requires no RPC. Operation failures include Anki’s serialized BackendError in the binary anki-error-bin trailer. The transport uses stable Tonic 0.14.6.

Dispatch runs on blocking threads because Anki owns its own runtime and operation synchronization. Worker panics terminate the process. A cancelled RPC does not promise rollback of a mutation already running in Anki.

Anki implicitly forwards collection-service methods through its backend services. The descriptor generator exposes both original service paths for generated clients and backend-prefixed paths for existing callers, using Anki’s own method indices. Methods declared in both services must have matching request and response schemas. TCP and Unix clients can use normal gRPC connections with the same generated clients.

Import git.alwaldend.com/alwaldend/src/projects/anki_grpc/pkg/ankiclient. Backend exposes Start(context.Context) error, Connection() (grpc.ClientConnInterface, error), and Stop(context.Context) error. BackendSTD implements it using the server’s stdin/stdout. ankiclient.New accepts one BackendSTDOptions value with Binary, Arguments, and ShutdownTimeout. It copies the arguments without starting a process. A zero shutdown timeout uses five seconds; Start rejects negative timeouts. Start launches the server and creates its gRPC connection, waiting for readiness. Its context controls startup only: cancelling it after successful startup leaves the worker running. The child inherits the parent environment and stderr. The caller supplies the exact server executable. For compatibility with existing application consumers, the Bazel Go library also includes the default worker as transitive runtime data. Other executable paths require their own runtime inputs. Failed startup releases its resources and reaps the child. The backend owns a separate lifetime context for the command.

The backend exposes grpc.ClientConnInterface through Connection. Construct Anki’s generated service clients with it; each method accepts a typed request and returns a typed response. There are no handwritten per-operation wrappers.

var worker ankiclient.Backend = ankiclient.New(ankiclient.BackendSTDOptions{
    Binary:          workerPath,
    Arguments:       []string{"serve", "--transport", "stdio"},
    ShutdownTimeout: 5 * time.Second,
})
if err := worker.Start(ctx); err != nil {
    return fmt.Errorf("start Anki: %w", err)
}
connection, err := worker.Connection()
if err != nil {
    return fmt.Errorf("get Anki connection: %w", err)
}
collections := collection.NewBackendCollectionServiceClient(connection)
items := notes.NewNotesServiceClient(connection)

_, err = collections.OpenCollection(ctx, &collection.OpenCollectionRequest{
    CollectionPath:  "/path/to/collection.anki2",
    MediaFolderPath: "/path/to/collection.media",
    MediaDbPath:     "/path/to/collection.media.db2",
})
if err != nil {
    return fmt.Errorf("open collection: %w", err)
}
note, err := items.GetNote(ctx, &notes.NoteId{Nid: noteID})

Generated clients use the upstream Go packages, such as github.com/ankitects/anki/proto/anki/collection and github.com/ankitects/anki/proto/anki/notes. Use BackendCollectionServiceClient for collection open/close and NotesServiceClient, NotetypesServiceClient, DecksServiceClient, or CardsServiceClient for collection operations.

One connection interceptor rejects calls after shutdown and decodes Anki’s error trailers, preserving gRPC status, context causes, and caller call options. Failed calls are never automatically replayed or sent to a replacement process. Cancellation stops waiting without guaranteeing rollback of a native mutation.

Close an open collection through collections.CloseCollection before calling worker.Stop(ctx). Stop signals EOF on stdin while draining stdout, waits for exit, and cancels the command’s lifetime context when its shutdown context expires or after the configured shutdown timeout. exec.CommandContext handles forced termination; an earlier Stop context deadline takes precedence. It completes reaping even after cancellation, returning the context cause and process exit errors. It also reaps crashes; unexpected exits remain errors on repeated Stop calls. Stop is safe before Start and after startup failure. Each instance permits one Start attempt; use a new instance for a new process. Connection returns an error before readiness, during startup/shutdown, after Stop, or after worker exit. Construct service clients after Start succeeds. Retained clients reject calls once Stop begins. The backend owns the connection: shut it down through Stop.

The client library supplies no server executable or implicit runtime dependency. Callers package their configured executable; native tests declare their own fixtures.

ankiclient.NewGRPC(ankiclient.BackendGRPCOptions{Address: endpoint}) implements the same Start, Connection and Stop interface for a running server. Endpoints accept TCP host:port, tcp://host:port, unix:///absolute/path and absolute socket paths. Unix URI paths may also be relative to the client’s working directory. Start waits for readiness within its context. Stop closes only the client; it does not stop the remote server or close its collection. Retained clients reject calls after Stop. Native error trailers are decoded as for stdio.

BackendCollection implements the same interface for collection lifetime. It borrows an already-started backend and never starts or stops that backend:

collectionBackend := ankiclient.NewCollection(ankiclient.BackendCollectionOptions{
    Backend: worker, // already started; no collection open
    Path:    "/path/to/collection.colpkg", // or collection.anki2
})
if err := collectionBackend.Start(ctx); err != nil {
    return fmt.Errorf("prepare collection: %w", err)
}
connection, err := collectionBackend.Connection()
if err != nil {
    return fmt.Errorf("get collection connection: %w", err)
}
items := notes.NewNotesServiceClient(connection)

The options object is copied. Path accepts .anki2 and .colpkg extensions, case-insensitively. Databases open directly; Anki can create a missing database. Media uses the database stem plus .media, with a .media.db2 index. Database writes commit in place and Stop does not roll them back.

Packages restore through Anki into an owned temporary directory by default. Set RestoreDirectory to use an empty persistent destination instead; it can be created when missing and is retained on Stop. RestoreDirectory is invalid for a database input. Source packages remain unchanged by default. Set WriteBack: true in constructor options to publish the source package with media on Stop, regardless of earlier request outcomes. This does not block mutating RPCs or roll back direct database writes. The backend API remains Start, Connection and Stop.

After work, call collectionBackend.Stop(cleanupContext) and then worker.Stop(cleanupContext), preserving both errors. A clean collection Stop publishes writable packages or closes native database storage, then deletes only its owned temporary restore. Publication failures retain the restored data and report its path for recovery. Call Stop even after Start fails. Startup leaves cleanup to the caller and adds no separate shutdown timeout. The borrowed backend stays available for another collection. Retained generated Anki clients reject after Stop. Start permits one attempt; Stop is terminal and idempotent, including before Start and after failed preparation. Lifecycle-changing native calls must use the collection connection, and callers must give the wrapper exclusive collection ownership. Anki exposes unary RPCs; a small connection adapter tracks active calls and observes CloseCollection and ExportCollectionPackage while forwarding generated client calls over the borrowed connection. These operations close the collection without closing the transport. Export also consumes it on a native failure, so confirmed completion lets Stop avoid a second close. When writable package storage was consumed, Stop reopens its restored database before source publication. Transport failures or cancellation without a native response retain the files.

Cancellation can stop waiting while native work continues. If native completion cannot be established, Stop reports failure and retains restore files instead of deleting files potentially still in use. Stop the borrowed backend first; after it is reaped, retained restore files can be removed using the location reported in the cleanup error. For programmatic cleanup, pass a caller-owned RestoreDirectory through options and remove it only after backend shutdown. Explicit destinations always remain caller-owned. Callers retain backend shutdown responsibility even when collection startup fails.

Ordinary calls remain concurrent. Stop waits for registered Go calls within its context before closing storage. Any unconfirmed native response invalidates collection access and keeps cleanup uncertain, including after later calls succeed. Anki’s collection mutex protects running native work; it cannot acknowledge a cancelled call still queued in Rust. Stop therefore retains the restore and reports failure in that case; stop the borrowed backend before cleaning its temporary files.

Applications compose the process and collection owners. Start the worker before the collection, close the collection before stopping the worker, and attempt cleanup after failed startup, callback errors, cancellation or panic unwinding. Use bounded cleanup contexts independent of operation cancellation and preserve both operation and cleanup errors.

The Anki as code collection store owns its callback scope and source reservations. The backend library owns archive write-back, readiness, shutdown and restore retention. Operation errors do not suppress enabled write-back; callers preserve operation and cleanup errors together.

Public backend names are BackendSTD, BackendGRPC and BackendCollection. The Go package is ankiclient; anki_grpc is the project and server name.

bazel_agent bazel test //projects/anki_grpc/test/transport:transport_test
bazel_agent bazel test //projects/anki_grpc/pkg/ankiclient:ankiclient_test

The server E2E checks CLI help, invalid arguments, startup initialization, persistence, and reconnection over both TCP and Unix sockets. It emits closed SQLite collections and JSON verification reports as repeatable artifacts.

The Go backend E2E uses generated clients over default stdio and checks native persistence, generated cards, original service routes, overlapping service methods, caller error trailers, concurrent calls, cancellation, startup deadlines, shutdown, and process failures. It also verifies constructor configuration, argument copying, repeated startup, stop before start, invalid arguments, startup-context isolation, connection errors during startup/shutdown, Stop deadlines, and OS-observed child reaping. Shutdown cases cover deadlines, explicit cancellation, the default five-second grace period, and a configured grace period. They also verify invalid timeout rejection and native failure details. The forwarding fixture reaps its inner Anki process before testing forced shutdown of the outer worker. It emits collection.anki2 and JSON verification reports.

The collection-backend E2E verifies prepared-backend borrowing, direct database persistence and media layout, native package exports/restores, temporary cleanup, persistent destinations, retained-client rejection, backend reuse and failed or cancelled lifecycle calls. It emits a native database/package and verification report. It also blocks a real native media download, cancels the client, and verifies that shutdown waits for active callers and retains unconfirmed restores until backend shutdown.

Application scope verification belongs to the Anki as code collection-store E2E. It exercises real workers across callback success, failure, cancellation, panic and crashes, checking process reaping, source reuse and archive preservation.

6.1 - head

Release head

7 - Ansible collection

Ansible collection alwaldend.main with Bazel source packaging

alwaldend.main is the repository’s Ansible collection. Bazel packages its Ansible source for reuse in repository automation.

  • Ansible collection
  • Bazel-managed Ansible source packaging.
namespace: alwaldend
name: main
version: 0.0.0
readme: README.md
authors:
-  <example@domain.com>
description: main alwaldend ansible collection
license:
  - AGPL-3.0-or-later
license_file: LICENSE.txt
tags: []
dependencies:
  ansible.posix: 1.5.4
  community.crypto: 2.17.0
  community.general: 11.3.0
  devsec.hardening: 9.0.1
  community.docker: 3.11.0
repository: https://git.alwaldend.com/src
documentation: https://collection-main.docs.alwaldend.com
homepage: https://collection-main.docs.alwaldend.com
issues: ""
build_ignore: []

7.1 - Playbooks

Ansible playbooks

7.2 - Roles

Ansible roles

7.2.1 - Adguard

Role to deploy adguard

7.2.1.1 - Defaults

Defaults for adguard
adguard_dir: /etc/adguard
adguard_work_dir: "{{ adguard_dir }}"
adguard_gpg_key_url: https://keys.openpgp.org/vks/v1/by-fingerprint/28645AC9776EC4C00BCE2AFC0FE641E7235E2EC6
adguard_gpg_key_src: files/key.asc
adguard_gpg_key_path: "{{ adguard_dir }}/release-key.asc"
adguard_gpg_key_checksum: "22d78dbacb461667861ee7d2dd13d13240ee003d"
adguard_release_source_url: https://github.com/AdguardTeam/AdGuardHome/releases/download
adguard_release_version: v0.107.48
adguard_release_checksum: "sha512:c0a336212e3792ae6fc6b8de976befce0038c5d6ddde919a00994c43a929349958c7bd65f7fb7fdd471962afa20855ecbf5830cc7a1d26f3037a716db638c101"
adguard_release_distrib: AdGuardHome_linux_amd64.tar.gz
adguard_release_url: "{{ adguard_release_source_url }}/{{ adguard_release_version }}/{{ adguard_release_distrib }}"
adguard_release_archive_dest: "{{ adguard_dir }}/release-{{ adguard_release_version }}-{{ adguard_release_distrib }}" 
adguard_release_dest: "{{ adguard_dir }}/release-{{ adguard_release_version }}" 
adguard_release_dir: "{{ adguard_release_dest }}/AdGuardHome"
adguard_release_bin: "{{ adguard_release_dir }}/AdGuardHome"
adguard_release_sig: "{{ adguard_release_bin }}.sig"

7.2.2 - Caddy

Role to deploy caddy

7.2.2.1 - Defaults

Defaults for caddy
caddy_enabled: false
caddy_user: caddy
caddy_config_path: /etc/caddy/Caddyfile
caddy_config_dir: /etc/caddy/configs
caddy_config: |
  import {{ caddy_config_dir }}/*

7.2.3 - CIFS

Setup cifs

7.2.3.1 - Defaults

Defaults for cifs
cifs_enabled: false
cifs_systemd_dir: /etc/systemd/system
cifs_mounts: []

7.2.4 - Consul

Consul

7.2.4.1 - Defaults

Defaults for consul
consul_user: consul
consul_user_uid: 4266
consul_dir: "/opt/consul"
consul_data_dir: "{{ consul_dir }}/data"
consul_config_dir: "{{ consul_dir }}/configs"
consul_config_path: "{{ consul_config_dir }}/consul.hcl"
consul_config_local_path: "files/consul.hcl"
consul_log_dir: "{{ consul_dir }}/logs"
consul_tls_dir: "{{ consul_dir }}/tls"
consul_service_path: "/lib/systemd/system/consul.service"
consul_tls_ca_file_local_path: files/pki_ca_servers.crt
consul_tls_ca_file_path: "{{ consul_tls_dir }}/tls_ca_file.crt"
consul_tls_cert_file_path: "{{ consul_tls_dir }}/cert_file.crt"
consul_tls_key_file_path: "{{ consul_tls_dir }}/key_file.crt"
consul_tls_common_name: "{{ inventory_hostname }}"
consul_tls_ttl: "2629746" # month
consul_tls_alt_names: ""
consul_vault_local_path: "{{ role_path }}/files/vault"
consul_bin_local_path: "{{ role_path }}/files/consul"
consul_bin_path: /usr/bin/consul

7.2.5 - Consul

Setup consul

7.2.5.1 - Defaults

Defaults for consul_old
consul_is_server: false
consul_user_name: consul
consul_user_uid:
consul_dir: "/opt/consul"
consul_persistence_dir: "{{ consul_dir }}"
consul_releases_dir: "{{ consul_dir }}/releases"
consul_config_symlink_dir: "{{ consul_configs_dir }}/current"
consul_config_symlink_data_dir: "{{ consul_config_symlink_dir }}/configs"
consul_configs_dir: "{{ consul_persistence_dir }}/configs/{{ inventory_hostname }}"
consul_data_dir: "{{ consul_persistence_dir }}/data/{{ inventory_hostname }}"
consul_config_path: "{{ consul_config_config_dir }}/consul.json"
consul_config_dir: "{{ consul_configs_dir }}/{{ consul_config_dir_name }}" 
consul_config_data_dir: "{{ consul_config_dir }}/data"
consul_config_config_dir: "{{ consul_config_dir }}/configs"
consul_config_dir_name: "{{ consul_config_version }}"
consul_config_version: "{{ lookup('ansible.builtin.pipe', 'git rev-parse HEAD') }}"
consul_env: {}
consul_configs: []
consul_env_path: "{{ consul_config_data_dir }}/consul.env"
consul_env_symlink_path: "{{ consul_config_symlink_dir }}/data/consul.env"
consul_release_dir: "{{ consul_releases_dir }}/{{ consul_release_dir_name }}"
consul_release_dir_name: "{{ consul_release_version }}"
consul_release_symlink_path: "{{ consul_releases_dir }}/current"
consul_release_symlink_bin_path: "{{ consul_release_symlink_path }}/consul"
consul_release_version: 1.20.2
consul_release_archive_name: "consul_{{ consul_release_version }}_linux_amd64"
consul_release_archive_fullname: "{{ consul_release_archive_name }}.zip"
consul_release_bin_path: "{{ consul_release_dir }}/consul"
consul_release_url: "https://releases.hashicorp.com/consul/{{ consul_release_version }}/{{ consul_release_archive_fullname }}"
consul_release_checksum: "sha256:1bf7ddf332f02e6e36082b0fdf6c3e8ce12a391e7ec7dafd3237bb12766a7fd5"
consul_agent_ca_cert_path: "{{ consul_config_data_dir }}/agent_ca_cert.pub"
consul_agent_ca_cert:
consul_server_cert_path: "{{ consul_config_data_dir }}/server_cert_{{ inventory_hostname }}.pub"
consul_server_cert:
consul_server_key_path: "{{ consul_config_data_dir }}/server_cert_{{ inventory_hostname }}.key"
consul_server_key:

7.2.6 - Consul envoy

Setup envoy for consul

7.2.6.1 - Defaults

Defaults for consul_envoy
consul_envoy_dir: "/opt/consul_envoy"
consul_envoy_deployments_dir: "{{ consul_envoy_dir }}/deployments"
consul_envoy_releases_dir: "{{ consul_envoy_dir }}/releases"
consul_envoy_deployment_dir: "{{ consul_envoy_deployments_dir }}/{{ consul_envoy_deployment_version }}"
consul_envoy_release_dir: "{{ consul_envoy_releases_dir }}/{{ consul_envoy_release_version }}"
consul_envoy_configs_dir: "{{ consul_envoy_deployment_dir }}/configs"
consul_envoy_bootstrap_config_path: "{{ consul_envoy_configs_dir }}/bootstrap.json"
consul_envoy_deployment_version: "{{ lookup('ansible.builtin.pipe', 'git rev-parse HEAD') }}"
consul_envoy_user_name: consul_envoy
consul_envoy_release_version: 1.31.0
consul_envoy_release_archive_fullname: "envoy_{{ consul_envoy_release_version }}_linux_amd64.zip"
consul_envoy_release_url: "https://releases.hashicorp.com/envoy/{{ consul_envoy_release_version }}/{{ consul_envoy_release_archive_fullname }}"
consul_envoy_release_bin_path: "{{ consul_envoy_release_dir }}/envoy"
consul_envoy_release_symlink_path: "{{ consul_envoy_releases_dir }}/current"
consul_envoy_release_checksum: "sha256:350782275de0fe50699844b4f9096d77a0193a5bcf205e14b8ad964ec429d45e"

7.2.7 - Dev VM

Set up repositories and packages for a development VM

The default task entry point configures package repositories and development packages. It uses the same dev_vm_packages list with either the ordinary package manager or RPM-OSTree layering. dev_vm_package_backend accepts auto, package, or rpm_ostree; auto selects RPM-OSTree when /run/ostree-booted exists. Set dev_vm_install_packages to false to skip repository and package management entirely.

RPM-OSTree changes are staged for the next boot by default. The role reports a pending deployment but does not reboot the host. Set dev_vm_rpm_ostree_apply_live to true only when live application is known to be safe for the selected packages.

The packaged Fedora mirror and Bazelisk tool currently make this role specific to Linux x86-64 development hosts.

The packages task entry point exposes package management separately from other role tasks. The bazel task entry point installs a caller-provided Bazel rc, Bazelisk, and the repository’s bazel_agent runner for one developer account.

Import the Bazel entry point with tasks_from: bazel and set:

  • dev_vm_bazel_user: owner of the installed files.
  • dev_vm_bazel_group: group of the installed files; defaults to the user.
  • dev_vm_bazel_home: absolute home directory for the developer account.
  • dev_vm_bazelrc_src: controller-side Bazel rc source; defaults to bazelrc.
  • dev_vm_bazelisk_src: controller-side Bazelisk source; defaults to bazelisk.
  • dev_vm_bazel_agent_src: controller-side bazel_agent source; defaults to bazel_agent.

The role packages its default Linux x86-64 Bazelisk and bazel_agent sources. The calling playbook must package the Bazel rc, plus any overridden binary sources, in an Ansible file search path. Cache storage and machine-specific Bazel settings remain the caller’s responsibility.

The optional android task entry point installs the caller-packaged repository Android installer as dev_vm_bazel_user. Supply dev_vm_android_installer_src and dev_vm_android_packages_src from //tools/android. It installs missing packages, accepts their licenses as part of the requested deployment, verifies each package receipt, and points ndk/current at the selected NDK. It requires the role’s Java package and does not invoke Bazel on the destination host.

7.2.7.1 - Defaults

Defaults for dev_vm
---
dev_vm_install_packages: true
dev_vm_package_backend: auto
dev_vm_rpm_ostree_apply_live: false
dev_vm_packages:
  - acl
  - clang
  - clang-tools-extra
  - java-latest-openjdk-devel
  - rust
  - cargo
  - mesa-libGL-devel
  - go
  - Xvfb
  - python3
  - gmp-devel
  - patch
  - podman
  - git
  - git-lfs
  - fuse
  - fuse-libs
  - pcsc-lite
  - pcsc-lite-devel
  - openssl
  - gnutls-utils
  - opensc
  - openssl-pkcs11
  - libdnet
  - qemu-kvm
  - qemu-img
dev_vm_bazel_user: "{{ undefined() }}"
dev_vm_bazel_group: "{{ dev_vm_bazel_user }}"
dev_vm_bazel_home: "{{ undefined() }}"
dev_vm_bazelrc_src: bazelrc
dev_vm_bazelisk_src: bazelisk
dev_vm_bazel_agent_src: bazel_agent
dev_vm_selinux_android_emulation: true
dev_vm_android_sdk_root: "{{ dev_vm_bazel_home }}/Android/Sdk"
dev_vm_android_installer_dir: "{{ dev_vm_bazel_home }}/.local/lib/android-installer"
dev_vm_android_installer_src: "{{ undefined() }}"
dev_vm_android_packages_src: "{{ undefined() }}"
dev_vm_android_install_timeout: 1800

7.2.8 - DNS

Setup dns records

7.2.8.1 - Defaults

Defaults for dns
dns_records: []
dns_domains: []
dns_njalla_api_url: https://njal.la/api/1/
dns_njalla_token:

7.2.9 - Docker

Setup docker

7.2.9.1 - Defaults

Defaults for docker
docker_enabled: false

7.2.10 - Download host

Btrfs storage, SSH publication, and native static hosting

alwaldend.main.download_host configures download hosts using the existing host, nginx, and traefik roles. It checks that the selected content device is a block device before configuring the host, creates Btrfs without forcing replacement of an existing filesystem, and mounts by UUID. This role is intended for the Fedora hosts used by infra/download.

The role creates only the publication roots: projects/, sites/, and private staging/, owned by the download publisher account. Publishers create individual projects, sites, and releases. The mount root and service state remain root-owned; privileged ownership changes never traverse per-site directories. Shared Nginx and Traefik roles own their service units. Traefik uses its standard system-disk location. A daily systemd timer runs incremental duperemove over projects and sites with resource limits and private hash state. Uploading files, extracting sites, and switching the current-release symlink are separate publisher operations. Administrators authenticate with existing SSH access and run publication as this account through sudo. The role does not manage its authorized_keys and requires no publisher key input. It installs rsync for SSH transfers.

On SELinux-enabled hosts, the role persists httpd_sys_content_t labels for static content and applies them with restorecon. This permits confined Nginx to read the custom document root; ordinary Unix permissions alone do not grant that access. See Red Hat’s Nginx configuration guide.

Filesystem creation, UUID-based mounting, directories, SELinux labels, and daily maintenance live in tasks/filesystem.yaml. The pinned community.general.btrfs_info module discovers filesystem UUIDs; selection uses the canonical device path so both direct device paths and by-id symlinks work. Attachment checks remain in tasks/main.yaml before base-host setup.

  • Select target hosts through inventory or deployment wrapper limits and enable privilege escalation. The role does not restrict play size.
  • Set force_handlers: true on the play so completed configuration changes run their notified handlers even if a later task fails.
  • Supply download_content_device. Administrator SSH and sudo access come from the shared host roles; no dedicated upload key is configured.
  • Override download_root and download_publisher as needed. The content mount must be under root-owned, non-publisher-writable parent directories.
  • Keep Traefik configuration and data on the system disk (the shared role defaults to /opt/traefik) so content-disk failure does not stop the proxy.
  • Supply the shared roles’ configuration, including nginx_config_template, Traefik static/dynamic templates, ACME settings, and base-host variables. The caller owns inventory, firewall policy, Vault references, and routing.
- name: Configure the selected download VM
  hosts: download
  become: true
  force_handlers: true
  roles:
    - alwaldend.main.download_host

The collection packages the role automatically through its existing role aggregation. Domain-specific serving templates stay with the deployment.

Default configuration

7.2.10.1 - Defaults

Defaults for download_host
# Persistent Btrfs content mount and its non-sudo content owner.
download_root: /srv/download
download_publisher: download
# Required: the content block device. Administrators publish via sudo.
download_content_device: "{{ undefined() }}"

7.2.11 - Facts

Setup ansible facts

7.2.11.1 - Defaults

Defaults for facts
facts_debug: false

7.2.12 - Filesystem

Setup filesystems

7.2.12.1 - Defaults

Defaults for filesystem
filesystem_setup: []

7.2.13 - Firewall

Setup firewall

7.2.13.1 - Defaults

Defaults for firewall
firewall_state: enabled
firewall_enabled: true
firewall_allow_port_from: []
firewall_allow_forward: []

7.2.14 - Forgejo

Forgejo

7.2.14.1 - Defaults

Defaults for forgejo
forgejo_user: forgejo
forgejo_user_uid: 5157
forgejo_dir: "/opt/forgejo"
forgejo_data_dir: "{{ forgejo_dir }}/data"
forgejo_config_dir: "{{ forgejo_dir }}/configs"
forgejo_work_dir: "{{ forgejo_dir }}/work"
forgejo_config_path: "{{ forgejo_config_dir }}/forgejo.ini"
forgejo_config_local_path: "files/forgejo.ini"
forgejo_disk:
forgejo_log_dir: "{{ forgejo_dir }}/logs"
forgejo_service_path: "/lib/systemd/system/forgejo.service"
forgejo_vault_local_path: "{{ role_path }}/files/vault"
forgejo_bin_local_path: "{{ role_path }}/files/forgejo"
forgejo_bin_path: /usr/bin/forgejo

7.2.15 - Forgejo

Forgejo

7.2.15.1 - Defaults

Defaults for threexui
threexui_user: threexui
threexui_user_uid: 6468
threexui_dir: "/opt/threexui"
threexui_data_dir: "{{ threexui_dir }}/data"
threexui_work_dir: "{{ threexui_dir }}/work"
threexui_disk:
threexui_log_dir: "{{ threexui_dir }}/logs"
threexui_service_path: "/lib/systemd/system/threexui.service"
threexui_vault_local_path: "{{ role_path }}/files/vault"
threexui_bin_dir: "{{ threexui_dir }}/bin"
threexui_bin_local_dir: "{{ role_path }}/files/threexui_bin"
threexui_config_dir: "{{ threexui_dir }}/configs"
threexui_env_path: "{{ threexui_config_dir }}/threexui.env"
threexui_env_override: {}
threexui_base_path: /
threexui_username: "{{ undefined() }}"
threexui_password: "{{ undefined() }}"
threexui_port: "2053"
threexui_debug: "false"
threexui_env:
  # https://docs.sanaei.dev/docs/reference/env-vars/
  XUI_DB_TYPE: sqlite
  XUI_DB_FOLDER: "{{ threexui_data_dir }}"
  XUI_PORT: "{{ threexui_port }}"
  XUI_INIT_WEB_BASE_PATH: "{{ threexui_base_path }}"
  XUI_ENABLE_FAIL2BAN: "true"
  XUI_SKIP_HSTS: "true"
  XUI_LOG_LEVEL: info
  XUI_DEBUG: "{{ threexui_debug }}"
  XUI_LOG_FOLDER: "{{ threexui_log_dir }}"
  XUI_BIN_FOLDER: "{{ threexui_bin_dir }}/bin"
  XRAY_VMESS_AEAD_FORCED: "false"
  XUI_ACCESS_URL: "https://{{ inventory_hostname }}{{ threexui_base_path }}"
  XUI_USERNAME: "{{ threexui_username }}"
  XUI_PASSWORD: "{{ threexui_password }}"

7.2.16 - Forgejo runner

Install and register a Forgejo Actions runner

Installs the repository-pinned Linux x86-64 Forgejo runner, creates its service account, registers it with Forgejo, and manages its systemd service. The binary and configuration are root-owned. The home and work directories belong to the runner account. Registration and the daemon use the same explicit configuration and registration file, so repeated deployments reuse the existing runner.

Supply forgejo_runner_instance and forgejo_runner_token for initial registration. forgejo_runner_name defaults to the inventory hostname. Inject the token from Vault; the role passes it through standard input with logging suppressed. The registration file is mode 0600. Changing labels or capacity updates the daemon configuration; changing a registered runner’s instance or identity requires deliberate re-registration.

Set forgejo_runner_install_packages: false when the calling deployment supplies all runner packages, including on RPM-OSTree hosts. Node.js is required for JavaScript actions such as checkout. The acl package must be available for Ansible to execute registration as the unprivileged runner account; both roles include it in their package defaults. Complete any required reboot before starting this role. Container runtime configuration remains the caller’s responsibility. The default installation and service paths are writable on OSTree hosts.

Host executor labels run jobs as the runner account without job isolation. Restrict registration to trusted repositories and keep deployment credentials out of the runner environment. The role does not grant sudo access. The Actions cache service is disabled by default; enable it only after configuring its network reachability. Configuration, binary, and service changes trigger a handler to reload systemd and restart the runner.

7.2.16.1 - Defaults

Defaults for forgejo_runner
---
forgejo_runner_user: forgejo-runner
forgejo_runner_user_uid: 5721
forgejo_runner_dir: /opt/forgejo-runner
forgejo_runner_home_dir: "{{ forgejo_runner_dir }}/home"
forgejo_runner_work_dir: "{{ forgejo_runner_dir }}/work"
forgejo_runner_bin_local_path: "{{ role_path }}/files/forgejo-runner"
forgejo_runner_bin_path: "{{ forgejo_runner_dir }}/forgejo-runner"
forgejo_runner_service_path: /etc/systemd/system/forgejo-runner.service
forgejo_runner_config_path: "{{ forgejo_runner_dir }}/config.yaml"
forgejo_runner_registration_path: "{{ forgejo_runner_work_dir }}/.runner"
forgejo_runner_install_packages: true
forgejo_runner_packages:
  - acl
  - git
  - nodejs
  - podman
forgejo_runner_instance: "{{ undefined() }}"
forgejo_runner_token: "{{ undefined() }}"
forgejo_runner_name: "{{ inventory_hostname }}"
forgejo_runner_labels:
  - "self-hosted:host"
forgejo_runner_capacity: 1
forgejo_runner_timeout: 3h
forgejo_runner_shutdown_timeout: 30s
forgejo_runner_service_stop_timeout: 60s
forgejo_runner_registration_timeout: 120
forgejo_runner_cache_enabled: false

7.2.17 - Gpg

Setup GPG

7.2.17.1 - Defaults

Defaults for gpg
gpg_users: []

7.2.18 - Harboer

Harbor

7.2.18.1 - Defaults

Defaults for harbor
harbor_user: harbor
harbor_user_uid: 7049
harbor_dir: "/opt/harbor"
harbor_installer_dir: "{{ harbor_dir }}/installer"
harbor_logs_dir: "{{ harbor_dir }}/logs"
harbor_data_dir: "{{ harbor_dir }}/data"
harbor_installer_local_dir: "{{ role_path }}/files/harbor_installer"
harbor_config_path: "{{ harbor_installer_dir }}/harbor.yml"
harbor_config_local_path: "files/harbor.yaml"
harbor_domain: "{{ undefined() }}"
harbor_ca_local_path: "{{ role_path }}/files/pki_ca_servers.crt"
harbor_ca_path: /etc/docker/certs.d/{{ harbor_domain }}/ca.crt
harbor_root_ca_local_path: "{{ role_path }}/files/pki_ca_root.crt"

7.2.19 - Hermes

Install and run the Hermes Agent gateway

7.2.19.1 - Defaults

Defaults for hermes
hermes_user: hermes
hermes_user_uid: 8150
hermes_dir: /opt/hermes
hermes_home_dir: "{{ hermes_dir }}/home"
hermes_install_dir: "{{ hermes_dir }}/hermes-agent"
hermes_disk:
hermes_port: 8642
hermes_commit: "{{ undefined() }}"
hermes_installer_local_path: "{{ role_path }}/files/install.sh"
hermes_installer_path: "{{ hermes_dir }}/install.sh"
hermes_config_local_path: "files/hermes.yaml"
hermes_config_path: "{{ hermes_home_dir }}/.hermes/config.yaml"
hermes_env_path: "{{ hermes_home_dir }}/.hermes/.env"
hermes_env: {}
hermes_bin_path: "{{ hermes_home_dir }}/.local/bin/hermes"
hermes_dashboard_service_path: /lib/systemd/system/hermes-dashboard.service

7.2.20 - Hiddify manager

Setup hiddify manager

7.2.20.1 - Defaults

Defaults for hiddify_manager
hiddify_manager_env:
  HIDDIFY_MANAGER_IMAGE: ghcr.io/hiddify/hiddify-manager:main@sha256:d5edef06d2133ffa26f0fcbb67e711f4356dba44c44a41a96570c4e03845a84c
  HIDDIFY_MANAGER_REDIS_IMAGE: redis:7.4.1@sha256:bb142a9c18ac18a16713c1491d779697b4e107c22a97266616099d288237ef47
  HIDDIFY_MANAGER_MARIADB_IMAGE: mariadb:11.6.2@sha256:a9547599cd87d7242435aea6fda22a9d83e2c06d16c658ef70d2868b3d3f6a80
  HIDDIFY_MANAGER_REDIS_PASSWORD: "{{ lookup('ansible.builtin.env', 'HIDDIFY_MANAGER_REDIS_PASSWORD', default=undef()) }}"
  HIDDIFY_MANAGER_MYSQL_PASSWORD: "{{ lookup('ansible.builtin.env', 'HIDDIFY_MANAGER_MYSQL_PASSWORD', default=undef()) }}"
  HIDDIFY_MANAGER_MARIADB_PASSWORD: "{{ lookup('ansible.builtin.env', 'HIDDIFY_MANAGER_MARIADB_PASSWORD', default=undef()) }}"
hiddify_manager_env_override: {}
hiddify_manager_dir: /opt/hiddify_manager

7.2.21 - Hiddify manager with host

Setup host and then hiddify manager

7.2.21.1 - Defaults

Defaults for hiddify_manager_host

7.2.22 - Host

Common host setup

7.2.22.1 - Defaults

Defaults for host

7.2.23 - Install CA

Install a certificate authority

7.2.23.1 - Defaults

Defaults for install_ca
install_ca:
  - path: "{{ role_path }}/files/pki_ca_root.crt"
  - path: "{{ role_path }}/files/pki_ca_servers.crt"

7.2.24 - K3s

Setup k3s

7.2.24.1 - Defaults

Defaults for k3s
k3s_data_dir: /srv/k3s_data
k3s_service_name: k3s
k3s_data_disk: /dev/sdb
k3s_storage_dir: /srv/k3s_storage
k3s_storage_disk: /dev/sdc
k3s_config_path: "/etc/rancher/k3s/config.yaml"
k3s_config_local_path: "files/k3s.yaml"
k3s_admission_config_path: "/etc/rancher/k3s/admission.yaml"
k3s_admission_config_local_path: "files/k3s_admission.yaml"
k3s_auth_config_path: "{{ [(k3s_config_path | dirname), 'k3s_auth.yaml'] | path_join }}"
k3s_auth_config_local_path: "files/k3s_auth.yaml"
k3s_manifests_local_path: "files/k3s_manifests.yaml"
k3s_manifests_path: "{{ k3s_data_dir }}/server/manifests/k3s-manifests.yaml"
k3s_bin_local_path: "{{ role_path }}/files/k3s"
k3s_bin_path: /usr/local/bin/k3s
k3s_install_script_local_path: "{{ role_path }}/files/k3s_install"
k3s_install_script_path: /usr/local/bin/k3s_install

7.2.25 - K3s bootstrap

Bootstrap k3s cluster

The role declares Python and uv as host packages, creates its Kubernetes virtual environment with uv venv, and installs the Python client with uv pip install. The environment is created only when its interpreter is missing; package installs report changes only when uv installs or removes distributions. These operations run during an explicitly authorized role deployment and require package-index access. Repository validation builds and renders the role without deploying it.

7.2.25.1 - Defaults

Defaults for k3s_bootstrap
k3s_bootstrap_apply_path:
k3s_bootstrap_token_name: "{{ lookup('ansible.builtin.env', 'USER', default=undef()) }}"
k3s_bootstrap_token_namespace: kube-system
k3s_bootstrap_venv_dir: "/opt/bootstrap-venv"
k3s_bootstrap_venv_bin: "{{ k3s_bootstrap_venv_dir | mandatory }}/bin/python"
k3s_bootstrap_kubeconfig: /etc/rancher/k3s/k3s.yaml
k3s_bootstrap_cluster_name: "{{ inventory_hostname }}"
k3s_bootstrap_cluster_ca_path: "{{ lookup('ansible.builtin.env', 'HOME', default=undef()) }}/.kube/ca-{{ k3s_bootstrap_cluster_name | mandatory }}.ca.crt"
k3s_bootstrap_user_ca_path: "{{ k3s_bootstrap_cluster_ca_path | mandatory | dirname }}/ca-{{ k3s_bootstrap_cluster_name | mandatory }}-{{ k3s_bootstrap_token_name | mandatory }}.ca.crt"
k3s_bootstrap_user_name: "{{ k3s_bootstrap_cluster_name | mandatory }}-{{ k3s_bootstrap_token_name | mandatory }}"
k3s_bootstrap_cluster_port:

7.2.26 - K3s cluster

Setup k3s cluster

7.2.26.1 - Defaults

Defaults for k3s_cluster

7.2.27 - K3s kubeconfig

Write k3s kubeconfig to a secret

7.2.27.1 - Defaults

Defaults for k3s_kubeconfig
k3s_kubeconfig_secret_path: "{{ undefined() }}"
k3s_kubeconfig_secret_mount: "{{ undefined() }}"
k3s_kubeconfig_path: /etc/rancher/k3s/k3s.yaml
k3s_kubeconfig_vault_bin_local_path: "{{ role_path }}/files/vault"

7.2.28 - lvg

Setup LVM volume groups

lvg_volume_groups describes the complete desired physical-volume list for each volume group. Extra physical volumes are not removed unless a caller sets remove_extra_pvs: true.

Creating a volume group initializes every listed device as an LVM physical volume. Callers must resolve stable device paths and verify that each device is the intended, unused disk before applying this role; pvcreate may overwrite an existing disk signature.

7.2.28.1 - Defaults

Defaults for lvg
lvg_volume_groups: []

7.2.29 - lvol

Setup LVM logical volumes

Each lvol_volumes entry can constrain allocation with pvs, pass creation arguments with opts, and disable shrinking with shrink: false.

7.2.29.1 - Defaults

Defaults for lvol
lvol_volumes: []

7.2.30 - Mount

Setup posix mounts

Mount entries can set opts, dump, and passno; state: mounted keeps the mount active and writes its persistent /etc/fstab entry.

7.2.30.1 - Defaults

Defaults for mount
mount_points: []

7.2.31 - Nginx

Native Nginx with validated consumer configuration

Installs Fedora’s nginx package and manages its native systemd service. The consumer supplies a complete nginx_config_template, including listeners, HTTP settings, MIME includes, and document roots. Replacing the main config also removes package-default virtual hosts from the active configuration.

Ansible renders and validates the entire candidate with nginx -t -c before atomically replacing nginx_config_path. Invalid candidates leave the prior configuration and running service intact. Valid changes notify a reload; an unchanged run does not restart or reload Nginx. The role never manages published content. Packages can be caller-managed with nginx_manage_packages: false.

The download component owns its routes, storage permissions, SELinux labels, and the Traefik TLS frontend. The role validation record links the consumer fixture and lifecycle results.

7.2.31.1 - Defaults

Defaults for nginx
# Complete configuration template owned by the consumer.
nginx_config_template: "{{ undefined() }}"
nginx_config_path: /etc/nginx/nginx.conf
nginx_binary: /usr/sbin/nginx
nginx_manage_packages: true
nginx_packages:
  - nginx
nginx_service_name: nginx

7.2.32 - Opencode

Opencode

7.2.32.1 - Defaults

Defaults for opencode
opencode_user: opencode
opencode_user_uid: 8149
opencode_dir: "/opt/opencode"
opencode_port: 4096
opencode_domain: "{{ undefined() }}"
opencode_log_dir: "{{ opencode_dir }}/logs"
opencode_work_dir: "{{ opencode_dir }}/work"
opencode_home_dir: "{{ opencode_dir }}/home"
opencode_config_dir: "{{ opencode_home_dir }}/.config/opencode"
opencode_config_path: "{{ opencode_config_dir }}/opencode.json"
opencode_config_local_path: "files/opencode.json"
opencode_disk:
opencode_service_path: "/lib/systemd/system/opencode.service"
opencode_bin_local_path: "{{ role_path }}/files/opencode"
opencode_bin_path: /usr/bin/opencode
opencode_env_path: "{{ opencode_config_dir }}/opencode.env"
opencode_env_override: {}
opencode_ssh_public_key: "{{ undefined() }}"
opencode_ssh_private_key: "{{ undefined() }}"
opencode_server_username: "{{ undefined() }}"
opencode_server_password: "{{ undefined() }}"
opencode_env:
  OPENCODE_SERVER_USERNAME: "{{ opencode_server_username }}"
  OPENCODE_SERVER_PASSWORD: "{{ opencode_server_password }}"

7.2.33 - OpenHands automation

OpenHands automation server

Runs the OpenHands automation server natively from a uv-managed virtual environment. It stores schedules and event triggers, tracks run lifecycle, and dispatches conversations to the agent server.

The automation server is not a sandbox. It records which agent server should run a dispatched conversation and hands that work to AUTOMATION_AGENT_SERVER_URL; setting that variable selects the agent server’s local mode, which uses a persistent local agent server instead of managed OpenHands Cloud sandboxes.

openhands_automation_agent_server_api_key must equal the agent server’s session API key because both services authenticate the same X-Session-API-Key value. openhands_automation_local_api_key is the key browsers present to this service.

The service stores state in SQLite via AUTOMATION_DB_URL by default, which local mode supports without a separate database role. Set openhands_automation_database_url to a PostgreSQL URL to use one instead. openhands_automation_kv_secret enables the automation key-value store and is required for automations that persist state between runs.

openhands_automation_base_url is the externally reachable origin the service appends /api/automation to when it builds callback URLs, so it must be the origin the browser and the dispatched agent server side both use.

7.2.33.1 - Defaults

Defaults for openhands_automation
openhands_automation_user: openhands
openhands_automation_user_uid: 8154
openhands_automation_dir: /opt/openhands-automation
openhands_automation_home_dir: "{{ openhands_automation_dir }}/home"
openhands_automation_work_dir: "{{ openhands_automation_dir }}/work"
openhands_automation_state_dir: "{{ openhands_automation_dir }}/state"
openhands_automation_disk:
openhands_automation_packages:
  - python3.12
  - uv
openhands_automation_host: 127.0.0.1
openhands_automation_port: 18001
openhands_automation_version: "{{ undefined() }}"
openhands_automation_agent_server_version: "{{ undefined() }}"
openhands_automation_agent_server_url: "{{ undefined() }}"
openhands_automation_sandbox_agent_server_url: ""
openhands_automation_agent_server_api_key: "{{ undefined() }}"
openhands_automation_base_url: "{{ undefined() }}"
openhands_automation_local_api_key: "{{ undefined() }}"
openhands_automation_kv_secret: "{{ undefined() }}"
openhands_automation_database_url: "sqlite+aiosqlite:///{{ openhands_automation_state_dir }}/automations.db"
openhands_automation_workspace_base: "{{ openhands_automation_work_dir }}/automations"
openhands_automation_venv_dir: "{{ openhands_automation_dir }}/venv"
openhands_automation_service_path: /lib/systemd/system/openhands-automation.service
openhands_automation_env_path: "{{ openhands_automation_dir }}/.env"
openhands_automation_env:
  PYTHONUTF8: "1"
  OPENHANDS_REMOTE_WS_READY_REQUIRED: "false"
  OPENHANDS_SUPPRESS_BANNER: "1"
openhands_automation_env_override: {}

7.2.34 - OpenHands canvas

OpenHands Agent Canvas frontend

Runs the OpenHands Agent Canvas browser client from the published npm package. The service listens on loopback port openhands_canvas_port; TLS, the public hostname, and routing to the agent server and automation API belong to the deployment’s Traefik role.

The service runs the package’s scripts/static-server.mjs directly with Node, an explicit loopback host, and the package’s build/ directory. It serves the browser client without starting an agent server, an automation server, or the npm launcher’s additional ingress process. Agent Canvas owns no conversation or automation state and executes no tools.

The browser starts with no configured backend. The operator adds one with the canvas origin as the host and the agent server’s session key as the credential. The static server receives no session key and injects none into served assets. This configuration does not advertise an embedded VSCode editor.

The npm prefix is installed inside openhands_canvas_dir. openhands_canvas_package_dir identifies the installed package containing the static server and browser assets.

7.2.34.1 - Defaults

Defaults for openhands_canvas
openhands_canvas_user: openhands
openhands_canvas_user_uid: 8153
openhands_canvas_dir: /opt/openhands-canvas
openhands_canvas_home_dir: "{{ openhands_canvas_dir }}/home"
openhands_canvas_work_dir: "{{ openhands_canvas_dir }}/work"
openhands_canvas_state_dir: "{{ openhands_canvas_dir }}/state"
openhands_canvas_package_dir: "{{ openhands_canvas_dir }}/lib/node_modules/@openhands/agent-canvas"
openhands_canvas_disk:
openhands_canvas_packages:
  - nodejs24
  - nodejs24-npm
openhands_canvas_host: 127.0.0.1
openhands_canvas_port: 8000
openhands_canvas_version: "{{ undefined() }}"
openhands_canvas_service_path: /lib/systemd/system/openhands-canvas.service
openhands_canvas_env_path: "{{ openhands_canvas_dir }}/.env"
openhands_canvas_env:
  NODE_ENV: production
openhands_canvas_env_override: {}

7.2.35 - Openhands server

OpenHands agent server

Runs the OpenHands agent server natively from a uv-managed virtual environment. It hosts conversations, executes tools, and streams events for Agent Canvas. The service binds loopback only; TLS and external reachability belong to the calling deployment.

Set openhands_server_secure to true to require a session API key. The unsecured mode omits the session key and is only appropriate where the loopback boundary is trusted.

The caller can set openhands_server_install_packages to false and install openhands_server_packages through its host-specific package workflow. OSTree hosts use the shared dev_vm package entry point and must boot into a deployment containing those dependencies before installing the service. They also set openhands_server_service_path under /etc/systemd/system.

7.2.35.1 - Defaults

Defaults for openhands_server
openhands_server_user: openhands
openhands_server_user_uid: 8152
openhands_server_dir: /opt/openhands-server
openhands_server_home_dir: "{{ openhands_server_dir }}/home"
openhands_server_work_dir: "{{ openhands_server_dir }}/work"
openhands_server_state_dir: "{{ openhands_server_dir }}/state"
openhands_server_conversations_dir: "{{ openhands_server_state_dir }}/conversations"
openhands_server_persistence_dir: "{{ openhands_server_state_dir }}/persistence"
openhands_server_workspace_dir: "{{ openhands_server_work_dir }}/project"
openhands_server_bash_events_dir: "{{ openhands_server_state_dir }}/bash_events"
openhands_server_tools_dir: "{{ openhands_server_dir }}/tools"
openhands_server_disk:
openhands_server_secure: true
openhands_server_install_packages: true
openhands_server_packages:
  - python3.12
  - uv
openhands_server_host: 127.0.0.1
openhands_server_port: 18000
openhands_server_version: "{{ undefined() }}"
openhands_server_session_api_key: "{{ undefined() }}"
openhands_server_secret_key: "{{ undefined() }}"
openhands_server_import_modules: canvas_ui_tool
openhands_server_vscode_port: 8001
openhands_server_vscode_base_path: /vscode
openhands_server_venv_dir: "{{ openhands_server_dir }}/venv"
openhands_server_venv_python: "{{ openhands_server_venv_dir }}/bin/python"
openhands_server_service_path: /lib/systemd/system/openhands-server.service
openhands_server_env_path: "{{ openhands_server_dir }}/.env"
openhands_server_env:
  LOG_JSON: "true"
  PYTHONUTF8: "1"
  OPENHANDS_REMOTE_WS_READY_REQUIRED: "false"
  OH_PERSISTENCE_DIR: "{{ openhands_server_persistence_dir }}"
  OH_CONVERSATIONS_PATH: "{{ openhands_server_conversations_dir }}"
  OH_WORKSPACE_PATH: "{{ openhands_server_workspace_dir }}"
  OH_BASH_EVENTS_DIR: "{{ openhands_server_bash_events_dir }}"
  OH_SECRET_KEY: "{{ openhands_server_secret_key }}"

7.2.36 - OS

Common os setup

7.2.36.1 - Defaults

Defaults for os
os_hardening_enabled: true

7.2.37 - Posgresql

Setup Postgresql

7.2.37.1 - Defaults

Defaults for postgresql
postgresql_packages:
  - postgresql-server
  - postgresql-contrib
postgresql_service: postgresql

7.2.38 - Pve

Proxmox Virtual Environment deploy

7.2.38.1 - Defaults

Defaults for pve
pve_repo_keyring_path: /usr/share/keyrings/proxmox-archive-keyring.gpg
pve_repo_path: /etc/apt/sources.list.d/pve-install-repo.sources
pve_repo_keyring_url: https://enterprise.proxmox.com/debian/proxmox-archive-keyring-trixie.gpg
pve_repo_keyring_checksum: "sha256:136673be77aba35dcce385b28737689ad64fd785a797e57897589aed08db6e45"
pve_snippets_dir: /var/lib/vz/snippets
pve_snippets: []
pve_repo_content: |
  Types: deb
  URIs: http://download.proxmox.com/debian/pve
  Suites: trixie
  Components: pve-no-subscription
  Signed-By: {{ pve_repo_keyring_path }}

7.2.39 - PVE cluster

Setup PVE cluster

7.2.39.1 - Defaults

Defaults for pve_cluster
pve_cluster_remove_repos:
  - pve-enterprise.list 
  - ceph.list
pve_cluster_add_repos:
  - name: pve-no-subscription
    value: deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription
  - name: ceph-squid
    value: deb http://download.proxmox.com/debian/ceph-squid bookworm no-subscription
pve_cluster_node_config: []
pve_cluster_admins: []
pve_cluster_cluster_name:
pve_cluster_acme_accounts: []
pve_cluster_acme_plugins: []
pve_cluster_venv_dir: /opt/ansible/pve_cluster_venv
pve_cluster_venv_packages: 
  - pexpect
pve_cluster_base_image_dir: /var/lib/vz/template
pve_cluster_node_name: "{{ inventory_hostname | mandatory | split('.') | first }}"
pve_cluster_ceph_enabled: false
pve_cluster_ceph_repository: no-subscription
pve_cluster_ceph_osd: []
pve_cluster_ceph_pools: []
pve_cluster_ceph_mon: []
pve_cluster_ceph_mgr: []
pve_cluster_ceph_mds: []
pve_cluster_storages: []
pve_cluster_storage_config_path: /etc/pve/storage.cfg

7.2.40 - PVE VM

Setup PVE VM

7.2.40.1 - Defaults

Defaults for pve_vm
pve_vm_agent: 
pve_vm_name: "{{ inventory_hostname }}"
pve_vm_delegate_update_known_hosts: localhost
pve_vm_delegate_pve: 
pve_vm_set: "{{ pve_vm_set_default + pve_vm_set_additional }}"
pve_vm_set_default: []
pve_vm_set_additional: []
pve_vm_set_creation: "{{ pve_vm_set_creation_default + pve_vm_set_creation_additional }}"
pve_vm_set_creation_default: []
pve_vm_set_creation_additional: []
pve_vm_resize: []
pve_vm_venv_dir: "/opt/ansible/pve_vm_venv"
pve_vm_init_user:
pve_vm_venv_packages:
  - proxmoxer
  - requests

7.2.41 - PVE VM remove

Remove PVE VM

7.2.41.1 - Defaults

Defaults for pve_vm_remove

7.2.42 - Raspberry pi

Setup raspberry pi

7.2.42.1 - Defaults

Defaults for raspberry_pi
raspberry_pi_argon_enabled: false
raspberry_pi_containers_enabled: false
raspberry_pi_argon_eeprom_script_path: /usr/local/bin/argon_argon_eeprom.sh
raspberry_pi_argon_argon1_script_path: /usr/local/bin/argon_argon1.sh
raspberry_pi_cmdline_path: /boot/firmware/cmdline.txt

7.2.43 - SSH

Setup ssh

7.2.43.1 - Defaults

Defaults for ssh
ssh_hardening_enabled: true
ssh_vault_mount: ssh/servers
ssh_vault_role: "{{ undefined }}"
ssh_sign_ignore_errors: false
ssh_valid_principals: []

7.2.44 - SSH port forwarding

Setup SSH port forwarding

7.2.44.1 - Defaults

Defaults for ssh_port_forward
ssh_port_forward_local_addr: 127.0.0.1
ssh_port_forward_script_path: /usr/local/bin/ssh-port-forward

7.2.45 - SSH update known hosts

Update known hosts

7.2.45.1 - Defaults

Defaults for ssh_update_known_hosts
ssh_update_known_hosts_hosts: []

7.2.46 - T3 Code

Run the T3 Code server as a systemd service

7.2.46.1 - Defaults

Defaults for t3code
t3code_user: t3code
t3code_user_uid: 8151
t3code_dir: /opt/t3code
t3code_home_dir: "{{ t3code_dir }}/home"
t3code_work_dir: "{{ t3code_dir }}/work"
t3code_disk:
t3code_port: 5120
t3code_version: "{{ undefined() }}"
t3code_state_dir: "{{ t3code_dir }}/state"
t3code_auth_token: "{{ undefined() }}"
t3code_service_path: /lib/systemd/system/t3code.service
t3code_env_path: "{{ t3code_dir }}/.env"
t3code_env: {}

7.2.47 - Traefik

Traefik

7.2.47.1 - Defaults

Defaults for traefik
traefik_user: traefik
traefik_no_user: false
traefik_owner: root
traefik_user_uid: 3578
traefik_dir: "/opt/traefik"
traefik_log_dir: "{{ traefik_dir }}/logs"
traefik_data_dir: "{{ traefik_dir }}/data"
traefik_tls_dir: "{{ traefik_dir }}/tls"
traefik_disk:
traefik_mtls_ca_local_path: "{{ role_path }}/files/traefik_mtls_ca.crt"
traefik_mtls_ca_path: "{{ traefik_tls_dir }}/mtls_ca.crt"
traefik_acme_path: "{{ undefined }}"
traefik_config_dir: "{{ traefik_dir }}/configs"
traefik_config_path: "{{ traefik_config_dir }}/traefik.toml"
traefik_disable_eab: false
traefik_config_local_path: "files/traefik.toml"
traefik_dynamic_config_path: "{{ traefik_config_dir }}/traefik_dynamic.toml"
traefik_dynamic_config_local_path: "files/traefik_dynamic.toml"
traefik_service_path: "/lib/systemd/system/traefik.service"
traefik_service_scope: system
traefik_bin_local_path: "{{ role_path }}/files/traefik"
traefik_bin_path: /usr/bin/traefik
traefik_vault_bin_local_path: "{{ role_path }}/files/vault"

7.2.48 - Traefik (old)

Old traefik role

7.2.48.1 - Defaults

Defaults for traefik_old
traefik_user: traefik
traefik_user_uid: 3653
traefik_env: {}
traefik_data_dir: /mnt/traefik
traefik_log_dir: "/var/log/traefik"
traefik_certificates_dir: "{{ traefik_data_dir }}/certificates"
traefik_configs_dir: "{{ traefik_data_dir }}/configs"
traefik_configs_version: "{{ lookup('ansible.builtin.pipe', 'git rev-parse HEAD') }}"
traefik_configs_dynamic_dir: "{{ traefik_configs_cur_dir }}/dynamic"
traefik_configs_dynamic_dir_symlink: "{{ traefik_configs_symlink }}/dynamic"
traefik_configs_cur_dir_name: "{{ traefik_configs_version }}"
traefik_configs_cur_dir: "{{ traefik_configs_dir }}/{{ traefik_configs_cur_dir_name }}"
traefik_configs_symlink: "{{ traefik_configs_dir }}/current"
traefik_static_config_path: "{{ traefik_configs_symlink }}/traefik.yaml"
traefik_releases_dir: /opt/traefik/releases
traefik_static_config:
traefik_dynamic_configs: []
traefik_release_version: v3.3.1
traefik_release_dir_name: "{{ traefik_release_version }}"
traefik_release_dir: "{{ traefik_releases_dir }}/{{ traefik_release_dir_name }}"
traefik_release_symlink: "{{ traefik_releases_dir }}/current"
traefik_release_symlink_bin: "{{ traefik_release_symlink }}/traefik"
traefik_release_archive_name: "traefik_{{ traefik_release_version }}_linux_amd64"
traefik_release_archive_full: "traefik_{{ traefik_release_version }}_linux_amd64.tar.gz"
traefik_release_bin_path: "{{ traefik_release_dir }}/traefik"
traefik_release_download_url: "https://github.com/traefik/traefik/releases/download/{{ traefik_release_version }}/{{ traefik_release_archive_full }}"
traefik_release_download_checksum: sha256:27fd502a8d80fc81b97faf5cebd7a1cbc1a2c5369d18e0f4471a66d1a8c139ce

7.2.49 - Update all packages

Update all system packages

7.2.49.1 - Defaults

Defaults for update_all_packages

7.2.50 - Users

Setup system users

7.2.50.1 - Defaults

Defaults for users
users_regular: {}
users_remove: {}
users_admins:
  ansible:
    name: ansible
    disable_passwd: true
    sudo_no_passwd: true
users_ssh_keys: {}

7.2.51 - Vault

Setup Hashicorp Vault

7.2.51.1 - Defaults

Defaults for vault
vault_user: vault
vault_time_server: time.cloudflare.com
vault_user_uid: 3123
vault_dir: "/opt/vault"
vault_data_dir: "{{ vault_dir }}/data"
vault_raft_dir: "{{ vault_dir }}/raft"
vault_config_dir: "{{ vault_dir }}/configs"
vault_config_path: "{{ vault_config_dir }}/vault.hcl"
vault_config_local_path: "files/vault.hcl"
vault_log_dir: "{{ vault_dir }}/logs"
vault_tls_dir: "{{ vault_dir }}/tls"
vault_service_path: "/lib/systemd/system/vault.service"
vault_tls_client_ca_file_local_path: files/tls_client_ca_file.pem
vault_tls_client_ca_file_path: "{{ vault_tls_dir }}/tls_client_ca_file.pem"
vault_tls_cert_file_path: "{{ vault_tls_dir }}/tls_cert_file.pem"
vault_tls_key_file_path: "{{ vault_tls_dir }}/tls_key_file.pem"
vault_tls_issue_path:
vault_tls_alt_names: ""
vault_bin_local_path: "{{ role_path }}/files/vault"
vault_bin_path: /usr/bin/vault
vault_peers_write: false
vault_peers_local_path:
vault_peers_remote_path: "{{ vault_raft_dir }}/raft/peers.json"

7.2.52 - Wireguard

Setup wireguard

7.2.52.1 - Defaults

Defaults for wireguard
wireguard_dir: "/etc/wireguard"
wireguard_local_config_paths: []

7.2.53 - Xray

Setup xray

Links:

7.2.53.1 - Defaults

Defaults for xray
xray_enabled: false
xray_config_dir: /usr/local/etc/xray
xray_log_dir: /var/log/xray
xray_config_path: "{{ xray_config_dir }}/0-main.json"
xray_client_id:
xray_wireguard_relays: []
xray_wireguard_ipv4_address:
xray_wireguard_ipv6_address:
xray_wireguard_private_key:
xray_config:
xray_configs: {}
xray_user: xray
xray_socket_dir: /var/shm/xray
xray_caddy_config_path: /etc/caddy/configs/xray.Caddyfile
xray_subscriptions_dir: /usr/local/etc/xray-subscriptions
xray_caddy_user: caddy

8 - Autoscroll

Mouse-driven autoscroll CLI with reloadable configuration

Autoscroll is a Python and PyQt6 command-line application that turns mouse movement into horizontal and vertical scrolling. It supports configurable buttons, scroll speed, and configuration changes without restarting.

  • Platfrom-independent autoscroll
  • Config file with hot-reload
  • Some argparse tinkering
  • Python3, PyQt6

By default, the icon is disabled, to enable it pass --icon-enable

You can pass file contents as command line arguments using @path/to/the/file syntax. Arguments in that case can be placed wherever - on one line, on several lines

If you want to dynamically pass runtime arguments (without restarting the process), you can use --config options for it

Once you press --buttons-start, you can scroll vertically or horizontally just by moving your mouse untill you press --buttons-end

If --buttons-hold is set, the srolling ends once you release --buttons-start

Once --buttons-start is pressed, the scroll thread starts looping Every loop consists of sleeping for an interval, then scrolling for either 0, 1, or -1 pixels on both axis towards the starting point Starting point is the point where --buttons-start was pressed Sleep interval is recalculated on every mouse move as such:

    100 / (--scrolling-acceleration * max(distance) + --scrolling-speed)

If --scrolling-acceleration is not 0, the speed of scrolling will be faster the farther away you are from the starting point If --scrolling-acceleration is 0, the speed of scrolling will be constant

uv venv venv
. venv/bin/activate
uv pip install autoscroll
autoscroll

Repository Python dependencies use the shared uv locking workflow. Dependencies are declared in pyproject.toml and locked in uv.lock. Update the native lock with //projects/autoscroll:uv_lock.update and review its diff. Build //projects/autoscroll:uv_lock to generate it without source writes. The sandboxed resolution action requires network access to PyPI.

autoscroll --buttons-start 1 --debug-click --icon-disable
autoscroll --icon-enable @config.txt

If config.txt is defined like this, its contents will be used as command line arguments - they will be loaded only once Arguments can be placed wherever - on one line, on several lines For example,

--buttons-start 1
--buttons-hold --debug-click
autoscroll --config-enable --config-path config.txt

If config.txt is defined like this, the process will listen for changes in that file and update itself Arguments can be placed wherever - on one line, on several lines The file is checked for changess every --config-interval For example:

--buttons-start 1 --buttons-hold
--debug_click
usage: autoscroll [-h] [-ss SCROLLING_SPEED] [-sd SCROLLING_DEAD_AREA]
                  [-sa SCROLLING_ACCELERATION] [-bh] [-bs BUTTONS_START] [-be BUTTONS_END]
                  [-ce] [-cp CONFIG_PATH] [-ci CONFIG_INTERVAL] [-ie] [-ip ICON_PATH]
                  [-is ICON_SIZE] [-df] [-dc] [-ds] [-di]

...

options:
  -h, --help            show this help message and exit

scrolling:

  -ss, --scrolling-speed int
                        constant part of the scrolling speed
                        [default: 300]
  -sd, --scrolling-dead-area int
                        size of the square area aroung the starting point where scrolling will stop, in
                        pixels
                        [default: 50]
  -sa, --scrolling-acceleration int
                        dynamic part of the scrolling speed, depends on the distance from the point
                        where the scrolling started, can be set to 0
                        [default: 10]

buttons:

  -bh, --buttons-hold   if set, the scrolling will end once you release --buttons-start
  -bs, --buttons-start int
                        button that starts the scrolling
                        [default: 2]
  -be, --buttons-end int
                        button that ends the scrolling
                        [default: --buttons-start]

config:

  -ce, --config-enable  if set, arguments from the configuration file on --config-path will be loaded
                        every --config-interval
  -cp, --config-path str
                        path to the configuration file
                        [default: ~/.config/autoscroll/config.txt]
  -ci, --config-interval int
                        how often the config file should be checked for changes, in seconds
                        [default: 5]

icon:

  -ie, --icon-enable    if set, the icon will be enabled
  -ip, --icon-path str  path to the icon
                        [default: resources/img/icon.svg]
  -is, --icon-size int  size of the icon, in pixels
                        [default: 30]

debug:

  -df, --debug-file     if set, every time the config file is parsed, information will be printed to
                        stdout
  -dc, --debug-click    if set, click info will be printed to stdout
  -ds, --debug-scroll   if set, scroll info will be printed to stdout
  -di, --debug-initial  if set, startup configuration will be printed to stdout

8.1 - Releases

Releases

8.1.1 - head

Release head

9 - Bazel agent

Bazel runner for repository agents

bazel_agent is the repository Bazel entry point for agents. It keeps the Bazel invocation behind a validated subcommand while consistently applying the agent configuration:

bazel_agent bazel test //path/to/package:all
    ->
bazel test --config=agent //path/to/package:all

bazel is the only Bazel entry point, and it is a validated subcommand. The runner accepts a known Bazel command after the bazel keyword, rejects arbitrary leading arguments, and places --config=agent after the command. Targets, command options, and arguments after the -- separator of a bazel run invocation pass through unchanged. Later options therefore retain Bazel’s normal precedence and can override settings supplied by the agent configuration. The runner resolves bazel from PATH and replaces itself with that process, so signals and the final exit status are not mediated by another wrapper process. Uses of the persistent Bazel server follow the host Codex network policy; the host-bot profile allows loopback so the client-server connection is not blocked.

The runner does not create or inject a host temporary directory. Bazel actions use declared outputs and Bazel-managed temporary storage, and tests use their test temporary-directory contract. Repository-updating host tools that need scratch must accept or derive an explicit task/run path under out/<task>/ instead of relying on ambient TMPDIR, TMP, or TEMP values propagated to the whole build.

bazel_agent doctor --workspace-root PATH --task-scratch out/<task>/<run> is a read-only, bounded JSON diagnostic. It reports runner and built-source identity, Bazelisk pins, platform, rc/profile composition, task scratch classification, and stale host-install state without dumping the environment.

Bootstrap the host installation with the underlying Bazel command:

bazel run --config=agent //projects/bazel_agent:install

Once installed, update it with:

bazel_agent bazel run //projects/bazel_agent:install

The install target atomically replaces ~/.local/bin/bazel_agent. After every code update to this project, rerun the install target; the installed binary is not updated automatically.

10 - Ci platform

Abandoned CI platform with a Go backend and Vue frontend

An abandoned continuous integration platform with a Go backend and a Vue single-page frontend. The source retains its job, pipeline, and project management components.

  • Clean architecture
  • Backend: Golang, Gorm, Fiber, Hcl, Postgresql
  • Frontend: SPA, VueJS with PrimeVue

Arch

ci_platform
├── api [Interface Adapters]
│   ├── controller
│   ├── middleware
│   └── presenter
├── cmd (CLI interface)
├── docs (OpenAPI Specification and other documentation)
│   └── diagrams
├── entity [Enterprise Business Rules]
├── infrastructure [Frameworks and Drivers]
│   ├── access
│   ├── branch
│   ├── config
│   ├── job
│   ├── jwt
│   ├── lifecycle
│   ├── pipeline
│   ├── pool
│   ├── project
│   ├── schedule
│   ├── session
│   └── user
├── pkg (Support packages)
│   └── error
└── usecase [Application Business Rules]
│   ├── access
│   ├── branch
│   ├── job
│   ├── jwt
│   ├── lifecycle
│   ├── pipeline
│   ├── pool
│   ├── project
│   ├── schedule
│   ├── session
│   └── user
└── web (Web interface)

10.1 - Releases

Releases

10.1.1 - head

Release head

11 - Dotfiles

Personal configuration files with installation and comparison commands

This project packages personal configuration files into an installable archive. Make and Bazel entry points compare the packaged files with the local system and install selected configurations.

  • Archive with dotfiles that can be installed using make
bazel run //projects/dotfiles:help # Show help
bazel run //projects/dotfiles:diff # Show diff
bazel run //projects/dotfiles:install # Install files
oras pull --output "${PWD}" docker.io/alwaldend/src:projects_dotfiles_dotfiles_tar_head
cd releases/projects/dotfiles/head/files
tar -xf dotfiles.tar
cd dotfiles
make help # Show help
make diff # Check diff between system files and those from the archive
make diff/nvim # Check diff for all nvim files
make diff/nvim/.config/nvim/lazy-lock.json # Diff specific file
make install # Install all files from the archive
make install/nvim # Install nvim files
make install/nvim/.config/nvim/lazy-lock.json # Install a specific file
help: Show help
install: Install files from the archive
diff: Show diff between archive files and system files
install/bin: Install bin files
diff/bin: Diff bin files
install/home: Install home files
diff/home: Diff home files
install/nvim: Install nvim files
diff/nvim: Diff nvim files
make: Nothing to be done for 'help'.

11.1 - Releases

Releases

11.1.1 - head

Release head

12 - Icon generator

Generate random patterns of colored squares or circles as PNG icons

Icon generator is a Go CLI that creates random grid patterns as PNG images. Choose the canvas dimensions, background, palette, cell size, density, clustering algorithm and strength, and square or circular shapes. Rendering and PNG encoding use only Go’s standard library; no external graphics programs or libraries are required.

From the repository root, create an output directory and generate an icon:

mkdir -p out/icon_generator
bazel_agent bazel run //projects/icon_generator -- \
  --width 256 --height 256 \
  --background '#f5f1e8' \
  --colors '#223843,#d77a61,#e3b23c' \
  --pixel-size 16 --pixel-shape square \
  --density 0.4 --seed 42 \
  --output "$PWD/out/icon_generator/squares.png"

For circles on a transparent background:

bazel_agent bazel run //projects/icon_generator -- \
  --background transparent \
  --colors '#223843,#d77a61,#e3b23c' \
  --pixel-shape circle --seed 42 \
  --output "$PWD/out/icon_generator/circles.png"

Use an absolute output path with bazel run. The output directory must already exist. Existing files and symlinks are never overwritten; choose a new path when repeating a command.

Use --clusterization 0.75 for compact groups. To grow winding, branching strands while keeping the same number of occupied cells, also select --clusterization-algorithm strands. Sparse densities leave more room for open gaps:

bazel_agent bazel run //projects/icon_generator -- \
  --width 512 --height 512 \
  --background '#212121' --colors '#ffffff' \
  --pixel-size 16 --pixel-shape circle \
  --density 0.2 --clusterization 0.75 --clusterization-algorithm strands --seed 42 \
  --output "$PWD/out/icon_generator/clustered.png"

For replication from a sparse initial population of individual white pixels:

bazel_agent bazel run //projects/icon_generator -- \
  --width 1024 --height 1024 \
  --background '#212121' --colors '#ffffff' \
  --pixel-size 1 --pixel-shape square \
  --density 0.03 --clusterization 0.4 --clusterization-algorithm replication \
  --replication-inheritance 0.9 --replication-forward-bias 0.8 \
  --replication-crowding 0.75 --replication-branching 0.15 \
  --replication-field-scale 128 \
  --replication-growth-variation 0.08 --replication-seeding-variation 0.75 \
  --seed 42 --output "$PWD/out/icon_generator/replication.png"

Build the executable with bazel_agent bazel build //projects/icon_generator. It can also run directly, without Bazel or other programs on PATH:

bazel-bin/projects/icon_generator/cmd/icon_generator/icon_generator_/icon_generator --help

For long, gradually curving stems with shorter side branches, select tips and start with a much sparser population. Density 0.00015 gives about 157 starting cells on a 1024-square, one-pixel grid:

bazel_agent bazel run //projects/icon_generator -- \
  --width 1024 --height 1024 \
  --background '#212121' --colors '#ffffff' \
  --pixel-size 1 --pixel-shape square \
  --density 0.00015 --clusterization 0.9 --clusterization-algorithm tips \
  --seed 42 --output "$PWD/out/icon_generator/tips.png"
Option Default Meaning
--width 256 Output width, 1 through 4096 pixels
--height 256 Output height, 1 through 4096 pixels
--background #ffffff Opaque #RRGGBB or transparent
--colors #000000 Nonempty comma-separated #RRGGBB palette
--pixel-size 16 Square side or circle diameter, 1 through 4096 pixels
--pixel-shape square square or circle
--density 0.4 Average initial cell occupancy probability, from 0 through 1
--clusterization 0 Clustering strength, replication probability, or tip growth length, 0 through 1
--clusterization-algorithm compact compact, strands, replication, or tips
--replication-inheritance 0 Probability a child keeps its parent-to-child heading, 0 through 1
--replication-forward-bias 0 Strength of forward and gentle-turn preference, 0 through 1
--replication-crowding 0 Strength of preference for less crowded destinations, 0 through 1
--replication-branching 0 Probability the second child favors a sideways fork, 0 through 1
--replication-field-scale 128 Approximate regional variation scale, 1 through 4096 logical cells
--replication-growth-variation 0 Maximum local offset to reproduction probability, 0 through 1
--replication-seeding-variation 0 Regional starting-population contrast, 0 through 1
--seed Fresh random seed Unsigned 64-bit seed; zero is valid
--output icon.png Destination PNG file
--help Print usage without generating an image

Hex colors are case-insensitive. Quote colors so the shell does not interpret # as a comment. Palette colors are opaque and keep their exact RGB values.

Canvas dimensions count output image pixels. Logical pixels occupy a grid starting at the top-left corner. A 256 by 256 canvas with size 16 contains 16 by 16 cells. Squares fill their cell; circles are centered within it and leave the background visible at the corners. Shapes have hard rasterized edges, so very small circles can resemble squares. Partial cells at the right and bottom are clipped without resizing the shape or padding the image.

Initial placement independently samples each cell. Its probability is the requested density, or a local probability when regional seeding is enabled. These local probabilities average to density. Each shape uses a randomly selected palette entry. Density is a probability, not an exact shape count: zero draws only the background and one occupies every cell. Circle corners remain background even at density one.

The algorithm determines how positive clusterization changes placement:

  • compact (default) moves occupied cells to increase neighboring contacts. Higher factors make more attempts and cannot decrease the number of occupied neighbor pairs with the same seed and other settings. Cell count is preserved.
  • strands grows winding strands with occasional branches. Higher factors favor longer strands; placement prefers uncrowded cells to leave open gaps. Cell count is preserved, but the neighbor count can rise or fall. Dense or tiny canvases have less room for open strands.
  • replication uses density for the initial population and clusterization as the base probability that each cell reproduces, optionally varied across regions. Reproduction adds exactly two distinct children chosen randomly from the parent’s empty adjacent cells. A cell with fewer than two vacancies adds none. A cell that dies adds none and remains visible. Children get the same one-time decision, so final coverage can exceed the initial density; high reproduction probabilities can fill most of the image. Initial cells are processed in row order, followed by children in birth order. Each cell is processed once, and growth stops when no decisions remain.
  • tips uses density for the starting population and clusterization to scale growth length. Tips usually extend one adjacent cell along a gradually turning heading. Occasional forks divide the remaining growth budget, giving a smaller share to a side branch. The main tip grows before its deferred branches. Tips stop at exhausted budgets, canvas edges, occupied destinations, or contact with existing paths. The recent trail and a small fork junction are exempt from contact stopping so curves and branches can leave their own stem. Initial cells are processed in seeded shuffled order and remain visible. Final coverage can exceed initial density; higher factors do not guarantee more coverage because collisions can stop growth. Replication controls have no effect on tips. Try density 0.00005 through 0.0008 for individual pixels on a 1024-square canvas; dense initial populations leave little room to grow.

Growth uses all eight neighbors: horizontal, vertical, and diagonal. Opposite canvas edges are not neighbors. Diagonally adjacent circles count as neighbors even though their shapes do not physically touch at the corners. The result can contain several groups and isolated cells; no factor promises one connected group. Zero disables reproduction and preserves the original independent pattern when regional seeding is off. Explicit regional seeding can change that initial pattern. Compact and strands can change positions and colors within the configured palette. Replication and tips retain each initial cell and its color; children use the palette.

The four placement controls default to zero, which reproduces the original uniform-neighbor rule when regional variation is also off. They are validated for every algorithm but affect only replication. They change placement, while --clusterization still controls reproduction probability and --density still sets the initial population.

Inheritance gives a newborn its parent-to-child direction with the configured probability; otherwise it gets a random direction. Roots start with random directions. Forward bias uses those directions to favor continuing forward or turning gently, with weaker preferences for sideways or backward growth. Use inheritance together with forward bias to encourage persistent paths. Inheritance alone has no visible effect when forward bias is zero.

Crowding avoidance lowers the weight of destinations surrounded by more occupied neighbors. It excludes the parent and counts the first child when placing the second. This is a soft preference: crowded vacancies remain eligible.

Branching controls how often the second child favors a direction 90 degrees to either side of the first child’s direction. It controls the fork angle, not the number of children. Every successful reproduction still adds exactly two children; if fewer than two vacancies exist, it adds none. Children can continue reproducing.

Controls do not promise thin or connected strands. High initial density or reproduction probability can still fill gaps. Different placements can change later vacancy availability and final coverage, so comparisons should keep the seed, density, and reproduction probability fixed and report final coverage.

Seeding and growth variation use the same seed-derived smooth field, so fertile and quiet areas line up. --replication-field-scale sets their approximate size in logical cells: 128 means about 128 output pixels with pixel-size 1, or 1024 output pixels with pixel-size 8. It is not an exact region diameter. Smaller values vary more rapidly; larger values form broader regions.

--replication-growth-variation bounds the local additive change to reproduction probability. For example, base clusterization 0.5 and variation 0.1 keep local probabilities within 0.4..0.6. Values are clamped to 0..1, so their mean can shift near those limits. Base clusterization zero always disables reproduction.

--replication-seeding-variation controls the contrast of the starting population: zero is uniform, while one uses the strongest regional contrast that keeps all initial probabilities within 0..1. Their average remains the requested density, including partially clipped cells, but the sampled cell count is still random. Seeding variation works with clusterization zero, allowing the starting population to be inspected separately. Empty/full density remains empty/full, and a constant field uses uniform probabilities.

Both variation strengths default to zero, preserving earlier seeded images. Regional options affect replication only and add a normalization pass over the logical grid without allocating a full-canvas field buffer. Strong growth variation can fill favorable areas; moderate values preserve more internal gaps.

Successful invocations print seed: NUMBER on stderr. Reuse that seed with the same settings and generator version to reproduce the decoded pixels. PNG compression bytes may change between Go toolchain versions. Different seeds are not guaranteed to yield different images.

Invalid options fail before output creation. Output errors return a nonzero status with a diagnostic, and a failed write removes the incomplete file created by the invocation. The dimension limits bound the main image buffer at 64 MiB. Clustering uses at most another 16 MiB for the cell grid. Replication also uses a queue of up to 64 MiB; tips uses a root-index list of up to 64 MiB and a bounded per-root branch frontier. Encoding and the Go runtime use additional memory.

bazel_agent bazel test //projects/icon_generator:test

The end-to-end suite runs the built command with an empty PATH, decodes its images, checks geometry and color behavior, and exercises failure paths. Its Bazel undeclared outputs contain squares.png, circles.png, transparent.png, clustered.png (strands), compact.png, replication.png, replication-growth.png, replication-regions.png, tips.png, and a manifest.json with replay arguments, seeds, and checksums of decoded dimensions and RGBA pixels. They can be inspected and recreated in a fresh directory.

Project page

12.1 - OpenSpec

12.1.1 - Specifications

12.1.1.1 - Random icon generation

12.1.1.1.1 - random-icon-generation Specification

Generate PNG icons from random arrangements of configurable colored shapes, with control over the canvas, background, palette, density, and seed.

The icon_generator CLI SHALL accept --width, --height, and --output and write one PNG with exactly the requested dimensions. Width and height SHALL be integers from 1 through 4096, measured in output image pixels. Generation SHALL work without installed image-processing programs or external runtime libraries.

  • WHEN the user requests width 120, height 80, and an available output path with otherwise valid options
  • THEN the command exits successfully and writes a decodable 120 by 80 PNG to that path
  • AND no image-processing executable is required on PATH

The CLI SHALL accept --background as #RRGGBB or transparent, and --colors as a comma-separated nonempty list of #RRGGBB colors. Hex digits SHALL be case-insensitive. An occupied cell SHALL choose uniformly from the supplied palette entries and use that opaque color for its shape. Unoccupied cells and pixels outside shapes SHALL retain the background. Rendering SHALL preserve palette colors without blended edge colors.

  • WHEN the user selects a white background and a palette containing only #123abc
  • THEN every rendered shape pixel has opaque RGB color #123abc
  • AND every remaining pixel is opaque white
  • WHEN the user selects --background transparent
  • THEN pixels not covered by a shape have alpha zero
  • AND shape pixels have alpha 255

The CLI SHALL accept --pixel-size as an integer from 1 through 4096 and --pixel-shape as square or circle. The grid SHALL start at the top-left canvas corner with cells of the requested size. A square SHALL fill its cell; a circle SHALL be centered in its cell with a diameter equal to that size. A circle SHALL include an output pixel when that pixel’s center is on or inside the circle. Shapes SHALL have hard rasterized boundaries. The rightmost and bottommost cells SHALL be clipped at the canvas bounds without changing their original shape size or center.

  • WHEN the user requests a 32 by 16 canvas, size 16, square shapes, and density 1
  • THEN two adjacent 16 by 16 squares cover the canvas
  • WHEN the user requests a 16 by 16 canvas, size 16, circle shapes, and density 1
  • THEN the cell contains a centered circle of diameter 16
  • AND the canvas corners retain the background
  • WHEN the user requests a 25 by 18 canvas with size 16
  • THEN the grid contains two columns and two rows
  • AND shapes in the last column and row are clipped to the 25 by 18 output bounds without padding or shrinking the shapes
  • WHEN size is 1, density is 1, and the shape is either supported value
  • THEN every output pixel receives a palette color

The CLI SHALL accept a finite --density from 0 through 1 inclusive. Initial placement SHALL independently sample each cell. The per-cell probability SHALL equal density unless regional replication seeding is enabled, in which case density SHALL equal the mean of the local probabilities. Compact and strand clustering SHALL rearrange that sample without changing its occupied-cell count. Replication and tips SHALL use the sample as their initial population and MAY increase the count through growth. Density SHALL represent an average initial occupancy probability, not an exact occupied-cell count or the percentage of output pixels covered by circles.

  • WHEN density is 0, with any valid clusterization and algorithm
  • THEN every output pixel retains the configured background
  • AND growth does not introduce a population spontaneously
  • WHEN density is 1, with any valid clusterization and algorithm
  • THEN every cell contains the selected shape
  • AND circle boundaries still leave background visible outside circles

The CLI SHALL accept an optional unsigned 64-bit integer --seed, including zero. For the same tool version, seed, and rendering settings, the decoded output dimensions and pixel values SHALL be identical. If omitted, the command SHALL obtain a fresh seed and report the effective seed on stderr so the user can reproduce the result. Reproducibility SHALL concern image content, without requiring byte-identical PNG encodings across toolchains.

  • WHEN two invocations use the same explicit seed and rendering options but different available output paths
  • THEN decoding both PNGs produces identical dimensions and pixels
  • WHEN an invocation omits the seed and the user repeats its rendering options with the reported seed
  • THEN the repeated image has identical decoded dimensions and pixels

The CLI SHALL default to width 256, height 256, background #ffffff, palette #000000, pixel size 16, square shapes, density 0.4, a fresh seed, and output icon.png. The CLI SHALL provide --help describing options, defaults, accepted values, seed replay, and the distinction between output pixels and logical grid cells. Help SHALL exit successfully without writing an image.

  • WHEN the command is invoked without options and icon.png does not already exist
  • THEN it writes a 256 by 256 PNG using black 16 by 16 square cells, a white background, and occupancy probability 0.4
  • WHEN the user invokes --help
  • THEN the command describes all supported options and exits successfully without creating or changing an image file

The CLI SHALL reject invalid dimensions, size, density, palette, background, shape, seed, unknown flags, and unexpected positional arguments with a nonzero exit status and a diagnostic on stderr. Input validation SHALL complete before creating the output file. The command SHALL refuse to overwrite an existing output file. File creation, encoding, and close failures SHALL produce a nonzero exit status and a diagnostic; a failed write SHALL remove only the incomplete output created by that invocation.

  • WHEN a rendering option is invalid, such as a zero width, size 4097, density NaN, an empty palette, a malformed hex color, or shape triangle
  • THEN the command reports the invalid option and exits unsuccessfully
  • AND it does not create an output image
  • WHEN the requested output path already exists
  • THEN the command exits unsuccessfully and reports the conflict
  • AND the existing file remains unchanged
  • WHEN the output parent directory does not exist or cannot be written
  • THEN the command exits unsuccessfully and identifies the output error

The CLI SHALL accept a finite --clusterization factor from 0 through 1, defaulting to 0, and --clusterization-algorithm as compact, strands, replication, or tips, defaulting to compact. Zero factor SHALL prevent reproduction. With regional seeding disabled, it SHALL preserve independent placement and existing seeded image content for every algorithm. Explicit strand selection SHALL preserve the current seeded strand behavior.

Compact clustering SHALL preserve the sampled occupied-cell count and favor dense groups. Increasing the factor with the same seed and other options SHALL NOT reduce the total eight-neighbor occupied pair count. Strand clustering SHALL preserve the sampled count and favor winding strands with occasional branches and open gaps at sparse densities; higher factors SHALL favor longer strands without a monotonic neighbor-count guarantee. Replication SHALL use the factor as the probability of reproduction as specified by its lifecycle. Tips SHALL use the factor to scale growth length as specified by its lifecycle.

All algorithms SHALL use the eight surrounding positions: horizontal, vertical, and diagonal. Adjacency SHALL NOT wrap across opposite canvas edges. Diagonal circle cells SHALL count as neighbors even though their shapes do not touch at corners. The CLI SHALL reject invalid factors and unknown or empty algorithm names before creating an output file and SHALL describe selection in help.

  • WHEN the user increases compact or strand clusterization with the seed and other options fixed
  • THEN the number of occupied cells remains unchanged
  • AND compact mode does not reduce the occupied neighbor-pair count
  • WHEN two occupied cells meet only diagonally on the grid
  • THEN they count as one neighboring pair for clustering
  • AND square and circle shapes use the same grid adjacency definition
  • WHEN the user selects strands, sparse density, and strong clusterization
  • THEN the pattern favors narrow winding strands, occasional branches, and open gaps
  • AND identical settings and seed reproduce the pattern
  • WHEN the user omits clusterization or explicitly sets it to 0, with regional seeding disabled
  • THEN the decoded image matches the independent-placement behavior
  • AND omitted algorithm selection remains equivalent to explicit compact for positive factors
  • WHEN clusterization is negative, greater than 1, nonnumeric, NaN, or infinite
  • THEN the command exits unsuccessfully with a diagnostic and creates no image
  • WHEN the algorithm name is empty or unsupported, even with zero factor
  • THEN the command reports the invalid selector and creates no image

In replication mode, each initial and newborn occupied cell SHALL receive one reproduction decision with probability equal to the clusterization factor, locally modified when regional growth variation is enabled. Zero base clusterization SHALL disable reproduction even with regional growth variation. Reproduction SHALL add exactly two distinct children chosen from the parent’s currently empty eight-neighbor positions, uniformly when placement controls are zero and with configured preferences otherwise. If fewer than two positions are available, the cell SHALL add none. A death decision SHALL add no children and SHALL NOT erase or recolor the parent. Newborn cells SHALL receive their own decision. Cells SHALL never be processed more than once or overwrite occupied positions, and processing SHALL terminate when no decisions remain.

  • WHEN a cell reproduces and at least two adjacent empty positions exist
  • THEN exactly two distinct adjacent positions become occupied
  • AND the parent remains occupied and its children may subsequently reproduce
  • WHEN a cell dies or has fewer than two empty adjacent positions
  • THEN it adds no children and remains visible
  • WHEN replication completes
  • THEN every initial occupied cell remains unchanged
  • AND the final population equals the initial population plus an even number of newborn cells

The CLI SHALL accept --replication-inheritance, --replication-forward-bias, --replication-crowding, and --replication-branching as finite numbers from 0 through 1 inclusive, defaulting to zero. Help SHALL describe each option. These controls SHALL affect only replication. Their zero defaults SHALL preserve existing seeded image content when regional controls are also disabled, and valid values SHALL NOT alter compact or strand output. Invalid values SHALL fail before creating an output file, even when the selected algorithm does not use them.

Inheritance SHALL set the probability that a newborn keeps its parent-to-child direction as its heading instead of taking a random heading. Roots SHALL start with random headings. Forward bias SHALL favor forward and gentle turns over sideways and backward choices relative to the heading. Inheritance alone SHALL NOT change image content when forward bias and branching are zero.

Crowding SHALL softly favor destinations with fewer occupied eight-neighbors, excluding the parent and including the first child when selecting the second. Branching SHALL set the probability that the second child favors a heading 90 degrees to either side of the first child’s direction. All valid vacancies SHALL retain positive selection weights; these controls SHALL NOT add a new reproduction rejection or permit partial births.

  • WHEN the four controls are omitted or explicitly zero and regional controls are disabled
  • THEN replication produces the existing seeded image
  • AND using the same controls and seed replays the same decoded pixels
  • WHEN inheritance and forward bias are enabled
  • THEN children can continue outward using their inherited heading
  • AND larger forward bias strengthens the forward preference
  • WHEN crowding avoidance is enabled
  • THEN more crowded destinations have lower relative weights than equally directed less crowded destinations
  • AND a crowded destination remains eligible if it is vacant
  • WHEN a reproduction decision selects sideways branching
  • THEN the second child’s placement favors a quarter-turn from the first child’s direction
  • AND two distinct children are still placed whenever two vacancies exist
  • WHEN any replication control is negative, above one, nonnumeric, NaN, or infinite
  • THEN the command fails with a diagnostic and creates no output for any algorithm

The CLI SHALL accept --replication-field-scale as an integer from 1 through 4096 logical cells, default 128, and --replication-growth-variation and --replication-seeding-variation as finite values from 0 through 1, default 0. All values SHALL be validated before output creation for every algorithm. Only replication SHALL use regional controls. Both variation strengths zero SHALL preserve all existing seeded image content regardless of field scale.

A seed-derived smooth field SHALL influence seeding and growth in the same spatial regions. Scale SHALL determine the approximate distance over which values vary, measured in logical cells. Growth variation SHALL bound the additive deviation from the base reproduction probability before clamping to [0,1]. Clamping MAY change the mean reproduction probability. Zero base probability SHALL prevent all reproduction.

Seeding variation SHALL interpolate between uniform sampling and regionally contrasted probabilities. The mean initial occupancy probability over the logical grid SHALL remain density within floating-point precision. This SHALL NOT require an exact occupied-cell count. Density 0 and 1 SHALL retain their existing behavior. Constant fields SHALL fall back to uniform probabilities. Regional seeding SHALL remain active when reproduction is disabled, and its sample SHALL be retained even when all cells happen to be occupied or vacant. Every logical cell, including a clipped edge cell, SHALL have equal weight in the mean. The field SHALL be evaluated without a full-resolution field buffer.

  • WHEN the user enables seeding and growth variation
  • THEN starting populations and reproduction probabilities vary gradually across the same regions
  • AND repeated invocations with the same seed and settings reproduce the image
  • WHEN regional seeding is enabled with reproduction disabled
  • THEN the local initial probabilities average to density
  • AND stronger seeding variation creates greater spatial contrast without promising an exact cell count
  • WHEN clusterization is zero with regional seeding enabled
  • THEN the output contains only the sampled regional initial population
  • AND regional growth variation does not introduce births
  • WHEN the grid has one cell, one row, one column, clipped cells, or a field scale larger than its dimensions
  • THEN generation remains finite and deterministic with probabilities within [0,1]
  • AND density endpoints and paired births remain valid
  • WHEN field scale is noninteger or outside 1..4096, or a variation is nonfinite or outside 0..1
  • THEN the command reports the invalid option and creates no image

The tips algorithm SHALL retain initial occupied cells and their colors and extend eight-connected paths into vacant cells. A tip SHALL ordinarily add one cell along a persistent, gradually turning heading. Occasional forks SHALL create a side tip with a smaller remaining growth budget than the continuing main tip. Tips SHALL stop on exhausted budgets, canvas boundaries, occupied destinations, or contact with existing growth outside their recent trail and local fork junction. Growth SHALL be finite without wraparound or overwrites.

Positive clusterization SHALL scale the available growth length; zero SHALL preserve independent placement. Final coverage SHALL NOT be constrained to the initial density or guaranteed monotonic in clusterization. Sparse starting populations SHALL favor narrow winding paths with open gaps. Replication-specific options SHALL NOT affect tips. The CLI SHALL describe tips and its density and factor semantics. Existing algorithms SHALL retain their seeded behavior.

  • WHEN tips is selected with sparse density and positive clusterization
  • THEN paths grow from the sampled initial cells and can add a single child
  • AND occasional forks allocate less growth to side branches than main tips
  • AND every resulting connected component contains an initial cell
  • WHEN a tips image is generated and then replayed with the same settings and seed
  • THEN both images have identical decoded pixels
  • AND every initial cell retains its palette color
  • WHEN a tip meets existing growth outside its local trail or junction, or a canvas edge
  • THEN it stops without overwriting cells or wrapping across the canvas
  • AND single-cell, narrow, clipped, empty, and full grids terminate correctly
  • WHEN valid replication controls change while tips settings and seed remain fixed
  • THEN the tips image remains unchanged

13 - Infinitime

InfiniTime firmware fork with a text watchface and Pomodoro app

This InfiniTime firmware fork adds a text watchface and a Pomodoro app. The repository packages the pinned firmware source and its build dependencies.

  • Extra Watchface: Text
  • Extra app: Pomodoro
  • C++, embedded

The root workspace declares the pinned firmware with use_repo_rule in include.MODULE.bazel, preserving recursive Git submodules and the CMake toolchain patch. Firmware source is fetched when referenced, rather than during module resolution. The Python tooling manifest and native uv.lock live in this project; npm and SDK archives retain their upstream pins. Python and Node runtimes use the root workspace toolchains. The standard pip extension reads the local uv.lock without fetching firmware. The project re-exports npm with a separate extension identity so unrelated npm targets do not fetch firmware to read its upstream lockfile. bazel mod deps deliberately evaluates all extensions and can still fetch it.

native_uv.patch removes the upstream source’s pip-tools lock target. This project owns the effective Python dependencies in pyproject.toml; update them with //projects/infinitime:uv_lock.update using the shared uv workflow. Explicit lock generation uses sandboxed uv lock and requires network access to PyPI. Firmware builds consume the checked-in native lock without running resolution.

Validate the firmware with bazel test //projects/infinitime:build_test.

  • Install Gadgetbridge
  • Download the firmware:
    oras pull docker.io/alwaldend/src:projects_infinitime_pinetime_mcuboot_app_dfu_1_15_0_zip_head
    
  • Pair the watch in Gadgetbridge
  • Install the firmware

13.1 - Releases

Releases

13.1.1 - head

Release head

14 - Kustomization

Kubernetes resources for Flux, Traefik, and cert-manager

This project contains Kubernetes Kustomization resources for Flux, Traefik, and cert-manager. It is still in progress.

14.1 - OpenSpec

14.1.1 - Specifications

14.1.1.1 - Project dns

14.1.1.1.1 - project-dns Specification

Record the retirement of this project’s landing DNS infrastructure while preserving its repository documentation and builds.

The project SHALL have no dedicated landing DNS declaration, Terraform root, or operational source export. Its landing page SHALL be published by the main site under /projects/kustomization/ instead of a dedicated hostname.

  • WHEN the project tree is consumed
  • THEN it contains no landing DNS declaration, Terraform DNS stage, or landing build target, and the main site owns its landing page.

14.1.1.2 - Project kustomization

14.1.1.2.1 - Kustomization Specification

Provide in-progress Kubernetes resource definitions for Flux, Traefik, and cert-manager. This baseline records declared resources at revision 550d7e79b1f5fdbc2b6017b75178471d6914082f, observed on 2026-09-08. It does not assert successful rendering, reconciliation, or a deployed cluster state.

Sources: project README, Flux source, Traefik release, Traefik remote resources, and cert-manager release.

The Flux GitRepository declaration SHALL select the repository’s master branch, refer to the flux-git-src credential secret, and include only infra and projects/kustomization from the repository through its ignore rules.

  • WHEN the checked-in Flux GitRepository is inspected
  • THEN its branch, secret reference, and inclusion paths SHALL match the declared source scope.

The Traefik definitions SHALL declare an OCI chart source and HelmRelease that enable the Kubernetes Gateway provider, disable the Kubernetes Ingress provider, and configure HTTP redirection to HTTPS with a named TLS certificate secret.

  • WHEN the Traefik HelmRelease values are inspected
  • THEN they SHALL enable HTTP and HTTPS gateway listeners and reference traefik-gateway-websecure-tls for HTTPS termination.

The cert-manager definitions SHALL declare an OCI chart source and HelmRelease with Gateway API support, CRD installation, Helm tests, and drift detection enabled.

  • WHEN the cert-manager HelmRelease is inspected
  • THEN its values SHALL enable Gateway API support and CRDs, and its release settings SHALL enable tests and drift detection.

14.2 - Releases

Releases

14.2.1 - head

Release head

15 - Leetcode downloader

LeetCode submission export and documentation tools

This project exports LeetCode submissions and generates documentation from submission files using a CLI and Bazel rules. A Tampermonkey script provides a browser-based download path; direct CLI downloads are currently blocked by LeetCode bot protection.

  • CLI and bzl code to generate submission docs
  • Tampermonkey script to download submissions
  • CLI to download submissions (Doesn’t work because of bot protection)
bazel run //projects/leetcode_downloader -- \
    --submissions-file "${PWD}/out/submissions.json" \
    --root-dir "${PWD}" \
    generate
Usage of flags:
  -base_url string
    	 (default "https://leetcode.com")
  -cookie string

  -limit uint
    	 (default 20)
  -offset uint

  -root-dir string
    	 (default "${PWD}")
  -submissions-file string

15.1 - Bzl

Bazel code

15.1.1 - al_leetcode_submissions

al_leetcode_submissions

load("@com_alwaldend_src//projects/leetcode_downloader/main/bzl:al_leetcode_submissions.bzl", "al_leetcode_submissions")

al_leetcode_submissions(name, srcs, visibility, **kwargs)

Generate leetcode submission targets

PARAMETERS

Name Description Default Value
name generated md archive name none
srcs leetcode submission configs none
visibility visibility None
kwargs kwargs for template_files none

15.2 - Proto

Protobuf contracts

15.2.1 - contracts

Proto docs for contracts.proto
load("@rules_java//java:defs.bzl", "java_library")

java_library(
    name = "name",
    deps = [
        "@com_alwaldend_src//projects/leetcode_downloader/main/proto/contracts:contracts_java_library",
    ],
)
load("@rules_go//go:def.bzl", "go_library")

go_library(
    name = "name",
    deps = [
        "@com_alwaldend_src//projects/leetcode_downloader/main/proto/contracts:contracts",
    ],
)
syntax = "proto3";

option go_package = "git.alwaldend.com/alwaldend/src/projects/leetcode_downloader/main/proto/contracts";

enum CliAction {
  DOWNLOAD = 0;
  GENERATE = 1;
  UPDATE = 2;
}

message Config {
  string base_url = 1;
  string cookie = 2;
  repeated string action_args = 4;
  CliAction action = 5;
  uint64 offset = 6;
  uint64 limit = 7;
  map<string, SubmissionConfig> submissions = 8;
  string root_dir = 9;
  map<string, string> headers = 11;
  string submissions_file = 12;
  bool write_code = 13;
}

message SubmissionConfig {
  string dir = 1;
  string extension = 2;
  repeated string types = 3;
}

message Submission {
  uint64 id = 1;
  string status_display = 2;
  string lang = 3;
  uint64 question_id = 4;
  string title_slug = 5;
  string code = 6;
  string title = 7;
  string url = 8;
  string lang_name = 9;
  // string time = 10;
  uint64 timestamp = 11;
  uint64 status = 12;
  string runtime = 13;
  string is_pending = 14;
  string memory = 15;
  string compare_result = 16;
  bool has_notes = 17;
  uint64 flag_type = 18;
}

message SubmissonsResponse {
  repeated Submission submissions_dump = 1;
  bool has_next = 2;
  string last_key = 3;
}
message SubmissonsStorage {
  repeated Submission submissions = 1;
}

15.3 - Releases

Releases

15.3.1 - head

Release head

16 - MCP Cordis

Workspace-local runtime packages behind a stable MCP server

mcp_cordis is a standalone stdio MCP server that mounts runtime JavaScript packages through Cordis. It is intentionally an MCP server, not a Codex plugin bundle.

Reusable definitions are ordinary ESM files in projects/mcp_cordis/plugins, listed by projects/mcp_cordis/cordis.yaml. Disposable definitions use the same layout under out/<task>/mcp_cordis/runs/<run>/. Each run writes a bounded manifest with explicit task, run, worker, information, budget, retention, lock, and cleanup fields. AGENT_TASK_ID, AGENT_RUN_ID, and AGENT_WORKER_ID may provide stable identities; the launcher otherwise creates process-scoped identities. Every package is addressed by both scope and name, so a scratch package never silently shadows a reusable package.

The repository’s .codex/config.toml registers mcp_cordis as a project-scoped stdio server. Codex loads that file for a trusted workspace and finds the active Git worktree before starting the server. Separate clones and worktrees therefore use their own source, projects/mcp_cordis packages, and task/run-namespaced scratch packages. Trusting the repository’s root checkout also covers its linked worktrees; a glob trust entry is neither needed nor supported. A new Codex session is needed after the MCP registration itself is first added; package changes after that do not require another session.

The registration calls cmd/mcp_cordis/launch.sh. With a current installed bazel_agent, the launcher selects a content-addressed runtime from the per-user tool cache and executes it directly. The first exact source version is built and atomically installed under a per-key lock; subsequent worktrees with the same inputs do not start Bazel or load a configured graph. An older runner falls back to asking Bazel for a launch script under the task’s ignored out directory. Either path releases Bazel’s output-base lock before the long-lived stdio server starts, so builds and tests can run normally while Codex remains connected.

The cached artifact contains the stable server runtime and pinned JavaScript dependencies, but not cordis.yaml or reusable plugins. It always reads those from the explicit active workspace, so editing a package changes live behavior without repackaging the runtime or selecting a new cache key.

The same project configuration starts an optional asynchronous SessionStart hook that starts the worktree’s Bazel server and warms repo_delivery. It produces no session context, ignores failure, and never queries the whole workspace graph. Cordis itself is already warmed by its MCP launch path, so the hook does not start a duplicate Cordis build.

To build and run the server directly from the repository root:

bazel_agent bazel run //projects/mcp_cordis:mcp_cordis -- \
  --workspace-root "$PWD" \
  --task-id example-task \
  --run-id example-run

The workspace root is mandatory unless BUILD_WORKSPACE_DIRECTORY is present. The checked-in launcher resolves the current Git worktree explicitly and supplies that path to the server.

The fixed cordis_* tools define, start, inspect, invoke, update, stop, remove, and promote packages without reconnecting the MCP client. Package handlers are called through cordis_invoke; this remains reliable even when an MCP client caches its initial tool list.

cordis.yaml uses the standard Cordis Include entry-list format:

- id: hello
  name: ./plugins/hello.mjs

The referenced file is a normal ESM Cordis plugin:

const plugin = {
  description: "Provide a greeting.",
  apply(ctx) {
    ctx.tool(
      {
        name: "hello_world",
        description: "Return a greeting.",
        inputSchema: {
          type: "object",
          properties: { name: { type: "string" } },
          additionalProperties: false,
        },
      },
      ({ name = "world" }) => ({ greeting: `Hello, ${name}!` }),
    );
  },
};

plugin.apply.description = plugin.description;

export default plugin;

Cordis normalizes an object plugin to its apply callback. Attaching the optional package description to that callback exposes it through cordis_list and cordis_inspect; tool descriptions remain part of each ctx.tool() definition.

The server mounts the official Cordis Loader, Include, and HMR services. cordis_define syntax-checks and atomically persists the ordinary module. Creating or enabling an entry refreshes any cached module through Cordis HMR, then uses the public Include refresh API and waits for activation. Updating an already-running entry returns activation: "pending"; poll cordis_invoke or cordis_list_tools until the new behavior is visible. The reproducibly pinned HMR package carries a focused pnpm patch that serializes module reloads and drains source changes arriving during an in-flight reload, so the latest persisted source is not lost.

Syntax errors are rejected before the file changes. Evaluation and apply() failures follow native Cordis HMR behavior; the wrapper does not add a second activation transaction around them. It also does not inject source markers, inspect Loader caches, correlate watcher events, or maintain its own source rollback/version store. Reusable history is normal Git history. Manual edits to watched plugin files are also picked up by Cordis HMR.

Runtime modules use normal Cordis semantics, including static imports, top-level await, and asynchronous apply(ctx, config). Package code is trusted: a never-settling module evaluation or activation can therefore stall Cordis lifecycle work. The stdio launcher reserves its protocol stream and redirects package stdout to stderr, keeping accidental console.log() calls off the JSON-RPC wire.

The package context exposes ctx.workspaceRoot, ctx.resolveWorkspace(), ctx.readText(), and structured ctx.exec() in addition to ctx.tool(). ctx.exec() returns code, signal, stdout, stderr, truncated, and outputLimitExceeded; maxBytes is a combined stdout/stderr budget. By default, exceeding that budget or producing invalid UTF-8 rejects with EXEC_OUTPUT_LIMIT or EXEC_INVALID_UTF8. Packages that explicitly set allowTruncatedOutput: true instead receive the valid retained prefix with truncated set; outputLimitExceeded distinguishes the byte cap from UTF-8 loss. A Fiber-owned supervisor admits each launch atomically, and results settle only after the direct child and every live member of its original Linux process group have stopped. Limits, timeouts, and plugin disposal use the same cleanup path. A process that deliberately creates a new session escapes that group and is outside this trusted-package contract. ctx.exec() therefore fails closed with EXEC_UNSUPPORTED_PLATFORM away from Linux. Package code also has normal Node built-ins; this host is a reliability boundary, not a security sandbox.

cordis_invoke.timeout_ms bounds how long the gateway waits for a result; it does not cancel an already admitted JavaScript handler. The handler keeps its Fiber lease until it finishes, so stop, remove, and shutdown wait for it. Cordis HMR waits for a retired Fiber to finish draining before it activates and publishes the replacement, so a live invocation can delay a reload. Any ctx.exec() launched by a timed-out invocation is cancelled and its process group is confirmed stopped before the timeout response settles.

  • repo_context: bounded repository reads and searches.
  • git_worktree: read-only branch, status, log, and comparison snapshots.
  • network_probe: DNS, TCP/TLS, and HTTP diagnostics.

These were selected from aggregate recurring task categories in recent local sessions. No transcript content, credentials, or private outputs are included.

The completed runtime extensions change preserves acceptance criteria, decisions, failed attempts and supporting evidence. New work uses the project OpenSpec workspace and a new change; the archived acceptance remains historical.

The runtime directly uses @deepseek-ai/cordis, its official Loader, Include, HMR, and Timer plugins, and the Model Context Protocol TypeScript SDK. Their license texts are retained in the resolved package artifacts by the pinned pnpm/Bazel dependency graph.

17 - MLOps 2026

MLOps course

Recommender runtime and trainingRecommender runtime and training

An MLOps course project with a factory-based FastAPI application named recommender, served by Uvicorn. App and router instances are created inside factories. RecommenderApplication owns the app and receives its service in the constructor; RecommendationRouter owns the versioned routes and service reference. The injected RecommendationService implements __aenter__ and __aexit__ for model loading and deterministic shutdown. Its idempotent close() also runs from __del__ as a fallback. Application, router and service state is private; app and router access use explicit read-only properties. Imports do not start services or create shared application instances. Response contracts are exported from internal/models. Implementation lives under internal/recommender/, with other future apps owning sibling packages under internal/ and separate cmd/ entry points.

bazel_agent bazel run //projects/mlops_2026/cmd/recommender -- --host 127.0.0.1 --port 8000

The defaults are 127.0.0.1:8000. GET /health returns {"status": "ok"}. FastAPI serves the generated schema at /openapi.json, Swagger UI at /docs, and ReDoc at /redoc; the documentation UIs use FastAPI’s default external assets. GET /api/v1/recommend?track_name=Time&n=5 returns requested_track and song recommendations containing track_name, artists, and album_name. track_name is required; n defaults to 5 and must be between 1 and 20. An unknown track returns an empty list. Invalid queries return HTTP 422.

The pinned upstream data.csv and dataset.csv are included in the executable runfiles and resolved independently of the working directory. Startup checks that both exist. Each app loads its packaged model once during startup using the upstream load_model function, then releases it on shutdown. Health checks do not invoke recommendation computation. Source and integrity are owned by third_party/com_github_yandex_practicum_mlops_freetrack/.

bazel_agent bazel build //projects/mlops_2026:model

The sandboxed target runs the upstream train_and_save_model.py unchanged, stages its CSV inputs in an action directory, and produces bazel-bin/projects/mlops_2026/model.pkl. It exposes a declared build artifact consumed by the recommender executable. The upstream script is also buildable as //third_party/com_github_yandex_practicum_mlops_freetrack:train_and_save_model; running that script directly requires a working directory with both CSVs and writes model.pkl there. Prefer the model build target for isolated execution.

The full training data joins to 6,788 unique tracks. Its dense similarity matrix uses about 0.34 GiB; the serialized artifact is about 359 MiB. The model target and isolated model verification are marked manual, but building or testing the recommender now requires this artifact and can trigger training when it is not cached. Shared Python dependencies are declared and locked under tools/py/.

bazel_agent bazel test //projects/mlops_2026/test/e2e:recommender_test
bazel_agent bazel test //projects/mlops_2026/test/e2e:model_test

These checks exercise real HTTP, factory isolation, startup conflict handling, shutdown, service context exit, repeated and deletion cleanup, course runfiles and checksums, and a recommendation from the built model. Repeatable JSON artifacts are saved in each test’s undeclared outputs under bazel-testlogs/projects/mlops_2026/test/e2e/. There is no deployment or release target.

17.1 - OpenSpec

17.1.1 - Specifications

17.1.1.1 - Course data

17.1.1.1.1 - course-data Specification

Make the two upstream course datasets available to the MLOps application at runtime with reproducible source identity and no checkout-path dependency.

The application runtime bundle SHALL include data.csv and dataset.csv from an immutable, integrity-verified revision of the user-requested Yandex-Practicum/mlops-freetrack repository. Both files SHALL be available through application runfiles without network downloads or dependence on the repository working directory. Their bytes SHALL match the pinned upstream files.

  • WHEN the Bazel-built application is launched from a different directory
  • THEN both CSV files resolve through its runfiles and can be opened
  • AND their checksums match the pinned upstream source
  • WHEN the server starts with both course CSV files in its runtime bundle
  • THEN GET /health retains its agreed response without parsing the datasets or invoking recommendation computation

The repository SHALL expose a runnable upstream training target and a Bazel build target whose declared output is model.pkl. Training SHALL use the pinned course CSV files and resolved upstream Python dependencies without network access or writing into source directories. The artifact SHALL be usable by a future model consumer; the recommendation server SHALL load it through the upstream loader.

  • WHEN the model build target is selected
  • THEN it runs the pinned upstream training code against the pinned datasets and produces a nonempty model.pkl in the Bazel output tree
  • AND a verification consumer loads it and obtains a structurally valid recommendation from a track present in the model

17.1.1.2 - Course placeholder

17.1.1.2.1 - course-placeholder Specification

Describe current MLOps course documentation and supported local commands.

The project SHALL provide a README identifying it as an MLOps course and linking the user-supplied course page. After implementation it SHALL describe the runnable health service and its supported endpoints and startup command, rather than claiming that no code exists. Its documentation SHALL remain included through repository documentation targets. The local application SHALL NOT require a release deployment target.

  • WHEN a reader opens the project README after implementation
  • THEN its description and external link identify the course
  • AND it documents the health service, OpenAPI endpoints, and local startup
  • WHEN repository consumers select the project documentation
  • THEN its README and baseline specification are included
  • AND release aggregation does not require an absent course release target

17.1.1.3 - Health api

17.1.1.3.1 - health-api Specification

Provide a runnable HTTP foundation for the MLOps course with a health check, an inspectable API description, and independent application instances.

The service SHALL respond to GET /health with HTTP 200 and the JSON object {“status”: “ok”}. The response SHALL indicate that the HTTP application is running without invoking recommendation computation or external services.

  • WHEN a client sends GET /health to a running service
  • THEN it receives HTTP 200 with application/json content and {“status”: “ok”}

The service SHALL provide a valid OpenAPI document at GET /openapi.json, including the health endpoint and its successful response contract. It SHALL provide the default documentation pages at /docs and /redoc, configured to use that schema URL.

  • WHEN a client requests GET /openapi.json
  • THEN it receives HTTP 200 with a valid OpenAPI JSON document describing GET /health and its successful JSON response
  • WHEN a client requests GET /docs or GET /redoc
  • THEN it receives HTTP 200 with an HTML documentation page referring to /openapi.json

Future application endpoints SHALL use /api/v1 as their initial routing prefix. Recommendations SHALL be exposed under that prefix; health and default API documentation SHALL retain their agreed root paths.

  • WHEN a client requests GET /api/v1/predict
  • THEN the service responds with HTTP 404 rather than exposing prediction or placeholder business behavior

Constructing an application SHALL create fresh application and routing state. Importing application modules SHALL NOT start a server, create shared mutable application instances, or allocate external service resources. Changes to one application’s routing SHALL NOT affect another application’s routing.

  • WHEN two applications are constructed in one process and routing is subsequently added to one of them
  • THEN the other application’s routes remain unchanged

Requirement: Provide a configurable local server entry point

The service SHALL be runnable through a repository Bazel target with configurable host and port. It SHALL bind to 127.0.0.1:8000 by default, accept an explicitly selected loopback address and available port, and shut down cleanly on termination.

  • WHEN the server target starts with a loopback host and an available port
  • THEN the health and OpenAPI endpoints are served on that address
  • AND terminating the server releases its resources and listening socket

GET /api/v1/recommend SHALL accept a required track_name query and an integer n query defaulting to 5, constrained to 1 through 20. It SHALL return a RecommenderRecommendationResponse with requested_track and recommendations of RecommenderSong (track_name, artists, album_name). It SHALL use the upstream load_model function to load the declared model.pkl during application lifespan, with per-application state and no global model object.

  • WHEN a client requests a track in the trained model with n=3
  • THEN it receives HTTP 200 and three typed song recommendations
  • AND requested_track matches the query
  • WHEN n is 0, 21, or nonnumeric, or track_name is absent
  • THEN the response is HTTP 422
  • WHEN track_name does not exist in the model
  • THEN requested_track is preserved and recommendations is empty

18 - Nexus security plugin

Security plugin for Sonatype Nexus 3

This plugin allows you to perform a check every time an artifact is requested from a repository

  • A request handler that checks all requests to repositories
  • Capability controlling the request handler
  • A task that periodically updates the capability using a remote source
  • Sonatype Nexus 3 plugin
  • Java

diagram

18.1 - Model

Attributes of some classes
etag: c849a44121f823c806f604d6568d9e89 (class java.lang.String)
last_modified: 2021-10-22T15:57:10.000Z (class org.joda.time.DateTime)
hashCodesMap: (class java.util.HashMap)
    org.sonatype.nexus.common.hash.HashAlgorithm@7ce01bd8: bcbb583a5a4b4767de8ac020dea3d54011fee961
    org.sonatype.nexus.common.hash.HashAlgorithm@5a3efc26: deaf32dcd9ab821e359cd8330786bcd077604b5c5730c0b096eda46f95c24a2d
    org.sonatype.nexus.common.hash.HashAlgorithm@5b0c0740: c849a44121f823c806f604d6568d9e89
org.sonatype.nexus.repository.storage.Asset:
  metadata: (AttachedEntityMetadata)
    schema: assetPath
    document:
      "#74:0": >-
        bucket:#57:1,format:pypi,last_updated:Fri Jul 01 12:46:21 UTC 2022,attributes:[5],component:#65:0,
        name:packages/pip/21.3.1/pip-21.3.1-py3-none-any.whl,size:1723581,content_type:application/zip,created_by:anonymous,
        created_by_ip:80.78.253.49,blob_ref:default@E1F281C2-0A159DAD-4208CEFD-524F990B-0B4DDE11:739a4ecb-73fc-4422-a7d7-c93c8ad069c6,
        last_downloaded:Fri Jul 01 04:44:03 UTC 2022,blob_created:Wed Jun 29 07:01:34 UTC 2022,blob_updated:Wed Jun 29 07:01:34 UTC 2022
    name: packages/pip/21.3.1/pip-21.3.1-py3-none-any.whl
org.sonatype.nexus.repository.cache.CacheInfo:
  lastVerified: 2022-07-01T12:46:21.457Z
  cacheToken: 'null'
org.apache.shiro.subject.support.DefaultSubjectContext.SESSION_CREATION_ENABLED: false (class java.lang.Boolean)
Key[type=org.sonatype.nexus.security.SecurityFilter, annotation=[none]].FILTERED: true (class java.lang.Boolean)
authcAntiCsrf.FILTERED: true (class java.lang.Boolean)
nx-authc.FILTERED: true (class java.lang.Boolean)
org.apache.shiro.web.servlet.ShiroHttpServletRequest_SESSION_ID_URL_REWRITING_ENABLED: false (class java.lang.Boolean)
javax.servlet.include.servlet_path: /repository/pypi/packages/pip/21.3.1/pip-21.3.1-py3-none-any.whl (class java.lang.String)
nexus.user.principal: admin (class java.lang.String)
nx-anonymous.FILTERED: true (class java.lang.Boolean)
nexus.user.id: admin (class java.lang.String)
nx-apikey-authc.FILTERED: true (class java.lang.Boolean)
security.authorized: true (class java.lang.Boolean)
nexus.analytics.format_request_rates.marked: true (class java.lang.Boolean)
com.sonatype.nexus.repository.pypi.AssetKind: PACKAGE (class com.sonatype.nexus.repository.pypi.AssetKind)
local.attribute.org.sonatype.nexus.repository.view.handlers.HandlerContributor.extended: true (class java.lang.Boolean)
org.sonatype.nexus.repository.view.matchers.token.TokenMatcher$State: >-
  org.sonatype.nexus.repository.view.matchers.token.TokenMatcher$1@19f23c0b ((class org.sonatype.nexus.repository.view.matchers.token.TokenMatcher$1))
proxy: (class java.util.HashMap)
  contentMaxAge: 0.0
  remoteUrl: https://pypi.org
  metadataMaxAge: 0.0
negativeCache: (class java.util.HashMap)
  timeToLive: 0.0
  enabled: false
storage: (class java.util.HashMap)
  strictContentTypeValidation: false
  blobStoreName: default
httpclient: (class java.util.HashMap)
  blocked: false
  connection:
    useTrustStore: true
    autoBlock: false
checksum: (class org.sonatype.nexus.common.collect.DetachingMap)
  sha1: bcbb583a5a4b4767de8ac020dea3d54011fee961
  sha256: deaf32dcd9ab821e359cd8330786bcd077604b5c5730c0b096eda46f95c24a2d
  md5: c849a44121f823c806f604d6568d9e89
cache: (class org.sonatype.nexus.common.collect.DetachingMap)
  last_verified: Fri Jul 01 13:07:08 UTC 2022
provenance: (class org.sonatype.nexus.common.collect.DetachingMap)
  hashes_not_verified: false
pypi: (class org.sonatype.nexus.common.collect.DetachingMap)
  summary: The PyPA recommended tool for installing Python packages
  author: The pip developers
  description: ...
content:
  etag: c849a44121f823c806f604d6568d9e89
  last_modified: Fri Oct 22 15:57:10 UTC 2021
etag: c849a44121f823c806f604d6568d9e89
last_modified: 2021-10-22T15:57:10.000Z (class org.joda.time.DateTime)
hashCodesMap: (class java.util.HashMap)
  org.sonatype.nexus.common.hash.HashAlgorithm@3d97cbd0: deaf32dcd9ab821e359cd8330786bcd077604b5c5730c0b096eda46f95c24a2d, org.sonatype.nexus.common.hash.HashAlgorithm@675317cb=c849a44121f823c806f604d6568d9e89
  org.sonatype.nexus.common.hash.HashAlgorithm@67bcbee7: bcbb583a5a4b4767de8ac020dea3d54011fee961
  org.sonatype.nexus.repository.storage.Asset: (class org.sonatype.nexus.repository.storage.Asset)
    metadata: (AttachedEntityMetadata)
      schema: assetPath
      document: (#74:0)
        bucket: #57:1
        format: pypi
        last_updated: Fri Jul 01 13:25:15 UTC 2022
        attributes: [5]
        component: #65:0
        name: packages/pip/21.3.1/pip-21.3.1-py3-none-any.whl
        size: 1723581
        content_type: application/zip
        created_by: anonymous
        created_by_ip: 80.78.253.49
        blob_ref: default@E1F281C2-0A159DAD-4208CEFD-524F990B-0B4DDE11:739a4ecb-73fc-4422-a7d7-c93c8ad069c6
        last_downloaded: Fri Jul 01 04:44:03 UTC 2022
        blob_created: Wed Jun 29 07:01:34 UTC 2022
        blob_updated: Wed Jun 29 07:01:34 UTC 2022
      name: packages/pip/21.3.1/pip-21.3.1-py3-none-any.whl
org.sonatype.nexus.repository.cache.CacheInfo: (class org.sonatype.nexus.repository.cache.CacheInfo)
  lastVerified: 2022-07-01T13:25:14.841Z
  cacheToken: 'null'

18.2 - Releases

Releases

18.2.1 - head

Release head

19 - Renders

Repository-owned render assets and their acceptance evidence

This project owns reusable Blender assets, their controlling references, and acceptance evidence bound to exact candidate bytes. Maintained work uses the project OpenSpec workspace.

The Reimu Fumo work lives under assets/reimu_fumo/. Its reusable asset target will be added only after a candidate passes the visual, structural, animation, and exact-byte delivery gates in Reimu Fumo change. That change preserves the open outcome, blocked execution and original goal history.

Working candidates and intermediate renders belong under the repository-root out/reimu_fumo_finish/ directory. They are not accepted or durable merely because they exist there. A historical packet may move into the source tree only when exact bytes and provenance are verified and it is labeled with its actual rejected or accepted state.

20 - Sri

Command-line Subresource Integrity calculator using OpenSSL

sri calculates Subresource Integrity hashes for files using OpenSSL. Its command-line interface accepts an input file and a digest algorithm, such as SHA-256.

  • Cli app that calculates SRI using OpenSSL
  • C, OpenSSL
Usage: sri [OPTION...]
Generate sri of a file

Example:
    bazel run //projects/sri -- --digest sha256 --file ${PWD}/README.md

  -d, --digest=String        Digest type (sha256, for example)
  -f, --file=Path            Path to the file to parse
  -?, --help                 Give this help list
      --usage                Give a short usage message

20.1 - Releases

Releases

20.1.1 - head

Release head

21 - Tf modules

Reusable Terraform modules for Vault, virtual machines, and storage

This project contains reusable Terraform modules for Vault configuration, Proxmox virtual machines, backup storage, and related infrastructure. The module collection is still in progress.

  • Terraform modules

21.1 - Backup bucket

S3 bucket for backups

21.2 - DNS records

Canonical DNS declarations for Cloudflare and RouterOS

This reusable module translates an owner’s decoded dnsconfig.json through its provider-free normalizer, then manages individual global Cloudflare and dc1 RouterOS records with caller-provided providers. Owners with only global records use the global entrypoint, which needs only Cloudflare. The combined entrypoint delegates Cloudflare resources to that same module and consumes its normalization for RouterOS. Repository infrastructure roots may consume its Bazel source filegroups; the child normalizer also supports provider-free inspection.

module "dns" {
  source             = "../../../projects/tf_modules/dns_records"
  document           = jsondecode(file("${path.module}/../dnsconfig.json"))
  cloudflare_zone_id = var.dns_cloudflare_zone_id
  enabled            = var.dns_enabled
}

zone defaults to alwaldend.com. An explicit cloudflare_zone_id is optional; when it is null or empty, enabled global records resolve exactly one Cloudflare zone matching zone. The token must permit zone listing and reading. Disabled ownership and declarations without global records skip this lookup. enabled defaults to false so a prepared root owns no provider records. Keep it true after adoption: setting it false in a state that already owns records plans deletion and is not a rollback procedure. Disabling ownership does not suppress provider initialization. Operational Terraform commands still require the caller’s real provider configuration and the owning Vault/AppRole prerequisites. In particular, the pinned RouterOS provider probes its configured API even when no DNS records are enabled. Use the provider-free normalizer for offline inspection. The migration runbook owns cutover, import, and rollback ordering. This module supplies no provider credentials or state backend.

The input contains exactly one records object. Each stable logical key contains one or more scalar type members and a nonempty dsp list. Supported destinations are global, dc1, and all; repeated destinations are deduplicated.

Type Required member fields Default TTL
A name, address 300
AAAA name, address 600
CNAME name, target 600
NS name, address 300
MX name, target, priority 300
TXT name, content 300

Every member accepts an integer ttl from 60 through 86400 seconds. MX priorities range from 0 through 65535. Multiple scalar values at the same name and type use distinct logical keys; changing values never changes resource identity. Unsupported fields and malformed members are rejected.

Names accept @, relative names, or zone-qualified names. Absolute owner names ending with a dot must be inside the zone. CNAME, MX, and NS targets accept @, relative names, zone-qualified names, or absolute external names ending with a dot. Normalization lowercases domain names and omits final dots; address and TXT bytes are preserved. relative_name is @ at the apex.

normalized_records maps logical_key/type/view to key, name, relative_name, type, value, priority (null except MX), ttl, view, and proxied (always false). This output remains available while disabled. The same keys index module.global.cloudflare_dns_record.records and module.dc1[0].routeros_ip_dns_record.records in the combined entrypoint; the global-only entrypoint uses cloudflare_dns_record.records. import_addresses exposes these addresses relative to the selected module, including while staged. The pinned providers import Cloudflare records by zone_id/record_id and RouterOS records by static IDs such as *1A.

Terraform tests use mocked providers and pinned local provider packages. The global-only test root has no RouterOS provider dependency. Normalization tests require no providers. Both run without network access; they establish declaration and resource mapping behavior, not live adoption.

21.2.1 - DNS normalization

Provider-free canonical DNS declaration transformation

This child module owns the canonical transformation described by the DNS module. Its document and zone inputs produce normalized_records without a provider, backend, or managed resources. Terraform writers and provider-free inspection consume this output.

21.2.2 - DNS test providers

Pinned provider packages for offline Terraform tests

The test target uses the public rules_terraform wrapper with the same Cloudflare, RouterOS, and Proxmox provider labels as infrastructure targets. The shared extension owns provider versions, release URLs, and checksums. Bazel fetches the declared archives before tests execute; Terraform uses the wrapper’s packaged filesystem mirror without a registry fallback.

Each regression runs Terraform in a caller-owned temporary module directory. Tests retain an explicit environment without inherited provider credentials; provider installation and mocked lifecycles require no network access.

The targeted import regression matches the owning Proxmox provider block by omitting pm_api_url. It checks both empty state and existing Proxmox resource state with no credentials. Without PM_API_URL, provider validation fails before target pruning; supplying only a loopback endpoint permits the DNS operation. The endpoint must receive zero requests.

The test imports a built-in Terraform resource through a root map into module.dns, checks the exact no-op import, applies that saved plan, and verifies the next targeted plan has no changes. Existing Proxmox resource attributes remain unchanged. An untargeted control must fail authentication before contacting the endpoint. These checks cover provider selection and state preservation; live DNS adoption retains its separate inventory and plan checks.

21.2.3 - Global DNS records

Cloudflare-only entrypoint for canonical DNS declarations

Global-only owners use this entrypoint with the shared module API to avoid requiring RouterOS configuration. The combined module also delegates its Cloudflare resources here, so both entrypoints share one implementation. Normalization returns all declared views, but this entrypoint owns only global records. Mixed-view owners use the parent module to manage dc1 as well.

Enabled global records use the explicit cloudflare_zone_id when supplied. Otherwise, the pinned cloudflare_zone data source resolves the configured zone name and rejects missing or ambiguous matches. This requires zone-list and zone-read access in addition to record permissions. Disabled ownership and declarations without global records perform no zone lookup.

The optional zone ID must be known during planning so Terraform can select whether discovery is needed. The repository’s AL injection supplies a known value or an empty string before Terraform starts. Zone-name discovery uses the normalizer’s canonical name, including case and final-dot handling.

import_addresses contains global addresses relative to this entrypoint. record_ids exposes bound Cloudflare IDs for adoption and identity checks.

21.3 - OpenSpec

21.3.1 - Specifications

21.3.1.1 - Dns records

21.3.1.1.1 - dns-records Specification

Provide one canonical DNS transformation for project-local Terraform resources and offline inspection, preserving declared names, values, and view ownership.

The module SHALL accept decoded owner DNS documents and a zone, flatten every supported type member, expand and deduplicate destinations, and expose one normalized map without provider configuration. It SHALL reject unsupported types, destinations, malformed members, and absolute names outside the zone.

  • WHEN an entry contains A and AAAA with destinations all and global
  • THEN normalization produces exactly four records, one per type and view

Normalized and provider resource keys SHALL use logical declaration key, type, and view without mutable record values. Separate logical keys SHALL preserve multiple records at the same name and type, including MX priority and TXT values. Explicit TTLs SHALL override the type-specific compatibility defaults.

  • WHEN an A member changes its address without changing its logical key
  • THEN its normalized and provider resource keys remain unchanged

The module SHALL accept provider instances from its caller and create individual Cloudflare global and RouterOS dc1 records only when explicitly enabled. It SHALL default to disabled provider ownership while preserving normalized outputs. Cloudflare records SHALL remain unproxied. Disabled ownership SHALL NOT imply that operational provider initialization or credential prerequisites are suppressed.

  • WHEN a root calls the module without enabling ownership
  • THEN it declares no provider record resources and still exposes every normalized declaration

21.3.1.2 - Project dns

21.3.1.2.1 - project-dns Specification

Record the retirement of this project’s landing DNS infrastructure while preserving its repository documentation and builds.

The project SHALL have no dedicated landing DNS declaration, Terraform root, or operational source export. Its landing page SHALL be published by the main site under /projects/tf_modules/ instead of a dedicated hostname.

  • WHEN the project tree is consumed
  • THEN it contains no landing DNS declaration, Terraform DNS stage, or landing build target, and the main site owns its landing page.

21.3.1.3 - Project tf modules

21.3.1.3.1 - Reusable Terraform modules

Provide reusable infrastructure declarations for Vault, virtual machines, storage, and related services. This baseline was observed at repository revision 550d7e79 on 2026-09-08. The collection remains in progress according to its README. Sources for the representative module contracts below are the AppRole module, transit-key module, backup-bucket module, and module packaging. These are declarative source contracts; no live provisioning is asserted.

The AppRole, transit-key, backup-bucket, and Proxmox VM module packages SHALL each expose their main.tf through a same-named Bazel filegroup available to repository subpackages.

  • WHEN a target depends on //projects/tf_modules/vault_approle:vault_approle
  • THEN its declared source input includes the AppRole module’s main.tf

The AppRole module SHALL declare an identity entity, backend alias, internal group, and named AppRole with configurable token and secret-ID limits. Its role policies SHALL combine the shared and AppRole-secret policies with caller policies and the Yandex-folder policy unless that policy is disabled for the role.

  • WHEN disable_yc_folder_policy is true
  • THEN the role’s policy list excludes the module’s Yandex-folder policy while preserving shared, AppRole-secret, and caller policies

The transit-key module SHALL declare a named Vault transit key, an encryption policy and group, and a decryption policy and group. Decryptor member groups SHALL also be included in the encryption group.

  • WHEN a caller adds a group ID to decryptors_member_group_ids
  • THEN the module includes that group in both transit permission groups

The backup-bucket module SHALL declare a versioned Yandex storage bucket with default KMS encryption, grant read and write permissions to the supplied service accounts, and store bucket identifiers in the caller-selected Vault KV v2 location.

  • WHEN the caller supplies the bucket name components, folder, service accounts, and Vault destination
  • THEN the declarations bind bucket encryption to the module’s KMS key and publish the bucket ID, folder ID, and bucket name to that Vault destination

21.4 - Pve vm qemu

Create a proxmox vm

21.5 - Releases

Releases

21.5.1 - head

Release head

21.6 - Terraform backend

Module that sets up an S3 terraform backend

21.7 - Vault approle

Create a vault approle

21.8 - Vault approle

Create a vault approle

21.9 - Vault OIDC provider

Vault OIDC provider

21.10 - Vault pki server

Create a pki config for a server

allowed_domains defines permitted certificate names. allow_subdomains defaults to true for existing consumers; set it to false to permit only the explicitly listed names. EAB access is granted through eab_new_member_group_ids for the role-scoped ACME directory.

21.11 - Vault ssh server role

Create an ssh role for a server

21.12 - Vault transit key

Vault transit key

21.13 - Yc folder

Folder for Yandex Cloud

22 - Useless QT GUI

Desktop GUI application built with C++ and Qt

Useless QT GUI is a desktop application built with C++ and Qt. Its Bazel build uses a pinned Qt distribution without requiring a system Qt installation.

  • Desktop GUI
  • C++, Qt

The Bazel build downloads a SHA-256-pinned Qt 6.8.3 distribution through rules_qt; a system Qt installation is not required. The project previously targeted Qt 6.9.0. Using 6.8.3 is a deliberate downgrade to the LTS version supported and tested by the pinned rules_qt release.

  • Add some screenshots

23 - X Article uploader

Compile a Markdown blog post into a DraftJS content_state and create an X Article draft

This project compiles a blog post into an X Article draft. It has two operations with different inputs, outputs, and trust requirements:

  • Conversion compiles a post’s Markdown body into the DraftJS content_state document the X Articles draft endpoint accepts. It is offline, deterministic, and credential-free; it performs no network access.
  • Draft creation resolves the body images and article banner through the media upload endpoint, then creates an X Article draft. It is the only operation that performs network calls, and the only one that needs credentials. The uploader creates drafts only and never publishes.

Splitting the two lets a draft be produced and diffed offline before anything reaches X, and keeping the tool to draft creation means no invocation of it can make a post publicly visible.

A source post is YAML front matter plus a Markdown body. The front matter is metadata: its title is placed in payload alongside content_state because the draft endpoint requires a title that content_state cannot carry, and it never appears in the article text. A source without a non-empty title fails conversion.

The first entry in front matter images, when present, supplies the article banner. It must name a supported raster image relative to the post package; remote URLs, missing files, and references outside the package fail offline conversion. Later entries do not become additional banners. Conversion records the selected image in an optional banner_locator with its path, post package, media type, and content digest. It does not add a body image for the banner.

Every explicit Markdown image remains in the article body, including opening images and repetitions of the selected banner. Front matter images selects the banner independently: it neither inserts nor removes body images. Identical banner and body bytes still share one media upload. Posts and older artifacts without a banner remain supported.

Markdown maps onto the vocabulary the API exposes:

  • Headings clamp: #/## to header-one, and ### and deeper to header-two. The API schema lists header-three, but the live draft endpoint returns HTTP 503 for it. A controlled upload of the complete 47-block showcase succeeded after changing only its header-three block to header-two. This follows the same workaround implemented by Postiz.
  • Paragraphs, both list kinds, nested list items, and block quotes map onto their matching block types.
  • Bold, italic, and strikethrough become inline_style_ranges; links become link entities. Offsets are UTF-16 code units of the block’s final text, matching how the document is interpreted as a JavaScript string. A link or image destination resolves the Markdown escapes and character references the source may carry, so the recorded URL or path is the one the author wrote.
  • Fenced code and tables become atomic blocks backed by a mutable markdown entity that preserves the original Markdown, because X has no table block or entity.
  • Footnotes become a trailing Footnotes heading with each definition as an ordered list item.
  • An inline-code span keeps its text; because DraftJS has no code style, the lost styling is reported as a continuing diagnostic. A thematic break becomes an atomic block backed by a divider entity.
  • An image wrapped in a link, such as [![alt](image.png)](target), is still emitted as an image; because the image carries no text span, the link cannot become a link entity over it, so the lost destination is reported as a continuing diagnostic naming the target. When the link also carries text, that text keeps the destination and the image’s lost link is still reported, so the outcome does not depend on whether unrelated sibling text happens to exist. A link or image title has no place in the entity data object, so its loss is reported the same way.
  • Each body image becomes an atomic block with an unresolved image entity. Its source travels beside the document as a locator, because the entity’s data object rejects additional properties. An image whose media type the upload endpoints reject is reported instead of being emitted as an entity publication could never resolve.

The uploader supports static image/jpeg, image/png, image/gif, and image/webp files no larger than 5,000,000 bytes, matching the documented simple-image upload formats and limit. Animated GIF, APNG, and WebP are refused explicitly; this tool does not implement the separate animated-media upload contract. BMP, TIFF, PJPEG, and SVG are not supported by this uploader. The initialize endpoint’s broader MIME enumeration does not establish support in the simple-upload path used here.

Conversion and draft preflight apply the same checks to banners and body images. JPEG, PNG, and GIF are decoded; WebP receives RIFF container, chunk, frame-header, and dimension validation, not full pixel decoding. A separate local limit of 32,000,000 pixels bounds decoder memory use; this is a tool resource guard, not a claimed X limit. File extensions must match the detected format. Authoring guidance points at this section rather than repeating the contract; the implementation is owned by internal/markdown/image.go.

X’s schema documents a 10,000 weighted-length limit for Markdown entities per article, but does not publish an Articles-specific weighting algorithm. Conversion uses a conservative estimate with a local budget of 9,500: NFC-normalized text for counting, the published X codepoint weights, separate weights for emoji components, and at least 23 units for each plausible dotted domain fragment. Other characters are counted normally. The original Markdown payload is preserved unchanged. This can reject some content X would accept and is not a guarantee of equivalence to its backend validator. An over-budget diagnostic reports the estimate and the local budget.

Conversion never silently drops content. Formatting losses produce warnings; content-loss errors always fail. The command prints diagnostics with source positions to stderr and fails on warnings by default. Pass --warnings-as-errors=false to allow warnings while retaining their stderr reports. Failed conversion does not write an artifact.

The artifact separates the X request from local upload metadata:

{
  "payload": {
    "title": "Example",
    "content_state": { "blocks": [], "entities": [] }
  },
  "image_locators": []
}

This schematic omits article content. An optional banner_locator sits beside payload; after media resolution its ID becomes payload.cover_media. Diagnostics are not serialized. Legacy artifacts with flat title and content_state fields must be regenerated.

Draft creation reads the draft artifact conversion emitted. It obtains each body or banner image’s bytes from the locator the artifact records — resolved against the recorded post package, refused when the path escapes the post directory or the bytes’ digest no longer matches — and uploads it. Containment is enforced by resolving the name through descriptor-anchored directory handles that reject a symlink escaping the root, so the checked object is the object read and a swapped symlink cannot redirect it. For body images, the returned media_id lands on the entity the locator names, not by position. Identical bytes reuse one identifier within a resolution and, when its lifetime is known, across later runs through a versioned cache under the task’s ignored output directory. Persistent reuse is scoped to a one-way fingerprint of the API endpoint, media category, and all four OAuth credential fields. Changing accounts or rotating credentials therefore causes a cache miss without an extra identity request. Unscoped legacy entries are not trusted. The cache contains identifiers, digests, expiries, and opaque scope fingerprints, never credential values.

Known lifetimes are anchored before the upload request, so upload and processing time cannot extend them, and reserve 30 seconds for submission. Media that expires while other files upload is refused before draft creation, including a later duplicate of an earlier image; it is not uploaded again mid-resolution. Missing or zero lifetime permits deduplication only within the current resolution; negative or already unusable lifetimes fail. Banner and body images share the cache, so identical bytes need only one upload within that resolution. All referenced files, content digests, and media types are verified before the first upload; an invalid banner cannot consume an upload or draft request. Recording the cache is best-effort: a cache that cannot be written costs a later re-upload rather than failing draft creation after the uploads already succeeded.

The media uploads happen separately before draft creation. The selected banner’s uploaded identifier becomes payload.cover_media, sent as the draft request’s top-level cover_media, with media_category: "tweet_image" and media_id. Body image identifiers remain in their DraftJS entities. This follows the X draft endpoint’s request schema.

An upload without processing_info, or with a succeeded state, needs no status request. Reported pending or in_progress processing triggers signed read-only status checks after the server’s check_after_secs, with a minimum one-second delay and a two-minute default deadline. Failed, unknown, missing, or inconsistent processing state, partial upload errors, and rejected status requests stop the operation before the draft POST. Status polling never replays an upload, and no rejected request is retried automatically.

The uploader creates a draft and reports its article identifier; it never calls the publish endpoint, so a review in the X composer is always the step that makes an article public. It does not retry automatically when a request is rejected. HTTP redirects are returned as failures without following them, preventing a redirect from issuing another media upload or draft request. The HTTP transport cannot recreate a consumed POST body for an automatic replay.

Every non-2xx API error, including HTTP 503, retains and prints the response’s X-Rate-Limit-{Limit,Remaining,Reset}, X-User-Limit-24hour-{Limit,Remaining,Reset}, and Retry-After headers. Only those headers are copied; authorization, cookies, and other response headers are excluded. The original operation, status, and body remain visible, including the available body and underlying cause if reading the response fails.

Valid Unix reset values also show their UTC date and time. A Rate-limit retry not before line appears only when known exhausted windows (Remaining: 0) have unambiguous future resets. It uses the latest exhausted window’s reset and extends it with valid later Retry-After advice, either an HTTP date or seconds after response receipt. Missing, invalid, ambiguous, or elapsed reset evidence leaves the current retry time unknown. Positive remaining counts and standalone Retry-After advice do not establish upload eligibility. The displayed boundary does not guarantee service recovery or request success, and it never triggers an automatic wait or retry.

Draft creation authenticates with OAuth 1.0a user context, whose token does not expire on the fixed schedule an OAuth 2.0 user token does. It requires four fields, supplied at run time through the repository’s Vault-backed injection flow:

  • X_API_KEY
  • X_API_SECRET
  • X_ACCESS_TOKEN
  • X_ACCESS_TOKEN_SECRET

No credential value is recorded in source, and the values are never printed. The identity, policy, and credential path are owned by infra/vault/openspec/changes/add-x-article-uploader-credentials. The credential sits inside the identity’s own AppRole subtree, the same shape every other component uses, and al.lua names its path directly, as every other component’s injected reference does; the shared AppRole module’s own-subtree policy grants the read.

Convert a post to a draft artifact:

bazel_agent bazel run //projects/x_article_uploader/cmd/convert -- \
  --source projects/alwaldend.com/content/blog/<slug>/index.md \
  --out out/x_article_uploader/<slug>.json \
  --post-package projects/alwaldend.com/content/blog/<slug>

--post-package may be omitted, in which case the package is derived from the post directory’s path relative to --workspace (default .). Whether supplied or derived, the package is opened through a descriptor-anchored handle on the workspace and the post’s source and images are read through that handle, so the recorded package and the bytes’ source are the same object: a symlinked post directory that escapes the workspace, or a supplied package whose opened directory is not the post directory, is refused instead of recorded; the package is accepted by comparing the identity of the directory actually opened, not a pathname. The workspace is the caller-supplied root, never a root rediscovered by walking the filesystem.

Draft creation is the only operation that needs credentials, so run it through the wrapper that injects them: //projects/x_article_uploader:draft selects the x_api=1 injection declared in al.lua, authenticates as the component AppRole, and places each credential field in its environment variable. The wrapped command is the draft binary, so its own flags are passed after --; the binary and the injector travel in the target’s data.

Create a draft from a converted artifact:

bazel_agent bazel run //projects/x_article_uploader:draft -- \
  --artifact out/x_article_uploader/<slug>.json

Publishing is deliberately unavailable: there is no publish flag and no publish endpoint call, so a draft becomes public only through a separate review step outside this tool. The injector only supplies credentials; it does not select the artifact or publish anything. Do not export X_* values by hand, which would bypass the AppRole boundary the wrapper establishes.

bazel_agent bazel test //projects/x_article_uploader/test/e2e:e2e_test

The end-to-end check discovers every post in the site content tree, asserts each post’s recorded outcome, emits a repeatable draft artifact, and exercises publication against a recorded-response client. It needs neither credentials nor network access.

23.1 - OpenSpec

23.1.1 - Specifications

23.1.1.1 - Markdown to draftjs

23.1.1.1.1 - markdown-to-draftjs Specification

Compile a Markdown post into the DraftJS content_state document that the X Articles API accepts, so the Markdown that renders the blog also produces the article body without hand-editing.

Requirement: Source post input model

The converter SHALL treat a blog source post as YAML front matter plus a Markdown body, and MUST NOT emit front matter as article text. It SHALL expose the parsed metadata separately from the content_state document, and SHALL report the parsed title as document metadata because draft creation requires a title that content_state does not carry. A source whose front matter has no non-empty title SHALL fail conversion with a diagnostic naming the source, rather than producing a document that cannot be uploaded.

Scenario: Convert a post with front matter

  • WHEN the converter is given a post whose front matter contains a title
  • THEN the emitted content_state contains no front matter text
  • AND the parsed title is reported as document metadata alongside it

Scenario: Convert a post without a title

  • WHEN the source front matter has no non-empty title
  • THEN conversion fails with a diagnostic naming the source
  • AND it does not emit a document that lacks a usable title

The converter SHALL transform a Markdown source file into a X-compatible DraftJS content_state document containing a blocks array and an entities array of {key, value} entries. Conversion MUST be deterministic and MUST NOT perform network access.

Scenario: Convert a post offline

  • WHEN the converter is given a Markdown file
  • THEN it emits a content_state document with blocks and entities
  • AND it performs no network request during conversion
  • WHEN the same Markdown input and configuration are converted twice
  • THEN both outputs are byte-identical

The emitted document SHALL use the exact shape the Articles draft endpoint accepts, not the canonical DraftJS spelling. Each block SHALL name its ranges inline_style_ranges and entity_ranges, and MUST NOT carry a depth field, because the endpoint’s schema sets additionalProperties: false and rejects both the camelCase range names and any depth. Each entry of entities SHALL be {"key": "<index>", "value": {"type", "mutability", "data"}}, matching the endpoint’s schema rather than DraftJS’s inline entityMap.

  • WHEN a document with inline styles, links, and a list is converted
  • THEN every block names its ranges inline_style_ranges and entity_ranges and carries no depth
  • AND each entity is a {key, value} entry whose value carries type, mutability, and data
  • AND no block or entity field falls outside the schema’s allowed names

Markdown headings SHALL map onto the two heading block types accepted by the live Articles draft endpoint. Depth SHALL be clamped: # and ## map to header-one, and ### and deeper map to header-two. The converter MUST NOT emit header-three: although the API schema permits it, the live endpoint returns HTTP 503 for that type.

  • WHEN a post contains a ## heading
  • THEN it becomes a header-one block
  • WHEN a post contains a ### heading
  • THEN it becomes a header-two block
  • WHEN a post contains a ####, #####, or ###### heading
  • THEN it becomes a header-two block
  • AND no block uses a heading type outside header-one or header-two

The converter SHALL map supported block constructs to the block type X expects: paragraphs to unstyled, unordered list items to unordered-list-item, ordered list items to ordered-list-item, and block quotes to blockquote. Nested list items SHALL be emitted as list items of their own kind rather than being merged into the parent item.

  • WHEN a post contains paragraphs and both list kinds
  • THEN paragraphs become unstyled blocks and each item becomes an unordered-list-item or ordered-list-item block
  • WHEN a list item contains a nested list
  • THEN the nested items are emitted as list-item blocks
  • AND no item’s text contains the nested list’s raw Markdown
  • WHEN a list item contains more than one paragraph, as a loose list does, whether or not a block construct such as a nested list or a code block lies between them
  • THEN the item becomes a single list-item block whose text carries all of the item’s paragraphs
  • AND the item’s block constructs follow that block in source order
  • AND it does not become one block per paragraph, which DraftJS would read as separate items and which would renumber an ordered list
  • WHEN a list item contains a block construct such as a fenced code block, an indented code block, a table, or a thematic break
  • THEN the construct is emitted through the same block mapping it uses at the top level, with its source preserved
  • AND its source is not silently dropped by walking only inline children
  • WHEN a post contains a block quote
  • THEN it becomes a blockquote block containing the quoted text
  • WHEN a block quote contains a heading, as in > # Warning, whether directly or through a nested list as in > - # Warning
  • THEN the heading text is emitted as a blockquote block, not an ordinary heading outside the quote and not a list-item block that drops the quote
  • AND the lost heading level is reported, because X exposes no quoted-heading block type
  • WHEN a paragraph contains a soft line break or a hard line break written with two trailing spaces or a trailing backslash
  • THEN the block’s text contains a newline at that break
  • AND the two lines are not joined into one word

Inline emphasis SHALL be expressed as inline_style_ranges on the enclosing block using bold, italic, or strikethrough, with offsets computed against the block’s final text. Links SHALL become link entities referenced by entity_ranges on the enclosing block. Ranges MUST be correct when a styled or linked span is adjacent to other text in the same block.

Offsets SHALL be counted in the code units the DraftJS format uses — UTF-16 code units of the block’s final text — rather than bytes, runes, or grapheme clusters. A block containing a supplementary character before a styled or linked span MUST still select exactly that span, because a byte or rune offset would select the wrong characters once the document is interpreted as a JavaScript string.

  • WHEN a paragraph contains bold, italic, or strikethrough text
  • THEN the enclosing block carries inline_style_ranges for that span
  • AND each range’s offset and length select exactly the styled text
  • WHEN a paragraph contains a Markdown link
  • THEN a link entity carrying the destination URL is added to entities
  • AND the enclosing block references it with an entity_range selecting the link text
  • WHEN a Markdown link carries an optional title, as in [docs](https://example.test "Reference")
  • THEN the entity cannot carry the title, so its loss is reported as a continuing diagnostic naming the title and positioned at the link
  • AND the link’s text and destination are still preserved
  • WHEN a Markdown image carries an optional title
  • THEN its loss is reported as a continuing diagnostic naming the title and positioned at the image
  • AND the image is still emitted as an atomic block
  • WHEN a titled link or image has an empty label or alt text, so the construct has no text node to locate it
  • THEN the lost-title diagnostic is positioned at the construct’s own opening delimiter rather than at the start of the enclosing block
  • AND the reported source position still names the construct that produced the loss
  • WHEN a paragraph contains an email autolink such as <user@example.com>
  • THEN the link entity records it as mailto:user@example.com
  • AND the recorded URL is an email address rather than a relative link
  • WHEN a link or image destination escapes a punctuation character or uses a character reference, as in [x](https://example.test/a\(1\)?x=1&amp;y=2)
  • THEN the recorded destination resolves those encodings to the URL the author wrote
  • AND the recorded link or image target does not contain the literal backslashes or unresolved entity
  • WHEN ordinary prose escapes a punctuation character or uses a character reference, as in \*literal\* or AT&amp;T
  • THEN the emitted block text resolves those encodings to the characters the author wrote rather than keeping the backslashes or the raw entity
  • AND a raw span such as a code span keeps its literal source, because its encoding is its content
  • AND an image caption, which is flattened from its inline content, follows the same rule: resolution applies to each non-raw descendant while a raw span inside the caption keeps its literal source
  • WHEN a block contains multiple styled or linked spans next to plain text
  • THEN every range’s offset is measured against the block’s final plain text
  • AND no range extends beyond the block text
  • WHEN a block contains an emoji or other supplementary character before a styled or linked span
  • THEN each range’s offset is measured in UTF-16 code units of the block’s final text
  • AND the range selects exactly the styled or linked text rather than drifting by the character’s extra code unit

Code fences and tables SHALL be emitted as atomic blocks backed by a markdown entity with mutable mutability whose payload preserves the construct’s original Markdown source. A table MUST NOT be flattened into paragraph text, because X exposes no table block or entity.

  • WHEN a post contains a fenced code block
  • THEN it becomes an atomic block with a markdown entity
  • AND the entity payload preserves the fenced source, including its language
  • WHEN a post contains a Markdown table
  • THEN it becomes an atomic block with a markdown entity
  • AND the entity payload preserves the table as Markdown with its rows and cell contents intact
  • WHEN a post contains an indented code block immediately followed by a non-indented paragraph
  • THEN the markdown entity payload contains only the code block’s own lines
  • AND the following paragraph is emitted once, as its own block, rather than being swallowed into the entity and repeated
  • WHEN the documented conservative weighted-length estimate for Markdown entities exceeds the local per-article budget
  • THEN conversion fails with the measured estimate and budget
  • AND the diagnostic and documentation distinguish that estimate from X’s undocumented Articles-specific backend validation

DraftJS exposes only bold, italic, and strikethrough as inline styles, so a Markdown inline-code span has no code style to map onto. Its literal text SHALL survive conversion unchanged, and the loss of the monospace styling SHALL be reported as a conversion diagnostic so the author sees it rather than having it silently dropped. A Markdown thematic break SHALL become an atomic block backed by a divider entity, because X exposes divider for exactly that purpose, rather than being dropped as an unrecognized paragraph.

  • WHEN a post contains a Markdown inline-code span
  • THEN the block’s final text contains the span’s literal text
  • AND conversion reports the lost code styling as a diagnostic
  • WHEN a post contains a task-list item
  • THEN the item’s text keeps an indicator of its checkbox state
  • AND the checked state is not silently dropped
  • WHEN a post contains a thematic break
  • THEN it becomes an atomic block with a divider entity
  • AND it does not become paragraph text containing the break’s characters

DraftJS has no footnote construct, so footnote definitions SHALL be preserved in a trailing Footnotes section rather than dropped. Each in-text footnote reference SHALL become plain bracketed text, and each definition SHALL become an ordered-list-item beneath a Footnotes heading.

Scenario: Convert a post with footnotes

  • WHEN a post contains a footnote reference and its definition
  • THEN the reference appears in the body as plain bracketed text
  • AND a Footnotes heading is appended with each definition as an ordered list item
  • WHEN a footnote definition contains multiple paragraphs or inline formatting such as a link
  • THEN each definition paragraph becomes its own ordered list item rather than being joined without a separator
  • AND inline entities such as links are preserved by the normal inline mapper rather than flattened to plain text
  • WHEN a footnote definition contains a nested list, block quote, fenced or indented code block, table, or thematic break
  • THEN the construct is emitted through the block mapper with its content preserved
  • AND it is not silently dropped

Scenario: Convert a post without footnotes

  • WHEN a post contains no footnotes
  • THEN no Footnotes heading is added

The image entity SHALL carry its media as media_items, whose entries require a media_category and a media_id; data.url is documented for link entities and MUST NOT be treated as an image source. Each explicit body image SHALL become an atomic block plus an image entity, and unresolved images SHALL remain explicitly unresolved so publication can resolve or reject them rather than silently emitting a broken article. Because the media endpoints accept only a fixed set of image media types that excludes image/svg+xml, the converter SHALL report an image whose media type the upload endpoints cannot accept, with its source position, rather than emitting an entity that publication can never resolve. The declared extension SHALL be accepted as the media type only when the file’s bytes carry that format’s own signature, so a file renamed to an accepted raster extension — even one accepted format renamed to another — is reported rather than sent to the upload endpoint.

  • WHEN a post contains an explicit Markdown image with alt text
  • THEN it becomes an atomic block with an image entity
  • AND the entity preserves the alt text as its caption, resolving Markdown escapes and character references the way prose is resolved while a raw span inside the alt text keeps its literal source
  • WHEN a converted document references an image whose media has not been uploaded
  • THEN the unresolved image is distinguishable from a resolved one
  • AND publication refuses to send an unresolved image as though it were resolved
  • WHEN a post references an image whose media type the media upload endpoints do not accept
  • THEN the converter reports the image with its source position
  • AND it does not emit an entity that publication could never resolve

Scenario: An image reference resolves outside the post directory

  • WHEN a post’s image reference is a syntactically safe relative path whose canonical target lies outside the post’s directory, such as a symlink to a file elsewhere
  • THEN the converter reports the image with its source position rather than reading bytes outside the post boundary
  • AND it does not record a locator that publication would later reject, so a converted artifact remains publishable
  • WHEN a post references an image whose bytes are not the format its extension declares
  • THEN the converter reports the image with its source position instead of treating it as the declared type
  • AND it does not emit an entity the upload endpoint would reject
  • WHEN bytes of one accepted raster format carry the extension of a different accepted raster format
  • THEN the converter reports the mismatch rather than accepting the sniffed type
  • AND it does not fall back to another accepted media type
  • WHEN a local image reference names a file whose name needs Markdown escaping, as in ![plot](plot\(final\).png)
  • THEN the reference is resolved before filesystem lookup, so the file it names is read rather than reported unreadable
  • AND the recorded locator names the resolved path
  • WHEN an image reference such as image.png is an in-directory symlink to a file with a different raster extension, such as actual.webp
  • THEN the declared-extension check classifies the image by the reference the author wrote, not by the canonical target’s name
  • AND bytes that do not match the reference’s declared format are reported rather than accepted through the target’s extension
  • WHEN an inline image interrupts a styled or linked span
  • THEN the text before the image keeps its style or entity range
  • AND the text after the image keeps its style or entity range
  • WHEN a Markdown image is the entire content of a link, as in [![alt](image.png)](target)
  • THEN the image is still emitted as an atomic block with its image entity
  • AND the lost destination is reported as a continuing diagnostic naming the link target, because the link has no text span to carry it
  • WHEN the link’s only content is an image nested inside a style wrapper, as in [**![alt](image.png)**](target)
  • THEN the enclosing link is found by ancestry rather than by immediate parentage
  • AND the lost destination is still reported, because the link has no text outside the image
  • WHEN a link contains non-whitespace text of its own in addition to an image, as in [label ![alt](image.png)](target)
  • THEN the destination survives as a link entity over that text
  • AND the image, which still cannot carry the link, is reported as a continuing diagnostic naming the destination, so the partial loss is not hidden merely because sibling text kept the link

Scenario: A post follows the raster-only policy

  • WHEN a post’s images all use a media type the media upload endpoints accept
  • THEN conversion completes with an image entity for each explicit body image
  • AND no unacceptable-image diagnostic is reported for that post

Because the API’s entity data object rejects additional properties, an image’s source cannot travel inside the entity. The emitted draft artifact SHALL therefore carry, as metadata beside content_state, an entry for every unresolved image. Each entry SHALL name the image’s source path relative to the post’s directory, SHALL record the post package the path is relative to, and SHALL record a digest of the image bytes as they were at conversion time, so the artifact identifies both the image and the directory it resolves against. Publication SHALL be able to obtain the image bytes from the artifact alone, without re-parsing Markdown, and SHALL reject a locator that escapes the post’s directory or whose current bytes do not match the recorded digest. Conversion SHALL apply the same containment before it reads an image, so it neither inspects bytes outside the post boundary nor records a locator that publication would refuse. Both SHALL enforce containment by resolving the name through descriptor-anchored directory handles that reject a symlink escaping the root, rather than by checking a pathname and then re-opening it, so the object whose containment is checked is the object read.

  • WHEN a post containing a raster image is converted
  • THEN the artifact carries a locator entry for that image beside the document
  • AND the entry names the source path relative to the post’s directory, the post package the path resolves against, and a digest of the image bytes
  • WHEN an artifact carries two or more image locators
  • THEN each locator entry records the entity it resolves, by the entity’s key, so the mapping does not depend on ordering or on repeated captions
  • AND publication attaches each returned media_id to the entity its locator names rather than by position
  • WHEN the conversion command is given an absolute --source and no --post-package
  • THEN the recorded locator’s package is relative to the workspace named by --workspace, rather than the absolute source directory
  • AND the artifact remains publishable, because publication refuses an absolute package rather than resolving it
  • AND the workspace root is the caller-supplied --workspace value and is never re-discovered by walking the filesystem, so no repository marker found through a link can be mistaken for it

Scenario: A post directory is reached through a symlink

  • WHEN the derived package would name a post directory whose canonical target, after resolving symlinks, lies outside the workspace root
  • THEN the conversion is refused with a directive to pass --post-package explicitly, rather than recording a package the descriptor-anchored read would resolve past and reject
  • AND an in-workspace symlink still records the relative package of the canonical directory it resolves to, so the recorded package matches the object publication reads
  • AND a link that points directly at another checkout’s root, a link into another tree beneath its root, and a post directory reached through an intermediate symlink-component are all refused rather than recorded relative to the external tree or collapsed to .
  • AND containment is established by opening the directory through a descriptor-anchored handle on the workspace, so the no-symlink validation and the directory accepted for the package are the same traversal and cannot be separated by a writer swapping the directory for a link
  • AND image reads for the post go through that same handle rather than re-opening the source pathname, so a symlink retargeted after validation cannot make conversion read another tree’s bytes while the artifact still records the validated package

Scenario: A post package is supplied explicitly

  • WHEN the conversion command is given --post-package rather than having one derived
  • THEN the package is accepted only when the directory it opens to is the post directory, compared by file identity rather than by pathname, because publication resolves the locator paths against the package and a package naming another directory would make publication read a different object than conversion did
  • AND the post’s images are read through the descriptor-anchored handle the identity was checked on, so a package retargeted between the check and the read cannot supply another tree’s bytes while the locator still names the supplied package
  • AND an absolute package, a package that escapes the workspace, or a package naming a different directory than the post is refused
  • WHEN publication reads an unresolved image from the artifact
  • THEN it obtains the image bytes from the recorded locator without re-parsing the source Markdown
  • AND it resolves the relative path against the recorded post package even when the artifact was moved elsewhere
  • AND it refuses a locator that escapes the post’s directory or names bytes whose digest does not match the recorded one
  • WHEN a locator’s path or its target is swapped for a symlink that leaves the post directory after containment was established
  • THEN the read is refused rather than following the swapped symlink
  • AND a swapped symlink cannot redirect the read to a different file, because the containment check and the read operate on the same descriptor rather than on a re-opened pathname

The converter SHALL report a construct it cannot represent with the source location that produced it. It SHALL distinguish two outcomes and never emit a document that silently omits content it could not represent: a construct whose content is preserved but whose formatting is lost is reported as a warning. The conversion command SHALL fail on warnings by default and SHALL permit them only with --warnings-as-errors=false. Errors SHALL fail with either setting. All diagnostics SHALL be printed to stderr and SHALL NOT appear in artifact JSON. The image whose media type the upload endpoints reject and the source without a title are failing outcomes; an inline-code span’s lost styling is a continuing one.

  • WHEN the converter cannot represent a construct and its content would be lost
  • THEN it reports the construct with its source position
  • AND conversion fails rather than emitting a document that discards the content
  • WHEN a source contains both a continuing loss and a failing construct, such as an inline-code span and an unacceptable image
  • THEN the continuing diagnostic is reported alongside the failing one rather than being discarded with the returned error
  • AND the author sees every detected loss in one run
  • WHEN the converter preserves a construct’s content but cannot reproduce its formatting
  • THEN it reports the lost formatting with its source position
  • AND command conversion fails by default without writing an artifact
  • AND --warnings-as-errors=false permits completion with the content present while still reporting the warning to stderr
  • WHEN a diagnostic’s construct follows a multi-byte character on the same line
  • THEN the reported column counts source characters rather than bytes, so it names the position an editor shows
  • AND the byte offset is still recorded for slicing the source

The converted artifact SHALL put title and content_state inside payload. Body image locators and the optional banner locator SHALL remain outside payload. Diagnostics SHALL NOT be serialized. Media resolution SHALL attach body media IDs inside payload.content_state and the banner ID inside payload.cover_media. Artifact reading SHALL reject the old flat format and require regeneration.

  • WHEN conversion succeeds
  • THEN payload contains title and content_state in the X request shape
  • AND local media references remain alongside payload
  • AND there is no serialized diagnostics field
  • WHEN the uploader resolves an artifact’s media
  • THEN body entities inside payload receive media_items
  • AND the banner becomes payload.cover_media
  • AND the draft request contains only X payload fields
  • WHEN an artifact has title and content_state outside payload
  • THEN reading fails before any API request
  • AND the error instructs the caller to regenerate the artifact

Conversion and draft preflight SHALL accept only static JPEG, PNG, GIF, and WebP images up to 5,000,000 bytes. They SHALL reject unsupported formats, animations, malformed images detectable by the supported decoder or container validator, and images exceeding the documented local decoded-size guard. The implementation SHALL distinguish X’s upload limits from local resource guards and SHALL NOT claim full WebP decoding when only container/header validation is available. Every image SHALL pass preflight before any upload or draft request.

  • WHEN a banner or retained body image uses an unsupported format or animation
  • THEN conversion reports the unusable source
  • AND a supplied artifact containing that source is also refused before network requests
  • WHEN a selected image contains more than 5,000,000 bytes
  • THEN conversion and draft preflight refuse it before upload
  • WHEN a file’s signature matches its extension but decoding or container validation fails
  • THEN it is refused rather than sent as a usable image

The converter SHALL resolve the first entry of the optional front matter images array as the article banner. It SHALL record a separate banner locator with the post-relative path, post package, content digest, and detected media type, using the same image validation as body images. Banner metadata MUST NOT insert or remove any body image blocks, entities, or locators. The converter SHALL preserve every valid explicit Markdown image in source order, including opening images, repeated references, and images whose bytes match the banner. Malformed metadata or an unusable selected image SHALL fail conversion. Banner selection MUST NOT bypass body image containment or media validation.

  • WHEN a post selects a local image in the first images entry
  • THEN conversion records its banner locator separately from body locators
  • AND later images entries do not select additional banners
  • AND body text and images retain their original order
  • WHEN a post opens with explicit Markdown images whose validated bytes match its selected banner, in one or several paragraphs
  • THEN every occurrence produces its normal body block, entity, and locator
  • AND the separate banner locator remains present
  • WHEN a post selects a banner in images and contains no Markdown images
  • THEN conversion records the banner locator
  • AND it creates no body image blocks, entities, or locators from metadata
  • WHEN a body image also appears in a later images entry
  • THEN the explicit Markdown image remains in the body
  • AND that metadata entry creates no additional banner or body occurrence
  • WHEN images is absent or empty
  • THEN the artifact has no banner locator and preserves existing conversion behavior
  • WHEN images is not an array of strings, or its selected image is missing, unsupported, remote, or outside the post package
  • THEN conversion fails with a diagnostic before any network operation
  • WHEN a body image aliases the banner’s bytes through an escaping symlink or an unsupported media type
  • THEN normal conversion diagnostics refuse that body reference
  • AND matching bytes do not bypass validation

23.1.1.2 - X article publication

23.1.1.2.1 - x-article-publication Specification

Create an X Article draft from a converted Markdown post, resolving referenced images through the media upload endpoint. The uploader creates drafts only; it never publishes an article.

The publisher SHALL authenticate to the X API with credentials supplied at run time through the repository’s secret-injection flow. Credential values MUST NOT be recorded in source, committed configuration, logs, or command history.

Authentication SHALL use OAuth 1.0a user context, because the existing media and Articles endpoints accept it and its user-context token does not expire on a fixed schedule the way an OAuth 2.0 user token does, so draft creation does not depend on a rotating refresh token. OAuth 1.0a needs four credential fields — the API key, the API secret, the access token, and the access token secret — and the publisher SHALL sign each request with HMAC-SHA1 per RFC 5849 using the repository’s standard library rather than adding a signing dependency. The publisher SHALL fail when any of the four fields is absent, rather than sending a partially signed request.

  • WHEN the publisher runs with credentials supplied through the injection flow
  • THEN it signs its requests to the X API with OAuth 1.0a user context
  • AND it does not print the credential values
  • WHEN the publisher runs without any one of the four required credential fields
  • THEN it fails with a diagnostic naming the missing credential reference
  • AND it does not retry with a partial or empty credential

The uploader SHALL create X Article drafts and MUST NOT publish an article. It SHALL NOT call the Articles publish endpoint or expose a way to request publication, so no invocation of this tool can make a post publicly visible. Draft creation SHALL send the title that conversion parsed from the source front matter, and MUST NOT invent, default, or omit it, because the draft endpoint requires a title that content_state does not carry.

  • WHEN draft creation is requested for a converted document
  • THEN the publisher reads the draft article identifier from the v2 response envelope’s data.id
  • AND no post becomes publicly visible
  • AND the request carries the title parsed from the source front matter
  • WHEN the draft endpoint returns a 2xx response whose data.id is missing or empty
  • THEN the publisher fails rather than reporting a successful draft with no identifier to review
  • AND it does not treat the zero-value response as a created draft
  • WHEN draft creation is requested for a document with no parsed title
  • THEN the publisher fails with a diagnostic
  • AND it does not send a placeholder or empty title

The publisher SHALL upload each referenced image through the X media upload endpoint and reference the returned media_id in an image entity, because that entity carries no document URL. Uploading MUST happen before the draft that references the media is created.

The publisher SHALL obtain the image bytes from the locator the draft artifact records beside the document, not by re-parsing the source Markdown, because the API’s entity data object rejects additional properties and so cannot carry a path. It SHALL resolve the recorded relative path against the post package the locator records, so the artifact stays resolvable after it is moved. It SHALL reject a locator that escapes the post’s directory or whose bytes do not match the digest the locator records, rather than uploading a different image. It SHALL enforce that containment by resolving the name through a descriptor-anchored directory handle that rejects a symlink escaping the root, rather than by checking a pathname and then re-opening it, so the object whose containment is checked is the object read.

  • WHEN a converted document references an unuploaded image
  • THEN the publisher reads the image bytes from the artifact’s locator and obtains a media_id
  • AND the created draft references that media_id in its image entity
  • WHEN the same image content has a ready upload in the current credential context and a usable lifetime
  • THEN the publisher reuses the recorded media_id rather than uploading the same bytes again
  • WHEN draft creation runs again in a new process for an image this tool already uploaded
  • THEN it reuses the identifier only when the cache schema, endpoint, media category, credential context, content digest, and conservative expiry all match
  • AND it stays correct when the cache is absent or the recorded digest no longer matches the artifact’s, by uploading again rather than reusing a stale identifier
  • WHEN the media upload endpoint returns the v2 response envelope
  • THEN the publisher reads the media identifier from the envelope’s data.id
  • AND the created draft references that identifier rather than an empty one
  • WHEN the media upload endpoint returns a 2xx response whose data.id is missing or empty
  • THEN the publisher fails rather than resolving the image to an empty identifier
  • AND it does not send an entity that references a missing media identifier
  • WHEN the recorded lifetime of a cached media identifier has passed before image resolution begins
  • THEN the cached entry is treated as a miss and the image is uploaded again
  • AND an entry with enough lifetime for draft submission is still reused
  • WHEN an image upload fails
  • THEN the publisher fails and reports the failing image
  • AND it does not create a draft that references a missing or placeholder media identifier
  • WHEN an artifact’s locator escapes the recorded post package or names bytes whose digest does not match the recorded one
  • THEN the publisher fails with a diagnostic naming the locator
  • AND it uploads no replacement image in its place
  • WHEN an artifact retains an image entity without media_items but records no locator that resolves it
  • THEN the publisher fails before uploading any image or creating a draft, naming the unresolved entity
  • AND it does not send an image entity without a media item
  • WHEN an artifact’s locator names an entity that is missing, is not an image, or is already named by another locator
  • THEN the publisher fails before uploading any image rather than discovering the mismatch after paying for uploads
  • WHEN an artifact contains more than one entity with the same numeric key
  • THEN the publisher fails before uploading any image, because one locator could resolve only the first and leave the other without media_items

Scenario: An image entity carries a malformed media_items entry

  • WHEN an image entity’s media_items is present but its entry has an empty or absent media_id, or a missing or incorrect media_category
  • THEN the entity is treated as unresolved, so the publisher requires a locator rather than sending the invalid entry to X

Scenario: An image entity carries a usable entry beside a malformed one

  • WHEN an image entity’s media_items holds a usable entry next to an empty, non-object, or incorrectly categorized one
  • THEN the entity is treated as unresolved, because every supplied entry must be usable
  • AND the publisher does not send the malformed array merely because one entry looked valid
  • WHEN an artifact contains an image entity whose key is missing, non-numeric, fractional, or negative
  • THEN the publisher fails before uploading any image, because the entity is invisible to locator coverage
  • AND it does not send an unresolved image to X
  • WHEN the cache cannot be recorded, such as a cache path in a read-only directory or over an existing directory
  • THEN draft creation continues and the draft is created from the uploads that already succeeded
  • AND the failure costs a later re-upload rather than aborting draft creation

The publisher SHALL report the identifier it obtained and SHALL fail loudly rather than report success when a request was rejected. Failures MUST identify which operation failed and MUST NOT be retried automatically.

For every non-2xx API response, including HTTP 503, the error SHALL preserve and display the original operation, status, body, and only these response headers: X-Rate-Limit-Limit, X-Rate-Limit-Remaining, X-Rate-Limit-Reset, X-User-Limit-24hour-Limit, X-User-Limit-24hour-Remaining, X-User-Limit-24hour-Reset, and Retry-After. It SHALL preserve every value of those headers and SHALL NOT copy authorization, cookies, or other headers into the error. A rejected response whose body cannot be completely read SHALL retain its status and headers alongside the body-read error cause.

Valid Unix reset timestamps SHALL also be displayed as human-readable UTC. A combined rate-limit retry not-before boundary SHALL be reported only when known exhausted windows have valid, future reset times at response receipt. A window SHALL count as exhausted only when its unambiguous remaining value is zero. The boundary SHALL use the latest reset among those windows, extended by a valid later Retry-After value interpreted as decimal seconds from receipt or an HTTP date. Missing, malformed, ambiguous, or already-elapsed reset data for an exhausted window SHALL prevent a combined boundary. A positive remaining count or Retry-After alone MUST NOT imply upload eligibility. The diagnostic SHALL distinguish a not-before boundary from guaranteed service recovery or request success, and SHALL preserve raw values when timing is unknown.

  • WHEN a draft is created
  • THEN the publisher reports the draft’s article identifier
  • WHEN an API request is rejected
  • THEN the publisher reports the failing operation and the API’s error
  • AND it does not report the operation as successful or retry automatically
  • WHEN a 503 response includes remaining allowance and reset headers
  • THEN the error retains those headers and displays readable UTC resets
  • AND it does not claim that the resets guarantee service recovery
  • WHEN both remaining counts are zero and both resets are valid future times
  • THEN the rate-limit boundary is no earlier than the later reset
  • AND valid later Retry-After advice extends that boundary
  • WHEN an exhausted window has a missing, malformed, ambiguous, or elapsed reset
  • THEN the diagnostic reports that a current retry time is unknown
  • AND it keeps the original header values without inventing an exact time
  • WHEN a non-2xx response terminates before its declared body length
  • THEN the error retains the operation, status, partial body, and allowlisted headers
  • AND callers can still inspect the body-read error cause
  • WHEN the project’s checks validate conversion
  • THEN they run without contacting the X API
  • AND no test requires live credentials

Requirement: Article banner media

Draft creation SHALL upload a selected banner through the media API and send its identifier in the optional cover_media object with media_category: tweet_image. The publisher SHALL share its digest-based media cache between banner and body images, reusing an unexpired identifier for the same bytes. It SHALL validate all banner and body image locators, bytes, digests, and media types before any upload or draft request.

  • WHEN the banner and a body image contain the same bytes
  • THEN at most one media upload resolves both references
  • AND the draft request carries that ID in cover_media and the body entity
  • WHEN the selected banner has different bytes from every body image
  • THEN it receives its own media upload or cached identifier
  • AND all media resolves before the draft request is sent
  • WHEN the artifact has no banner locator
  • THEN the request omits cover_media
  • WHEN any banner or body locator is malformed, escapes its package, names missing bytes, or has a mismatched digest or media type
  • THEN draft creation fails before any media or draft HTTP request

The publisher SHALL inspect media processing information before using an upload identifier. A response without processing information or with succeeded state SHALL require no status request. Pending or in-progress processing SHALL use read-only signed status requests, respect the reported delay, and stop within a bounded deadline. Failed, unknown, inconsistent, or incomplete processing state, partial upload errors, and rejected status requests SHALL prevent draft creation. Neither upload nor draft POST requests SHALL be replayed by this workflow.

  • WHEN upload succeeds without processing information or with succeeded state
  • THEN the publisher makes no processing-status request
  • AND the media identifier can be attached to the draft
  • WHEN the upload reports pending or in-progress processing
  • THEN the publisher checks status after the prescribed delay within a finite budget
  • AND it creates a draft only after observing succeeded state
  • WHEN processing fails, exceeds its deadline, returns errors, or supplies inconsistent state
  • THEN the publisher reports the media failure without creating a draft
  • AND it does not retry the upload POST

Persistent media reuse SHALL be scoped to the upload endpoint, media category, and OAuth credential context without persisting plaintext credentials or requesting account identity merely to name the cache. Changing any credential field SHALL prevent reuse from the prior context. Unscoped legacy entries SHALL be treated as misses.

A persisted entry SHALL have a known positive lifetime, conservatively anchored before upload and accounting for processing time and a submission reserve. Missing or zero lifetime SHALL permit reuse only within the current resolution, never across resolutions or processes. Negative or already unusable upload lifetimes SHALL fail before draft creation.

  • WHEN identical image bytes are submitted using a different credential context
  • THEN the earlier context’s cached identifier is not reused
  • AND the cache contains no credential values
  • WHEN an upload response omits its lifetime or reports zero
  • THEN identical banner and body images may share that fresh identifier within one resolution
  • AND a later resolution uploads the bytes again
  • WHEN a positive reported lifetime has insufficient time remaining for submission
  • THEN draft creation stops instead of attaching the expired or near-expiry identifier
  • WHEN uploading another image consumes the usable lifetime of an identifier already selected for a banner or body image
  • AND a later body image references those same bytes
  • THEN resolution stops without uploading the duplicate again or creating a draft
  • AND a replacement cache entry cannot mask the expired identifier already selected for the draft

23.1.1.3 - X article uploader build

23.1.1.3.1 - x-article-uploader-build Specification

Build the X Article uploader from pinned, hermetic inputs so conversion and its tests run reproducibly in the repository’s Bazel workflow without network access or credentials.

The project SHALL expose Bazel targets for its converter library, its conversion command, and its draft-creation command, with tests declared beside the sources they cover. Targets MUST follow the repository’s role-based source layout using internal/ for implementation and cmd/ for entry points.

  • WHEN the project’s conversion and draft-creation targets are built
  • THEN both binaries build from the project’s declared sources
  • WHEN the project’s library tests run
  • THEN they execute against the converter’s declared source inputs
  • AND they require neither credentials nor network access

External build inputs, including the Markdown parser, SHALL be declared with immutable versions and integrity information in the owning dependency declarations, and SHALL be updated through the owning generator rather than hand-edited.

  • WHEN the project depends on an external Markdown parser
  • THEN its version and integrity are pinned in the owning dependency declaration
  • AND the applicable lock and package-check targets validate the declaration
  • WHEN the project is built and tested in the repository’s agent configuration
  • THEN no build or test step fetches an undeclared input

Tests SHALL exercise conversion against every blog post in the site content tree and SHALL assert the mapped block types, inline ranges, and entity payloads for the constructs those posts contain, rather than relying on a single smoke check. The covered set MUST be derived from the content tree, so a post added later is covered without editing the test list. Each post SHALL carry an expected outcome: a post whose images all use a media type the upload endpoints accept MUST satisfy the mapping contract and MAY carry the continuing diagnostics its constructs produce, while a post that references an unacceptable image MUST fail with the named diagnostic at the reported source position. Where a construct is not present in any current post, a focused case SHALL cover it.

Behavior coverage SHALL be authored before the implementation it exercises: the expected outcome for a construct, or the enumerated ways a conversion can fail, is written first, and the implementation follows. Test cases MUST assert observable conversion behavior and MUST NOT restate the implementation’s own constants or assert only that output changed.

Scenario: Convert every existing blog post

  • WHEN the converter’s tests run against the blog posts in the site content tree
  • THEN conversion is exercised for every post in the tree, discovered from the tree itself
  • AND each post produces the outcome its entry records: the mapping contract where every image is acceptable, including any continuing diagnostic its constructs produce, or the named failing diagnostic where an image is not acceptable

Scenario: Cover a construct absent from any current post

  • WHEN a mapped construct does not appear in any current post
  • THEN a focused case covers that construct
  • AND the case asserts the resulting block type and range offsets
  • WHEN a conversion behavior is implemented
  • THEN the case that establishes its expected outcome already exists

A post intended for a draft SHALL reference only images whose media type the upload endpoints accept. A Mermaid diagram in such a post SHALL be referenced as a raster render of its .mmd source, and this change SHALL verify that render with an end-to-end check. The check SHALL prove the properties this project depends on: the produced image is in an accepted media type, it was rendered from the diagram source through the repository’s maintained Mermaid render contract rather than a host browser, a host font, a CDN fetch, or a second appearance, and the post that references it converts without an unacceptable-image diagnostic.

Scenario: Convert a post that references a rendered diagram

  • WHEN a post intended for a draft references a diagram’s raster render
  • THEN the conversion check reads that rendered image from the post’s package
  • AND the image is in a media type the upload endpoints accept
  • AND the post’s recorded outcome is the mapping contract, with no unacceptable-image diagnostic
  • WHEN the raster render referenced by that post is produced
  • THEN it is rendered from the diagram source through the pinned Mermaid inputs and the maintained appearance, not a host browser, a host font, a CDN fetch, or a second appearance

The new project SHALL be registered everywhere the repository catalogs direct projects, so the project builds, tests, and validates like its siblings.

  • WHEN the project is added under projects/
  • THEN it appears in the project catalog, the OpenSpec validation workspace sources, and its own OpenSpec workspace
  • WHEN the repository’s OpenSpec validation runs
  • THEN the new owner workspace is included and its artifacts validate strictly

The project SHALL document its purpose, its two operations, its inputs and outputs, how to run conversion and publication, and the credential and disclosure boundary it depends on.

  • WHEN a reader opens the project README
  • THEN it explains conversion and publication, their inputs and outputs, and how credentials are supplied
  • AND it states that conversion is offline and publication is the only authenticated, network-performing operation