@appritech/ep-cli
v0.1.1
Published
CLI for Easypanel, driven by the target instance's live OpenAPI spec
Readme
ep
A CLI for Easypanel, generated at runtime from the target
instance's own /api/openapi.json — so it always matches whatever version of
Easypanel you're actually running, instead of a frozen snapshot of one instance.
Install
npm install -g @appritech/ep-cliRequires Node >=16.20.0. This installs the ep command globally.
From source
npm install
npm run build
npm link # makes the `ep` command available globallyGetting started
ep login --host https://panel.example.com
# prompts for your API token (find it in the Easypanel dashboard),
# then fetches and caches that instance's API specEvery command below is generated from that spec, so what's available depends on
your instance's version. Explore with --help:
ep --help
ep projects --help
ep services app create-service --helpep whoami # verify the current token against the instance
ep logout # clear the stored token (keeps the host, for easy re-login)Multiple instances
ep login --profile work --host https://work.example.com
ep profile list
ep profile use work
ep --profile work projects list-projects # per-invocation override--host/--token/--profile can also come from EP_HOST/EP_TOKEN/EP_PROFILE
env vars.
TLS certificates
If ep login/ep spec sync can't verify the instance's TLS certificate (common
for self-signed or internal-CA setups), you'll be prompted to disable verification
for that profile — this makes the connection vulnerable to MITM attacks, so only
accept it for hosts you trust:
ep profile tls insecure [profile] # disable verification (defaults to the active profile)
ep profile tls secure [profile] # re-enable it--insecure (or EP_INSECURE_TLS=1) overrides this per-invocation without
changing the stored profile.
Passing complex fields
Simple fields become flags (--project-name foo). Nested/array fields (e.g.
services app create-service's build, domains, mounts, source) don't get
individual flags — pass them as JSON instead:
ep services app create-service --project-name foo --service-name bar \
--data '{"source": {"type": "image", "image": "nginx:latest"}}'
# or from a file / stdin
ep services app create-service --data-file service.json
cat service.json | ep services app create-service --project-name foo --service-name barScalar flags always override matching keys from --data/--data-file/stdin.
Keeping the spec fresh
ep spec sync # re-fetch the current profile's spec
ep spec sync --profile workOther flags
--raw— compact single-line JSON output (for piping intojq)--verbose— print the outgoing request before sending it
