replicas-cli 0.3.20 → 0.3.22

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.
Files changed (2) hide show
  1. package/dist/index.cjs +27 -11
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -22371,9 +22371,9 @@ var PLANS = {
22371
22371
  monthlyPrice: 50,
22372
22372
  seatPriceCents: 5e3,
22373
22373
  features: [
22374
- "For individuals",
22375
- `${DEVELOPER_SEAT_HOURS} hours per month`,
22376
- "API and automations billed by usage",
22374
+ "$50 of included usage every month",
22375
+ "Usage beyond that billed at the overage rate",
22376
+ "Small, Large, and Ultra workspaces",
22377
22377
  "Unlimited repositories",
22378
22378
  "Unlimited environments",
22379
22379
  "Unlimited automations",
@@ -22388,15 +22388,12 @@ var PLANS = {
22388
22388
  monthlyPrice: 200,
22389
22389
  seatPriceCents: 2e4,
22390
22390
  features: [
22391
- "Unlimited manual workspace minutes",
22392
- "API and automations billed by usage",
22393
- "Unlimited repositories",
22394
- "Unlimited automations",
22395
- "Warm pools and warm hooks",
22391
+ "$200+ of included usage every month, in $100 steps",
22392
+ "Usage beyond that billed at the overage rate",
22393
+ "Everything in Developer",
22394
+ "Large workspaces by default (4 vCPU, 16 GB memory)",
22396
22395
  "Higher API rate limits",
22397
- "Mobile app",
22398
22396
  "Access to a static egress IP",
22399
- "Auto-upgraded to Large workspaces (4 vCPU, 16 GB memory)",
22400
22397
  "Shared Slack support channel"
22401
22398
  ]
22402
22399
  },
@@ -28396,7 +28393,7 @@ var headlessAgentRequestSchema = external_exports.object({
28396
28393
  });
28397
28394
 
28398
28395
  // ../shared/src/cli-version.ts
28399
- var CLI_VERSION = "0.3.20";
28396
+ var CLI_VERSION = "0.3.22";
28400
28397
 
28401
28398
  // ../shared/src/version.ts
28402
28399
  function compareVersions(v1, v2) {
@@ -31044,6 +31041,24 @@ async function credentialsRemoveCommand(service, options) {
31044
31041
  const response = await orgAuthenticatedFetch(credentialsPath(service, options), { method: "DELETE" });
31045
31042
  output(response, ({ success: success2 }) => console.log(success2 ? import_chalk17.default.green(`Removed ${scopeLabel(options)} ${service} credentials.`) : `No ${scopeLabel(options)} ${service} credentials to remove.`));
31046
31043
  }
31044
+ async function credentialsUsageCommand({ org: org2, user }) {
31045
+ const scope = org2 ? "org" : user ? "user" : null;
31046
+ const response = await orgAuthenticatedFetch(`/v1/agents/subscription-usage${scope ? `?scope=${scope}` : ""}`);
31047
+ output(response, ({ accounts }) => {
31048
+ if (accounts.length === 0) console.log(import_chalk17.default.yellow("No Claude or Codex subscriptions connected."));
31049
+ for (const account of accounts) {
31050
+ const limits = account.reconnectRequired ? import_chalk17.default.yellow(`Reconnect required: run replicas ${account.provider}-auth${account.scope === "org" ? " --org" : ""} with the same account`) : !account.windows ? import_chalk17.default.gray("Usage unavailable, try again in a few minutes") : account.windows.length === 0 ? "No usage limits" : account.windows.map((window) => [
31051
+ window.kind === "session" ? "5-hour" : "weekly",
31052
+ window.model,
31053
+ `${Math.round(window.usedPercent)}%`,
31054
+ window.resetsAt && import_chalk17.default.gray(`(resets ${formatDate(window.resetsAt)})`)
31055
+ ].filter(Boolean).join(" ")).join(", ");
31056
+ const label = [account.email ?? account.credentialId, account.planType].filter(Boolean).join(" ");
31057
+ console.log(`${account.provider} ${scopeLabel({ org: account.scope === "org" })} ${label} ${limits}`);
31058
+ if (account.exhaustedUntil) console.log(import_chalk17.default.gray(` Workspaces skip this account until ${formatDate(account.exhaustedUntil)}`));
31059
+ }
31060
+ });
31061
+ }
31047
31062
 
31048
31063
  // src/lib/version-check.ts
31049
31064
  var import_chalk18 = __toESM(require("chalk"));
@@ -34167,6 +34182,7 @@ credentials.command("list <agent>").description("List connected credentials for
34167
34182
  credentials.command("get <service>").description("Show stored credentials for a service (secrets masked for API keys)").option("-o, --org", "Organization credentials instead of personal").action(run(credentialsGetCommand));
34168
34183
  credentials.command("set <service>").description(`Store credentials. The API key (AWS secret for bedrock) is prompted for, or read from stdin. Services: ${API_KEY_CREDENTIAL_SERVICES.join(", ")}`).option("-o, --org", "Organization credentials (admins only)").option("--base-url <url>", "Base URL (ollama, openai-compatible, codex-foundry)").option("--models <ids>", "Comma-separated model IDs (ollama)").option("--models-url <url>", "Models endpoint (openai-compatible)").option("--authorization-header <value>", "Authorization header value (openai-compatible)").option("--preserve-authorization-header", "Forward the authorization header unchanged (openai-compatible)").option("--aws-access-key-id <id>", "AWS access key ID (bedrock)").option("--aws-region <region>", "AWS region (bedrock)").option("--small-fast-model-region <region>", "Region for the small fast model (bedrock)").option("--resource <name>", "Azure Foundry resource (claude-foundry)").option("--sonnet-model <id>", "Sonnet deployment (claude-foundry)").option("--haiku-model <id>", "Haiku deployment (claude-foundry)").option("--opus-model <id>", "Opus deployment (claude-foundry)").option("--model <id>", "Model deployment (codex-foundry)").action(run(credentialsSetCommand));
34169
34184
  credentials.command("remove <service>").description("Remove stored credentials for a service (also claude, codex, muse subscriptions)").option("-o, --org", "Organization credentials instead of personal").action(run(credentialsRemoveCommand));
34185
+ credentials.command("usage").description("Show how much of each connected Claude and ChatGPT subscription's 5-hour and weekly limits is used (personal and organization by default)").addOption(new import_commander.Option("-o, --org", "Only organization subscriptions").conflicts("user")).option("-u, --user", "Only your personal subscriptions").action(run(credentialsUsageCommand));
34170
34186
  var automation = program.command("automation").alias("auto").description("Manage automations");
34171
34187
  automation.command("list").description("List all automations").option("-p, --page <page>", "Page number").option("-l, --limit <limit>", "Number of items per page").option("--owner <owner>", "Ownership filter: org, user, all").option("--trigger-type <type>", "Only automations with a trigger of this type (cron, github, gitlab, slack, sentry, custom)").option("--enabled <enabled>", "Only enabled or disabled automations (true/false)").option("--search <search>", "Case-insensitive substring match on the name").option("--background <background>", "Only background (true) or main-list (false) automations").action(run(automationListCommand));
34172
34188
  automation.command("get <id>").description("Get automation details by ID").action(run(automationGetCommand));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.20",
3
+ "version": "0.3.22",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {