Skip to main content

Knowledge

Read and write generated knowledge files for a product from the terminal. Pass --scope <org-slug>/<product-slug> to select the product. tpc kb is an alias for tpc knowledge.
Knowledge commands require OAuth login (tpc auth login). API keys are rejected with an “OAuth login required” error.

List files

Text output is an indented Unix-style tree. JSON output is the API’s flat file list.
Filter to a subtree. The prefix becomes the tree root:
Get the flat list for scripting:

Get a file

Text output prints the file content. JSON output prints the API payload.

Write a file

put creates the file, or replaces it when it already exists. Use either --content or --content-file.
Text output says whether the file was created or updated and prints its path, the commit, and the branch.

Move or archive a file

move renames a file in one commit. The destination must not already exist. To take a file out of use without losing its history, move it under archive/.

Delete files

delete removes one or more files in a single commit. Pass paths as arguments, or one per line with --paths-file (- reads stdin). Blank lines and duplicate paths are ignored, and one call accepts up to 500 paths.
Paths that don’t exist are reported as not found and don’t fail the command. Text output lists each deleted path, each path not found, the commit, and the branch. The knowledge schema file cannot be deleted or moved.

Output formats

Every knowledge command supports --format json. --format csv is not supported.