mycontext-cli 0.4.14 → 0.4.16
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 +53 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -93,18 +93,29 @@ mycontext model test # Test generation
|
|
|
93
93
|
- **`.mycontext/04-component-list.json`** — Component architecture plan
|
|
94
94
|
- **`components/`** — Generated React components with shadcn/ui
|
|
95
95
|
|
|
96
|
-
## 🤖
|
|
96
|
+
## 🤖 AI Provider Options
|
|
97
97
|
|
|
98
|
-
MyContext supports multiple AI providers
|
|
98
|
+
MyContext supports multiple AI providers - you can use your own API keys or our managed service:
|
|
99
99
|
|
|
100
|
-
### **
|
|
100
|
+
### **Bring Your Own Keys (BYOK)**
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
| **
|
|
107
|
-
| **
|
|
102
|
+
Use your own API keys for full control and potentially lower costs:
|
|
103
|
+
|
|
104
|
+
| Provider | Environment Variable | Best For | Cost |
|
|
105
|
+
| ---------------------- | -------------------------- | -------------------------------- | -------------- |
|
|
106
|
+
| **GitHub Models** | `MYCONTEXT_GITHUB_TOKEN` | Fast, high-quality generation | Your API costs |
|
|
107
|
+
| **Claude (Anthropic)** | `MYCONTEXT_CLAUDE_API_KEY` | Complex reasoning, detailed PRDs | Your API costs |
|
|
108
|
+
| **OpenAI** | `MYCONTEXT_OPENAI_API_KEY` | Versatile generation, refinement | Your API costs |
|
|
109
|
+
| **X.AI (Grok)** | `MYCONTEXT_GROK_TOKEN` | Creative tasks, quick iterations | Your API costs |
|
|
110
|
+
|
|
111
|
+
### **MyContext Managed Service**
|
|
112
|
+
|
|
113
|
+
If you don't set any API keys, MyContext uses our hosted AI service:
|
|
114
|
+
|
|
115
|
+
- **Rate Limited**: 10 requests per hour for free tier
|
|
116
|
+
- **Paid Credits**: Purchase credits for unlimited usage
|
|
117
|
+
- **Tracked Usage**: All generations are logged for quality improvement
|
|
118
|
+
- **Fallback Support**: Automatic fallback to multiple providers
|
|
108
119
|
|
|
109
120
|
### **Local AI (Free & Unlimited)**
|
|
110
121
|
|
|
@@ -113,30 +124,55 @@ MyContext supports multiple AI providers for maximum flexibility and cost optimi
|
|
|
113
124
|
| **Ollama** | `mycontext-react` | Unlimited generation | `mycontext setup` |
|
|
114
125
|
| **Ollama** | `deepseek-coder` | Code-focused tasks | `ollama pull deepseek-coder` |
|
|
115
126
|
|
|
116
|
-
### **
|
|
127
|
+
### **Provider Priority Order**
|
|
117
128
|
|
|
118
|
-
MyContext automatically tries providers in this
|
|
129
|
+
MyContext automatically tries providers in this order:
|
|
119
130
|
|
|
120
|
-
1. **
|
|
121
|
-
2. **
|
|
122
|
-
3. **
|
|
123
|
-
4. **
|
|
131
|
+
1. **Your API Keys** (GitHub → Claude → OpenAI → X.AI)
|
|
132
|
+
2. **MyContext Managed Service** (if no keys set)
|
|
133
|
+
3. **Local Ollama** (if available)
|
|
134
|
+
4. **Basic Templates** (fallback generation)
|
|
124
135
|
|
|
125
136
|
## Environment Setup
|
|
126
137
|
|
|
127
|
-
###
|
|
138
|
+
### Option 1: Bring Your Own API Keys (Recommended)
|
|
139
|
+
|
|
140
|
+
Set up your preferred AI provider for best performance and cost control:
|
|
128
141
|
|
|
129
142
|
```bash
|
|
143
|
+
# GitHub Models (Fastest, most cost-effective)
|
|
130
144
|
echo 'MYCONTEXT_GITHUB_TOKEN=ghp_xxx' > .mycontext/.env
|
|
145
|
+
|
|
146
|
+
# Or Claude (Best for complex reasoning)
|
|
147
|
+
echo 'MYCONTEXT_CLAUDE_API_KEY=sk-ant-xxx' > .mycontext/.env
|
|
148
|
+
|
|
149
|
+
# Or OpenAI (Most versatile)
|
|
150
|
+
echo 'MYCONTEXT_OPENAI_API_KEY=sk-xxx' > .mycontext/.env
|
|
151
|
+
|
|
152
|
+
# Or X.AI (Creative tasks)
|
|
153
|
+
echo 'MYCONTEXT_GROK_TOKEN=xai-xxx' > .mycontext/.env
|
|
131
154
|
```
|
|
132
155
|
|
|
133
|
-
###
|
|
156
|
+
### Option 2: Use MyContext Managed Service
|
|
157
|
+
|
|
158
|
+
No setup required! Just start using MyContext:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
mycontext generate context --description "My project"
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Note**: Without API keys, you'll use MyContext's hosted service with rate limits and usage tracking.
|
|
165
|
+
|
|
166
|
+
### Option 3: Local AI Setup (Free & Unlimited)
|
|
134
167
|
|
|
135
168
|
```bash
|
|
136
169
|
# Install Ollama (one-time setup)
|
|
137
170
|
curl -fsSL https://ollama.ai/install.sh | sh
|
|
138
171
|
ollama pull llama3.2:3b
|
|
139
172
|
|
|
173
|
+
# Set up MyContext local AI
|
|
174
|
+
mycontext setup
|
|
175
|
+
|
|
140
176
|
# Verify setup
|
|
141
177
|
mycontext model status
|
|
142
178
|
```
|