@hyperaide/cli
v0.1.11
Published
Hyperaide command line tooling.
Readme
@hyperaide/cli
Hyperaide command line tooling.
Commands
npx @hyperaide/cli loginnpx @hyperaide/cli logoutnpx @hyperaide/cli apps initnpx @hyperaide/cli apps migratenpx @hyperaide/cli apps deploy
The existing top-level init, migrate, and deploy commands remain available as compatibility aliases.
migrate
Loads hyperaide.app.ts and, if it defines a non-empty database section (entities / links), compares it to your Hyperaide user database schema (the one tied to your account). It prints planned additions (new entities, new attributes on existing entities, new links) and asks for confirmation before applying.
- If the API reports conflicts (e.g. an attribute already exists with a different type or indexed flag), the command exits with an error and does not apply changes. Fix the manifest or your existing schema, then run again.
- If there is nothing to change, it exits successfully with no changes.
deploy
If the manifest includes a non-empty database section, deploy runs a non-interactive schema sync first (same additive merge as migrate). If that step returns conflicts, deploy fails with a message to run hyperaide apps migrate interactively to review. Then it builds the bundle and uploads as before.
Config
apps deploy loads hyperaide.app.ts from the current working directory.
apps init requires CLI auth, lets you choose an existing app from your account or create a new one, and then scaffolds this file from the canonical server app record.
Minimal config:
export default {
id: "11111111-1111-4111-8111-111111111111",
slug: "my-app",
name: "My App",
actions: {
create: {
name: "Create",
path: "/api/create",
},
},
database: {
entities: [
{
name: "tasks",
attributes: [
{ name: "title", type: "string", indexed: true },
{ name: "done", type: "boolean" },
],
},
],
links: [],
},
};Optional database describes entities and links to merge additively into your user database via migrate / deploy. Attribute types object and array in the manifest are stored as json on the server.
build is optional. Today the CLI only uses build.command before it creates the deployment tarball.
Auth storage
Credentials are stored at ~/.hyperaide/credentials:
{
"token": "hype_access_xxx"
}Environment overrides
HYPERAIDE_APP_URLoverrides theweb-apporigin used by the CLI, for examplehttps://app.dev.hyperaide.comorhttp://127.0.0.1:3002HYPERAIDE_API_URLis still accepted as a deprecated alias forHYPERAIDE_APP_URLHYPERAIDE_ACCESS_TOKENprovides a raw access token (hype_access_...) directly, soapps init,apps migrate, andapps deploycan run withoutloginHYPERAIDE_CONFIG_DIRoverrides the directory used for local credential storage
login stays browser-based, but the approval page is intentionally minimal: open the link, sign in if needed, approve the request, and return to the terminal.
