MCPcopy
hub / github.com/langchain-ai/deepagents / run_auth_command

Function run_auth_command

libs/code/deepagents_code/auth_commands.py:160–184  ·  view source on GitHub ↗

Dispatch a parsed `dcode auth` invocation. Returns: Process exit code (`0` on success, non-zero on error).

(args: argparse.Namespace)

Source from the content-addressed store, hash-verified

158
159
160def run_auth_command(args: argparse.Namespace) -> int:
161 """Dispatch a parsed `dcode auth` invocation.
162
163 Returns:
164 Process exit code (`0` on success, non-zero on error).
165 """
166 command = getattr(args, "auth_command", None)
167 if command in {"list", "ls"}:
168 return _run_list()
169 if command == "set":
170 return _run_set(
171 args.provider,
172 from_env=args.from_env,
173 project=getattr(args, "project", None),
174 )
175 if command in {"remove", "rm", "delete"}:
176 return _run_remove(args.provider)
177 if command == "status":
178 return _run_status(getattr(args, "provider", None))
179 if command == "path":
180 return _run_path()
181 from deepagents_code.ui import show_auth_help
182
183 show_auth_help()
184 return 0
185
186
187def _resolution_label(status: ProviderAuthStatus) -> str:

Calls 6

show_auth_helpFunction · 0.90
_run_setFunction · 0.85
_run_removeFunction · 0.85
_run_statusFunction · 0.85
_run_listFunction · 0.70
_run_pathFunction · 0.70

Used in the wild real call sites across dependent graphs

searching dependent graphs…