Documentation
¶
Overview ¶
Command levelrail-cli is a thin, scriptable HTTP client for the control plane's versioned API (internal/api, mounted at /api/v1), the first command-line surface this project has (cmd/levelrail is the control plane server, cmd/levelrail-agent is the node agent, neither is meant to be typed at by an operator).
It is designed the way this platform's own API is meant to be: "AI-ready" from the start. Concretely, per the competitive research direction this command was built against (flyctl launch, railway up, vercel):
- Every required input has a flag. Supplying all of them skips every prompt, so a missing required flag is reported as an immediate, actionable error rather than a hang on stdin: safe to drive from CI or an agent with no TTY at all. "apps create --interactive" is the one deliberate exception, a step-by-step wizard for a human at a real terminal (see apps_create_interactive.go).
- --json switches every command's stdout to a single parseable JSON value (the result, or {"error": "..."} on failure) and nothing else; diagnostics always go to stderr, in both modes. --output json|table|text is the more general form --json is shorthand for (--json means --output json); --query takes a JMESPath expression and filters the result before it's printed, in any of the three formats, e.g. `apps list --query "[?node_id=='node-1'].name"`.
- Exit codes are real and distinct (see output.go's exitOK/ exitUsage/exitValidation/exitNetwork/exitAPIError), not just 0/1, so a caller can branch on *why* a call failed.
No product name is hardcoded anywhere in this command: "prog" (the string every usage message is built from) always comes from filepath.Base(os.Args[0]), matching this project's standing rule that a CLI's command name comes from os.Args[0], not a literal, and APP_API_TOKEN/APP_API_URL follow this project's existing APP_* env-var-prefix convention (see internal/brand's own envPrefix), not a name-specific one.
Source Files
¶
- app_volume_backups.go
- app_volume_backups_list.go
- app_volume_backups_restore.go
- app_volume_backups_restore_as_new.go
- app_volume_backups_schedule.go
- app_volume_backups_trigger.go
- app_volume_backups_verifications.go
- app_volume_backups_verify.go
- apps.go
- apps_alerts.go
- apps_create.go
- apps_create_interactive.go
- apps_delete.go
- apps_deploy.go
- apps_deploy_compose.go
- apps_deploy_spec.go
- apps_deploys.go
- apps_diagnose.go
- apps_environments.go
- apps_exec.go
- apps_get.go
- apps_git_source.go
- apps_group.go
- apps_hook_runs.go
- apps_list.go
- apps_log_drain.go
- apps_logs.go
- apps_network.go
- apps_organizations.go
- apps_previews.go
- apps_projects.go
- apps_promote.go
- apps_resource_recommendation.go
- apps_restart.go
- apps_rollback.go
- apps_scheduled_tasks.go
- apps_secrets.go
- apps_set_environment.go
- apps_set_project.go
- apps_start.go
- apps_status.go
- apps_stop.go
- apps_webhook_deliveries.go
- audit_log.go
- audit_purge.go
- auth.go
- auth_login.go
- auth_login_device.go
- auth_whoami.go
- authclient.go
- authprompt.go
- backup_targets.go
- backup_targets_create.go
- backup_targets_delete.go
- backup_targets_get.go
- backup_targets_list.go
- backup_targets_testcmd.go
- backup_targets_update.go
- backups.go
- backups_list.go
- backups_restore.go
- backups_restore_as_new.go
- backups_schedule.go
- backups_trigger.go
- backups_verifications.go
- backups_verify.go
- caprover_client.go
- caprover_map.go
- channels.go
- channels_client.go
- channels_create.go
- channels_delete.go
- channels_deliveries.go
- channels_list.go
- channels_testcmd.go
- client.go
- cloudflare_tunnel.go
- completion.go
- completion_bash.go
- completion_fish.go
- completion_zsh.go
- config.go
- containers.go
- coolify_apply.go
- coolify_client.go
- coolify_files.go
- coolify_map.go
- coolify_report.go
- coolify_yaml.go
- databases.go
- databases_create.go
- databases_create_interactive.go
- databases_delete.go
- databases_get.go
- databases_list.go
- databases_resource_recommendation.go
- databases_set_project.go
- doctor.go
- dokploy_client.go
- dokploy_map.go
- domains.go
- domains_basic_auth.go
- domains_cloudflare_dns.go
- domains_list.go
- domains_maintenance.go
- domains_tls_cert.go
- flags.go
- flagutil.go
- gitdetect.go
- iam.go
- iam_policies.go
- invites.go
- invites_create.go
- invites_list.go
- invites_revoke.go
- main.go
- migrate.go
- migrate_caprover.go
- migrate_coolify.go
- migrate_dokploy.go
- nodes.go
- nodes_cordon.go
- nodes_delete.go
- nodes_drain.go
- nodes_get.go
- nodes_health.go
- nodes_join_token.go
- nodes_list.go
- nodes_patch_status.go
- nodes_workloads.go
- output.go
- profile.go
- protected_environment_confirm.go
- provider_http.go
- registry.go
- registry_credentials.go
- registry_credentials_create.go
- registry_credentials_delete.go
- registry_credentials_get.go
- registry_credentials_list.go
- registry_credentials_testcmd.go
- registry_credentials_update.go
- secrets.go
- status.go
- tokens.go
- tokens_create.go
- tokens_list.go
- tokens_revoke.go
- users.go
- users_create.go
- users_delete.go
- users_list.go
- users_roles.go
- users_set_abilities.go
- version.go