Lines 1-22javascript
1import { hostname } from "node:os";
2import { createInterface } from "node:readline/promises";
3import { spawn } from "node:child_process";
4import { stdin, stdout } from "node:process";
5import { loadConfigFile, redactToken, resolveConfigPath, writeConfigKeys, workspaceFromToken, } from "../config.js";
HighSandbox Evasion Gated Capability
Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.
dist/commands/login.jsView on unpkg · L2 6import { createUploadsClient, createWorkspaceRequest, exchangeEnrollment, listMintWorkspaces, mintWorkspaceToken, requestDeviceCode, requestDeviceToken, } from "../client.js";
7import { flagBool, flagString, parseCommandArgs, UsageError } from "../cli-args.js";
8import { parseScopes } from "./admin-enrollment.js";
9import { writeCommandHelp } from "../cli-style.js";
10const HELP = `uploads login [options]
12Sign in and save workspace credentials. With no flags, opens a browser to
13authorize this device — the recommended way to sign in. Pass an enrollment
14code only if you were given one from before device login (fallback path).
17 --workspace <name> Workspace to mint a token for (device flow; required if
18 your account can access more than one)
19 --create With --workspace: create the workspace first if your
20 account doesn't have it yet (device flow only) — lets
21 scripted/agent logins provision without a prompt
22 --scopes <list> Comma-separated scopes (default: files:read,files:write)