@majkapp/majk-chat-cli 1.0.4 → 1.0.5
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 +15 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -134,6 +134,7 @@ majk-chat chat [options]
|
|
|
134
134
|
- `--profile <name>` - Use specific profile for credentials (default: "default")
|
|
135
135
|
- `--api-key <key>` - API key (overrides environment)
|
|
136
136
|
- `--api-key-file <file>` - Read API key from file
|
|
137
|
+
- `--bedrock-api-key <key>` - AWS Bedrock API key (bearer token)
|
|
137
138
|
|
|
138
139
|
#### Session Management Options
|
|
139
140
|
|
|
@@ -168,6 +169,13 @@ majk-chat chat --tools --profile default -M "Create a file called test.txt with
|
|
|
168
169
|
# JSON output with profile
|
|
169
170
|
majk-chat chat -j --profile work -M "Hello" > response.json
|
|
170
171
|
|
|
172
|
+
# Use Bedrock with API key (bearer token)
|
|
173
|
+
majk-chat chat --provider bedrock --bedrock-api-key "bedrock-api-key-..." -M "Hello"
|
|
174
|
+
|
|
175
|
+
# Use Bedrock with environment variable
|
|
176
|
+
export AWS_BEARER_TOKEN_BEDROCK="bedrock-api-key-..."
|
|
177
|
+
majk-chat chat --provider bedrock -M "Explain quantum computing"
|
|
178
|
+
|
|
171
179
|
# Create a session with profile
|
|
172
180
|
majk-chat chat --save-session --session-title "Code Review" --profile work -M "Review this Python function"
|
|
173
181
|
|
|
@@ -343,7 +351,7 @@ majk-chat set-key [options]
|
|
|
343
351
|
- `--openai <key>` - OpenAI API key
|
|
344
352
|
- `--anthropic <key>` - Anthropic API key
|
|
345
353
|
- `--azure-openai <key> <endpoint> <deployment>` - Azure OpenAI credentials
|
|
346
|
-
- `--bedrock <accessKey> <secretKey> [region]` - AWS Bedrock credentials
|
|
354
|
+
- `--bedrock <accessKey> <secretKey> [region]` - AWS Bedrock traditional credentials
|
|
347
355
|
- `--profile <name>` - Profile to store configuration in (default: "default")
|
|
348
356
|
- `--skip-validation` - Skip API key validation
|
|
349
357
|
|
|
@@ -831,7 +839,7 @@ majk-chat configure-provider anthropic [--profile name] [--skip-validation]
|
|
|
831
839
|
# Azure OpenAI (prompts for key, endpoint, deployment)
|
|
832
840
|
majk-chat configure-provider azure-openai [--profile name] [--skip-validation]
|
|
833
841
|
|
|
834
|
-
# AWS Bedrock (prompts for access key, secret key, region)
|
|
842
|
+
# AWS Bedrock (prompts for API key or access key, secret key, region)
|
|
835
843
|
majk-chat configure-provider bedrock [--profile name] [--skip-validation]
|
|
836
844
|
```
|
|
837
845
|
|
|
@@ -880,8 +888,7 @@ Profiles are stored in `~/.magic/chat/config.json`:
|
|
|
880
888
|
"aws-prod": {
|
|
881
889
|
"providers": {
|
|
882
890
|
"bedrock": {
|
|
883
|
-
"
|
|
884
|
-
"secretAccessKey": "...",
|
|
891
|
+
"bearerToken": "bedrock-api-key-...",
|
|
885
892
|
"region": "us-west-2"
|
|
886
893
|
}
|
|
887
894
|
}
|
|
@@ -900,7 +907,7 @@ The CLI looks for credentials in the following order (highest to lowest preceden
|
|
|
900
907
|
- OpenAI: `OPENAI_API_KEY`, `OPENAI_ORG_ID`
|
|
901
908
|
- Anthropic: `ANTHROPIC_API_KEY`
|
|
902
909
|
- Azure: `AZURE_OPENAI_API_KEY`, `AZURE_OPENAI_ENDPOINT`, `AZURE_OPENAI_DEPLOYMENT`
|
|
903
|
-
- AWS: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION`
|
|
910
|
+
- AWS Bedrock: `AWS_BEARER_TOKEN_BEDROCK` (API keys) or `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION` (traditional)
|
|
904
911
|
4. **Standard provider locations**:
|
|
905
912
|
- `~/.openai/api_key`
|
|
906
913
|
- `~/.anthropic/api_key`
|
|
@@ -1013,8 +1020,9 @@ majk-chat chat --profile production -M "Production query"
|
|
|
1013
1020
|
- `AZURE_OPENAI_API_KEY` - Azure OpenAI API key
|
|
1014
1021
|
- `AZURE_OPENAI_ENDPOINT` - Azure OpenAI endpoint
|
|
1015
1022
|
- `AZURE_OPENAI_DEPLOYMENT` - Azure OpenAI deployment name
|
|
1016
|
-
- `
|
|
1017
|
-
- `
|
|
1023
|
+
- `AWS_BEARER_TOKEN_BEDROCK` - AWS Bedrock API key (bearer token)
|
|
1024
|
+
- `AWS_ACCESS_KEY_ID` - AWS access key (traditional credentials)
|
|
1025
|
+
- `AWS_SECRET_ACCESS_KEY` - AWS secret key (traditional credentials)
|
|
1018
1026
|
- `AWS_REGION` - AWS region
|
|
1019
1027
|
- `NO_COLOR` - Disable colored output
|
|
1020
1028
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@majkapp/majk-chat-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "CLI for multi-provider LLM chat interactions",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@majkapp/majk-chat-basic-tools": "^1.0.4",
|
|
34
|
-
"@majkapp/majk-chat-core": "^1.0.
|
|
34
|
+
"@majkapp/majk-chat-core": "^1.0.4",
|
|
35
35
|
"@majkapp/majk-chat-mcp": "^1.0.2",
|
|
36
36
|
"@majkapp/majk-chat-sessions": "^1.0.2",
|
|
37
37
|
"chalk": "^4.1.2",
|