appliku について
Appliku は、Appliku PaaS 上のアプリケーションやインフラを管理する CLI と Python SDK を提供します。デプロイ関連リソース、設定、チーム運用を扱えます。
主な機能
- 01チームとアプリケーションの管理
- 02GitHub、GitLab、Git からアプリを作成
- 03デプロイとログの確認
- 04ドメイン、データストア、ボリューム、cron ジョブの管理
- 05環境変数の設定
- 06CLI または Python SDK の利用
活用シーン
- 01アプリ一覧と最新デプロイの確認
- 02アプリ設定の変更とデプロイまたは再起動
- 03ドメイン作成と DNS レコードの確認
- 04データストアと定期ジョブの管理
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ appliku/ skill --skill applikuインストール後、Claude Code で/applikuを入力して読み込まれたか確認します。
同梱ファイルREADME.mddocs/reference.md
詳細
Appliku CLI & SDK リファレンス
Appliku は PaaS プラットフォームです。appliku パッケージには、CLI と Python SDK の両方が用意されています。
インストール
1. uv の確認
uv --version
コマンドが見つからない場合は、まず uv をインストールします。
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows PowerShell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
インストール後、uv が $PATH に含まれるように、シェルを再起動するかプロファイルを読み込みます。
2. appliku CLI の確認
appliku --version
見つからない場合は、uv ツールとしてインストールします。
uv tool install appliku
次に、動作を確認します。
appliku --help
SDK(Python プロジェクト内)
uv add appliku
# or
pip install appliku
Python 3.10 以降が必要です。
認証
トークンの解決順序(最初に一致したものが使用されます):
- 明示的な指定:
Appliku(token="...") - 環境変数:
APPLIKU_TOKEN=... - 設定ファイル:
~/.config/appliku/config.toml→[auth] token = "..."
非対話型環境/CI 環境の場合
export APPLIKU_TOKEN=your_api_token
対話型ログイン(ブラウザーのデバイスフロー)
appliku login # opens browser to authorize
appliku login --token TOKEN # direct token login (non-interactive)
appliku logout
appliku whoami
主な概念
- team_path:チームを識別するスラッグです(例:
my-team)。ほとんどのコマンドで必須です。 - app id:アプリケーションの数値 ID です。
appliku apps list --team my-team --output jsonで確認できます。 - resource id:ドメイン、データストア、ボリューム、cron などの数値 ID です。
- ほとんどの一覧表示コマンドは、機械可読な出力を得るために
--output jsonをサポートしています。
CLI コマンドリファレンス
teams
appliku teams list
appliku teams get <team_path>
teams get はメンバーシップのレベルにかかわらず同じフィールドを返しますが、読み取り権限のない値は null になります。管理者には請求関連フィールド(paddle_*)、can_invite_members、name_picked が null として表示されます。開発者にはさらに、デプロイキー(public_key、public_key_ed25519)と通知用 Webhook URL も null として表示されます。つまり、null は「未設定」または「閲覧不可」のどちらかを意味します。請求関連の値については、チームにサブスクリプションがないと判断する前に、オーナーとして確認してください。CLI 0.5.0 以降が必要です。古いバージョンでは、オーナー以外が実行するとクラッシュしていました。
apps
appliku apps list --team <team_path>
appliku apps list --team <team_path> --output json
# Create from GitHub or GitLab. Use exactly one positive target ID.
appliku apps create github owner/repository -t <team_path> -n myapp -b main --server <id>
appliku apps create gitlab group/repository -t <team_path> -n myapp -b main --cluster <id>
# Create from custom Git. A URL file can contain HTTPS credentials.
appliku apps create custom -t <team_path> -n myapp -b main --server <id> \
--git-url-file <path-or-> [--private-key-file <path>]
# Trigger a deployment
appliku apps deploy --team <team_path> --app <id>
# Restart WITHOUT a build: same running image, current env vars and process
# settings. No new code, no build, no release command. Build-time variables
# (NEXT_PUBLIC_*, anything the build command reads) keep their old values ->
# use `apps deploy` for those. Needs the backend with the restart endpoint; the
# first restart needs one full deploy made with it. Not for static sites.
appliku apps restart --team <team_path> --app <id>
appliku apps restart --team <team_path> --app <id> --check # possible? exit 1 + reason if not
# Config vars: see the `config` group below. `apps delete-config-var` is
# DEPRECATED — use `appliku config unset KEY` instead.
# Application logs — one command, any deployment mode, one or more processes.
# With no --process it returns logs for ALL of the app's processes.
appliku apps logs --team <team_path> --app <id>
appliku apps logs --team <team_path> --app <id> --process web
appliku apps logs --team <team_path> --app <id> --process web --process celery --tail 200
# service-logs is DEPRECATED — use `apps logs -p <service>` instead.
# Nginx / load balancer logs
appliku apps nginx-logs --team <team_path> --app <id> --domain example.com --tail 100
appliku apps load-balancer-logs --team <team_path> --app <id> --domain example.com --tail 100
各作成コマンドでは、--static-site と --output table|json を指定できます。カスタム Git では位置引数としてパブリック URL も指定できますが、位置引数の URL または --git-url-file のどちらか一方を必ず指定してください。認証情報を含む URL には、ファイルまたは標準入力(--git-url-file -)を使用してください。プライベートキーを指定できるのは --private-key-file 経由のみです。出力には安全なアプリケーションのフィールドのみが含まれ、これらのシークレットは含まれません。
作成を開始すると、非同期で初期の appliku.yml 検査が始まります。アプリケーションはデプロイされません。セットアップが完了したら、別途デプロイしてください。
対象は準備完了状態である必要があります。 セットアップが完了していないサーバーまたはクラスターは、HTTP 400 で拒否されます。どちらの一覧表示コマンドも ready 列を返すため、ID を推測するのではなく、そこから対象を選択してください。
appliku servers list --team <team_path> # Ready column
appliku clusters list --team <team_path> # Ready column
appliku servers list --team <team_path> --output json | jq '[.[] | select(.ready)]'
サーバーは、アクティブでセットアップが完了している場合に準備完了となります。クラスターは、プライマリマネージャーが準備完了状態であれば準備完了となります。プライマリマネージャーのないクラスターでは、アプリケーションを実行できません。準備完了の対象がない場合は、セットアップが完了するまで待ってください。すぐに作成を再試行しても、同じ 400 が返されます。
config
Heroku スタイルの環境変数(heroku config/config:get/config:set/config:unset)。
appliku config list --team <team_path> --app <id> # table: name, value, source, mode
appliku config list --team <team_path> --app <id> --output json # {"NAME": "value", ...}
appliku config list --team <team_path> --app <id> --output shell # NAME='value' (POSIX shell, not dotenv)
appliku config get KEY --team <team_path> --app <id> # value only; exit 1 if not set
appliku config set A=1 B=2 --team <team_path> --app <id> # merges; split on first '='
appliku config set A=1 --team <team_path> --app <id> --deploy # save, then start a full deployment
appliku config set A=1 --team <team_path> --app <id> --restart # save, then restart WITHOUT a build
appliku config unset A B --team <team_path> --app <id> # missing names: warning, exit 0
- 変更は次回のデプロイまたは再起動時に反映されます。保存時に再起動は行われません。
--deploy= フルビルド、--restart= ビルドなしで実行時の値のみを反映(NEXT_PUBLIC_* のようなビルド時変数には古い値が残るため、それらには--deployを使用してください)。この2つのフラグは併用できません。また、何も書き込まれなかった場合は、どちらも実行されません。保存されたものの開始されなかった場合は、「Config saved, but ...」と表示して終了コード1で終了します(書き込みを再試行しないでください)。 setはKEY=(空の値は Appliku で削除されます。unsetを使用してください)、同じ名前の重複指定、先頭または末尾に空白がある値を拒否します。appliku.ymlで定義された変数は、ここでは設定も解除もできません。データベースまたはドメインにリンクされた変数を静的な値に置き換えるには、--replace-linksが必要です。set/unsetは API の応答を検証し、適用されなかったキーを示して終了コード1で終了します。書き込み前のチェックは参考情報です。チェック後、書き込み前に変数がデータベースにリンクされても、警告なしで置き換えられます。set/unsetにはenv_varsの読み取りと更新が可能なトークンが必要です。--deploy/--restartには、さらにdeploymentsの作成権限も必要です。
deployments
appliku deployments list --team <team_path> --app <id>
appliku deployments latest --team <team_path> --app <id>
appliku deployments logs --team <team_path> --id <deployment_id>
domains
appliku domains list --team <team_path> --app <id>
appliku domains create --team <team_path> --app <id> --domain example.com
appliku domains delete --team <team_path> --app <id> --id <domain_id>
appliku domains check-dns --team <team_path> --app <id> --domain example.com
datastores
appliku datastores list --team <team_path> --app <id>
appliku datastores start --team <team_path> --app <id> --id <datastore_id>
appliku datastores stop --team <team_path> --app <id> --id <datastore_id>
appliku datastores restart --team <team_path> --app <id> --id <datastore_id>
appliku datastores delete --team <team_path> --app <id> --id <datastore_id>
volumes
appliku volumes list --team <team_path> --app <id>
appliku volumes delete --team <team_path> --app <id> --id <volume_id>
crons
appliku crons list --team <team_path> --app <id>
appliku crons delete --team <team_path> --app <id> --id <cron_id>
clusters
appliku clusters list --team <team_path>
appliku clusters delete --team <team_path> --id <cluster_id>
servers
appliku servers list --team <team_path>
appliku servers get --team <team_path> --id <server_id>
# Hetzner Cloud server provisioning (requires the team to have a stored
# Hetzner Cloud token, configured in the dashboard under Team Settings ->
# Cloud Providers).
appliku servers hetzner-info --team <team_path> --show locations
appliku servers hetzner-info --team <team_path> --show server-types \
--category "ARM" --location nbg1
appliku servers create-hetzner --team <team_path> \
--location nbg1 --server-type cax11 \
[--enable-backups] [--cluster <cluster_id>]
invites
appliku invites list --team <team_path>
appliku invites delete --team <team_path> --id <invite_id>
migrations
appliku migrations list --team <team_path>
appliku migrations logs --team <team_path> --id <migration_id>
ssh-keys
appliku ssh-keys list
appliku ssh-keys add --key "ssh-rsa AAAA... user@host"
appliku ssh-keys add --key "$(cat ~/.ssh/id_ed25519.pub)"
appliku ssh-keys delete --id <key_id>
OpenSSH の公開鍵のみ受け付けます。 値は、鍵の種類(ssh-ed25519、ssh-rsa、ecdsa-sha2-nistp256 など)で始まり、その後に base64 形式の鍵データが続く1行である必要があります。後続のコメントは保持されます。それ以外はすべて HTTP 400 で拒否されます。
.pub ファイルを送信してください。秘密鍵は絶対に送信しないでください。以下は誤って貼り付けられることがよくありますが、いずれも拒否されます。
- 秘密鍵(
-----BEGIN ... PRIVATE KEY-----、またはb3BlbnNzaC1rZXktdjEAで始まる base64 文字列) - PuTTY/RFC4716 エクスポート(
---- BEGIN SSH2 PUBLIC KEY ----)— まずssh-keygen -i -f key.pubで変換してください - フィンガープリント(
SHA256:...)、git リモート URL、またはアクセストークン
ダッシュボードに Git 認証情報を保存すると、鍵も自動的にインポートされます。プロバイダーから提供された鍵が有効な OpenSSH 公開鍵でない場合はスキップされ、skipped_public_keys として報告されるとともに、1通のメールにまとめて通知されます。
Python SDK リファレンス
from appliku import Appliku
client = Appliku() # uses APPLIKU_TOKEN or config file
client = Appliku(token="YOUR_TOKEN") # explicit token
apps
client.apps.list("my-team")
client.apps.get("my-team", app_id=42)
client.apps.create_from_github(
"my-team", "owner/repository", name="myapp", branch="main", server=12
)
client.apps.create_from_gitlab(
"my-team", "group/repository", name="myapp", branch="main", cluster=7
)
client.apps.create_from_custom_git(
"my-team",
"[email protected]:team/repository.git",
name="myapp",
branch="main",
server=12,
private_key=private_key_contents,
)
client.apps.update("my-team", app_id=42, branch="develop")
client.apps.delete("my-team", app_id=42)
client.apps.deploy("my-team", app_id=42)
client.apps.restart("my-team", app_id=42) # no build; {success, deployment_id}
client.apps.restart_availability("my-team", app_id=42) # {available, reason, source_number_id}
# Config vars. get returns {"env_vars": [...]}; set takes a flat mapping.
vars = client.apps.get_config_vars("my-team", app_id=42)
# set MERGES: variables not named in the call are left untouched.
client.apps.set_config_vars("my-team", app_id=42, vars={"DEBUG": "false"})
# An empty ("" or None) value DELETES the variable rather than blanking it.
client.apps.set_config_vars("my-team", app_id=42, vars={"DEBUG": ""}) # deletes DEBUG
client.apps.delete_config_var("my-team", app_id=42, key="OLD_VAR") # returns remaining vars
# Logs — get_logs takes a list of processes (None = all), works on any mode.
logs = client.apps.get_logs("my-team", app_id=42) # all processes
logs = client.apps.get_logs("my-team", app_id=42, processes=["web", "celery"], tail=100)
# get_service_logs is a deprecated shim that delegates to get_logs.
logs = client.apps.get_nginx_logs("my-team", app_id=42, domain="example.com", tail=100)
logs = client.apps.get_load_balancer_logs("my-team", app_id=42, domain="example.com", tail=100)
deployments
client.deployments.list("my-team", app_id=42)
client.deployments.get("my-team", app_id=42, deployment_id=1234)
client.deployments.latest("my-team", app_id=42)
client.deployments.logs("my-team", deployment_id=1234)
domains
client.domains.list("my-team", app_id=42)
client.domains.get("my-team", app_id=42, domain_id=7)
client.domains.create("my-team", app_id=42, domain="example.com")
client.domains.delete("my-team", app_id=42, domain_id=7)
result = client.domains.check_dns("my-team", app_id=42, domain="example.com")
datastores
client.datastores.list("my-team", app_id=42)
client.datastores.get("my-team", app_id=42, datastore_id=5)
client.datastores.create("my-team", app_id=42, name="mydb", kind="postgresql")
client.datastores.start("my-team", app_id=42, datastore_id=5)
client.datastores.stop("my-team", app_id=42, datastore_id=5)
client.datastores.restart("my-team", app_id=42, datastore_id=5)
client.datastores.delete("my-team", app_id=42, datastore_id=5)
volumes
client.volumes.list("my-team", app_id=42)
client.volumes.create("my-team", app_id=42, name="uploads", mount_path="/app/uploads")
client.volumes.update("my-team", app_id=42, volume_id=3, mount_path="/app/media")
client.volumes.delete("my-team", app_id=42, volume_id=3)
cron_jobs
client.cron_jobs.list("my-team", app_id=42)
client.cron_jobs.create("my-team", app_id=42, schedule="0 * * * *", command="python manage.py clearsessions")
client.cron_jobs.update("my-team", app_id=42, cron_id=8, schedule="30 2 * * *")
client.cron_jobs.delete("my-team", app_id=42, cron_id=8)
clusters
client.clusters.list("my-team")
client.clusters.get("my-team", cluster_id=2)
client.clusters.create("my-team", name="prod-cluster")
client.clusters.delete("my-team", cluster_id=2)
servers
client.servers.list("my-team")
client.servers.get("my-team", server_id=10)
# Hetzner Cloud provisioning. Requires the team to have a stored Hetzner Cloud
# token. Server types and locations are pulled live from Hetzner.
info = client.servers.get_hetzner_cloud_info("my-team")
client.servers.create_hetzner_cloud(
"my-team",
location="nbg1",
server_type="cax11",
hetzner_backups_enabled=False,
cluster=None,
)
invites
client.invites.list("my-team")
client.invites.create("my-team", email="[email protected]")
client.invites.delete("my-team", invite_id=4)
migrations
client.migrations.list("my-team")
client.migrations.run("my-team", app_id=42, command="python manage.py migrate")
client.migrations.logs("my-team", migration_id=99)
public_keys
client.public_keys.list()
client.public_keys.create("ssh-rsa AAAA... user@host")
client.public_keys.delete(key_id=12)
エラー処理(SDK)
from appliku import (
Appliku,
AuthenticationError,
AuthorizationError,
NotFoundError,
ValidationError,
RateLimitError,
ServerError,
)
client = Appliku()
try:
client.teams.get("missing-team")
except AuthenticationError:
print("Invalid or missing token")
except NotFoundError as exc:
print(exc)
| 例外 | HTTP ステータス |
|---|---|
AuthenticationError | 401 |
AuthorizationError | 403 |
NotFoundError | 404 |
ValidationError | 400 |
RateLimitError | 429 |
ServerError | 5xx |
よくあるワークフロー
アプリを探して最新のデプロイを確認する
appliku teams list
appliku apps list --team my-team --output json # grab the numeric app id
appliku deployments latest --team my-team --app 42
appliku deployments logs --team my-team --id <deployment_id>
アプリケーションログを追跡する
# All processes (default when no --process is given)
appliku apps logs --team my-team --app 42 --tail 200
# Specific processes
appliku apps logs --team my-team --app 42 --process web --process celery --tail 200
カスタムドメインを追加して DNS を確認する
appliku domains create --team my-team --app 42 --domain example.com
appliku domains check-dns --team my-team --app 42 --domain example.com
データストアを再起動する
appliku datastores list --team my-team --app 42 # get the datastore id
appliku datastores restart --team my-team --app 42 --id 5
注意点
- 作成してもデプロイされません:アプリケーションの作成では、初期設定の検査のみが開始されます。セットアップが完了した後、別のコマンドでデプロイしてください。
- ログコマンドは
apps logsのみです:サーバーモードとクラスター・モードの両方のアプリで動作し、1つ以上のプロセスのログを返します。リクエストを POST してから、ログの準備ができるまでポーリングします。(apps service-logsはapps logs -p <service>の非推奨エイリアスとして引き続き利用できます。) --processは複数回指定でき、省略も可能です:複数のプロセスを指定するには、複数回指定します(--process web --process celery)。省略すると、アプリのすべてのプロセスのログを取得します。- 機械可読な出力:ID をプログラムで解析する必要がある場合は、任意の一覧コマンドに
--output jsonを追加します。 - CI での
APPLIKU_TOKEN:自動化された環境で対話形式のログインを避けるには、この環境変数を設定してください。