@nestbox-ai/cli 1.0.62 → 1.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Nestbox CLI for managing and deploying agents
2
2
 
3
- The Nestbox CLI tool is designed to facilitate development, management, and deployment of AI agents built on the Nestbox platform. It provides developers streamlined commands for authentication, deployment lifecycle management, and AI agent management.
3
+ The Nestbox CLI tool is designed to facilitate development, management, and deployment of AI agents built on the Nestbox platform. It provides developers streamlined commands for authentication, deployment lifecycle management, AI agent management, document processing, and AI-assisted configuration generation.
4
4
 
5
5
  Read more in the [Nestbox AI developers site](https://developers.nestbox.ai)
6
6
 
@@ -45,13 +45,14 @@ Options:
45
45
  ## Commands Overview
46
46
 
47
47
  - [`login`](#login) - Login using Google SSO
48
- - [`logout`](#logout) - Logout from Nestbox platform
48
+ - [`logout`](#logout) - Logout from Nestbox platform
49
49
  - [`project`](#project) - Manage Nestbox projects
50
50
  - [`compute`](#compute) - Manage Nestbox compute instances
51
51
  - [`agent`](#agent) - Manage Nestbox agents
52
52
  - [`document`](#document) - Manage Nestbox documents and collections
53
53
  - [`image`](#image) - Manage Nestbox images
54
- - [`generate`](#generate) - Generate new projects and components
54
+ - [`doc-proc`](#doc-proc) - Document processing pipeline management
55
+ - [`generate`](#generate) - AI-assisted configuration and project generation
55
56
 
56
57
  ---
57
58
 
@@ -496,13 +497,430 @@ nestbox image list [options]
496
497
 
497
498
  ---
498
499
 
499
- ## Project Generation
500
+ ## Document Processing
501
+
502
+ ### `doc-proc`
503
+
504
+ Manage document processing pipelines — upload documents, run processing jobs, manage profiles, run evaluations, and configure webhooks.
505
+
506
+ **Global options** (available on all `doc-proc` subcommands):
507
+ - `--project <projectId>` - Project ID or name (defaults to current project)
508
+ - `--instance <instanceId>` - Document processing instance ID
509
+ - `--json` - Output raw JSON instead of formatted tables
510
+
511
+ ---
512
+
513
+ ### Profile Management
514
+
515
+ A *profile* is a YAML configuration file that controls how documents are processed (OCR settings, chunking strategy, GraphRAG indexing, etc.).
516
+
517
+ #### `doc-proc profile init`
518
+
519
+ Scaffold a profile YAML template to the local filesystem.
520
+
521
+ ```bash
522
+ nestbox doc-proc profile init [options]
523
+ ```
524
+
525
+ **Options:**
526
+ - `-o, --output <path>` - Output file path (default: `./profile.yaml`)
527
+ - `-f, --force` - Overwrite existing file
528
+
529
+ **Example:**
530
+ ```bash
531
+ nestbox doc-proc profile init -o ./my-profile.yaml
532
+ ```
533
+
534
+ #### `doc-proc profile create`
535
+
536
+ Register a profile from a YAML file with the processing instance.
537
+
538
+ ```bash
539
+ nestbox doc-proc profile create --file <path> [options]
540
+ ```
541
+
542
+ **Options:**
543
+ - `-f, --file <path>` - Path to profile YAML file (required)
544
+ - `-n, --name <name>` - Override the profile name from the file
545
+ - `--project <projectId>` - Project ID or name
546
+ - `--instance <instanceId>` - Processing instance ID
547
+ - `--json` - Output raw JSON
548
+
549
+ **Example:**
550
+ ```bash
551
+ nestbox doc-proc profile create --file ./my-profile.yaml --name "OCR + GraphRAG"
552
+ ```
553
+
554
+ #### `doc-proc profile list`
555
+
556
+ List all profiles registered with the instance.
557
+
558
+ ```bash
559
+ nestbox doc-proc profile list [options]
560
+ ```
561
+
562
+ **Options:**
563
+ - `--page <page>` - Page number (default: `1`)
564
+ - `--limit <limit>` - Page size (default: `20`)
565
+
566
+ #### `doc-proc profile show`
567
+
568
+ Show full details of a profile by ID.
569
+
570
+ ```bash
571
+ nestbox doc-proc profile show --profile <profileId> [options]
572
+ ```
573
+
574
+ **Options:**
575
+ - `--profile <profileId>` - Profile ID (required)
576
+
577
+ #### `doc-proc profile validate`
578
+
579
+ Validate a profile YAML file against the schema without registering it.
580
+
581
+ ```bash
582
+ nestbox doc-proc profile validate --file <path> [options]
583
+ ```
584
+
585
+ **Options:**
586
+ - `-f, --file <path>` - Path to profile YAML file (required)
587
+
588
+ #### `doc-proc profile schema`
589
+
590
+ Print the full profile JSON Schema for reference.
591
+
592
+ ```bash
593
+ nestbox doc-proc profile schema [options]
594
+ ```
595
+
596
+ ---
597
+
598
+ ### Document Management
599
+
600
+ #### `doc-proc document create`
601
+
602
+ Upload a file and create a document processing job.
603
+
604
+ ```bash
605
+ nestbox doc-proc document create --input <path> [options]
606
+ ```
607
+
608
+ **Options:**
609
+ - `--input <path>` - Document file path (required)
610
+ - `--profile <profileId>` - Processing profile ID
611
+ - `--stages <stages>` - Comma-separated stage override (e.g. `ocr,chunking`)
612
+ - `--priority <priority>` - Job priority: `low`, `normal`, or `high`
613
+
614
+ **Example:**
615
+ ```bash
616
+ nestbox doc-proc document create --input ./contract.pdf --profile prof-abc123
617
+ ```
618
+
619
+ #### `doc-proc document list`
620
+
621
+ List all processed documents.
622
+
623
+ ```bash
624
+ nestbox doc-proc document list [options]
625
+ ```
626
+
627
+ **Options:**
628
+ - `--page <page>` - Page number (default: `1`)
629
+ - `--limit <limit>` - Page size (default: `20`)
630
+
631
+ #### `doc-proc document show`
632
+
633
+ Show details of a specific processed document.
634
+
635
+ ```bash
636
+ nestbox doc-proc document show --document <documentId> [options]
637
+ ```
638
+
639
+ **Options:**
640
+ - `--document <documentId>` - Document ID (required)
641
+
642
+ #### `doc-proc document artifacts`
643
+
644
+ Download all artifacts for a document as a zip file (GraphRAG output, chunks, etc.).
645
+
646
+ ```bash
647
+ nestbox doc-proc document artifacts --document <documentId> [options]
648
+ ```
649
+
650
+ **Options:**
651
+ - `--document <documentId>` - Document ID (required)
652
+ - `-o, --output <path>` - Output zip path (default: `./document-artifacts.zip`)
653
+
654
+ **Example:**
655
+ ```bash
656
+ nestbox doc-proc document artifacts --document doc-abc123 -o ./artifacts.zip
657
+ ```
658
+
659
+ ---
660
+
661
+ ### Job Monitoring
662
+
663
+ #### `doc-proc job list`
664
+
665
+ List document processing jobs.
666
+
667
+ ```bash
668
+ nestbox doc-proc job list [options]
669
+ ```
670
+
671
+ **Options:**
672
+ - `--state <state>` - Filter by job state (e.g. `pending`, `running`, `completed`, `failed`)
673
+ - `--page <page>` - Page number (default: `1`)
674
+ - `--limit <limit>` - Page size (default: `20`)
675
+
676
+ #### `doc-proc job status`
677
+
678
+ Get the status of a specific job.
679
+
680
+ ```bash
681
+ nestbox doc-proc job status --job <jobId> [options]
682
+ ```
683
+
684
+ **Options:**
685
+ - `--job <jobId>` - Job ID (required)
686
+ - `--full` - Fetch full job details instead of lightweight status
687
+
688
+ **Example:**
689
+ ```bash
690
+ nestbox doc-proc job status --job job-xyz789 --full
691
+ ```
692
+
693
+ ---
694
+
695
+ ### Evaluations
696
+
697
+ Evaluations run a set of Q&A test cases against a processed document to measure extraction quality.
698
+
699
+ #### `doc-proc eval init`
700
+
701
+ Scaffold an eval YAML template.
702
+
703
+ ```bash
704
+ nestbox doc-proc eval init [options]
705
+ ```
706
+
707
+ **Options:**
708
+ - `-o, --output <path>` - Output file path (default: `./eval.yaml`)
709
+ - `-f, --force` - Overwrite existing file
710
+
711
+ **Example eval.yaml:**
712
+ ```yaml
713
+ testCases:
714
+ - id: q1
715
+ question: "What are the payment terms?"
716
+ expectedAnswer: "Net 30"
717
+ ```
718
+
719
+ #### `doc-proc eval run`
720
+
721
+ Run an evaluation against a document.
722
+
723
+ ```bash
724
+ nestbox doc-proc eval run --document <documentId> --file <path> [options]
725
+ ```
726
+
727
+ **Options:**
728
+ - `--document <documentId>` - Document ID (required)
729
+ - `-f, --file <path>` - Path to eval YAML file (required)
730
+
731
+ **Example:**
732
+ ```bash
733
+ nestbox doc-proc eval run --document doc-abc123 --file ./eval.yaml
734
+ ```
735
+
736
+ #### `doc-proc eval validate`
737
+
738
+ Validate an eval YAML file against the schema without running it.
739
+
740
+ ```bash
741
+ nestbox doc-proc eval validate --document <documentId> --file <path> [options]
742
+ ```
743
+
744
+ #### `doc-proc eval list`
745
+
746
+ List all evaluations for a document.
747
+
748
+ ```bash
749
+ nestbox doc-proc eval list --document <documentId> [options]
750
+ ```
751
+
752
+ **Options:**
753
+ - `--document <documentId>` - Document ID (required)
754
+ - `--page <page>` - Page number (default: `1`)
755
+ - `--limit <limit>` - Page size (default: `20`)
756
+
757
+ #### `doc-proc eval show`
758
+
759
+ Get full details of a specific evaluation.
760
+
761
+ ```bash
762
+ nestbox doc-proc eval show --document <documentId> --eval <evalId> [options]
763
+ ```
764
+
765
+ **Options:**
766
+ - `--document <documentId>` - Document ID (required)
767
+ - `--eval <evalId>` - Evaluation ID (required)
768
+
769
+ ---
770
+
771
+ ### Batch Queries
772
+
773
+ Batch queries let you run multiple questions against a processed document in one request.
774
+
775
+ #### `doc-proc query init`
776
+
777
+ Scaffold a batch query YAML template.
778
+
779
+ ```bash
780
+ nestbox doc-proc query init [options]
781
+ ```
782
+
783
+ **Options:**
784
+ - `-o, --output <path>` - Output file path (default: `./query.yaml`)
785
+ - `-f, --force` - Overwrite existing file
786
+
787
+ **Example query.yaml:**
788
+ ```yaml
789
+ queries:
790
+ - id: payment_terms
791
+ question: "What are the payment terms?"
792
+ mode: local
793
+ ```
794
+
795
+ #### `doc-proc query create`
796
+
797
+ Submit a batch query from a YAML file.
798
+
799
+ ```bash
800
+ nestbox doc-proc query create --file <path> [options]
801
+ ```
802
+
803
+ **Options:**
804
+ - `-f, --file <path>` - YAML file path (required)
805
+
806
+ #### `doc-proc query validate`
807
+
808
+ Validate a query YAML file without submitting it.
809
+
810
+ ```bash
811
+ nestbox doc-proc query validate --file <path> [options]
812
+ ```
813
+
814
+ #### `doc-proc query list`
815
+
816
+ List all batch queries.
817
+
818
+ ```bash
819
+ nestbox doc-proc query list [options]
820
+ ```
821
+
822
+ **Options:**
823
+ - `--page <page>` - Page number (default: `1`)
824
+ - `--limit <limit>` - Page size (default: `20`)
825
+
826
+ #### `doc-proc query show`
827
+
828
+ Get details of a specific batch query.
829
+
830
+ ```bash
831
+ nestbox doc-proc query show --query <queryId> [options]
832
+ ```
833
+
834
+ **Options:**
835
+ - `--query <queryId>` - Query ID (required)
836
+
837
+ ---
838
+
839
+ ### Webhooks
840
+
841
+ #### `doc-proc webhook create`
842
+
843
+ Register a webhook to receive processing event notifications.
844
+
845
+ ```bash
846
+ nestbox doc-proc webhook create --url <url> [options]
847
+ ```
848
+
849
+ **Options:**
850
+ - `--url <url>` - Webhook URL (required)
851
+ - `--secret <secret>` - HMAC signing secret for payload verification
852
+ - `--event <event...>` - One or more event names to subscribe to
853
+
854
+ **Example:**
855
+ ```bash
856
+ nestbox doc-proc webhook create --url https://my-app.com/hooks/nestbox --event job.completed job.failed
857
+ ```
858
+
859
+ #### `doc-proc webhook list`
860
+
861
+ List all registered webhooks.
862
+
863
+ ```bash
864
+ nestbox doc-proc webhook list [options]
865
+ ```
866
+
867
+ #### `doc-proc webhook show`
868
+
869
+ Get details of a specific webhook.
870
+
871
+ ```bash
872
+ nestbox doc-proc webhook show --webhook <webhookId> [options]
873
+ ```
874
+
875
+ #### `doc-proc webhook update`
876
+
877
+ Update a webhook's configuration.
878
+
879
+ ```bash
880
+ nestbox doc-proc webhook update --webhook <webhookId> [options]
881
+ ```
882
+
883
+ **Options:**
884
+ - `--webhook <webhookId>` - Webhook ID (required)
885
+ - `--url <url>` - New webhook URL
886
+ - `--secret <secret>` - New signing secret
887
+ - `--event <event...>` - New event subscriptions
888
+ - `--active <true|false>` - Enable or disable the webhook
889
+
890
+ #### `doc-proc webhook delete`
891
+
892
+ Delete a webhook.
893
+
894
+ ```bash
895
+ nestbox doc-proc webhook delete --webhook <webhookId> [options]
896
+ ```
897
+
898
+ **Options:**
899
+ - `--webhook <webhookId>` - Webhook ID (required)
900
+
901
+ ---
902
+
903
+ ### Health Check
904
+
905
+ #### `doc-proc health`
906
+
907
+ Check the health of the document processing API.
908
+
909
+ ```bash
910
+ nestbox doc-proc health [options]
911
+ ```
912
+
913
+ ---
914
+
915
+ ## Generate
500
916
 
501
917
  ### `generate`
502
918
 
503
- Generate new projects and components with the following subcommands:
919
+ AI-assisted generation of configuration files and project scaffolds. Uses Claude to generate validated YAML configurations from plain-English instruction files.
504
920
 
505
- #### `generate project`
921
+ ---
922
+
923
+ ### `generate project`
506
924
 
507
925
  Generate a new Nestbox project from templates.
508
926
 
@@ -514,8 +932,8 @@ nestbox generate project <folder> [options]
514
932
  - `<folder>` - Name of the folder to create the project in
515
933
 
516
934
  **Options:**
517
- - `--lang <language>` - Project language (ts|js)
518
- - `--template <type>` - Template type (agent|chatbot)
935
+ - `--lang <language>` - Project language (`ts`|`js`)
936
+ - `--template <type>` - Template type (`agent`|`chatbot`)
519
937
  - `--instanceName <name>` - Name of the compute instance
520
938
  - `--project <projectId>` - Project ID
521
939
 
@@ -525,7 +943,108 @@ nestbox generate project <folder> [options]
525
943
  nestbox generate project my-agent --lang ts --template agent
526
944
 
527
945
  # Generate a JavaScript chatbot project
528
- nestbox generate project my-chatbot --lang js --template chatbot --project my-project-id
946
+ nestbox generate project my-chatbot --lang js --template chatbot
947
+ ```
948
+
949
+ ---
950
+
951
+ ### `generate doc-proc`
952
+
953
+ Generate a document processing pipeline configuration (`config.yaml` and `eval.yaml`) from a plain-English instructions file using Claude AI.
954
+
955
+ The agent reads your instructions, writes both files, validates each against their schemas, and iterates automatically until both pass validation.
956
+
957
+ ```bash
958
+ nestbox generate doc-proc --file <path> --output <dir> --anthropicApiKey <key> [options]
959
+ ```
960
+
961
+ **Required options:**
962
+ - `-f, --file <path>` - Path to a Markdown file describing what the pipeline should do
963
+ - `-o, --output <dir>` - Output directory where `config.yaml` and `eval.yaml` will be written
964
+ - `--anthropicApiKey <key>` - Anthropic API key (or set `ANTHROPIC_API_KEY` env var)
965
+
966
+ **Optional options:**
967
+ - `--model <model>` - Claude model ID (default: `claude-sonnet-4-6`)
968
+ - `--maxIterations <n>` - Maximum agent iterations before giving up (default: `8`)
969
+
970
+ **Output files:**
971
+ - `config.yaml` — document processing pipeline configuration
972
+ - `eval.yaml` — evaluation test cases for the pipeline
973
+
974
+ **Example:**
975
+ ```bash
976
+ # Using a flag for the API key
977
+ nestbox generate doc-proc \
978
+ --file ./instructions.md \
979
+ --output ./pipeline \
980
+ --anthropicApiKey sk-ant-...
981
+
982
+ # Using the environment variable
983
+ export ANTHROPIC_API_KEY=sk-ant-...
984
+ nestbox generate doc-proc --file ./instructions.md --output ./pipeline
985
+ ```
986
+
987
+ **Example instructions file (`instructions.md`):**
988
+ ```markdown
989
+ # Contract Processing Pipeline
990
+
991
+ Process PDF contracts. Extract text with OCR using rapidocr.
992
+ Chunk with the docling_hybrid strategy, max 1200 tokens, 200 overlap.
993
+ Enable GraphRAG indexing.
994
+
995
+ Eval test cases:
996
+ - "What are the payment terms?" → expected answer should mention Net 30 or similar
997
+ - "Who are the parties to this agreement?"
998
+ ```
999
+
1000
+ ---
1001
+
1002
+ ### `generate report-composer`
1003
+
1004
+ Generate a GraphRAG report composer configuration (`report.yaml`) from a plain-English instructions file using Claude AI.
1005
+
1006
+ The agent reads your instructions, writes the report configuration, validates it against the schema (v2.2), and iterates automatically until it passes — it will not finish until the file is valid.
1007
+
1008
+ ```bash
1009
+ nestbox generate report-composer --file <path> --output <dir> --anthropicApiKey <key> [options]
1010
+ ```
1011
+
1012
+ **Required options:**
1013
+ - `-f, --file <path>` - Path to a Markdown file describing the report to generate
1014
+ - `-o, --output <dir>` - Output directory where `report.yaml` will be written
1015
+ - `--anthropicApiKey <key>` - Anthropic API key (or set `ANTHROPIC_API_KEY` env var)
1016
+
1017
+ **Optional options:**
1018
+ - `--model <model>` - Claude model ID (default: `claude-sonnet-4-6`)
1019
+ - `--maxIterations <n>` - Maximum agent iterations before giving up (default: `5`)
1020
+
1021
+ **Output files:**
1022
+ - `report.yaml` — report composer configuration (schema version 2.2)
1023
+
1024
+ **Example:**
1025
+ ```bash
1026
+ nestbox generate report-composer \
1027
+ --file ./report-instructions.md \
1028
+ --output ~/Downloads/my-report \
1029
+ --anthropicApiKey sk-ant-...
1030
+ ```
1031
+
1032
+ **Example instructions file (`report-instructions.md`):**
1033
+ ```markdown
1034
+ # Quarterly Board Report
1035
+
1036
+ Analyze the board deck PDF for Q4 2025.
1037
+
1038
+ Extract:
1039
+ - Total ARR and net retention rate
1040
+ - Net new ARR broken down by new business vs expansion
1041
+ - Top 3 customer deals closed in the quarter
1042
+ - Key risks and mitigation plans
1043
+
1044
+ The document is stored at repo:doc-abc123. Use ${OPENAI_API_KEY} for GraphRAG search
1045
+ and ${LLAMAINDEX_API_KEY} for the LlamaIndex agent.
1046
+
1047
+ Include two guardrails: one to check all numbers have citations, one to detect fabricated data.
529
1048
  ```
530
1049
 
531
1050
  ---
@@ -547,4 +1066,3 @@ The CLI includes automatic token refresh functionality. If your authentication t
547
1066
  For more information and detailed guides, visit the [Nestbox AI developers site](https://developers.nestbox.ai).
548
1067
 
549
1068
  For issues and bug reports, please visit the [GitHub repository](https://github.com/NestboxAI/nestbox-ai-cli-tools).
550
-
@@ -873,6 +873,29 @@ graphrag:
873
873
 
874
874
  ---
875
875
 
876
+ ### Embeddings
877
+
878
+ The `embeddings` section controls how entity and community texts are vectorised for similarity search. It does **not** have an `enabled` field — to disable embeddings, omit the section entirely.
879
+
880
+ ```yaml
881
+ graphrag:
882
+ embeddings:
883
+ model: text-embedding-3-large # embedding model (matches graphrag.models.embeddingModel)
884
+ dimensions: 3072 # vector dimensions (3072 for text-embedding-3-large)
885
+ batchSize: 100 # texts per API batch
886
+ ```
887
+
888
+ Fields:
889
+ - `model` — the embedding model name. Must match what `graphrag.models.embeddingModel` uses.
890
+ - `text-embedding-3-large` → set `dimensions: 3072` (default)
891
+ - `text-embedding-3-small` → set `dimensions: 1536`
892
+ - `dimensions` — must match the model's output dimensions.
893
+ - `batchSize` — number of text chunks sent per embedding request. Default `100`.
894
+
895
+ > **Do not write `enabled: true` or any other key here.** The schema only allows `model`, `dimensions`, and `batchSize`.
896
+
897
+ ---
898
+
876
899
  ### Local Search
877
900
 
878
901
  Local search answers specific, entity-focused questions ("What is the rent?", "Who are the parties?").