Skip to main content
A category groups articles in your knowledge base and can nest inside another category. For fields and response details, see the API reference.

List categories

This command lists the category tree with article counts. The tree omits categories without published articles, and omits private categories for API keys. Pass --flat to list every category, including empty and private ones, as flat rows. Use this when you want a category ID to filter articles by, or to check where a new article should go before creating it.
Sample output (--json)
subcategories nests the full child categories, and ancestors lists the parents up to the root. articles_count covers the category itself; total_articles_count includes its subcategories. With --flat, each row also carries is_private and has no subcategories or ancestors. Private categories are hidden from logged-out visitors only; members see every article.
Pass an id from this list to neetokb articles list --category-id. To place a new article, neetokb articles create --category takes category names, not these IDs.

Show a category

This command shows one category. articles_count counts published articles only.
Required arguments:
  • <id> - Category UUID or slug

Create a category

This command creates a category. Changing categories needs the Manage categories permission.
--position is 1-based among the siblings. A number larger than the sibling count puts the category last. A public category cannot sit under a private parent.

Update a category

This command renames a category, changes its privacy, moves it or changes its position. Only the flags you pass change.
Required arguments:
  • <id> - Category UUID or slug
--parent "" moves the category to the top level. --private also applies to its subcategories.

Delete a category

This command deletes a category. Its articles and subcategories move to --move-to-category-id, or to the parent category when you leave it out.
Required arguments:
  • <id> - Category UUID or slug
A top-level category that has articles or subcategories needs --move-to-category-id. The last remaining category cannot be deleted.

Reorder category articles

This command sets the order of the articles in a category. Articles you leave out follow in their current order.
Required arguments:
  • <id> - Category UUID or slug
Each article must be in the category. An article cannot be listed twice.