refactorai-cli 0.2.29__tar.gz → 0.2.30__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.
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/PKG-INFO +14 -8
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/README.md +13 -7
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/pyproject.toml +1 -1
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/__init__.py +1 -1
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/commands/cloud_cmds.py +2 -1
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/commands/run_cmds.py +134 -51
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/commands/runtime_proxy_cmds.py +2 -2
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli.egg-info/PKG-INFO +14 -8
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/auth.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/client.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/commands/__init__.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/commands/auth_cmds.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/commands/engine_cmds.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/commands/model_cmds.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/commands/rules_cmds.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/commands/runtime_cmds.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/commands/setup_cmds.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/control_plane.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/credentials.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/local_constitution.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/local_engine_runtime.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/local_paths.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/main.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/model_policy.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/runtime_manager.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/settings.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/setup_flow.py +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli.egg-info/SOURCES.txt +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli.egg-info/dependency_links.txt +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli.egg-info/entry_points.txt +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli.egg-info/requires.txt +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli.egg-info/top_level.txt +0 -0
- {refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: refactorai-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.30
|
|
4
4
|
Summary: Local-first CLI for the refactor platform
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -53,28 +53,34 @@ python -m twine upload ./refactorai-cli/dist/*
|
|
|
53
53
|
## Install test (local)
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
python -m pip install ./refactorai-cli/dist/refactorai_cli-0.2.
|
|
56
|
+
python -m pip install ./refactorai-cli/dist/refactorai_cli-0.2.30-py3-none-any.whl
|
|
57
57
|
refactor --version
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
## Cloud BYOK setup (bring your own provider key)
|
|
61
61
|
|
|
62
62
|
Run cloud inference with your own provider credentials (no local runtime
|
|
63
|
-
required).
|
|
64
|
-
|
|
63
|
+
required). Preferred path is env-key in project config (`provider_key:
|
|
64
|
+
${ENV_VAR}`). Platform-stored credentials (`credential_ref`) are optional
|
|
65
|
+
fallback.
|
|
65
66
|
|
|
66
67
|
```bash
|
|
67
68
|
# 1. Authenticate (developer key with the run:byok entitlement).
|
|
68
69
|
refactor login
|
|
69
70
|
|
|
70
|
-
#
|
|
71
|
+
# 2A. Preferred: set BYOK directly from project env in refactor.config:
|
|
72
|
+
#
|
|
73
|
+
# mode: cloud_byok
|
|
74
|
+
# provider: openai
|
|
75
|
+
# model_id: gpt-4.1-mini
|
|
76
|
+
# provider_key: ${OPENAI_API_KEY}
|
|
77
|
+
#
|
|
78
|
+
# 2B. Optional fallback: register a platform-stored credential from env.
|
|
71
79
|
export OPENAI_API_KEY=sk-...
|
|
72
80
|
refactor cloud credentials set --provider openai --from-env OPENAI_API_KEY --label "my key"
|
|
73
81
|
# -> prints a credential_ref, e.g. cred_01J...
|
|
74
82
|
|
|
75
|
-
# 3.
|
|
76
|
-
# mode: cloud_byok
|
|
77
|
-
# provider: openai
|
|
83
|
+
# 3. If you use platform-stored fallback, set credential_ref in config:
|
|
78
84
|
# credential_ref: cred_01J...
|
|
79
85
|
|
|
80
86
|
# 4. Verify readiness, then run.
|
|
@@ -42,28 +42,34 @@ python -m twine upload ./refactorai-cli/dist/*
|
|
|
42
42
|
## Install test (local)
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
python -m pip install ./refactorai-cli/dist/refactorai_cli-0.2.
|
|
45
|
+
python -m pip install ./refactorai-cli/dist/refactorai_cli-0.2.30-py3-none-any.whl
|
|
46
46
|
refactor --version
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
## Cloud BYOK setup (bring your own provider key)
|
|
50
50
|
|
|
51
51
|
Run cloud inference with your own provider credentials (no local runtime
|
|
52
|
-
required).
|
|
53
|
-
|
|
52
|
+
required). Preferred path is env-key in project config (`provider_key:
|
|
53
|
+
${ENV_VAR}`). Platform-stored credentials (`credential_ref`) are optional
|
|
54
|
+
fallback.
|
|
54
55
|
|
|
55
56
|
```bash
|
|
56
57
|
# 1. Authenticate (developer key with the run:byok entitlement).
|
|
57
58
|
refactor login
|
|
58
59
|
|
|
59
|
-
#
|
|
60
|
+
# 2A. Preferred: set BYOK directly from project env in refactor.config:
|
|
61
|
+
#
|
|
62
|
+
# mode: cloud_byok
|
|
63
|
+
# provider: openai
|
|
64
|
+
# model_id: gpt-4.1-mini
|
|
65
|
+
# provider_key: ${OPENAI_API_KEY}
|
|
66
|
+
#
|
|
67
|
+
# 2B. Optional fallback: register a platform-stored credential from env.
|
|
60
68
|
export OPENAI_API_KEY=sk-...
|
|
61
69
|
refactor cloud credentials set --provider openai --from-env OPENAI_API_KEY --label "my key"
|
|
62
70
|
# -> prints a credential_ref, e.g. cred_01J...
|
|
63
71
|
|
|
64
|
-
# 3.
|
|
65
|
-
# mode: cloud_byok
|
|
66
|
-
# provider: openai
|
|
72
|
+
# 3. If you use platform-stored fallback, set credential_ref in config:
|
|
67
73
|
# credential_ref: cred_01J...
|
|
68
74
|
|
|
69
75
|
# 4. Verify readiness, then run.
|
|
@@ -114,7 +114,8 @@ def credentials_set(
|
|
|
114
114
|
f"[green]Credential registered[/green] for provider [bold]{data.get('provider', provider)}[/bold].\n"
|
|
115
115
|
f" credential_ref: [bold]{data.get('credential_ref', '?')}[/bold]\n"
|
|
116
116
|
f" masked_secret: {data.get('masked_secret', '****')}\n"
|
|
117
|
-
"
|
|
117
|
+
"Use this as an optional cloud_byok fallback (`credential_ref:`). "
|
|
118
|
+
"Preferred path is env-key in project config (`provider_key: ${ENV_VAR}`)."
|
|
118
119
|
)
|
|
119
120
|
|
|
120
121
|
|
|
@@ -167,7 +167,14 @@ def _default_config_for_init() -> tuple[str, str]:
|
|
|
167
167
|
)
|
|
168
168
|
return config_text, "local_server"
|
|
169
169
|
if backend == BACKEND_BYOK:
|
|
170
|
-
|
|
170
|
+
config_text = DEFAULT_CONFIG.replace("mode: local", "mode: cloud_byok", 1)
|
|
171
|
+
config_text = config_text.replace("provider: heuristic", "provider: openai", 1)
|
|
172
|
+
config_text = config_text.replace(
|
|
173
|
+
"model_id: heuristic-local-v1",
|
|
174
|
+
"model_id: gpt-4.1-mini\nprovider_key: ${OPENAI_API_KEY}\n# credential_ref: cred_01J...",
|
|
175
|
+
1,
|
|
176
|
+
)
|
|
177
|
+
return config_text, "byok"
|
|
171
178
|
return DEFAULT_CONFIG, "default"
|
|
172
179
|
|
|
173
180
|
_SEVERITY_STYLE = {
|
|
@@ -653,16 +660,29 @@ def _cloud_inference(
|
|
|
653
660
|
}
|
|
654
661
|
|
|
655
662
|
if execution_mode == "cloud_byok":
|
|
656
|
-
credential_ref = str(constitution.get_setting("credential_ref", "") or "").strip()
|
|
657
663
|
provider_name = str(constitution.get_setting("provider", "") or "").strip()
|
|
658
|
-
|
|
664
|
+
provider_key = str(constitution.get_setting("provider_key", "") or "").strip()
|
|
665
|
+
credential_ref = str(constitution.get_setting("credential_ref", "") or "").strip()
|
|
666
|
+
|
|
667
|
+
# Env-key-first BYOK path: when provider_key is configured (typically via
|
|
668
|
+
# ${ENV_VAR} interpolation), prefer it over credential_ref.
|
|
669
|
+
if provider_key:
|
|
670
|
+
if not provider_name or provider_name.lower() == "cloud":
|
|
671
|
+
raise RuntimeError(
|
|
672
|
+
"cloud_byok with provider_key requires an explicit provider "
|
|
673
|
+
"(e.g. provider: openai)."
|
|
674
|
+
)
|
|
675
|
+
payload["provider_key"] = provider_key
|
|
676
|
+
payload["provider"] = provider_name
|
|
677
|
+
elif credential_ref:
|
|
678
|
+
payload["credential_ref"] = credential_ref
|
|
679
|
+
if provider_name and provider_name.lower() != "cloud":
|
|
680
|
+
payload["provider"] = provider_name
|
|
681
|
+
else:
|
|
659
682
|
raise RuntimeError(
|
|
660
|
-
"cloud_byok requires
|
|
661
|
-
"
|
|
683
|
+
"cloud_byok requires either `provider_key` (preferred env-key path) "
|
|
684
|
+
"or `credential_ref` (platform-stored credential path) in refactor.config."
|
|
662
685
|
)
|
|
663
|
-
payload["credential_ref"] = credential_ref
|
|
664
|
-
if provider_name and provider_name.lower() != "cloud":
|
|
665
|
-
payload["provider"] = provider_name
|
|
666
686
|
|
|
667
687
|
idempotency_key = _stable_idempotency_key(
|
|
668
688
|
account_id=auth_ctx.account_id,
|
|
@@ -911,7 +931,7 @@ def init(
|
|
|
911
931
|
elif config_profile == "byok":
|
|
912
932
|
console.print(
|
|
913
933
|
"[green]Configured[/green] refactor.config for BYOK setup "
|
|
914
|
-
"(
|
|
934
|
+
"(mode=cloud_byok, env-key-first via provider_key; credential_ref is optional fallback)."
|
|
915
935
|
)
|
|
916
936
|
console.print(
|
|
917
937
|
f"[green]Registered[/green] project in central store: {project_store_dir(project_root)}"
|
|
@@ -3065,60 +3085,123 @@ def _cloud_doctor(
|
|
|
3065
3085
|
console.print("[dim]Run `refactor login` or set REFACTOR_API_KEY.[/dim]")
|
|
3066
3086
|
raise typer.Exit(code=1) from exc
|
|
3067
3087
|
|
|
3068
|
-
# BYOK
|
|
3069
|
-
#
|
|
3088
|
+
# BYOK supports two secret sources:
|
|
3089
|
+
# 1) provider_key (preferred env-key path), or
|
|
3090
|
+
# 2) credential_ref (platform-stored secret fallback).
|
|
3070
3091
|
credential_ref = ""
|
|
3092
|
+
provider_key = ""
|
|
3093
|
+
provider_name = ""
|
|
3071
3094
|
if execution_mode == "cloud_byok":
|
|
3095
|
+
provider_name = str(constitution.get_setting("provider", "") or "").strip()
|
|
3096
|
+
provider_key = str(constitution.get_setting("provider_key", "") or "").strip()
|
|
3072
3097
|
credential_ref = str(constitution.get_setting("credential_ref", "") or "").strip()
|
|
3073
|
-
if not
|
|
3098
|
+
if not provider_name or provider_name.lower() == "cloud":
|
|
3074
3099
|
console.print(
|
|
3075
|
-
"[red]cloud_byok[/red]:
|
|
3076
|
-
"
|
|
3100
|
+
"[red]cloud_byok[/red]: set an explicit `provider` "
|
|
3101
|
+
"(for example `provider: openai`)."
|
|
3102
|
+
)
|
|
3103
|
+
raise typer.Exit(code=1)
|
|
3104
|
+
console.print(f"[bold]provider[/bold]: {provider_name}")
|
|
3105
|
+
if provider_key:
|
|
3106
|
+
console.print(
|
|
3107
|
+
"[green]provider_key[/green]: set via config/env interpolation "
|
|
3108
|
+
"(preferred BYOK path)."
|
|
3109
|
+
)
|
|
3110
|
+
elif credential_ref:
|
|
3111
|
+
console.print(f"[green]credential_ref[/green]: {credential_ref}")
|
|
3112
|
+
else:
|
|
3113
|
+
console.print(
|
|
3114
|
+
"[red]cloud_byok[/red]: set either `provider_key` (preferred) "
|
|
3115
|
+
"or `credential_ref` in refactor.config."
|
|
3077
3116
|
)
|
|
3078
3117
|
raise typer.Exit(code=1)
|
|
3079
|
-
console.print(f"[green]credential_ref[/green]: {credential_ref}")
|
|
3080
|
-
provider_name = str(constitution.get_setting("provider", "") or "").strip()
|
|
3081
|
-
if provider_name and provider_name.lower() != "cloud":
|
|
3082
|
-
console.print(f"[bold]provider[/bold]: {provider_name}")
|
|
3083
3118
|
|
|
3084
3119
|
if skip_ping:
|
|
3085
3120
|
console.print("[dim]Skipping cloud endpoint reachability check (--skip-ping).[/dim]")
|
|
3086
3121
|
return
|
|
3087
3122
|
|
|
3088
|
-
# Verify
|
|
3089
|
-
# the credential endpoint is reachable.
|
|
3123
|
+
# Verify BYOK readiness and endpoint reachability.
|
|
3090
3124
|
if execution_mode == "cloud_byok":
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3125
|
+
if provider_key:
|
|
3126
|
+
# Env-key path: perform a lightweight inference ping so entitlement +
|
|
3127
|
+
# provider auth are validated together.
|
|
3128
|
+
try:
|
|
3129
|
+
response = httpx.post(
|
|
3130
|
+
f"{platform_url()}/v1/inference/refactor",
|
|
3131
|
+
headers={
|
|
3132
|
+
"Authorization": f"Bearer {auth_ctx.key.key}",
|
|
3133
|
+
"Content-Type": "application/json",
|
|
3134
|
+
"Idempotency-Key": f"doctor-cloud-byok-{uuid.uuid4().hex}",
|
|
3135
|
+
},
|
|
3136
|
+
json={
|
|
3137
|
+
"stage": "review",
|
|
3138
|
+
"execution_mode": "cloud_byok",
|
|
3139
|
+
"provider": provider_name,
|
|
3140
|
+
"provider_key": provider_key,
|
|
3141
|
+
"constitution_hash": "doctor",
|
|
3142
|
+
"system_prompt": "doctor ping",
|
|
3143
|
+
"user_prompt": "doctor ping",
|
|
3144
|
+
"max_alerts": 1,
|
|
3145
|
+
},
|
|
3146
|
+
timeout=20.0,
|
|
3147
|
+
)
|
|
3148
|
+
except httpx.HTTPError as exc:
|
|
3149
|
+
console.print(f"[red]cloud endpoint[/red]: unreachable ({exc}).")
|
|
3150
|
+
raise typer.Exit(code=1) from exc
|
|
3151
|
+
if response.status_code == 402:
|
|
3152
|
+
console.print(
|
|
3153
|
+
"[red]entitlement[/red]: BYOK not enabled for this account (missing `run:byok`). "
|
|
3154
|
+
"Contact your admin to enable BYOK cloud execution."
|
|
3155
|
+
)
|
|
3156
|
+
raise typer.Exit(code=1)
|
|
3157
|
+
if response.status_code == 401:
|
|
3158
|
+
console.print("[red]developer key[/red]: unauthorized (invalid or revoked). Run `refactor login`.")
|
|
3159
|
+
raise typer.Exit(code=1)
|
|
3160
|
+
if response.status_code >= 400:
|
|
3161
|
+
detail = ""
|
|
3162
|
+
try:
|
|
3163
|
+
detail = str((response.json() or {}).get("detail", ""))
|
|
3164
|
+
except Exception:
|
|
3165
|
+
detail = response.text[:200]
|
|
3166
|
+
console.print(
|
|
3167
|
+
f"[red]cloud BYOK ping failed[/red] ({response.status_code})"
|
|
3168
|
+
+ (f": {detail}" if detail else ".")
|
|
3169
|
+
)
|
|
3170
|
+
raise typer.Exit(code=1)
|
|
3171
|
+
console.print("[green]cloud endpoint[/green]: reachable.")
|
|
3172
|
+
console.print("[green]BYOK provider auth[/green]: OK")
|
|
3173
|
+
else:
|
|
3174
|
+
try:
|
|
3175
|
+
response = httpx.get(
|
|
3176
|
+
f"{platform_url()}/v1/inference/credentials",
|
|
3177
|
+
headers={"Authorization": f"Bearer {auth_ctx.key.key}"},
|
|
3178
|
+
timeout=20.0,
|
|
3179
|
+
)
|
|
3180
|
+
except httpx.HTTPError as exc:
|
|
3181
|
+
console.print(f"[red]cloud endpoint[/red]: unreachable ({exc}).")
|
|
3182
|
+
raise typer.Exit(code=1) from exc
|
|
3183
|
+
if response.status_code == 402:
|
|
3184
|
+
console.print(
|
|
3185
|
+
"[red]entitlement[/red]: BYOK not enabled for this account (missing `run:byok`). "
|
|
3186
|
+
"Contact your admin to enable BYOK cloud execution."
|
|
3187
|
+
)
|
|
3188
|
+
raise typer.Exit(code=1)
|
|
3189
|
+
if response.status_code == 401:
|
|
3190
|
+
console.print("[red]developer key[/red]: unauthorized (invalid or revoked). Run `refactor login`.")
|
|
3191
|
+
raise typer.Exit(code=1)
|
|
3192
|
+
if response.status_code >= 400:
|
|
3193
|
+
console.print(f"[red]cloud endpoint[/red]: credential check failed ({response.status_code}).")
|
|
3194
|
+
raise typer.Exit(code=1)
|
|
3195
|
+
data = response.json() if response.content else {}
|
|
3196
|
+
refs = {str(row.get("credential_ref", "")) for row in (data.get("credentials", []) or [])}
|
|
3197
|
+
if credential_ref not in refs:
|
|
3198
|
+
console.print(
|
|
3199
|
+
f"[red]credential[/red]: `{credential_ref}` not found for this account. "
|
|
3200
|
+
"Check `refactor cloud credentials list`."
|
|
3201
|
+
)
|
|
3202
|
+
raise typer.Exit(code=1)
|
|
3203
|
+
console.print("[green]credential[/green]: found and owned by this account.")
|
|
3204
|
+
console.print("[green]cloud endpoint[/green]: reachable.")
|
|
3122
3205
|
else:
|
|
3123
3206
|
console.print(
|
|
3124
3207
|
"[dim]cloud_managed uses platform-managed provider credentials; "
|
{refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli/commands/runtime_proxy_cmds.py
RENAMED
|
@@ -142,8 +142,8 @@ def _exec_runtime(command_name: str, passthrough_args: list[str]) -> None:
|
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
def init(ctx: typer.Context) -> None:
|
|
145
|
-
"""Initialize project
|
|
146
|
-
|
|
145
|
+
"""Initialize project config locally (no runtime required)."""
|
|
146
|
+
_delegate_to_run_cmds("init", list(ctx.args))
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
def start(ctx: typer.Context) -> None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: refactorai-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.30
|
|
4
4
|
Summary: Local-first CLI for the refactor platform
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -53,28 +53,34 @@ python -m twine upload ./refactorai-cli/dist/*
|
|
|
53
53
|
## Install test (local)
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
python -m pip install ./refactorai-cli/dist/refactorai_cli-0.2.
|
|
56
|
+
python -m pip install ./refactorai-cli/dist/refactorai_cli-0.2.30-py3-none-any.whl
|
|
57
57
|
refactor --version
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
## Cloud BYOK setup (bring your own provider key)
|
|
61
61
|
|
|
62
62
|
Run cloud inference with your own provider credentials (no local runtime
|
|
63
|
-
required).
|
|
64
|
-
|
|
63
|
+
required). Preferred path is env-key in project config (`provider_key:
|
|
64
|
+
${ENV_VAR}`). Platform-stored credentials (`credential_ref`) are optional
|
|
65
|
+
fallback.
|
|
65
66
|
|
|
66
67
|
```bash
|
|
67
68
|
# 1. Authenticate (developer key with the run:byok entitlement).
|
|
68
69
|
refactor login
|
|
69
70
|
|
|
70
|
-
#
|
|
71
|
+
# 2A. Preferred: set BYOK directly from project env in refactor.config:
|
|
72
|
+
#
|
|
73
|
+
# mode: cloud_byok
|
|
74
|
+
# provider: openai
|
|
75
|
+
# model_id: gpt-4.1-mini
|
|
76
|
+
# provider_key: ${OPENAI_API_KEY}
|
|
77
|
+
#
|
|
78
|
+
# 2B. Optional fallback: register a platform-stored credential from env.
|
|
71
79
|
export OPENAI_API_KEY=sk-...
|
|
72
80
|
refactor cloud credentials set --provider openai --from-env OPENAI_API_KEY --label "my key"
|
|
73
81
|
# -> prints a credential_ref, e.g. cred_01J...
|
|
74
82
|
|
|
75
|
-
# 3.
|
|
76
|
-
# mode: cloud_byok
|
|
77
|
-
# provider: openai
|
|
83
|
+
# 3. If you use platform-stored fallback, set credential_ref in config:
|
|
78
84
|
# credential_ref: cred_01J...
|
|
79
85
|
|
|
80
86
|
# 4. Verify readiness, then run.
|
|
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
|
{refactorai_cli-0.2.29 → refactorai_cli-0.2.30}/refactorai_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|