Skip to content

Commit 42caad4

Browse files
committed
docs: update README to remove MOMORPH_ENV references
* Remove outdated MOMORPH_ENV section as it's no longer used * Simplify environment configuration documentation * Update available environment variables table * Add MOMORPH_MCP_ENDPOINT to supported environment variables * Clarify priority of environment variables
1 parent 7f0fd8e commit 42caad4

File tree

2 files changed

+11
-70
lines changed

2 files changed

+11
-70
lines changed

README.md

Lines changed: 11 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -139,55 +139,9 @@ The CLI will:
139139

140140
### 4. Environment Configuration (Optional)
141141

142-
By default, MoMorph CLI connects to the production MoMorph API. For development or testing purposes, you can configure the CLI to use different environments:
142+
By default, MoMorph CLI connects to the production MoMorph API. For development or testing purposes, you can configure the CLI using environment variables.
143143

144-
#### Using Staging Environment
145-
146-
Staging environment requires Basic Authentication in addition to GitHub token. Set up your environment variables:
147-
148-
```bash
149-
# Set environment to staging
150-
export MOMORPH_ENV=staging
151-
# or
152-
export MOMORPH_ENV=stg
153-
154-
# Set Basic Auth credentials (required for staging)
155-
export MOMORPH_BASIC_AUTH_USERNAME=your_username
156-
export MOMORPH_BASIC_AUTH_PASSWORD=your_password
157-
158-
# Now all commands will use staging API with Basic Auth
159-
momorph login
160-
momorph init my-project --ai copilot
161-
```
162-
163-
#### Using .env File (Recommended)
164-
165-
For convenience and security, you can use a `.env` file:
166-
167-
```bash
168-
# Copy the example file
169-
cp .env.example .env
170-
171-
# Edit .env with your credentials
172-
nano .env
173-
174-
# Load environment variables (bash/zsh)
175-
source .env
176-
177-
# Or use with direnv (auto-loads when entering directory)
178-
echo "dotenv" > .envrc
179-
direnv allow
180-
```
181-
182-
**Important Security Notes**:
183-
-`.env` is already in `.gitignore` - your credentials won't be committed
184-
- ✅ Basic Auth credentials are NEVER saved to disk config files
185-
- ✅ Credentials are only read from environment variables at runtime
186-
- ⚠️ Keep your `.env` file secure: `chmod 600 .env`
187-
- ⚠️ Never share or commit your `.env` file
188-
- ⚠️ Use different credentials for staging and production
189-
190-
#### Custom API Endpoint
144+
#### Using Custom API Endpoint
191145

192146
```bash
193147
# Use a custom API endpoint
@@ -200,25 +154,17 @@ momorph init my-project --ai copilot
200154

201155
#### Available Environment Variables
202156

203-
| Environment Variable | Description | Required | Example Value |
204-
| ----------------------------- | ---------------------------------- | ----------- | ------------------------- |
205-
| `MOMORPH_ENV` | Predefined environment | No | `staging`, `stg` |
206-
| `MOMORPH_API_ENDPOINT` | Custom API endpoint URL | No | `https://stg.momorph.com` |
207-
| `MOMORPH_BASIC_AUTH_USERNAME` | Basic Auth username (staging only) | For staging | `your_username` |
208-
| `MOMORPH_BASIC_AUTH_PASSWORD` | Basic Auth password (staging only) | For staging | `your_password` |
157+
| Environment Variable | Description | Required | Example Value |
158+
| ----------------------------- | --------------------------------- | -------- | ------------------------ |
159+
| `MOMORPH_API_ENDPOINT` | Custom API endpoint URL | No | `https://momorph.ai` |
160+
| `MOMORPH_MCP_ENDPOINT` | Custom MCP endpoint URL | No | `https://momorph.ai/mcp` |
161+
| `MOMORPH_BASIC_AUTH_USERNAME` | Basic Auth username (if required) | No | `your_username` |
162+
| `MOMORPH_BASIC_AUTH_PASSWORD` | Basic Auth password (if required) | No | `your_password` |
209163

210164
**Environment Priority**:
211-
1. `MOMORPH_API_ENDPOINT` (highest priority)
212-
2. `MOMORPH_ENV`
213-
3. Default production URL (lowest priority)
214-
215-
**Authentication by Environment**:
216-
- **Production**: GitHub OAuth → MoMorph Bearer Token
217-
- **Staging**: GitHub OAuth + Basic Auth (username/password)
218-
219-
**Note**: Basic Auth is only used in staging environment. Production uses standard Bearer token authentication.
220-
- The `MOMORPH_API_ENDPOINT` variable takes precedence over `MOMORPH_ENV` if both are set.
221-
- The `MOMORPH_BASIC_AUTH` variable is used for staging environments that require Basic Authentication instead of Bearer tokens.
165+
1. `MOMORPH_API_ENDPOINT` (highest priority for API)
166+
2. `MOMORPH_MCP_ENDPOINT` (highest priority for MCP)
167+
3. Default production URLs (lowest priority)
222168

223169
## 🤖 Supported AI Agents
224170

internal/config/config.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ type UserConfig struct {
2626
func DefaultConfig() *UserConfig {
2727
apiEndpoint := "https://momorph.ai"
2828

29-
// Check for environment-based endpoint override
30-
if env := os.Getenv("MOMORPH_ENV"); env == "staging" || env == "stg" {
31-
apiEndpoint = "https://stg.momorph.com"
32-
}
33-
3429
// Allow direct override via MOMORPH_API_ENDPOINT
3530
if endpoint := os.Getenv("MOMORPH_API_ENDPOINT"); endpoint != "" {
3631
apiEndpoint = endpoint

0 commit comments

Comments
 (0)