@cliniq360/ondc-cli 0.1.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/README.md +29 -35
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ondc CLI
4
4
 
5
- CLI for the ONDC insurance MCP workflow exposed by ondc-mcp.
5
+ CLI for the ONDC insurance MCP workflow.
6
6
 
7
7
  </div>
8
8
 
@@ -11,40 +11,27 @@ CLI for the ONDC insurance MCP workflow exposed by ondc-mcp.
11
11
  ## Features
12
12
 
13
13
  - Talks to the ONDC MCP server over the official Streamable HTTP transport
14
- - Covers every current insurance journey tool exposed by ondc-mcp
15
- - Mirrors the grouped CLI structure used in eigi-cli
14
+ - Covers the current ONDC insurance journey tool surface
16
15
  - Supports human-readable and JSON output
17
16
  - Includes a raw tool caller for any current or future MCP tool
18
- - Uses `https://ondc.eigi.ai/mcp` as the hardcoded default MCP endpoint, with optional env override
17
+ - Uses `https://ondc.eigi.ai/mcp` as the default MCP endpoint
18
+ - Supports endpoint override with `ONDC_MCP_URL`
19
19
  - Can print the strict insurance AI workflow prompt via `ondc workflow prompt`
20
20
 
21
21
  ---
22
22
 
23
23
  ## Installation
24
24
 
25
- ### From source
25
+ Install globally:
26
26
 
27
27
  ```bash
28
- cd ondc-cli
29
- npm install
30
- npm run build
31
- npm link
28
+ npm install -g @cliniq360/ondc-cli
32
29
  ```
33
30
 
34
- ### Run without linking
31
+ Or run without installing:
35
32
 
36
33
  ```bash
37
- cd ondc-cli
38
- npm install
39
- npm run build
40
- node dist/main.js --help
41
- ```
42
-
43
- ### From npm
44
-
45
- ```bash
46
- npm install -g @cliniq360/ondc-cli
47
- ondc --help
34
+ npx @cliniq360/ondc-cli --help
48
35
  ```
49
36
 
50
37
  ---
@@ -52,9 +39,8 @@ ondc --help
52
39
  ## Quick Start
53
40
 
54
41
  ```bash
55
- # 1. Default MCP URL is already hosted
42
+ # 1. The CLI uses the hosted MCP endpoint by default
56
43
  # https://ondc.eigi.ai/mcp
57
- # Edit .env only if you need a different endpoint
58
44
 
59
45
  # 2. Inspect the available tool surface
60
46
  ondc tools list
@@ -86,6 +72,21 @@ ondc journey trigger-search --txn-id <TXN_ID>
86
72
  ondc offers list --txn-id <TXN_ID>
87
73
  ```
88
74
 
75
+ ## Use A Different MCP Endpoint
76
+
77
+ Override the default hosted endpoint with a shell environment variable:
78
+
79
+ ```bash
80
+ ONDC_MCP_URL=http://localhost:7600/mcp ondc tools list
81
+ ```
82
+
83
+ Or export it for the current shell session:
84
+
85
+ ```bash
86
+ export ONDC_MCP_URL=http://localhost:7600/mcp
87
+ ondc config show
88
+ ```
89
+
89
90
  ---
90
91
 
91
92
  ## Command Groups
@@ -144,25 +145,18 @@ ondc offers list --txn-id <TXN_ID>
144
145
 
145
146
  ## Environment Variables
146
147
 
147
- | Variable | Description |
148
- | -------------- | -------------------------------------------------------------------- |
148
+ | Variable | Description |
149
+ | -------------- | ---------------------------------------------------------------------------- |
149
150
  | `ONDC_MCP_URL` | Optional override for the default hosted endpoint `https://ondc.eigi.ai/mcp` |
150
151
 
151
152
  ---
152
153
 
153
154
  ## Notes
154
155
 
155
- - `ondc-cli` talks to `ondc-app` over MCP instead of calling backend REST APIs directly.
156
+ - `ondc-cli` talks to the ONDC MCP server over MCP instead of calling backend REST APIs directly.
156
157
  - `ondc-cli` is no-auth by design. ONDC backend credentials stay inside `ondc-app` via its own environment configuration.
157
- - The published CLI defaults to `https://ondc.eigi.ai/mcp`. Use `ONDC_MCP_URL` only when you need a different MCP endpoint.
158
+ - The published CLI defaults to `https://ondc.eigi.ai/mcp`.
159
+ - Use `ONDC_MCP_URL` only when you need a different MCP endpoint.
158
160
  - `ondc workflow prompt` prints the strict `INSURANCE_WORKFLOW_TEMPLATE` guidance so an AI agent can follow the intended ONDC tool chain.
159
161
  - The CLI prints parsed tool payloads by default. Use `--json` for clean automation output.
160
162
  - For complex payloads such as family floater submissions, use `--input`, `--file`, or pipe JSON through stdin.
161
-
162
- ## Publishing
163
-
164
- - npm package: `@cliniq360/ondc-cli`
165
- - GitHub Actions workflow: `.github/workflows/publish-cli.yml`
166
- - Release trigger: push a tag like `v0.1.0`
167
- - Manual trigger: run the workflow with a version input such as `0.1.0`
168
- - npm auth model: GitHub OIDC trusted publishing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cliniq360/ondc-cli",
3
- "version": "0.1.0",
3
+ "version": "1.0.1",
4
4
  "description": "Official CLI for the ONDC insurance MCP workflow.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,7 +12,7 @@
12
12
  "start": "node dist/main.js",
13
13
  "clean": "node -e \"const fs=require('fs'); fs.rmSync('dist',{recursive:true,force:true});\"",
14
14
  "typecheck": "tsc --noEmit",
15
- "test": "node dist/main.js --help",
15
+ "test": "tsx src/main.ts --help",
16
16
  "prepublishOnly": "npm run clean && npm run build && npm run typecheck"
17
17
  },
18
18
  "keywords": [