@zakasalaheddine/lincx-cli
v0.0.11
Published
Lincx platform CLI — manage networks, zones, templates, creatives, and campaigns from the command line
Readme
Lincx CLI
Lincx platform CLI — manage networks, zones, templates, creatives, and campaigns from the command line.
Deploy & run
Prerequisites
- Node.js ≥ 18
Install
- From npm (when published):
npm install -g lincx - From source: clone the repo, then:
Run viacd lincx-cli && npm install && npm run buildnode ./bin/run.js <command>ornpm run dev -- <command>. Optionallynpm linkfor a globallincxon your machine.
Configuration and secrets
The CLI does not use API keys in the environment. Auth is done via lincx auth login; the CLI stores a session at ~/.config/lincx/session.json. Do not commit this file — it contains your auth token.
Optional environment variables (for custom backends or local dev):
| Variable | Default | Purpose |
| --------------- | ------------------------ | ------------------------- |
| LINCX_API_URL | https://api.lincx.com | Platform API base URL |
| LINCX_ID_URL | https://ix-id.lincx.la | Identity (login) base URL |
Secrets in practice:
- Local use: Only your Lincx account email and password (entered at
lincx auth login). No need to set any env for production. - CI / run in your repos: Use one of:
- Option A — Non-interactive login with secrets: pass
--emailand--password(e.g. from GitHub Actions secrets or CI env). Session file will be created under the runner’s home directory. - Option B — Pre-create the session file from a secret token: write
~/.config/lincx/session.jsonwith{"authToken":"<token>","email":"..."}(and optionallyactiveNetworkId/activeNetworkName). The token must be obtained outside the CLI (e.g. from your auth system or a long-lived token).
- Option A — Non-interactive login with secrets: pass
Store credentials in your platform’s secret store (e.g. GitHub Actions secrets, CI env) and never commit them.
First-time setup (local)
- Install the CLI (see above).
- Log in:
lincx auth login(orlincx auth login --email [email protected] --password '...'). - If needed, set active network:
lincx networks switch <networkId>(required for most resource commands). - Run commands, e.g.
lincx zones list.
Running in CI or in your repos
- Ensure Node ≥ 18 and the CLI is installed (from npm or from the repo).
- Auth: Either run
lincx auth login --email "$LINCX_EMAIL" --password "$LINCX_PASSWORD"using secrets, or create~/.config/lincx/session.jsonfrom a secret token (setHOMEor the session path if the runner uses a different home). - Network: If the workflow needs a specific network, run
lincx networks switch <networkId>after login, or includeactiveNetworkIdin the pre-created session file.
The table of contents and command list below are auto-generated by oclif readme.
Usage
$ npm install -g lincx
$ lincx COMMAND
running command...
$ lincx (--version)
lincx/0.0.0 darwin-arm64 node-v22.13.1
$ lincx --help [COMMAND]
USAGE
$ lincx COMMAND
...Commands
[lincx help [COMMAND]](#lincx-help-command)
lincx help [COMMAND]
Display help for lincx.
USAGE
$ lincx help [COMMAND...] [-n]
ARGUMENTS
[COMMAND...] Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for lincx.See code: @oclif/plugin-help
