@paralyn/cli
v1.0.0
Published
PARALYN CLI — register workspaces, sign handoff tokens, manage your PARALYN integration
Readme
@paralyn/cli
The PARALYN developer CLI — register your workspace and go live in minutes.
Get started
npx @paralyn/cli initRegisters your workspace and writes all credentials to .env automatically. No dashboard, no manual copy-paste.
PARALYN workspace setup
Workspace slug (lowercase, hyphens only): smartstock
✓ "smartstock" is available
Display name: SmartStock
Your email: [email protected]
Your backend URL (optional): https://api.smartstock.com
✓ Workspace "smartstock" registered
✓ Credentials written to .env
PARALYN_HANDOFF_SECRET phs_... → sign login redirect tokens
PARALYN_WORKSPACE_TOKEN pk_live_... → mint session JWTs for embedded widgetCommands
paralyn init
Register a new workspace and write credentials to .env.
npx @paralyn/cli init
npx @paralyn/cli init --env .env.local
npx @paralyn/cli init --api https://paralyn-api.onrender.comparalyn handoff sign
Generate a login URL for a user (local secret, no API call needed).
npx @paralyn/cli handoff sign \
--workspace smartstock \
--role user \
--secret $PARALYN_HANDOFF_SECRET \
--platform https://paralynhq-ai.vercel.appOutput:
{
"loginUrl": "https://paralynhq-ai.vercel.app/api/auth/handoff/complete?token=..."
}paralyn status
Check if the PARALYN API is reachable.
npx @paralyn/cli status --api https://paralyn-api.onrender.comparalyn session mint
Mint a short-lived access JWT for the embedded widget (dev/testing).
npx @paralyn/cli session mint --workspace smartstock --sub user-123After init — wire up your backend
import { signHandoffToken } from "@paralyn/identity";
// GET /api/auth/paralyn — redirects user to PARALYN platform
app.get("/api/auth/paralyn", requireAuth, async (req, res) => {
const token = await signHandoffToken(
process.env.PARALYN_HANDOFF_SECRET!,
{
sub: req.user.id,
workspace: process.env.PARALYN_WORKSPACE!,
tenant_id: process.env.PARALYN_TENANT_ID!,
role: "user",
},
600
);
const loginUrl = `${process.env.PARALYN_PLATFORM_URL}/api/auth/handoff/complete?token=${encodeURIComponent(token)}`;
res.redirect(loginUrl);
});Related packages
| Package | Description |
|---------|-------------|
| @paralyn/sdk | React widget for embedding AI in your product |
| @paralyn/identity | Token signing utilities |
License
AfriIntelligence — © PARALYN. All rights reserved.
