How cognigy/cognigy-cli works
Cognigy CLI is a command-line client for manipulating existing Cognigy.AI agent resources, with local files as the working copy. The principal workflow dispatches a user command, performs resource-specific work, then reads or updates local data and/or Cognigy.AI. Separate capabilities cover Flow localization and CSV content, playbooks and API-client commands, and Knowledge AI resource management and ingestion. The tree, README, and sampled excerpts support the command entry and parts of Flow and Knowledge AI behavior; some subsystem wiring is documented but its implementation was not sampled.
Main entry points: program.ts Command registry · knowledgeAI Knowledge operations · cognigyClient.ts Cognigy API client · flows.ts Flow operations
Components 22
CLI dispatch
- Executable entry
src/cognigy.ts - Command registry
src/program/program.ts
Agent resources
- Resource commands
src/commands - Resource operations
src/lib - Playbook operations
src/lib/playbooks.ts
Flow content
- Flow operations
src/lib/flows.ts - Locale operations
src/lib/locales.ts - Flow content commands
src/commands - Translation adapters
src/utils/translators.ts - Flow CSV exchange
src/commands/exportcsv.ts
Knowledge AI
- Knowledge command registry
src/program/knowledgeAIProgram.ts - Knowledge commands
src/commands/knowledgeAI - Knowledge operations
src/lib/knowledgeAI - Extraction providers
src/lib/knowledgeAI/extractionProvider - Text splitting
src/utils/paragraphSplitter.ts
Runtime services
- Configuration
src/utils/config.ts - Cognigy API client
src/utils/cognigyClient.ts - HTTP request adapter
src/utils/axiosClient.ts
Other components
- CLI user
- Agent files
- Cognigy.AI API
- Translation service
Connections 27
- CLI user → Executable entry: runs
- Executable entry → Command registry: parses input
- Command registry → Resource commands: dispatches commands
- Command registry → Flow content commands: dispatches commands
- Command registry → Knowledge command registry: registers commands
- Resource commands → Resource operations: performs resource work
- Resource operations → Cognigy API client: uses API client
- Resource operations → Agent files: reads and writes
- Cognigy API client → Cognigy.AI API: calls API
- Flow content commands → Flow operations: runs Flow work
- Flow operations → Locale operations: retrieves locales
- Flow operations → Cognigy API client: requests resources
- Flow operations → Agent files: reads and writes
- Flow content commands → Translation adapters: requests translation
- Translation adapters → Translation service: translates text
- Flow content commands → Flow CSV exchange: exports and imports
- Flow CSV exchange → Agent files: reads and writes CSV
- Knowledge command registry → Knowledge commands: dispatches commands
- Knowledge commands → Knowledge operations: runs knowledge work
- Knowledge operations → Extraction providers: extracts content
- Knowledge operations → Text splitting: splits text
- Knowledge operations → HTTP request adapter: uploads files
- HTTP request adapter → Cognigy.AI API: sends requests
- Knowledge operations → Agent files: reads source files
- Configuration → Cognigy API client: supplies credentials
- Playbook operations → Cognigy API client: uses API client
- Command registry → Playbook operations: schedules playbooks