@logicpanel/lphub
v0.2.0
Published
Thin CLI client for the LogicPanel Hub API — manifest-driven, gh-style.
Maintainers
Readme
@logicpanel/lphub
A thin command-line client for the LogicPanel Hub /api/v1. It authenticates with a
Personal Access Token (PAT) and forwards requests — the API is the source of truth.
The command tree (commands, options, help) is generated from a server manifest
(GET /api/v1/cli-manifest) and cached locally, so the CLI needs almost no maintenance:
when the API changes, you run lphub sync, not a rebuild.
Install
Requires Node.js >= 18.
# Global install — exposes the `lphub` command
npm i -g @logicpanel/lphub
lphub --help
# …or run it without installing
npx @logicpanel/lphub --helpFrom source (this monorepo)
pnpm install # once — workspace dependencies
pnpm --filter @logicpanel/lphub build # compile → packages/lphub/dist/index.js
cd packages/lphub && pnpm link --global # expose `lphub` globally (symlink to dist/)First-time setup
lphub auth login # prompts for profile name, base URL and PAT token (validates via /auth/me)
lphub sync # downloads the real manifest → ~/.lphub/manifest.json
lphub ticket list # now the real, API-driven commands workUpdating
There are two different updates — don't confuse them:
| What changed | What to run |
| --- | --- |
| The API (new endpoint, field or filter) | lphub sync — no reinstall; commands are manifest-driven |
| The CLI itself (new release on npm) | npm i -g @logicpanel/lphub@latest |
| The CLI from source (local dev) | pnpm --filter @logicpanel/lphub build (the global symlink picks up the new dist/) |
For active development, pnpm --filter @logicpanel/lphub dev runs tsup --watch.
90% of the time, keeping up with the backend is just lphub sync.
Uninstall
npm uninstall -g @logicpanel/lphub # or, if linked from source:
pnpm uninstall --global @logicpanel/lphubProfiles & servers (prod vs local)
Each profile bundles a server (baseUrl) and its token, stored in ~/.lphub/config.json.
Multiple servers = multiple profiles — no need to edit anything by hand.
lphub auth login # e.g. profile "prod" → https://api-hub.hrplane.com/api/v1
lphub auth login # e.g. profile "local" → http://localhost:8484/api/v1
lphub auth list # lists profiles, marks the current one
lphub auth switch local # set the default profile
lphub --profile prod ticket list # one-off overrideTwo optional escape hatches override the active profile's base URL (precedence: flag > env > profile):
lphub --base-url http://localhost:8484/api/v1 ticket list
export LPHUB_BASE_URL=http://localhost:8484/api/v1Directory context (lphub init)
Pin a profile + project to the current directory so commands auto-scope to it — like
gh inferring the repo from the folder. The file is personal, keep it out of git.
echo .lphub.json >> .gitignore
lphub init # choose profile + project → writes .lphub.json { profile, projectId }
lphub ticket list # auto-scoped to the pinned project
lphub ticket create --title "Bug X" # project_id injected from context
lphub ticket create --title "Y" --project-id 99 # an explicit flag always winsResolution — project: --project-id flag > .lphub.json > error if required.
Profile: --profile > LPHUB_PROFILE env > .lphub.json > current profile.
Output
The default is a human-friendly table (like gh). Use flags for machine-readable output:
lphub ticket list # table
lphub ticket list --json # raw JSON
lphub ticket list --fields id,title,status,project.name # projected columns (dot-paths)Long / Markdown fields
For any string option you can read the value from a file or STDIN, instead of a flag
(useful for Markdown ticket descriptions — like gh issue create --body-file):
lphub ticket create --title "..." --description-file ./body.md
lphub ticket create --title "..." --description-file - # read from STDINOther commands
lphub me # the authenticated user (whoami)
lphub auth status # active profile + whoami
lphub docs # list topics; `lphub docs tickets` prints a topic's examples
lphub agent setup # fetch the agent skill from the API and install it via skills.shlphub agent setup downloads the SKILL.md from the API and hands it to
skills.sh (npx skills add), which installs it into your agent
(Claude Code, Cursor, …). Forward flags through, e.g. lphub agent setup --agent claude-code -y.
Destructive commands (HTTP DELETE) ask for confirmation; pass -y/--yes to skip
(also skipped automatically when not running in a TTY).
Exit codes
0 success · 4 auth failure (401/403) · 1 any other error.
Publishing
cd packages/lphub
npm version patch # bump the version
npm publish # `prepack` builds dist/ first; only dist/ + README shipTo verify what would ship without publishing:
npm pack --dry-run # lists the tarball contents (dist/index.js, package.json, README)The package is scoped (@logicpanel/lphub). To publish to a private registry (e.g. the
GitLab npm registry) instead of public npm, point npm at it — drop the public default with
--access restricted or a .npmrc @logicpanel:registry=... entry.
