K

데이터베이스 · 환경변수

앱 전용 DB 조회(tables db-list · db-rows)와 환경변수(env) 관련 명령

앱 전용 DB에 어떤 테이블 · 행이 들어 있는지 터미널에서 바로 확인하거나, 앱 환경변수를 넣고 빼야 할 때 이 페이지를 봐요. 앱 전용 데이터베이스는 axhub.yamldatabase.engine: postgres 선언(또는 axhub apps raw-db)으로 켜요. 데이터 읽기 · 쓰기는 앱 런타임에 주입되는 DATABASE_URL로 하고, CLI의 tables 명령은 읽기 전용 조회만 해요. DB를 켜는 것부터 마이그레이션까지의 흐름은 데이터베이스 연결하기에서 다뤄요.

axhub tables db-list

앱 전용 데이터베이스의 테이블 목록을 봐요 (OAuth 필요).

플래그타입설명기본값
--appstringApp slug or id to inspect
--environmentstringRead production or staging raw DB metadata

axhub tables db-rows

앱 전용 데이터베이스 테이블의 행을 봐요 (OAuth 필요).

플래그타입설명기본값
<table>string (인자)Raw database table name to browse
--appstringApp slug or id to inspect
--environmentstringRead production or staging raw DB rows
--pageintegerPage number to request
--per-pageintegerNumber 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.
--appstringApp slug or ID to operate on.
--dry-runbooleanPreview the operation without applying state changes.true
--executebooleanApply the state-changing operation instead of previewing it.

axhub env get

환경변수를 조회해요.

플래그타입설명기본값
<key>string (인자)Environment variable key.
--appstringApp slug or ID to operate on.

axhub env list

환경변수 목록을 봐요.

플래그타입설명기본값
--appstringApp slug or ID to operate on.

axhub env set

환경변수를 설정해요.

플래그타입설명기본값
<key>string (인자)Environment variable key.
<value>string (인자)Environment variable value.
--appstringApp slug or ID to operate on.
--from-stdinbooleanRead the value from standard input.
--plainbooleanMark the value as plain. Mutually exclusive with --secret
--secretbooleanMark 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
--stagestringStage where this variable is available: build, runtime, or both

axhub env set-staging-value

환경변수의 스테이징 전용 값을 설정해요.

플래그타입설명기본값
<key>string (인자)Environment variable key.
<value>string (인자)Environment variable value.
--appstringApp slug or ID to operate on.
--dry-runbooleanPreview the operation without applying state changes.true
--executebooleanApply the state-changing operation instead of previewing it.
--from-stdinbooleanRead 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
--appstringApp slug or ID to operate on.
--from-stdinbooleanRead 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
--plainbooleanMark as plain on update
--secretbooleanMark as secret on update
--stagestringStage where this variable is available: build, runtime, or both

DB를 켠 앱에서 DATABASE_URL · DIRECT_DATABASE_URL, 스토리지를 켠 앱에서 STORAGE_*는 플랫폼이 주입하는 값이 항상 이겨요 — 같은 이름으로 저장해도 무시돼요.