@an-sdk/cli 0.0.5 → 0.0.7

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.js +4 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -39,13 +39,14 @@ function saveProject(data) {
39
39
  }
40
40
 
41
41
  // src/login.ts
42
- var API_BASE = process.env.AN_API_URL || "https://www.an.dev/api/v1";
42
+ var API_BASE = process.env.AN_API_URL || "https://an.dev/api/v1";
43
43
  async function login() {
44
44
  p.intro("an login");
45
45
  const existing = getApiKey();
46
46
  if (existing) {
47
47
  p.log.info("Already logged in. Continuing will re-authenticate.");
48
48
  }
49
+ p.log.info("Get your API key at https://an.dev/api-keys");
49
50
  const apiKey = await p.text({
50
51
  message: "Enter your API key",
51
52
  validate: (val) => {
@@ -63,7 +64,7 @@ async function login() {
63
64
  });
64
65
  if (!res.ok) {
65
66
  s.stop("Invalid API key");
66
- p.log.error("The API key could not be verified. Check it and try again.");
67
+ p.log.error("Invalid API key. Get a new one at https://an.dev/api-keys");
67
68
  process.exit(1);
68
69
  }
69
70
  const { user, team } = await res.json();
@@ -134,7 +135,7 @@ import * as p2 from "@clack/prompts";
134
135
  function slugify(name) {
135
136
  return name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
136
137
  }
137
- var API_BASE2 = process.env.AN_API_URL || "https://www.an.dev/api/v1";
138
+ var API_BASE2 = process.env.AN_API_URL || "https://an.dev/api/v1";
138
139
  var AN_BASE = process.env.AN_URL || "https://an.dev";
139
140
  async function fetchProjects(apiKey) {
140
141
  const res = await fetch(`${API_BASE2}/projects`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@an-sdk/cli",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "AN CLI — deploy AI agents",
5
5
  "type": "module",
6
6
  "bin": {