데이터베이스 · 환경변수
앱 전용 DB 조회(tables db-list · db-rows)와 환경변수(env) 관련 명령
앱 전용 DB에 어떤 테이블 · 행이 들어 있는지 터미널에서 바로 확인하거나, 앱 환경변수를 넣고 빼야 할 때 이 페이지를 봐요. 앱 전용 데이터베이스는 axhub.yaml의 database.engine: postgres 선언(또는 axhub apps raw-db)으로 켜요. 데이터 읽기 · 쓰기는 앱 런타임에 주입되는 DATABASE_URL로 하고, CLI의 tables 명령은 읽기 전용 조회만 해요. DB를 켜는 것부터 마이그레이션까지의 흐름은 데이터베이스 연결하기에서 다뤄요.
axhub tables db-list
앱 전용 데이터베이스의 테이블 목록을 봐요 (OAuth 필요).
| 플래그 | 타입 | 설명 | 기본값 |
|---|---|---|---|
--app | string | App slug or id to inspect | — |
--environment | string | Read production or staging raw DB metadata | — |
axhub tables db-rows
앱 전용 데이터베이스 테이블의 행을 봐요 (OAuth 필요).
| 플래그 | 타입 | 설명 | 기본값 |
|---|---|---|---|
<table> | string (인자) | Raw database table name to browse | — |
--app | string | App slug or id to inspect | — |
--environment | string | Read production or staging raw DB rows | — |
--page | integer | Page number to request | — |
--per-page | integer | Number of rows per page | — |
DB 켜기 · 끄기는 axhub apps raw-db enable · disable에 있어요. 테이블 생성 · 행 쓰기는 CLI가 아니라 앱의 마이그레이션 도구와 DATABASE_URL로 해요.
앱의 리소스 열람 정책이 owners_only · locked로 잠겨 있으면 DB 행 · 스토리지 파일 · 환경변수 값 조회가 관리자에게도 403 resource_browse_restricted로 거부될 수 있어요.
axhub env
앱 환경변수를 관리해요.
axhub env delete
환경변수를 삭제해요.
| 플래그 | 타입 | 설명 | 기본값 |
|---|---|---|---|
<key> | string (인자) | Environment variable key. | — |
--app | string | App slug or ID to operate on. | — |
--dry-run | boolean | Preview the operation without applying state changes. | true |
--execute | boolean | Apply the state-changing operation instead of previewing it. | — |
axhub env get
환경변수를 조회해요.
| 플래그 | 타입 | 설명 | 기본값 |
|---|---|---|---|
<key> | string (인자) | Environment variable key. | — |
--app | string | App slug or ID to operate on. | — |
axhub env list
환경변수 목록을 봐요.
| 플래그 | 타입 | 설명 | 기본값 |
|---|---|---|---|
--app | string | App slug or ID to operate on. | — |
axhub env set
환경변수를 설정해요.
| 플래그 | 타입 | 설명 | 기본값 |
|---|---|---|---|
<key> | string (인자) | Environment variable key. | — |
<value> | string (인자) | Environment variable value. | — |
--app | string | App slug or ID to operate on. | — |
--from-stdin | boolean | Read the value from standard input. | — |
--plain | boolean | Mark the value as plain. Mutually exclusive with --secret | — |
--secret | boolean | Mark the value as a secret. Backend masks it on read (value=***) and encrypts at rest. When set, value positional arg is disallowed; use --from-stdin instead | — |
--stage | string | Stage where this variable is available: build, runtime, or both | — |
axhub env set-staging-value
환경변수의 스테이징 전용 값을 설정해요.
| 플래그 | 타입 | 설명 | 기본값 |
|---|---|---|---|
<key> | string (인자) | Environment variable key. | — |
<value> | string (인자) | Environment variable value. | — |
--app | string | App slug or ID to operate on. | — |
--dry-run | boolean | Preview the operation without applying state changes. | true |
--execute | boolean | Apply the state-changing operation instead of previewing it. | — |
--from-stdin | boolean | Read the value from standard input. | — |
axhub env update
환경변수를 수정해요.
| 플래그 | 타입 | 설명 | 기본값 |
|---|---|---|---|
<key> | string (인자) | Env var key to update. Must already exist (otherwise ExitCode 5) | — |
<value> | string (인자) | New value, positional. Mirrors env set KEY VALUE so the two commands share a single argument shape. live-QA Gap C/E showed users hitting unexpected argument 'VALUE' because the only way to pass a value was the --value flag. --value stays as a backward-compatible alias (handler prefers positional when both are passed); pass through stdin with --from-stdin | — |
--app | string | App slug or ID to operate on. | — |
--from-stdin | boolean | Read the new value from stdin. Mutually exclusive with both positional value and the legacy --value flag — passing more than one input shape is a usage error | — |
--plain | boolean | Mark as plain on update | — |
--secret | boolean | Mark as secret on update | — |
--stage | string | Stage where this variable is available: build, runtime, or both | — |
DB를 켠 앱에서 DATABASE_URL · DIRECT_DATABASE_URL, 스토리지를 켠 앱에서 STORAGE_*는 플랫폼이 주입하는 값이 항상 이겨요 — 같은 이름으로 저장해도 무시돼요.