terradev-cli 4.0.3__tar.gz → 4.0.4__tar.gz
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.
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/PKG-INFO +1 -1
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/setup.py +1 -1
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/terradev_cli/cli.py +2 -2
- terradev_cli-4.0.4/terradev_cli/credential_prompt.py +164 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/terradev_cli.egg-info/PKG-INFO +1 -1
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/terradev_cli.egg-info/SOURCES.txt +1 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/README.md +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/__init__.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/async_config.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/auth.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/checkpoint_manager.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/config.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/cost_scaler.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/cost_tracker.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/cuda_graph_integrator.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/dag_executor.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/data_governance.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/dataset_stager.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/deployment_router.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/drift_detector.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/egress_cost_monitor.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/egress_optimizer.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/enterprise_auth.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/gitops_manager.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/gpu_topology.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/helm_generator.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/helm_generator_old.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/hf_cli_integration.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/hf_smart_templates.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/hf_spaces.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/inference_router.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/job_state_manager.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/kv_cache_checkpoint_manager.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/kv_cache_checkpoint_tests.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/manifest_cache.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/mig_manager.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/mla_vram_estimator.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/mla_vram_tests.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/model_orchestrator.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/oidc_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/optimization_config.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/parallel_provisioner.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/preflight_validator.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/price_discovery.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/price_discovery_mock.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/price_intelligence.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/public_ip_billing_tracker.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/quick_start.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/rate_limiter.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/saml_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/semantic_router.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/semantic_signals/__init__.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/semantic_signals/base_signal.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/semantic_signals/complexity_signal.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/semantic_signals/domain_signal.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/semantic_signals/keyword_signal.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/semantic_signals/language_signal.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/semantic_signals/modality_signal.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/semantic_signals/orchestrator.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/semantic_signals/safety_signal.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/session_manager.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/ssh_key_manager.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/stripe_manager.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/telemetry.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/telemetry_backup.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/terradev_engine.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/tier_manager.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/trace_viewer.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/training_monitor.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/training_orchestrator.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/user_manager.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/warm_pool_manager.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/weight_streaming_benchmarks.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/core/weight_streaming_manager.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/integrations/__init__.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/integrations/datadog_integration.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/integrations/prometheus_integration.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/integrations/wandb_integration.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/__init__.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/dvc_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/guardrails_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/huggingface_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/kserve_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/kubernetes_enhanced.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/kubernetes_enhanced_fixed.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/kubernetes_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/langchain_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/langgraph_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/langsmith_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/lmcache_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/mlflow_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/ollama_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/phoenix_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/qdrant_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/ray_enhanced.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/ray_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/sglang_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/vllm_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/wandb_enhanced.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/ml_services/wandb_service.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/optimization/__init__.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/optimization/auto_optimizer.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/optimization/cuco_optimizer.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/__init__.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/alibaba_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/aws_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/azure_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/base_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/baseten_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/coreweave_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/crusoe_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/demo_mode.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/digitalocean_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/fluidstack_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/gcp_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/hetzner_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/huggingface_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/hyperstack_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/inferx_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/lambda_labs_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/oracle_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/ovhcloud_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/provider_factory.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/real_pricing.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/runpod_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/siliconflow_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/tensordock_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/providers/vastai_provider.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/setup.cfg +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/terradev_cli/__init__.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/terradev_cli.egg-info/dependency_links.txt +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/terradev_cli.egg-info/entry_points.txt +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/terradev_cli.egg-info/not-zip-safe +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/terradev_cli.egg-info/requires.txt +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/terradev_cli.egg-info/top_level.txt +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/utils/__init__.py +0 -0
- {terradev_cli-4.0.3 → terradev_cli-4.0.4}/utils/formatters.py +0 -0
|
@@ -12,7 +12,7 @@ long_description = readme_file.read_text() if readme_file.exists() else ""
|
|
|
12
12
|
|
|
13
13
|
setup(
|
|
14
14
|
name="terradev-cli",
|
|
15
|
-
version="4.0.
|
|
15
|
+
version="4.0.4",
|
|
16
16
|
author="Terradev Team",
|
|
17
17
|
author_email="team@terradev.com",
|
|
18
18
|
description="MLA-aware VRAM estimation, weight streaming, and KV cache checkpointing for production ML workloads",
|
|
@@ -1155,7 +1155,7 @@ def configure(provider):
|
|
|
1155
1155
|
|
|
1156
1156
|
if provider:
|
|
1157
1157
|
# Configure specific provider
|
|
1158
|
-
from credential_prompt import prompt_for_credentials
|
|
1158
|
+
from .credential_prompt import prompt_for_credentials
|
|
1159
1159
|
|
|
1160
1160
|
print(f" Configure {provider.upper()} credentials")
|
|
1161
1161
|
|
|
@@ -1339,7 +1339,7 @@ def configure(provider):
|
|
|
1339
1339
|
|
|
1340
1340
|
else:
|
|
1341
1341
|
# Interactive configuration for all providers
|
|
1342
|
-
from credential_prompt import prompt_for_credentials
|
|
1342
|
+
from .credential_prompt import prompt_for_credentials
|
|
1343
1343
|
configured_providers = prompt_for_credentials()
|
|
1344
1344
|
|
|
1345
1345
|
if configured_providers:
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Simple credential prompt system - no demo mode, just input credentials
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import json
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
import click
|
|
9
|
+
|
|
10
|
+
def prompt_for_credentials():
|
|
11
|
+
"""Prompt users to input their API credentials"""
|
|
12
|
+
|
|
13
|
+
config_dir = Path.home() / '.terradev'
|
|
14
|
+
config_dir.mkdir(exist_ok=True)
|
|
15
|
+
|
|
16
|
+
credentials_file = config_dir / 'credentials.json'
|
|
17
|
+
|
|
18
|
+
# Load existing credentials
|
|
19
|
+
existing_creds = {}
|
|
20
|
+
if credentials_file.exists():
|
|
21
|
+
with open(credentials_file, 'r') as f:
|
|
22
|
+
existing_creds = json.load(f)
|
|
23
|
+
|
|
24
|
+
print("Configure Cloud Provider Credentials")
|
|
25
|
+
print("=" * 50)
|
|
26
|
+
print("Enter your API keys for the providers you want to use.")
|
|
27
|
+
print("Press Enter to skip a provider.")
|
|
28
|
+
print()
|
|
29
|
+
|
|
30
|
+
# Provider configurations
|
|
31
|
+
providers = {
|
|
32
|
+
'runpod': {
|
|
33
|
+
'name': 'RunPod',
|
|
34
|
+
'key_name': 'API Key',
|
|
35
|
+
'help': 'Get from: https://runpod.io/console/settings/api-keys',
|
|
36
|
+
'example': 'rpa_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
|
37
|
+
},
|
|
38
|
+
'vastai': {
|
|
39
|
+
'name': 'Vast.ai',
|
|
40
|
+
'key_name': 'API Key',
|
|
41
|
+
'help': 'Get from: https://console.vast.ai/api-keys',
|
|
42
|
+
'example': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
|
43
|
+
},
|
|
44
|
+
'aws': {
|
|
45
|
+
'name': 'AWS',
|
|
46
|
+
'key_name': 'Access Key ID',
|
|
47
|
+
'help': 'Get from: AWS IAM console',
|
|
48
|
+
'example': 'AKIAEXAMPLEKEY123456'
|
|
49
|
+
},
|
|
50
|
+
'gcp': {
|
|
51
|
+
'name': 'Google Cloud',
|
|
52
|
+
'key_name': 'Service Account JSON',
|
|
53
|
+
'help': 'Get from: GCP Console → IAM & Admin → Service Accounts',
|
|
54
|
+
'example': 'path/to/service-account.json'
|
|
55
|
+
},
|
|
56
|
+
'azure': {
|
|
57
|
+
'name': 'Azure',
|
|
58
|
+
'key_name': 'Client ID',
|
|
59
|
+
'help': 'Get from: Azure Portal → App registrations',
|
|
60
|
+
'example': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
|
|
61
|
+
},
|
|
62
|
+
'lambda_labs': {
|
|
63
|
+
'name': 'Lambda Labs',
|
|
64
|
+
'key_name': 'API Key',
|
|
65
|
+
'help': 'Get from: Lambda Labs dashboard',
|
|
66
|
+
'example': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
|
67
|
+
},
|
|
68
|
+
'coreweave': {
|
|
69
|
+
'name': 'CoreWeave',
|
|
70
|
+
'key_name': 'API Key',
|
|
71
|
+
'help': 'Get from: CoreWeave dashboard',
|
|
72
|
+
'example': 'cw_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
|
73
|
+
},
|
|
74
|
+
'tensordock': {
|
|
75
|
+
'name': 'TensorDock',
|
|
76
|
+
'key_name': 'API Key',
|
|
77
|
+
'help': 'Get from: TensorDock dashboard',
|
|
78
|
+
'example': 'td_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
|
79
|
+
},
|
|
80
|
+
'oracle': {
|
|
81
|
+
'name': 'Oracle Cloud',
|
|
82
|
+
'key_name': 'API Key',
|
|
83
|
+
'help': 'Get from: Oracle Cloud Console',
|
|
84
|
+
'example': 'ocid1.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
|
85
|
+
},
|
|
86
|
+
'crusoe': {
|
|
87
|
+
'name': 'Crusoe Cloud',
|
|
88
|
+
'key_name': 'API Key',
|
|
89
|
+
'help': 'Get from: Crusoe dashboard',
|
|
90
|
+
'example': 'crusoe_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
updated_creds = existing_creds.copy()
|
|
95
|
+
|
|
96
|
+
for provider_id, config in providers.items():
|
|
97
|
+
print(f"\n{config['name']}")
|
|
98
|
+
print(f" Help: {config['help']}")
|
|
99
|
+
print(f" Example: {config['example']}")
|
|
100
|
+
|
|
101
|
+
# Check if already configured
|
|
102
|
+
existing_key = existing_creds.get(provider_id, {}).get('api_key')
|
|
103
|
+
if existing_key:
|
|
104
|
+
print(f" Already configured: {existing_key[:10]}...")
|
|
105
|
+
if click.confirm(f" Update {config['name']} credentials?", default=False):
|
|
106
|
+
pass # User wants to update
|
|
107
|
+
else:
|
|
108
|
+
continue # Skip this provider
|
|
109
|
+
|
|
110
|
+
# Prompt for API key
|
|
111
|
+
api_key = click.prompt(f" Enter {config['key_name']}",
|
|
112
|
+
default='',
|
|
113
|
+
hide_input=True,
|
|
114
|
+
show_default=False)
|
|
115
|
+
|
|
116
|
+
if api_key.strip():
|
|
117
|
+
if provider_id == 'gcp':
|
|
118
|
+
# GCP needs special handling for service account JSON
|
|
119
|
+
updated_creds[provider_id] = {
|
|
120
|
+
'service_account_key': api_key.strip(),
|
|
121
|
+
'project_id': click.prompt(" Enter GCP Project ID", default="my-project")
|
|
122
|
+
}
|
|
123
|
+
else:
|
|
124
|
+
updated_creds[provider_id] = {'api_key': api_key.strip()}
|
|
125
|
+
|
|
126
|
+
print(f" {config['name']} credentials saved")
|
|
127
|
+
else:
|
|
128
|
+
# Remove if user skipped and it existed
|
|
129
|
+
if provider_id in updated_creds:
|
|
130
|
+
del updated_creds[provider_id]
|
|
131
|
+
print(f" {config['name']} credentials removed")
|
|
132
|
+
|
|
133
|
+
# Save credentials
|
|
134
|
+
with open(credentials_file, 'w') as f:
|
|
135
|
+
json.dump(updated_creds, f, indent=2)
|
|
136
|
+
|
|
137
|
+
print(f"\nCredentials saved to: {credentials_file}")
|
|
138
|
+
|
|
139
|
+
# Show configured providers
|
|
140
|
+
configured_providers = list(updated_creds.keys())
|
|
141
|
+
if configured_providers:
|
|
142
|
+
print(f"\nConfigured providers: {', '.join(configured_providers)}")
|
|
143
|
+
print(f"\nGet quotes:")
|
|
144
|
+
print(f" terradev quote --gpu-type a100")
|
|
145
|
+
print(f" terradev quote --gpu-type h100 --providers {','.join(configured_providers[:3])}")
|
|
146
|
+
else:
|
|
147
|
+
print(f"\nNo providers configured")
|
|
148
|
+
print(f" Run 'terradev configure' to add credentials")
|
|
149
|
+
|
|
150
|
+
return configured_providers
|
|
151
|
+
|
|
152
|
+
def check_configured_providers():
|
|
153
|
+
"""Check which providers are configured"""
|
|
154
|
+
|
|
155
|
+
config_dir = Path.home() / '.terradev'
|
|
156
|
+
credentials_file = config_dir / 'credentials.json'
|
|
157
|
+
|
|
158
|
+
if not credentials_file.exists():
|
|
159
|
+
return []
|
|
160
|
+
|
|
161
|
+
with open(credentials_file, 'r') as f:
|
|
162
|
+
credentials = json.load(f)
|
|
163
|
+
|
|
164
|
+
return list(credentials.keys())
|
|
@@ -123,6 +123,7 @@ providers/tensordock_provider.py
|
|
|
123
123
|
providers/vastai_provider.py
|
|
124
124
|
terradev_cli/__init__.py
|
|
125
125
|
terradev_cli/cli.py
|
|
126
|
+
terradev_cli/credential_prompt.py
|
|
126
127
|
terradev_cli.egg-info/PKG-INFO
|
|
127
128
|
terradev_cli.egg-info/SOURCES.txt
|
|
128
129
|
terradev_cli.egg-info/dependency_links.txt
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|