@teinai/cli 1.0.0 → 1.0.1

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/index.js +19 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1573,8 +1573,14 @@ ${c.green("\u2714")} API key saved to ${c.dim(getConfigPath())}
1573
1573
  break;
1574
1574
  }
1575
1575
  case "logout": {
1576
+ const stored = getStoredConfig();
1577
+ if (!stored.apiKey) {
1578
+ process.stdout.write(`${c.yellow("\u2139")} No active API key found. You are already logged out.
1579
+ `);
1580
+ break;
1581
+ }
1576
1582
  saveStoredConfig({ apiKey: "" });
1577
- process.stdout.write(`${c.green("\u2714")} Logged out. Stored API key has been cleared.
1583
+ process.stdout.write(`${c.green("\u2714")} Logged out successfully. Stored API key has been cleared from ${c.dim(getConfigPath())}
1578
1584
  `);
1579
1585
  break;
1580
1586
  }
@@ -1887,6 +1893,18 @@ async function main() {
1887
1893
  await authCommand(parsed.subcommand, parsed.options.key);
1888
1894
  break;
1889
1895
  }
1896
+ case "login": {
1897
+ await authCommand("login", parsed.options.key);
1898
+ break;
1899
+ }
1900
+ case "logout": {
1901
+ await authCommand("logout");
1902
+ break;
1903
+ }
1904
+ case "whoami": {
1905
+ await authCommand("status");
1906
+ break;
1907
+ }
1890
1908
  case "models":
1891
1909
  case "list": {
1892
1910
  listModelsCommand(parsed.subcommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teinai/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Official CLI for Tein AI models (Video, Image, Audio, LLM, 3D)",
5
5
  "main": "index.js",
6
6
  "bin": {