@wildix/cli
v0.1.7
Published
Wildix CLI — manage SSO and artifacts on the Wildix platform
Maintainers
Keywords
Readme
wildix CLI
A small AWS-CLI-style command-line tool for the Wildix platform. Authorize via browser-based SSO, then upload, download, tag, list and share artifacts hosted on the Wildix server.
Install
npm install -g @wildix/cli
wildix --help(For local development: npm link from this directory.)
Authentication
# One-time browser-based login (opens your browser)
wildix sso login
# Use an alternate profile / endpoint
wildix --profile staging --endpoint https://staging.wildix.local sso login
# Inspect / clear credentials
wildix sso status
wildix sso logoutCredentials live at ~/.wildix/credentials.json, mode 0600 (per-profile).
Refresh tokens are rotated on every refresh; sessions can be revoked
server-side.
Automation (non-interactive)
CLI runs in non-interactive mode by default — every command works with the
--output json flag for stable machine-readable output. For headless
environments, supply credentials via env var:
# Long-lived API key issued by the server (preferred for CI / Docker jobs)
export WILDIX_API_KEY=wxk_...
wildix artifacts list --output json
# Or a short-lived bearer token
export WILDIX_TOKEN=wat_...WILDIX_TOKEN and WILDIX_API_KEY take precedence over any stored profile.
Artifacts
# Upload (returns 8-char fileId)
wildix artifacts upload ./report.pdf --tag release --tag q2
# Download
wildix artifacts download abCD12eF -o ./out.pdf
wildix artifacts download abCD12eF -o - # to stdout
# Share (default 24h, --public for unauthenticated link)
wildix artifacts share abCD12eF --expires-in 7d
wildix artifacts share abCD12eF --public
# Tag / untag
wildix artifacts mark abCD12eF release q2
wildix artifacts mark abCD12eF q2 --remove
# List, optionally filtered by tag (AND-matched)
wildix artifacts list
wildix artifacts list --tag release --output jsonConfiguration
Resolution order (highest to lowest):
--profile,--endpoint,--outputflagsWILDIX_PROFILE,WILDIX_ENDPOINT,WILDIX_TOKEN,WILDIX_API_KEY,WILDIX_CONFIG_DIRenv vars~/.wildix/config.json(per-profile)- Built-in defaults (
endpoint=http://127.0.0.1:3000,profile=default)
Security notes
- Credentials are written atomically with mode 0600 in a 0700 directory.
- Browser SSO uses PKCE — the verifier never leaves the CLI, only its SHA-256 challenge.
- The browser callback only accepts
http://127.0.0.1:<port>/callback; any other redirect target is rejected by the server. stateis verified on the loopback callback to prevent CSRF.- Access tokens have a short TTL (1h default); refresh tokens are rotated on every refresh.
Layout
src/
bin/wildix.js # entry point (shebang)
index.js # commander setup + global flags
commands/
sso.js # login / logout / status
artifacts/
index.js
upload.js
download.js
share.js
mark.js
list.js
lib/
config.js # ~/.wildix/{config,credentials}.json (mode 0600)
auth.js # token resolution + refresh
api.js # authenticated HTTP wrapper
output.js # text/json formatter