MCPcopy Index your code
hub / github.com/anomalyco/opencode / createSecretKey

Function createSecretKey

packages/console/core/script/create-api-key.ts:113–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111console.log(JSON.stringify({ stage: Resource.App.stage, ...result }, null, 2))
112
113function createSecretKey() {
114 const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
115 const values = new Uint32Array(64)
116 crypto.getRandomValues(values)
117 return `sk-${Array.from(values, (value) => chars[value % chars.length]).join("")}`
118}
119
120function parseArgs(argv: string[]) {
121 const parsed = {

Callers 1

create-api-key.tsFile · 0.85

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected