koigrid 0.8.0 → 0.10.0

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.
package/dist/index.js CHANGED
@@ -2,12 +2,13 @@
2
2
  // Entry del CLI. Dispatch data-driven desde el manifest (resolveCommand) + registro de handlers.
3
3
  // Añadir un comando = fichero en commands/ + entrada en registry.ts + manifest.ts (los guards lo obligan).
4
4
  import { parseArgs, vigilarFlags } from './args.js';
5
- import { buildHelp } from './help.js';
5
+ import { buildHelp, buildCommandHelp } from './help.js';
6
6
  import { ApiError } from './api.js';
7
7
  import { resolveCommand, CLI_COMMANDS } from './manifest.js';
8
8
  import { HANDLERS } from './registry.js';
9
9
  import { red, yellow } from './output.js';
10
10
  import { createRequire } from 'node:module';
11
+ import { avisoDeVersion, debeComprobar, ultimaVersionConocida } from './actualizacion.js';
11
12
  const version = (() => { try {
12
13
  return createRequire(import.meta.url)('../package.json').version;
13
14
  }
@@ -24,7 +25,9 @@ async function main() {
24
25
  }
25
26
  // Ayuda humana, o `help --json` → manifest completo para que un AGENTE IA introspeccione TODO el CLI.
26
27
  if (!a.cmd || a.cmd === 'help' || a.flags.help || a.flags.h) {
27
- console.log(a.flags.json ? JSON.stringify(CLI_COMMANDS, null, 2) : buildHelp());
28
+ // `koigrid <cmd> [sub] --help`: la ayuda de ese comando o subcomando (ficha f76082de); sin comando, la global.
29
+ const propia = a.cmd && a.cmd !== 'help' && !a.flags.json ? buildCommandHelp(a.cmd, a.sub) : null;
30
+ console.log(a.flags.json ? JSON.stringify(CLI_COMMANDS, null, 2) : propia ?? buildHelp());
28
31
  return;
29
32
  }
30
33
  if (typeof a.flags.token === 'string')
@@ -45,10 +48,24 @@ async function main() {
45
48
  if (ignorados.length)
46
49
  console.error(yellow(`⚠ ignored (this command doesn't use them): ${ignorados.map((f) => (f.length === 1 ? `-${f}` : `--${f}`)).join(' ')}`));
47
50
  }
51
+ // ¿Hay versión nueva? Al final y por stderr, como gh o flyctl; nunca frena ni rompe el comando (ficha dd72ac6f).
52
+ if (debeComprobar(process.env, !!a.flags.json)) {
53
+ const aviso = avisoDeVersion(version, await ultimaVersionConocida());
54
+ if (aviso)
55
+ console.error(yellow(aviso));
56
+ }
48
57
  }
49
58
  main().catch((e) => {
50
59
  if (e instanceof ApiError) {
51
- console.error(red(`✗ ${e.message}`) + (e.detail ? `\n ${e.detail}` : ''));
60
+ // El sobre de error de la API (ficha cad2f339): motivo, si se puede reintentar, dónde se explica el código y el
61
+ // requestId para citarlo a soporte.
62
+ const b = e.body ?? {};
63
+ const extra = [
64
+ b.retryable === true ? 'retryable: yes (repeating the same command later can work)' : null,
65
+ typeof b.docUrl === 'string' ? `docs: ${b.docUrl}` : null,
66
+ typeof b.requestId === 'string' ? `requestId: ${b.requestId}` : null,
67
+ ].filter(Boolean);
68
+ console.error(red(`✗ ${e.message}`) + (e.detail ? `\n ${e.detail}` : '') + (extra.length ? `\n ${extra.join(' · ')}` : ''));
52
69
  process.exit(e.status === 401 ? 2 : 1);
53
70
  }
54
71
  console.error(red(`✗ ${e?.message || e}`));
package/dist/manifest.js CHANGED
@@ -1,18 +1,31 @@
1
1
  export const CLI_COMMANDS = [
2
- { name: 'login', summary: 'Authenticate (paste an API key, or --token / KOIGRID_TOKEN)', subs: [], endpoints: [] },
2
+ { name: 'login', summary: 'Authenticate: --email <you> (link + 6-digit code you approve in the browser; renews by itself) or paste an API key (--token / KOIGRID_TOKEN)', subs: [], endpoints: [] },
3
3
  { name: 'logout', summary: 'Remove the stored credentials', subs: [], endpoints: [] },
4
4
  { name: 'whoami', summary: 'Show the authenticated account', subs: [], endpoints: ['me'] },
5
5
  { name: 'usage', summary: 'Show usage & cost', subs: [], endpoints: ['usage'] },
6
6
  { name: 'changelog', aliases: ['changes'], summary: "What changed recently — so you don't have to re-run every test to find out if your issue is fixed", subs: [], endpoints: ['changelog'] },
7
+ { name: 'pricing', aliases: ['price'], summary: 'The price list (per reserved GB of RAM, vCPU, GB of disk) and a quote of what resources would cost before creating them', subs: ['quote'], endpoints: ['pricing', 'pricing/quote'] },
7
8
  { name: 'projects', aliases: ['project'], summary: 'Projects (group resources within the org)', subs: ['ls', 'create', 'rm'], endpoints: ['projects', 'projects/[id]'] },
8
9
  {
9
10
  name: 'apps', aliases: ['app'], product: 'apps', summary: 'Deploy and manage apps (git repo, container image, or local --dir)',
10
- subs: ['ls', 'deploy', 'logs', 'rm', 'rename', 'scale', 'resize', 'autoscale', 'scale-out', 'env', 'domains', 'volumes', 'cdn', 'cache', 'protection', 'retention', 'github', 'hooks', 'rollback', 'pause', 'resume', 'restore', 'migrate', 'deployments', 'previews', 'preview', 'rules', 'rule', 'rule-rm', 'rule-toggle', 'registry', 'loadtest'],
11
- endpoints: ['apps', 'apps/[id]', 'apps/[id]/deployments', 'apps/[id]/source-upload', 'apps/[id]/logs', 'apps/[id]/scale', 'apps/[id]/resources', 'apps/[id]/autoscale', 'apps/[id]/scale-out', 'apps/[id]/env', 'apps/[id]/env/verify', 'apps/[id]/domains', 'apps/[id]/domains/verify', 'apps/[id]/volumes', 'apps/[id]/volumes/[volId]', 'apps/[id]/volumes/[volId]/backups', 'apps/[id]/volumes/[volId]/backups/[backupId]/restore', 'apps/[id]/cdn', 'apps/[id]/cache', 'apps/[id]/cache/purge', 'apps/[id]/protection', 'apps/[id]/protection/evaluate', 'apps/[id]/retention', 'apps/[id]/github', 'apps/[id]/deploy-hooks', 'apps/[id]/deploy-hooks/[hookId]', 'apps/[id]/rollback', 'apps/[id]/pause', 'apps/[id]/resume', 'apps/[id]/restore', 'apps/[id]/migrate', 'apps/[id]/previews', 'apps/[id]/rules', 'apps/[id]/rules/[ruleId]', 'apps/[id]/registry', 'apps/[id]/loadtest'],
11
+ usage: {
12
+ deploy: `koigrid apps deploy <name> --dir <path> | --image <img> | --repo <git-url>
13
+ Source --dir <path> (your folder, no git/Docker needed) · --image <img> · --repo <git-url> [--branch B] [--repo-token T]
14
+ Runtime --port N (default: the image's single EXPOSE port, else 3000; PORT is injected; change later: apps port <id> <n>) · --health-path /health · --memory <MB> · --cpus <n> · --ingress edge|runner
15
+ Worker --worker: a background process with NO port (queue consumer, bot), like a Heroku worker or a Render
16
+ background worker. No URL or domain; alive = the process keeps running. Do not pass --port.
17
+ Build --build-cmd C · --install-cmd C · --start-cmd C · --root-dir D · --node-version V · --dockerfile PATH · --release-cmd C
18
+ Env --env KEY=VALUE (repeatable; references like 'DATABASE_URL=\${{db.<name>.DATABASE_URL}}') · --env-target all|production|preview
19
+ Waiting waits until live or failed and prints the URL or the error with the end of the log (default)
20
+ --no-wait (or --detach) returns at once · --timeout <min> (default 20) · with --json it returns at once unless --wait
21
+ Other --project <id> · --json`,
22
+ },
23
+ subs: ['ls', 'deploy', 'logs', 'http', 'rm', 'rename', 'health-path', 'port', 'release', 'build-settings', 'traffic-ramp', 'max-surge', 'deploy-analysis', 'scale', 'resize', 'autoscale', 'scale-out', 'env', 'domains', 'volumes', 'cdn', 'cache', 'protection', 'retention', 'github', 'hooks', 'rollback', 'pause', 'resume', 'restore', 'migrate', 'deployments', 'previews', 'preview', 'rules', 'rule', 'rule-rm', 'rule-toggle', 'registry', 'loadtest'],
24
+ endpoints: ['apps', 'apps/[id]', 'apps/[id]/deployments', 'apps/[id]/source-upload', 'apps/[id]/logs', 'apps/[id]/http', 'apps/[id]/scale', 'apps/[id]/resources', 'apps/[id]/autoscale', 'apps/[id]/scale-out', 'apps/[id]/env', 'apps/[id]/env/verify', 'apps/[id]/domains', 'apps/[id]/domains/verify', 'apps/[id]/volumes', 'apps/[id]/volumes/[volId]', 'apps/[id]/volumes/[volId]/backups', 'apps/[id]/volumes/[volId]/backups/[backupId]/restore', 'apps/[id]/cdn', 'apps/[id]/cache', 'apps/[id]/cache/purge', 'apps/[id]/protection', 'apps/[id]/protection/evaluate', 'apps/[id]/retention', 'apps/[id]/github', 'apps/[id]/deploy-hooks', 'apps/[id]/deploy-hooks/[hookId]', 'apps/[id]/rollback', 'apps/[id]/pause', 'apps/[id]/resume', 'apps/[id]/restore', 'apps/[id]/migrate', 'apps/[id]/previews', 'apps/[id]/rules', 'apps/[id]/rules/[ruleId]', 'apps/[id]/registry', 'apps/[id]/loadtest'],
12
25
  },
13
- { name: 'db', aliases: ['databases', 'database'], product: 'databases', summary: 'Managed Postgres (HA) — incl. SQL console (db query/tables) + branching (db branch) + managed restore (db restore-dump)', subs: ['ls', 'create', 'rm', 'rename', 'pause', 'resume', 'retention', 'url', 'connect', 'metrics', 'logs', 'backups', 'restore', 'restore-dump', 'fix-ownership', 'import', 'restore-status', 'ext', 'replicas', 'pub', 'query', 'tables', 'branch', 'roles', 'rotation', 'patching', 'resize', 'apply-config', 'subs', 'data', 'rpc'], endpoints: ['databases', 'databases/[id]', 'databases/[id]/pause', 'databases/[id]/resume', 'databases/[id]/connection', 'databases/[id]/backups', 'databases/[id]/restore', 'databases/[id]/restore-dump', 'databases/[id]/restore-dump/upload-url', 'databases/[id]/restore-dump/[jobId]', 'databases/[id]/fix-ownership', 'databases/[id]/metrics', 'databases/[id]/logs', 'databases/[id]/extensions', 'databases/[id]/replicas', 'databases/[id]/publications', 'databases/[id]/subscriptions', 'databases/[id]/subscriptions/preflight', 'databases/[id]/subscriptions/verify', 'databases/[id]/subscriptions/verify/[verificationId]', 'databases/[id]/subscriptions/sync-sequences', 'databases/[id]/apply-config', 'databases/[id]/query', 'databases/[id]/branches', 'databases/[id]/branches/[branchId]', 'databases/[id]/branches/[branchId]/reset', 'databases/[id]/roles', 'databases/[id]/roles/[roleName]', 'databases/[id]/rotation', 'databases/[id]/rotation/rotate', 'databases/[id]/rotation/migrate', 'databases/[id]/data/[table]', 'databases/[id]/rpc/[fn]'] },
14
- { name: 'redis', aliases: ['cache'], product: 'cache', summary: 'Managed Redis (HA)', subs: ['apply-config', 'ls', 'create', 'rm', 'rename', 'url', 'connect', 'metrics', 'backups', 'restore'], endpoints: ['redis/[id]/apply-config', 'redis', 'redis/[id]', 'redis/[id]/connection', 'redis/[id]/backups', 'redis/[id]/restore', 'redis/[id]/metrics'] },
15
- { name: 'storage', aliases: ['buckets'], product: 'storage', summary: 'Object storage (S3): buckets, object browser (list/upload/download/delete), versioning + restore', subs: ['ls', 'create', 'rm', 'keys', 'key', 'key-scope', 'versions', 'restore', 'objects', 'upload-url', 'download-url', 'object-rm', 'replication'], endpoints: ['buckets', 'buckets/[id]', 'buckets/[id]/versions', 'buckets/[id]/objects', 'buckets/[id]/objects/upload-url', 'buckets/[id]/objects/download-url', 'storage/keys', 'storage/keys/[id]', 'storage/keys/[id]/scope'] },
26
+ { name: 'db', aliases: ['databases', 'database'], product: 'databases', summary: 'Managed Postgres (HA) — incl. SQL console (db query/tables) + branching (db branch) + managed restore (db restore-dump)', subs: ['ls', 'info', 'create', 'rm', 'rename', 'pause', 'resume', 'retention', 'weekly', 'monthly', 'url', 'connect', 'metrics', 'top-queries', 'slots', 'logs', 'backups', 'restore', 'restore-dump', 'fix-ownership', 'analyze', 'import', 'restore-status', 'ext', 'replicas', 'dr-copy', 'network', 'pub', 'query', 'tables', 'branch', 'roles', 'params', 'pooler', 'rotation', 'patching', 'sync', 'slot-cap', 'resize', 'apply-config', 'maintenance', 'subs', 'data', 'rpc'], endpoints: ['databases', 'databases/[id]', 'databases/[id]/pause', 'databases/[id]/resume', 'databases/[id]/connection', 'databases/[id]/backups', 'databases/[id]/restore', 'databases/[id]/restore-dump', 'databases/[id]/restore-dump/upload-url', 'databases/[id]/restore-dump/[jobId]', 'databases/[id]/fix-ownership', 'databases/[id]/analyze', 'databases/[id]/metrics', 'databases/[id]/queries', 'databases/[id]/replication-slots', 'databases/[id]/logs', 'databases/[id]/extensions', 'databases/[id]/replicas', 'databases/[id]/dr-copy', 'databases/[id]/network', 'databases/[id]/publications', 'databases/[id]/subscriptions', 'databases/[id]/subscriptions/preflight', 'databases/[id]/subscriptions/verify', 'databases/[id]/subscriptions/verify/[verificationId]', 'databases/[id]/subscriptions/sync-sequences', 'databases/[id]/apply-config', 'databases/[id]/maintenance/apply', 'databases/[id]/maintenance/defer', 'databases/[id]/query', 'databases/[id]/branches', 'databases/[id]/branches/[branchId]', 'databases/[id]/branches/[branchId]/reset', 'databases/[id]/roles', 'databases/[id]/roles/[roleName]', 'databases/[id]/parameters', 'databases/[id]/pooler', 'databases/[id]/rotation', 'databases/[id]/rotation/rotate', 'databases/[id]/rotation/migrate', 'databases/[id]/data/[table]', 'databases/[id]/rpc/[fn]'] },
27
+ { name: 'redis', aliases: ['cache'], product: 'cache', summary: 'Managed Redis (HA)', subs: ['apply-config', 'ls', 'create', 'rm', 'rename', 'resize', 'url', 'connect', 'metrics', 'backups', 'restore', 'dr-copy', 'network', 'password'], endpoints: ['redis/[id]/apply-config', 'redis/[id]/password', 'redis', 'redis/[id]', 'redis/[id]/connection', 'redis/[id]/backups', 'redis/[id]/restore', 'redis/[id]/metrics', 'redis/[id]/dr-copy', 'redis/[id]/network'] },
28
+ { name: 'storage', aliases: ['buckets'], product: 'storage', summary: 'Object storage (S3): buckets, object browser (list/upload/download/delete), versioning + restore, public read (storage public)', subs: ['ls', 'create', 'rm', 'keys', 'key', 'key-scope', 'versions', 'restore', 'objects', 'upload-url', 'download-url', 'object-rm', 'replication', 'public'], endpoints: ['buckets', 'buckets/[id]', 'buckets/[id]/versions', 'buckets/[id]/objects', 'buckets/[id]/objects/upload-url', 'buckets/[id]/objects/download-url', 'buckets/[id]/public', 'storage/keys', 'storage/keys/[id]', 'storage/keys/[id]/scope'] },
16
29
  { name: 'jobs', aliases: ['cron'], product: 'jobs', summary: 'Cron / scheduled jobs', subs: ['ls', 'create', 'update', 'rm', 'trigger', 'runs'], endpoints: ['jobs', 'jobs/[id]', 'jobs/[id]/runs', 'jobs/[id]/trigger'] },
17
30
  { name: 'events', aliases: ['activity'], product: 'observability', summary: 'Events and metrics', subs: ['ls', 'metrics'], endpoints: ['events', 'metrics'] },
18
31
  { name: 'links', aliases: ['link'], product: 'links', summary: 'Short links + QR (create, retarget, retire)', subs: ['ls', 'create', 'update', 'rm'], endpoints: ['links', 'links/[id]'] },
@@ -20,35 +33,36 @@ export const CLI_COMMANDS = [
20
33
  { name: 'alarms', product: 'observability', summary: 'Metric alarms', subs: ['ls', 'create', 'rm'], endpoints: ['alarms', 'alarms/[id]'] },
21
34
  { name: 'anomalies', aliases: ['anomaly'], product: 'observability', summary: 'Anomaly detection (statistical >Nσ spike alerts on cost/usage — no fixed threshold)', subs: ['ls', 'create', 'rm'], endpoints: ['anomalies', 'anomalies/[id]'] },
22
35
  { name: 'tokens', aliases: ['token', 'keys'], summary: 'API tokens (mint scoped/expiring tokens by API — AI-native; no scope escalation)', subs: ['ls', 'create', 'rm'], endpoints: ['tokens', 'tokens/[id]'] },
23
- { name: 'notifications', aliases: ['notify'], summary: 'Notification preferences (which alert categories you get by email: alarms/anomalies/spend/jobs/heartbeats/checks)', subs: ['ls', 'set'], endpoints: ['notifications/preferences'] },
36
+ { name: 'notifications', aliases: ['notify'], summary: 'Notification preferences (which alert categories you get by email: alarms/anomalies/spend/jobs/heartbeats/checks/deploys/maintenance)', subs: ['ls', 'set'], endpoints: ['notifications/preferences'] },
24
37
  { name: 'notices', summary: 'In-app notices (the dashboard bell) and how many support conversations have an unread reply', subs: ['ls', 'read'], endpoints: ['notices', 'notices/read'] },
25
38
  { name: 'support', summary: 'Talk to the koigrid team and read their replies (support/feedback conversations)', subs: ['ls', 'open', 'show', 'reply'], endpoints: ['support', 'support/[id]', 'support/[id]/read', 'support/[id]/messages'] },
26
39
  { name: 'connect', summary: 'Connect: agent credential broker — a grant mints only ephemeral, scope-limited tokens (STS-style)', subs: ['ls', 'grants', 'create', 'update', 'rm', 'token'], endpoints: ['connect/grants', 'connect/grants/[id]', 'connect/token'] },
27
- { name: 'rewards', product: 'rewards', summary: 'Rewards: earn balance for using koigrid + feedback; redeem as infra credit or gift card', subs: ['ls', 'lines', 'referral', 'submit', 'redeem', 'beta'], endpoints: ['rewards', 'rewards/lines', 'rewards/referral', 'rewards/redeem', 'rewards/submissions/[id]/review', 'rewards/beta', 'rewards/beta/apply', 'rewards/beta/feedback', 'rewards/beta/agent-log', 'rewards/beta/wallet', 'rewards/beta/payout', 'rewards/beta/applications', 'rewards/beta/applications/[id]/review', 'rewards/crypto-payouts/[id]/sent'] },
40
+ { name: 'rewards', product: 'rewards', summary: 'Rewards: earn koigrid credit for using koigrid + feedback (credit only, applied to your bill)', subs: ['ls', 'lines', 'referral', 'submit', 'redeem', 'beta'], endpoints: ['rewards', 'rewards/lines', 'rewards/referral', 'rewards/redeem', 'rewards/submissions/[id]/review', 'rewards/beta', 'rewards/beta/apply', 'rewards/beta/feedback', 'rewards/beta/feedback-month', 'rewards/beta/agent-log', 'rewards/beta/wallet', 'rewards/beta/payout', 'rewards/beta/applications', 'rewards/beta/applications/[id]/review', 'rewards/crypto-payouts/[id]/sent'] },
28
41
  { name: 'wp', aliases: ['wordpress'], product: 'wordpress', summary: 'Managed WordPress: hosting accounts (OLS container, unlimited sites) + 1-click install + WP-CLI by API', subs: ['accounts', 'create', 'account', 'rm', 'sites', 'install', 'site', 'uninstall', 'cli', 'backups', 'backup', 'domains', 'domain-add', 'domain-check', 'domain-activate', 'domain-rm'], endpoints: ['wordpress/accounts', 'wordpress/accounts/[id]', 'wordpress/accounts/[id]/sites', 'wordpress/sites/[id]', 'wordpress/sites/[id]/wp-cli', 'wordpress/sites/[id]/backups', 'wordpress/sites/[id]/domains', 'wordpress/domains/[id]'] },
29
42
  { name: 'email', product: 'email', summary: 'Transactional email', subs: ['send', 'messages', 'config'], endpoints: ['email/send', 'email/messages', 'email/config'] },
30
43
  { name: 'checks', aliases: ['check', 'monitoring'], product: 'checks', summary: 'Uptime & synthetic monitoring (URL/API checks + alerts)', subs: ['ls', 'create', 'update', 'rm', 'run', 'runs'], endpoints: ['checks', 'checks/[id]', 'checks/[id]/run', 'checks/[id]/runs'] },
31
44
  { name: 'members', aliases: ['team'], summary: 'Team members & invitations (invite, roles, remove)', subs: ['2fa', 'ls', 'invite', 'role', 'rm', 'revoke'], endpoints: ['members/two-factor', 'members', 'members/[userId]', 'members/invitations/[id]'] },
32
- { name: 'flags', aliases: ['flag'], product: 'flags', summary: 'Feature flags (toggle + rollout + targeting)', subs: ['ls', 'create', 'enable', 'disable', 'rollout', 'target', 'rm', 'eval'], endpoints: ['flags', 'flags/[key]', 'flags/evaluate'] },
45
+ { name: 'flags', aliases: ['flag'], product: 'flags', summary: 'Feature flags (toggle + rollout + targeting + variants)', subs: ['ls', 'create', 'enable', 'disable', 'rollout', 'target', 'variants', 'rm', 'eval'], endpoints: ['flags', 'flags/[key]', 'flags/evaluate'] },
46
+ { name: 'experiments', aliases: ['exp'], product: 'flags', summary: 'A/B experiments on multivariate flags (hypothesis, metric and sample fixed before starting)', subs: ['ls', 'create', 'show', 'edit', 'start', 'stop', 'decide', 'expose', 'convert', 'results', 'rm'], endpoints: ['experiments', 'experiments/[key]', 'experiments/[key]/start', 'experiments/[key]/stop', 'experiments/[key]/decide', 'experiments/[key]/exposures', 'experiments/[key]/conversions', 'experiments/[key]/results'] },
33
47
  { name: 'status', aliases: ['statuspage', 'statuspages'], product: 'status', summary: 'Public status pages (from your Checks) + incidents/maintenance', subs: ['ls', 'create', 'update', 'rm', 'incidents', 'incident', 'resolve'], endpoints: ['status-pages', 'status-pages/[id]', 'status-pages/[id]/incidents', 'status-pages/[id]/incidents/[incidentId]'] },
34
48
  { name: 'heartbeats', aliases: ['heartbeat', 'hb'], product: 'heartbeats', summary: 'Cron monitoring / dead-man’s switch (ping a URL; alert if silent)', subs: ['ls', 'create', 'update', 'rm'], endpoints: ['heartbeats', 'heartbeats/[id]'] },
35
49
  { name: 'config', aliases: ['secrets', 'secret'], product: 'config', summary: 'Project config/secrets (shared, encrypted) — pull it into your app, or run a local process with it injected', subs: ['ls', 'set', 'rm', 'pull', 'run'], endpoints: ['config', 'config/pull', 'config/[key]'] },
36
50
  { name: 'analytics', product: 'analytics', summary: 'Privacy-first web analytics (no cookies)', subs: ['sites', 'create', 'stats', 'rm'], endpoints: ['analytics/sites', 'analytics/sites/[id]', 'analytics/sites/[id]/stats'] },
37
51
  { name: 'errors', aliases: ['error'], product: 'errors', summary: 'Error tracking (capture exceptions, group by fingerprint)', subs: ['ls', 'token', 'resolve', 'reopen', 'rm'], endpoints: ['errors', 'errors/groups/[id]'] },
38
52
  { name: 'speed', aliases: ['vitals'], product: 'speed-insights', summary: 'Speed Insights (Core Web Vitals: LCP/CLS/FCP/TTFB)', subs: ['ls'], endpoints: ['speed-insights', 'speed-insights/[id]'] },
39
- { name: 'sandboxes', aliases: ['sandbox', 'sb'], product: 'sandboxes', summary: 'Ephemeral compute — run an image+command once, get the output', subs: ['run', 'ls', 'get'], endpoints: ['sandboxes', 'sandboxes/[id]'] },
53
+ { name: 'sandboxes', aliases: ['sandbox', 'sb'], product: 'sandboxes', summary: 'Ephemeral runs (image+command once) and persistent agent VMs (sandboxes vm …: pause with memory, fork, exec, ssh, environment, VM-scoped tokens)', subs: ['run', 'ls', 'get', 'vm'], endpoints: ['sandboxes', 'sandboxes/[id]', 'sandboxes/vms', 'sandboxes/vms/[id]', 'sandboxes/vms/[id]/exec', 'sandboxes/vms/[id]/pause', 'sandboxes/vms/[id]/resume', 'sandboxes/vms/[id]/stop', 'sandboxes/vms/[id]/start', 'sandboxes/vms/[id]/fork', 'sandboxes/vms/[id]/ssh-keys', 'sandboxes/vms/[id]/environment', 'sandboxes/vms/[id]/tokens', 'sandboxes/vms/[id]/usage', 'sandboxes/vms/limits', 'sandboxes/vms/[id]/snapshots', 'sandboxes/vms/[id]/commands', 'sandboxes/vms/[id]/commands/[cmd]', 'sandboxes/vms/[id]/commands/[cmd]/stream', 'sandboxes/vms/[id]/files', 'sandboxes/vms/[id]/files/content', 'sandboxes/vms/[id]/files/move', 'sandboxes/vms/[id]/files/mkdir', 'sandboxes/vms/[id]/files/chmod', 'sandboxes/vms/[id]/files/replace', 'sandboxes/vms/[id]/files/upload-url', 'sandboxes/vms/[id]/files/upload-complete', 'sandboxes/vms/[id]/files/download-url'] },
40
54
  { name: 'images', aliases: ['image', 'img'], product: 'images', summary: 'Image optimization (resize/re-encode on the fly, allowlisted)', subs: ['config', 'allow', 'usage'], endpoints: ['images/config', 'images/usage'] },
41
55
  { name: 'waf', aliases: ['firewall'], product: 'firewall', summary: 'Firewall/WAF — allow/block rules (IP/country/path…) + evaluate', subs: ['rules', 'add', 'rm', 'evaluate'], endpoints: ['waf/rules', 'waf/rules/[id]', 'waf/evaluate'] },
42
56
  { name: 'webhooks', aliases: ['webhook', 'hooks'], product: 'webhooks', summary: 'Outbound webhooks — platform events → your URL, signed + retried', subs: ['ls', 'create', 'enable', 'disable', 'deliveries', 'rm'], endpoints: ['webhooks', 'webhooks/[id]', 'webhooks/[id]/deliveries'] },
43
57
  { name: 'logs', aliases: ['logdrains', 'log-drains'], product: 'log-drains', summary: 'Log Drains — forward logs to an HTTP/Datadog sink + ingest/query the buffer', subs: ['tail', 'push', 'drains', 'drain-add', 'enable', 'disable', 'drain-rm'], endpoints: ['log-drains', 'log-drains/[id]', 'logs'] },
44
- { name: 'billing', aliases: ['plan'], summary: 'Plan actual, catálogo de planes y el enlace de pago (no cobra: devuelve la URL del proveedor)', subs: ['show', 'upgrade'], endpoints: ['billing', 'billing/checkout-session'] },
58
+ { name: 'billing', aliases: ['plan'], summary: 'Cómo paga la organización (prepago o factura mensual), lo reservado este mes, el monedero prepagado (saldo, recargas, recarga automática, movimientos) y el enlace para guardar una tarjeta', subs: ['show', 'card', 'mode', 'wallet', 'topup', 'auto-topup', 'entries'], endpoints: ['billing', 'billing/checkout-session', 'billing/mode', 'billing/wallet', 'billing/wallet/topup', 'billing/wallet/auto-topup', 'billing/wallet/entries'] },
45
59
  { name: 'spend', aliases: ['budget'], product: 'spend', summary: 'Spend Management — monthly cap + threshold alerts + optional hard stop', subs: ['show', 'set', 'rm'], endpoints: ['spend'] },
46
60
  { name: 'bots', aliases: ['bot'], product: 'bots', summary: 'Bot Management — classify UA + allow/challenge/block + proof-of-work challenge', subs: ['policy', 'set', 'evaluate', 'challenge', 'verify'], endpoints: ['bots/policy', 'bots/evaluate', 'bots/challenge', 'bots/verify'] },
47
61
  { name: 'otel', aliases: ['opentelemetry'], product: 'otel', summary: 'OpenTelemetry export — ship metrics in OTLP to any OTEL backend', subs: ['show', 'set', 'rm'], endpoints: ['otel'] },
48
62
  { name: 'dns', product: 'dns', summary: 'DNS Management (BYO) — connect your zone + CRUD records', subs: ['zones', 'connect', 'disconnect', 'records', 'add', 'update', 'del'], endpoints: ['dns/zones', 'dns/zones/[id]', 'dns/zones/[id]/records', 'dns/zones/[id]/records/[recordId]'] },
49
63
  { name: 'queues', aliases: ['queue', 'sqs'], product: 'queues', summary: 'Queues — durable message queue (SQS-like): send/receive/ack + visibility timeout + dead-letter', subs: ['ls', 'create', 'show', 'update', 'send', 'receive', 'ack', 'rm'], endpoints: ['queues', 'queues/[id]', 'queues/[id]/messages', 'queues/[id]/receive', 'queues/[id]/ack'] },
50
64
  { name: 'workflows', aliases: ['workflow', 'wf'], product: 'workflows', summary: 'Workflows — durable execution (Step-Functions-like): ordered steps + journal + durable sleep + retries', subs: ['ls', 'create', 'rm', 'update', 'start', 'runs', 'run', 'next', 'complete', 'fail', 'sleep'], endpoints: ['workflows', 'workflows/[id]', 'workflows/[id]/runs', 'workflows/[id]/runs/[runId]', 'workflows/[id]/runs/[runId]/next', 'workflows/[id]/runs/[runId]/complete', 'workflows/[id]/runs/[runId]/fail', 'workflows/[id]/runs/[runId]/sleep'] },
51
- { name: 'registry', aliases: ['ecr', 'cr'], product: 'container-registry', summary: 'Container Registry (OCI, ECR-like) — docker push/pull; list repos + tags (digest/size/pushed); CVE scan (Trivy)', subs: ['repos', 'tags', 'rm-tag', 'gc', 'login', 'scan'], endpoints: ['registry/repositories', 'registry/repositories/[name]/tags', 'registry/repositories/[name]/tags/[tag]', 'registry/gc'] },
65
+ { name: 'registry', aliases: ['ecr', 'cr'], product: 'container-registry', summary: 'Container Registry (OCI, ECR-like) — docker push/pull; list repos + tags (digest/size/pushed); CVE scan (Trivy)', subs: ['repos', 'tags', 'rm-tag', 'gc', 'login', 'scan', 'policy'], endpoints: ['registry/repositories', 'registry/repositories/[name]/tags', 'registry/repositories/[name]/policy', 'registry/repositories/[name]/tags/[tag]', 'registry/gc'] },
52
66
  { name: 'audit', aliases: ['audit-log', 'cloudtrail'], product: 'audit', summary: 'Audit Log — who did what (security/config changes), with IP + CSV export (owner/admin only)', subs: ['ls', 'export'], endpoints: ['audit', 'audit/export'] },
53
67
  { name: 'up', aliases: ['apply', 'cutover'], summary: 'Cutover manifest — bring up a WHOLE stack (apps+db+redis, wired by ${{...}}) from koigrid.yaml in one command', subs: [], endpoints: ['manifest'] },
54
68
  { name: 'plan', summary: 'Dry-run a cutover manifest (koigrid.yaml): what would be created/updated, without mutating', subs: [], endpoints: ['manifest/plan'] },
package/dist/registry.js CHANGED
@@ -10,10 +10,12 @@ import { alarms } from './commands/alarms.js';
10
10
  import { links, share } from './commands/links.js';
11
11
  import { usage } from './commands/usage.js';
12
12
  import { changelog } from './commands/changelog.js';
13
+ import { pricing } from './commands/pricing.js';
13
14
  import { projects } from './commands/projects.js';
14
15
  import { checks } from './commands/checks.js';
15
16
  import { members } from './commands/members.js';
16
17
  import { flags } from './commands/flags.js';
18
+ import { experiments } from './commands/experiments.js';
17
19
  import { status } from './commands/status.js';
18
20
  import { heartbeats } from './commands/heartbeats.js';
19
21
  import { config } from './commands/config.js';
@@ -47,5 +49,5 @@ export const HANDLERS = {
47
49
  login: (a) => auth.login(a.flags),
48
50
  logout: () => auth.logout(),
49
51
  whoami: (a) => auth.whoami(!!a.flags.json),
50
- usage, changelog, billing, projects, apps, links, share, db, redis, storage, jobs, events, alarms, email, checks, members, flags, status, heartbeats, config, analytics, errors, speed, sandboxes, images, waf, webhooks, logs, spend, bots, otel, dns, queues, workflows, registry, audit, anomalies, tokens, notifications, notices, support, connect, rewards, up, plan, wp: wordpress,
52
+ usage, changelog, pricing, billing, projects, apps, links, share, db, redis, storage, jobs, events, alarms, email, checks, members, flags, experiments, status, heartbeats, config, analytics, errors, speed, sandboxes, images, waf, webhooks, logs, spend, bots, otel, dns, queues, workflows, registry, audit, anomalies, tokens, notifications, notices, support, connect, rewards, up, plan, wp: wordpress,
51
53
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koigrid",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "koigrid CLI — deploy apps, databases, redis, storage and more from your terminal (or your AI agent).",
5
5
  "bin": {
6
6
  "koigrid": "dist/index.js"
@@ -36,5 +36,9 @@
36
36
  "author": "koigrid",
37
37
  "dependencies": {
38
38
  "yaml": "^2.9.0"
39
+ },
40
+ "devDependencies": {
41
+ "@types/node": "^20.19.43",
42
+ "typescript": "^5.9.3"
39
43
  }
40
44
  }