Skip to main content
4 min read

knowledge

knowledge

Use stackgen ai knowledge to upload documents to an Aiden Knowledge Hub and manage ingestion. You can upload a file, check status, list documents, delete documents, and list hubs.

Usage​

stackgen ai knowledge [command]

Available commands​

CommandDescription
uploadUpload a document to a Knowledge Hub
statusCheck ingestion status of a document
lsList ingested documents. Alias: list
deleteDelete an ingested document and its chunks. Alias: rm
hubsWork with Knowledge Hubs

Flags​

FlagDescription
-h, --helpHelp for knowledge.

Global flags​

See Global flags for --project, --workspace, --output, --interactive, --log, --stackgen-home, and other options.

Subcommands​

upload​

Click to view

Upload a document file for asynchronous ingestion into an Aiden Knowledge Hub. If you omit --hub, the CLI uses the default Organization Knowledge hub.

stackgen ai knowledge upload <file> [flags]
FlagDescription
--hub stringTarget Knowledge Hub name or ID (default: Organization Knowledge)
--poll durationPoll interval when --wait is set (default 3s)
--runbookClassify the document as a runbook
--timeout durationMax time to wait when --wait is set (default 5m0s)
--waitWait until ingestion reaches ready or failed
-h, --helpHelp for upload

Examples

Upload a document and wait for ingestion​

stackgen ai knowledge upload ./runbooks/deploy.md --runbook --wait

The above command will:

  • Upload ./runbooks/deploy.md to the default Organization Knowledge hub
  • Mark the document as a runbook
  • Wait until ingestion reaches ready or failed

Upload to a specific hub​

stackgen ai knowledge upload ./docs/guide.md --hub "<hub-name-or-id>"

The above command will upload the file to the Knowledge Hub you specify.

status​

Click to view
stackgen ai knowledge status <document-id> [flags]
FlagDescription
-h, --helpHelp for status

Examples

Check ingestion status for a document​

stackgen ai knowledge status <document-id>

The above command will show the ingestion status for the document ID you provide.

ls​

Click to view

List ingested knowledge documents. You can filter by hub and by status (pending, processing, ready, failed).

stackgen ai knowledge ls [flags]

Aliases: ls, list

FlagDescription
--hub stringFilter by Knowledge Hub name or ID
--status stringFilter by status: pending, processing, ready, failed
-h, --helpHelp for ls

Examples

List all ingested documents​

stackgen ai knowledge ls

The above command will list ingested documents.

List ready documents​

stackgen ai knowledge ls --status ready

The above command will list only documents with status ready.

delete​

Click to view
stackgen ai knowledge delete <document-id> [flags]

Aliases: delete, rm

FlagDescription
-y, --yesSkip confirmation prompt and delete
-h, --helpHelp for delete

Examples

Delete a document​

stackgen ai knowledge delete <document-id> --yes

The above command will delete the document and its chunks without a confirmation prompt.

hubs​

Click to view
stackgen ai knowledge hubs [command]

hubs ls​

List Knowledge Hubs.

stackgen ai knowledge hubs ls [flags]

Aliases: ls, list

stackgen ai knowledge hubs ls

The above command will list the Knowledge Hubs available to you.