···11+/**
22+ * System-wide constants for the Slices CLI
33+ */
44+55+// The main Slices platform slice URI and DID
66+export const SYSTEM_SLICE_URI = "at://did:plc:bcgltzqazw5tb6k2g3ttenbj/network.slices.slice/3lymhd4jhrd2z";
77+export const SYSTEM_SLICE_DID = "did:plc:bcgltzqazw5tb6k2g3ttenbj";
88+99+// Reference slice with base lexicons for new projects
1010+export const REFERENCE_SLICE_URI = "at://did:plc:bcgltzqazw5tb6k2g3ttenbj/network.slices.slice/3lzbzumcmvo2z";
1111+1212+// API endpoints
1313+export const DEFAULT_API_URL = "https://api.slices.network";
1414+export const DEFAULT_AIP_BASE_URL = "https://auth.slices.network";
+61
packages/cli/src/utils/name_generator.ts
···11+/**
22+ * Simple Docker-style name generator for slices
33+ * Generates names in the format: adjective-noun
44+ */
55+66+const adjectives = [
77+ "awesome", "blazing", "brilliant", "clever", "cool",
88+ "dazzling", "dynamic", "elegant", "epic", "fast",
99+ "fearless", "friendly", "gentle", "happy", "jolly",
1010+ "kind", "lively", "mighty", "nimble", "peaceful",
1111+ "quick", "radiant", "serene", "sharp", "smooth",
1212+ "stellar", "swift", "tender", "vibrant", "wise",
1313+ "zen", "cosmic", "digital", "quantum", "cyber",
1414+ "neon", "pixel", "sonic", "turbo", "ultra"
1515+];
1616+1717+const nouns = [
1818+ "slice", "wave", "spark", "pulse", "stream",
1919+ "beacon", "bridge", "cloud", "comet", "crystal",
2020+ "delta", "echo", "flame", "galaxy", "harbor",
2121+ "horizon", "iris", "jet", "lens", "meteor",
2222+ "nexus", "orbit", "phoenix", "prism", "quasar",
2323+ "ray", "sphere", "star", "storm", "tide",
2424+ "vertex", "vortex", "zen", "zone", "arc",
2525+ "beam", "core", "drift", "edge", "flux"
2626+];
2727+2828+/**
2929+ * Generates a random slice name in the format: adjective-noun-xxxx
3030+ * @param separator The separator to use between words (default: "-")
3131+ * @returns A randomly generated name with 4-digit suffix
3232+ */
3333+export function generateSliceName(separator: string = "-"): string {
3434+ const adjective = adjectives[Math.floor(Math.random() * adjectives.length)];
3535+ const noun = nouns[Math.floor(Math.random() * nouns.length)];
3636+ const randomSuffix = Math.floor(Math.random() * 10000).toString().padStart(4, '0');
3737+ return `${adjective}${separator}${noun}${separator}${randomSuffix}`;
3838+}
3939+4040+/**
4141+ * Generates a unique slice name with a random number suffix
4242+ * @param separator The separator to use between words (default: "-")
4343+ * @returns A randomly generated name with number suffix
4444+ */
4545+export function generateUniqueSliceName(separator: string = "-"): string {
4646+ const baseName = generateSliceName(separator);
4747+ const randomNum = Math.floor(Math.random() * 9999);
4848+ return `${baseName}${separator}${randomNum}`;
4949+}
5050+5151+/**
5252+ * Generates a unique random domain name
5353+ * @returns A unique domain in the format: network.slices.adjective-noun-xxxx
5454+ */
5555+export function generateDomain(): string {
5656+ // Generate a completely random domain, independent of slice name
5757+ const adjective = adjectives[Math.floor(Math.random() * adjectives.length)];
5858+ const noun = nouns[Math.floor(Math.random() * nouns.length)];
5959+ const randomSuffix = Math.floor(Math.random() * 10000).toString().padStart(4, '0');
6060+ return `network.slices.${adjective}-${noun}-${randomSuffix}`;
6161+}
+18
packages/cli/src/utils/strings.ts
···11+/**
22+ * Convert a string to kebab-case (dash-separated lowercase)
33+ *
44+ * Examples:
55+ * "MyProject" -> "my-project"
66+ * "my_project" -> "my-project"
77+ * "My Cool Project" -> "my-cool-project"
88+ * "myProject123" -> "my-project123"
99+ */
1010+export function dasherize(str: string): string {
1111+ return str
1212+ .replace(/([a-z])([A-Z])/g, '$1-$2') // camelCase to kebab-case
1313+ .replace(/[\s_]+/g, '-') // spaces and underscores to dashes
1414+ .replace(/[^a-z0-9-]/gi, '') // remove invalid characters
1515+ .replace(/-+/g, '-') // collapse multiple dashes
1616+ .replace(/^-|-$/g, '') // trim dashes from start/end
1717+ .toLowerCase();
1818+}