@mcpc-tech/cli 0.1.1-beta.1 → 0.1.2

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
@@ -2,39 +2,68 @@
2
2
 
3
3
  CLI server for MCPC with configuration support.
4
4
 
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ # Show help
9
+ npx -y deno run -A jsr:@mcpc/cli/bin --help
10
+
11
+ # Load configuration from URL
12
+ npx -y deno run -A jsr:@mcpc/cli/bin --config-url \
13
+ "https://raw.githubusercontent.com/mcpc-tech/mcpc/main/packages/cli/examples/configs/codex-fork.json"
14
+ ```
15
+
5
16
  ## Configuration
6
17
 
7
18
  Load configuration using command-line arguments:
8
19
 
20
+ - `--help`, `-h` - Show help message
9
21
  - `--config <json>` - Inline JSON configuration string
10
22
  - `--config-url <url>` - Fetch from URL (e.g., GitHub raw)
11
23
  - `--config-file <path>` - Path to configuration file
24
+ - `--request-headers <header>`, `-H <header>` - Add custom HTTP header for URL
25
+ fetching (can be used multiple times)
12
26
  - No arguments - Uses `./mcpc.config.json` if available
13
27
 
14
28
  ## Usage
15
29
 
30
+ **Show help:**
31
+
32
+ ```bash
33
+ npx -y deno run -A jsr:@mcpc/cli/bin --help
34
+ ```
35
+
16
36
  **Inline JSON config:**
17
37
 
18
38
  ```bash
19
- deno run --allow-all src/bin.ts --config '[{"name":"my-agent","description":"..."}]'
39
+ npx -y deno run -A jsr:@mcpc/cli/bin --config '[{"name":"my-agent","description":"..."}]'
20
40
  ```
21
41
 
22
42
  **From URL:**
23
43
 
24
44
  ```bash
25
- deno run --allow-all src/bin.ts --config-url https://example.com/config.json
45
+ npx -y deno run -A jsr:@mcpc/cli/bin --config-url https://example.com/config.json
46
+ ```
47
+
48
+ **From URL with custom headers:**
49
+
50
+ ```bash
51
+ npx -y deno run -A jsr:@mcpc/cli/bin \
52
+ --config-url https://api.example.com/config.json \
53
+ -H "Authorization: Bearer token123" \
54
+ -H "X-Custom-Header: value"
26
55
  ```
27
56
 
28
57
  **From file:**
29
58
 
30
59
  ```bash
31
- deno run --allow-all src/bin.ts --config-file ./my-config.json
60
+ npx -y deno run -A jsr:@mcpc/cli/bin --config-file ./my-config.json
32
61
  ```
33
62
 
34
63
  **Default (uses ./mcpc.config.json):**
35
64
 
36
65
  ```bash
37
- deno run --allow-all src/bin.ts
66
+ npx -y deno run -A jsr:@mcpc/cli/bin
38
67
  ```
39
68
 
40
69
  **Environment variable substitution:**
@@ -60,7 +89,7 @@ Config files support `$ENV_VAR_NAME` syntax:
60
89
  **HTTP server:**
61
90
 
62
91
  ```bash
63
- deno run --allow-all src/server.ts --config-file ./my-config.json
92
+ npx -y deno run -A jsr:@mcpc/cli/server --config-file ./my-config.json
64
93
  ```
65
94
 
66
95
  ## Examples
@@ -75,7 +104,7 @@ When using the Codex Fork configuration:
75
104
  Run the example scripts to see different usage patterns:
76
105
 
77
106
  ```bash
78
- # P
107
+ # First, set required environment variables
79
108
  export GITHUB_PERSONAL_ACCESS_TOKEN="github_pat_your_token"
80
109
 
81
110
  # Example 1: Inline configuration
@@ -92,6 +121,9 @@ export GITHUB_PERSONAL_ACCESS_TOKEN="github_pat_your_token"
92
121
 
93
122
  # Example 5: Remote URL config
94
123
  ./examples/05-url-config.sh
124
+
125
+ # Example 6: URL config with custom headers
126
+ ./examples/06-url-with-headers.sh
95
127
  ```
96
128
 
97
129
  All examples use the same [codex-fork.json](examples/configs/codex-fork.json)