File size: 711 Bytes
cd6f98e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import chalk from "chalk";
import figlet from "figlet";

export const printTitle = () => {
  console.log(
    chalk.red(
      figlet.textSync("AgentGPT", {
        horizontalLayout: "full",
        font: "ANSI Shadow",
      })
    )
  );
  console.log(
    "Welcome to the AgentGPT CLI! This CLI will generate the required .env files."
  );
  console.log(
    "Copies of the generated envs will be created in `./next/.env` and `./platform/.env`.\n"
  );
};

// Function to check if entered api key is in the correct format or empty
export const isValidKey = (apikey, pattern) => {
  return (apikey === "" || pattern.test(apikey))
};

export const validKeyErrorMessage = "\nInvalid api key. Please try again."