### Install LynxPrompt CLI via npm Source: https://lynxprompt.com/docs/cli Install the LynxPrompt CLI globally using npm. This is the cross-platform installation method. ```bash npm install -g lynxprompt ``` -------------------------------- ### Install with bun Source: https://lynxprompt.com/docs/cli/installation Installs LynxPrompt globally using bun. Requires Node.js 18 or later. ```bash bun add -g lynxprompt ``` -------------------------------- ### lynxp config examples Source: https://lynxprompt.com/docs/cli/commands Examples of lynxp config commands showing current configuration, setting a self-hosted URL, resetting to default, and finding the config file. ```bash # View current configuration $ lynxp config 🐱 LynxPrompt CLI Configuration API URL: https://api.lynxprompt.com Logged in as: [emailΒ protected] # Point to self-hosted instance $ lynxp config set-url https://lynxprompt.yourcompany.com βœ“ API URL set to https://lynxprompt.yourcompany.com # Reset to default $ lynxp config reset-url βœ“ API URL reset to https://api.lynxprompt.com # Find config file $ lynxp config path ~/.config/lynxprompt/config.json ``` -------------------------------- ### Install with yarn Source: https://lynxprompt.com/docs/cli/installation Installs LynxPrompt globally using yarn. Requires Node.js 18 or later. ```bash yarn global add lynxprompt ``` -------------------------------- ### Verify installation with lynxp --version and --help Source: https://lynxprompt.com/docs/cli/installation Checks that the CLI is installed correctly by displaying the version and help output. The help output lists available commands. ```bash $ lynxp --version 0.3.0 $ lynxp --help 🐱 LynxPrompt CLI Generate AI IDE configuration files Usage: lynxprompt [options] [command] Commands: wizard Generate AI config interactively (recommended) check Validate AI config files (CI/CD) status Show config status and tracked blueprints pull Download and track a blueprint push Push local file to cloud search Search marketplace blueprints link Link local file to cloud blueprint unlink Disconnect file from cloud blueprint diff Compare tracked files with cloud login Authenticate with LynxPrompt ``` -------------------------------- ### lynxp pull examples Source: https://lynxprompt.com/docs/cli/commands Examples of using 'lynxp pull' with different options: download and track, preview, and no-track. Shows the output for the download and track case. ```bash # Download and track $ lynxp pull bp_abc123 🐱 Blueprint: Next.js TypeScript Starter πŸ“¦ Marketplace blueprint (read-only) βœ… Downloaded: AGENTS.md Linked to: bp_abc123 Updates: Run 'lynxp pull bp_abc123' to sync updates # Preview first $ lynxp pull bp_abc123 --preview # Shows content without writing file # Without tracking $ lynxp pull bp_abc123 --no-track ``` -------------------------------- ### lynxp analyze examples Source: https://lynxprompt.com/docs/cli/commands Examples of using lynxp analyze: analyzing current directory, analyzing a remote repository, and outputting JSON for scripting. ```bash # Analyze current directory $ lynxp analyze πŸ“Š Project Analysis Name: my-project Stack: typescript, react, tailwind Package Manager: npm CI/CD: github_actions # Analyze remote repository $ lynxp analyze -r https://github.com/owner/repo # JSON output for scripts $ lynxp analyze --json | jq '.detected.stack' ``` -------------------------------- ### lynxp import examples Source: https://lynxprompt.com/docs/cli/commands Examples of using lynxp import: scanning the current directory, previewing with --dry-run, scanning a specific directory with --depth, and outputting JSON for scripting. ```bash # Scan current directory $ lynxp import πŸ“₯ LynxPrompt Import Found 4 configuration file(s) 🏒 my-monorepo [Monorepo Root] AGENTS.md └─ πŸ“„ packages/web packages/web/AGENTS.md └─ πŸ“„ packages/api packages/api/AGENTS.md πŸ“Š 1 monorepo detected with hierarchical configs # Preview without changes $ lynxp import --dry-run # Scan specific directory $ lynxp import ./packages --depth 3 # JSON output for scripting $ lynxp import --json | jq '.hierarchy' ``` -------------------------------- ### lynxp wizard usage examples Source: https://lynxprompt.com/docs/cli/commands Provides practical examples of using the 'lynxp wizard' command, including interactive mode, quick generation with defaults, generating for Cursor, analyzing a remote repository, creating blueprint templates, filling variables, and saving/loading drafts. ```bash # Interactive wizard (recommended) $ lynxp wizard # Quick generation with defaults $ lynxp wizard -y # Generate for Cursor $ lynxp wizard -f cursor # Analyze remote repo first $ lynxp wizard --repo-url https://github.com/owner/repo # Generate blueprint template $ lynxp wizard --blueprint # Output: [[PROJECT_NAME|MyApp]] configuration... # Fill blueprint variables $ lynxp wizard --blueprint --vars "PROJECT_NAME=MyApp,LICENSE=MIT" # Save/load drafts $ lynxp wizard --save-draft myproject $ lynxp wizard --load-draft myproject ``` -------------------------------- ### Install with pnpm Source: https://lynxprompt.com/docs/cli/installation Installs LynxPrompt globally using pnpm. Requires Node.js 18 or later. ```bash pnpm add -g lynxprompt ``` -------------------------------- ### Blueprint Example with Variables and Defaults Source: https://lynxprompt.com/docs/blueprints/variables A full blueprint example using template variables with defaults. Variables without defaults (e.g., REPO_URL, TEAM_LEAD) must be filled in by the user. ```plaintext # [[PROJECT_NAME]] - AI Configuration ## Project Context This is a [[PROJECT_TYPE|web]] project using [[FRAMEWORK|Next.js]]. Repository: [[REPO_URL]] ## Deployment Deploy to [[K8S_CLUSTER|prod-cluster]] cluster using Helm. Documentation at [[CONFLUENCE_URL]]/deployment-guide ## Team Contact Team lead: [[TEAM_LEAD]] Slack channel: #[[SLACK_CHANNEL|dev-team]] ``` -------------------------------- ### Install LynxPrompt CLI via Homebrew Source: https://lynxprompt.com/docs/cli Install the LynxPrompt CLI on macOS using Homebrew with the GeiserX tap. ```bash brew install GeiserX/lynxprompt/lynxprompt ``` -------------------------------- ### lynxp check example with output Source: https://lynxprompt.com/docs/cli/commands Example of running 'lynxp check' and 'lynxp check --ci' with their outputs. Shows validation results including found files, warnings, and pass status. ```bash $ lynxp check 🐱 LynxPrompt Check βœ“ Found 3 configuration files: AGENTS.md .cursor/rules/project.mdc .github/copilot-instructions.md ⚠ 1 warning: AGENTS.md: Contains placeholder text "TODO" βœ… Validation passed! # In CI/CD: $ lynxp check --ci βœ“ Validation passed ``` -------------------------------- ### Add Homebrew tap and install Source: https://lynxprompt.com/docs/cli/installation Adds the official LynxPrompt tap and installs the CLI via Homebrew on macOS. ```bash brew tap GeiserX/lynxprompt brew install lynxprompt ``` -------------------------------- ### Install with Snap Source: https://lynxprompt.com/docs/cli/installation Installs LynxPrompt using Snap on Ubuntu and other Linux distributions. Note that Snap packages may have sandbox restrictions; npm is recommended for full functionality on Linux. ```bash snap install lynxprompt ``` -------------------------------- ### lynxp convert examples Source: https://lynxprompt.com/docs/cli/commands Examples of using lynxp convert: converting AGENTS.md to Cursor format, auto-detecting source, and using a custom output filename. ```bash # Convert AGENTS.md to Cursor format $ lynxp convert AGENTS.md cursor βœ“ Converted to .cursor/rules/project.mdc # Auto-detect source and convert $ lynxp convert cursor # Custom output filename $ lynxp convert AGENTS.md copilot -o team-rules.md ``` -------------------------------- ### Example AGENTS.md file Source: https://lynxprompt.com/docs/platforms/agents-md A complete example AGENTS.md file showing project overview, tech stack, architecture, code style, git workflow, testing, and security sections. Use as a template for your own project. ```markdown # AGENTS.md ## Project Overview E-commerce platform with React frontend and Go backend. ## Tech Stack - **Frontend**: React 18, TypeScript, Vite, Tailwind CSS - **Backend**: Go 1.21, Gin, PostgreSQL - **Infrastructure**: Docker, Kubernetes, AWS ## Architecture ``` /frontend - React SPA /backend - Go API server /deploy - Kubernetes manifests /docs - API documentation ``` ## Code Style ### TypeScript/React - Use functional components with hooks - Prefer named exports - Use absolute imports (@/components/...) - Comprehensive TypeScript types ### Go - Follow standard Go conventions - Use interfaces for dependencies - Table-driven tests - Structured logging with slog ## Git Workflow - Conventional commits (feat:, fix:, docs:, etc.) - Feature branches from main - Required PR reviews - CI must pass before merge ## Testing - Frontend: Vitest + Testing Library - Backend: Go testing + testify - E2E: Playwright - Minimum 80% coverage for new code ## Security - No secrets in code - Use environment variables - Input validation on all endpoints - SQL parameterized queries only ``` -------------------------------- ### lynxp merge examples Source: https://lynxprompt.com/docs/cli/commands Examples of using lynxp merge: merging two config files, custom output and strategy, and interactive mode. ```bash # Merge two config files $ lynxp merge team-rules.md project-rules.md βœ“ Merged to merged.md # Custom output and strategy $ lynxp merge a.md b.md c.md -o combined.md -s smart # Interactive mode to select sections $ lynxp merge rules1.md rules2.md -i ``` -------------------------------- ### Start LynxPrompt services with Docker Compose Source: https://lynxprompt.com/docs/self-hosting Starts all services defined in docker-compose.selfhost.yml in detached mode. Requires Docker Engine 24+ and Docker Compose v2. ```bash docker compose -f docker-compose.selfhost.yml up -d ``` -------------------------------- ### lynxp status example output Source: https://lynxprompt.com/docs/cli/commands Example output of the lynxp status command showing tracked blueprints and AI config files. ```bash $ lynxp status 🐱 LynxPrompt Status Directory: /Users/me/my-project βœ“ LynxPrompt initialized Exporters: cursor, agents πŸ“¦ Tracked Blueprints βœ“ AGENTS.md [marketplace] ID: bp_abc123 β€’ Next.js Starter ● .cursor/rules/project.mdc [team] ID: bp_team456 β€’ Team Standards ⚠ Local changes - run 'lynxp push' to sync πŸ“„ AI Config Files βœ“ AGENTS.md (tracked) Platform: Claude Code, Cursor, AI Agents Size: 2.1 KB (85 lines) βœ“ .cursor/rules/ (tracked) Platform: Cursor Rules: 3 files βœ“ .github/copilot-instructions.md Platform: GitHub Copilot Size: 1.2 KB (42 lines) ``` -------------------------------- ### JSON Response for GET /api/v1/user Source: https://lynxprompt.com/docs/api/user Example JSON response returned by the endpoint. Contains user fields: id, email, name, image, and createdAt. The name and image fields can be null. ```json { "id": "bp_clw2m8k0x0001", "email": "[emailΒ protected]", "name": "John Doe", "image": "https://avatars.githubusercontent.com/u/12345", "createdAt": "2024-06-15T10:30:00.000Z" } ``` -------------------------------- ### lynxp link interactive example Source: https://lynxprompt.com/docs/cli/commands Example output of running lynxp link in interactive mode, showing prompts for file selection, blueprint discovery method, and blueprint selection, followed by a success message. Also shows the direct mode command. ```bash $ lynxp link 🐱 Link File to Blueprint ? Which file do you want to link? β†’ AGENTS.md .cursor/rules/project.mdc ? How do you want to find the blueprint? β†’ πŸ“‹ From my blueprints πŸ” Search marketplace πŸ”’ Enter ID directly ? Select a blueprint: β†’ Next.js TypeScript Starter Team Standards βœ… Linked: AGENTS.md β†’ bp_abc123 # Or use direct mode: $ lynxp link AGENTS.md bp_abc123 ``` -------------------------------- ### Run without installing (npx) Source: https://lynxprompt.com/docs/cli/installation Runs the LynxPrompt wizard directly using npx without global installation. Useful for one-off usage or trying out the CLI. ```bash npx lynxprompt wizard ``` -------------------------------- ### Install with Chocolatey Source: https://lynxprompt.com/docs/cli/installation Installs LynxPrompt using Chocolatey on Windows. Note that Chocolatey packages go through community moderation; if the latest version isn't available, use npm instead. ```bash choco install lynxprompt ``` -------------------------------- ### lynxp diff examples Source: https://lynxprompt.com/docs/cli/commands Example output of lynxp diff comparing all tracked files, showing sync status and line changes, followed by commands for comparing a specific file and an untracked blueprint. ```bash # Compare all tracked files (recommended) $ lynxp diff 🐱 LynxPrompt Diff πŸ“„ AGENTS.md Linked to: Next.js Starter (bp_abc123) βœ“ In sync with cloud πŸ“„ .cursor/rules/project.mdc Linked to: Team Standards (bp_team456) - Old line + New line +2 -1 lines To push local changes: lynxp push # Compare specific file $ lynxp diff AGENTS.md # Compare with untracked blueprint $ lynxp diff bp_newid123 ``` -------------------------------- ### Blueprint Configuration with Defaults Source: https://lynxprompt.com/docs/blueprints/variables Example of a blueprint configuration file using variables with default values. Defaults appear pre-filled when users download the blueprint. ```plaintext # [[PROJECT_NAME|My Awesome App]] Configuration Framework: [[FRAMEWORK|Next.js]] Database: [[DATABASE|PostgreSQL]] Deploy to: [[DEPLOY_TARGET|Vercel]] # Slack channel: #[[SLACK_CHANNEL|dev-team]] ``` -------------------------------- ### lynxp unlink interactive example Source: https://lynxprompt.com/docs/cli/commands Example output of running lynxp unlink in interactive mode, showing file selection, current blueprint details, and confirmation prompt, followed by a success message. ```bash $ lynxp unlink 🐱 Unlink File from Blueprint ? Which file do you want to unlink? β†’ AGENTS.md (Next.js TypeScript Starter) .cursor/rules/project.mdc (Team Standards) Currently linked to: Next.js TypeScript Starter ID: bp_abc123 Source: marketplace ? Unlink AGENTS.md? Yes βœ… Unlinked: AGENTS.md ``` -------------------------------- ### Update Homebrew installation Source: https://lynxprompt.com/docs/cli/installation Updates Homebrew and upgrades LynxPrompt to the latest version. ```bash brew update brew upgrade lynxprompt ``` -------------------------------- ### Example Cursor Rules File Source: https://lynxprompt.com/docs/platforms/cursor A sample .cursor/rules file for a Next.js project, covering tech stack, code style, file organization, and testing preferences. ```plaintext # Project: My Next.js App ## Tech Stack - Next.js 14 with App Router - TypeScript (strict mode) - Tailwind CSS - Prisma ORM ## Code Style - Use functional components with hooks - Prefer named exports over default exports - Use async/await instead of .then() - Always include proper TypeScript types ## File Organization - Components in /components - API routes in /app/api - Database models in /prisma ## Testing - Write tests with Vitest - Aim for 80%+ coverage on new code ``` -------------------------------- ### Configure CLI for Self-Hosted Instance Source: https://lynxprompt.com/docs/self-hosting After installing the LynxPrompt CLI, point it to your self-hosted instance. This stores the API URL locally; all subsequent CLI commands (push, pull, sync) will target your instance. ```bash lynxp config set-url https://lynxprompt.yourcompany.com lynxp login ``` -------------------------------- ### Monorepo directory structure example Source: https://lynxprompt.com/docs/blueprints/hierarchy Shows a typical monorepo layout with a root AGENTS.md and child AGENTS.md files in packages and services directories, all grouped under a hierarchy ha_xyz123. ```plaintext my-monorepo/ β”œβ”€β”€ AGENTS.md ← Root blueprint (organization rules) β”œβ”€β”€ packages/ β”‚ β”œβ”€β”€ core/ β”‚ β”‚ └── AGENTS.md ← Child blueprint (core-specific) β”‚ β”œβ”€β”€ web/ β”‚ β”‚ └── AGENTS.md ← Child blueprint (web-specific) β”‚ └── mobile/ β”‚ └── AGENTS.md ← Child blueprint (mobile-specific) └── services/ β”œβ”€β”€ api/ β”‚ └── AGENTS.md ← Child blueprint (api-specific) └── worker/ └── AGENTS.md ← Child blueprint (worker-specific) β†’ All grouped under hierarchy: ha_xyz123 ``` -------------------------------- ### Single Database Configuration Source: https://lynxprompt.com/docs/self-hosting Point all four DATABASE_URL_* variables to the same PostgreSQL database. This is the default in docker-compose.selfhost.yml and is the simplest setup. ```plaintext DATABASE_URL_APP=postgresql://... DATABASE_URL_USERS=postgresql://... # same DATABASE_URL_BLOG=postgresql://... # same DATABASE_URL_SUPPORT=postgresql://... # same ``` -------------------------------- ### Example: Security Audit Command Source: https://lynxprompt.com/docs/blueprints/commands A Markdown command file that instructs the AI to perform a security audit. It includes tasks and output format requirements. ```markdown # Security Audit Perform a comprehensive security audit of the codebase. ## Tasks 1. Check for hardcoded secrets 2. Review authentication flows 3. Identify SQL injection risks 4. Check for XSS vulnerabilities 5. Review dependency versions ## Output Provide a markdown report with: - Severity levels (Critical, High, Medium, Low) - File locations - Recommended fixes ``` -------------------------------- ### AI output for formatting custom requirements Source: https://lynxprompt.com/docs/ai-features/wizard-assistant Example output from the AI assistant when formatting the provided input. It structures requirements into sections like Code Style, Testing, API Design, and Git Workflow with specific rules. ```markdown ## Code Style ### Async/Await - Always use async/await syntax for asynchronous operations - Never use .then() chains or callbacks for promises - Handle errors with try/catch blocks ## Testing ### Coverage Requirements - Minimum test coverage: 80% - All new features must include unit tests - Integration tests for API endpoints ## API Design ### Response Format - Include appropriate HTTP status codes - Return meaningful error messages - Use consistent error response structure ## Git Workflow ### Commits - Follow Conventional Commits specification - Format: type(scope): description - Types: feat, fix, docs, style, refactor, test, chore ``` -------------------------------- ### LynxPrompt CLI Quick Example Workflow Source: https://lynxprompt.com/docs/cli A typical workflow showing how to generate AI config interactively with 'lynxp wizard', push to cloud with 'lynxp push', search and pull from the marketplace, and check sync status with 'lynxp diff'. ```bash # Generate AI config interactively $ lynxp wizard 🐱 LynxPrompt Wizard ●○○○○ Step 1/5: Output Format [β†’] AGENTS.md (Universal) Cursor Windsurf Claude βœ… Generated: AGENTS.md # Push to cloud & sync with team $ lynxp push πŸ“€ Pushing to LynxPrompt... β†’ Created blueprint: bp_x7k9m2 βœ“ Rules synced to cloud # Or pull from marketplace $ lynxp search nextjs β†’ Next.js 15 Stack (β˜… 220) β†’ Next.js TypeScript (β˜… 185) $ lynxp pull bp_cmjq... βœ“ Downloaded to AGENTS.md # See what changed $ lynxp diff βœ“ All tracked files in sync ``` -------------------------------- ### Get blueprint response Source: https://lynxprompt.com/docs/api/blueprints Example JSON response for the GET /api/v1/blueprints/:id endpoint. Includes the blueprint's content and variables. ```json { "id": "bp_clw2m8k0x0001", "name": "My React Config", "description": "Custom rules for React projects", "content": "You are an expert React developer...", "visibility": "private", "platform": "cursor", "variables": [ { "name": "PROJECT_NAME", "default": "my-app" }, { "name": "FRAMEWORK", "default": null } ], "createdAt": "2025-01-15T10:30:00.000Z", "updatedAt": "2025-01-20T14:45:00.000Z" } ``` -------------------------------- ### List hierarchies API Source: https://lynxprompt.com/docs/blueprints/hierarchy GET request to list hierarchies, with an example response showing hierarchy metadata. ```http GET /api/v1/hierarchies Authorization: Bearer lp_xxx # Response: { "hierarchies": [ { "id": "ha_xyz789", "name": "my-monorepo", "repository_root": "abc123...", "blueprint_count": 6 } ] } ``` -------------------------------- ### List blueprints response Source: https://lynxprompt.com/docs/api/blueprints Example JSON response for the GET /api/v1/blueprints endpoint. Contains an array of blueprints and a total count. ```json { "blueprints": [ { "id": "bp_clw2m8k0x0001", "name": "My React Config", "description": "Custom rules for React projects", "visibility": "private", "platform": "cursor", "createdAt": "2025-01-15T10:30:00.000Z", "updatedAt": "2025-01-20T14:45:00.000Z" } ], "total": 1 } ``` -------------------------------- ### GET /api/v1/blueprints/:id Source: https://lynxprompt.com/docs/api/blueprints Get a specific blueprint by ID, including its full content. ```APIDOC ## GET /api/v1/blueprints/:id ### Description Get a specific blueprint by ID, including its full content. ### Method GET ### Endpoint /api/v1/blueprints/:id ### Parameters #### Path Parameters - **id** (string) - Required - The blueprint ID (e.g., bp_clw2m8k0x0001) ### Request Example ``` curl -H "Authorization: Bearer lp_your_token" \ https://lynxprompt.com/api/v1/blueprints/bp_clw2m8k0x0001 ``` ### Response #### Success Response (200) - **id** (string) - Blueprint ID - **name** (string) - Blueprint name - **description** (string) - Blueprint description - **content** (string) - Full blueprint content - **visibility** (string) - Visibility setting - **platform** (string) - Platform - **variables** (array) - List of variables with name and default - **createdAt** (string) - Creation timestamp - **updatedAt** (string) - Last update timestamp #### Response Example ``` { "id": "bp_clw2m8k0x0001", "name": "My React Config", "description": "Custom rules for React projects", "content": "You are an expert React developer...", "visibility": "private", "platform": "cursor", "variables": [ { "name": "PROJECT_NAME", "default": "my-app" }, { "name": "FRAMEWORK", "default": null } ], "createdAt": "2025-01-15T10:30:00.000Z", "updatedAt": "2025-01-20T14:45:00.000Z" } ``` ``` -------------------------------- ### Update Blueprint via curl on Linux/macOS Source: https://lynxprompt.com/docs/api/blueprints Uses curl with an exported API token and jq to escape the file content into JSON. Requires jq; install with brew install jq (macOS) or sudo apt install jq (Linux). ```bash # Set your API token export LYNXPROMPT_API_TOKEN="lp_your_token_here" # Update blueprint from file curl -X PUT https://lynxprompt.com/api/v1/blueprints/bp_your_id \ -H "Authorization: Bearer $LYNXPROMPT_API_TOKEN" \ -H "Content-Type: application/json" \ -d "{\"content\": $(cat .cursor/rules | jq -Rs .)}" ``` -------------------------------- ### Get hierarchy with blueprints API Source: https://lynxprompt.com/docs/blueprints/hierarchy GET request to retrieve a specific hierarchy with its blueprints, including metadata, flat list, and tree structure. ```http GET /api/v1/hierarchies/ha_xyz789 Authorization: Bearer lp_xxx # Response includes: # - hierarchy metadata # - blueprints array (flat list) # - tree structure (nested for traversal) ``` -------------------------------- ### lynxp wizard command options Source: https://lynxprompt.com/docs/cli/commands Shows the full set of options for the 'lynxp wizard' command, including basic options like project name, description, stack, format, persona, boundaries, and yes flag, as well as advanced options for output directory, remote repo URL, blueprint generation, license, CI/CD platform, project type, detection, drafts, and variables. ```bash lynxp wizard [options] Basic Options: -n, --name Project name -d, --description Project description -s, --stack Tech stack (comma-separated) -f, --format Output: agents, cursor, copilot, etc. --persona AI persona (fullstack, backend, frontend, etc.) --boundaries Boundary preset (conservative, standard, permissive) -y, --yes Skip prompts, use defaults Advanced Options: -o, --output Output directory --repo-url Analyze remote repository (GitHub/GitLab) --blueprint Generate with [[VAR|default]] placeholders --license License type (mit, apache-2.0, gpl-3.0) --ci-cd CI/CD platform (github_actions, gitlab_ci) --project-type Project type (work, leisure, opensource) --detect-only Only detect project info, don't generate --load-draft Load a saved wizard draft --save-draft Save wizard state as draft --vars Fill variables: VAR1=val1,VAR2=val2 ``` -------------------------------- ### Enable federation with ENABLE_FEDERATION=true Source: https://lynxprompt.com/docs/self-hosting Set this environment variable to join the default public federation network at https://lynxprompt.com. Only set FEDERATION_REGISTRY_URL if running your own registry. Federation is optional; without it the instance works standalone. ```plaintext ENABLE_FEDERATION=true ``` -------------------------------- ### Docker Compose healthcheck example Source: https://lynxprompt.com/docs/self-hosting Example healthcheck configuration for Docker Compose that uses curl to test the /api/health endpoint. It runs every 30 seconds with a 5-second timeout and 3 retries. ```yaml # Docker Compose healthcheck example healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"] interval: 30s timeout: 5s retries: 3 ``` -------------------------------- ### Create .env file for LynxPrompt self-hosting Source: https://lynxprompt.com/docs/self-hosting Environment file with required NEXTAUTH_SECRET, ADMIN_EMAIL, and APP_URL. NEXTAUTH_SECRET is strictly required and can be generated with `openssl rand -base64 32`. ```plaintext # .env NEXTAUTH_SECRET=$(openssl rand -base64 32) [emailΒ protected] APP_URL=https://lynxprompt.yourcompany.com ``` -------------------------------- ### Environment variable configuration for federation Source: https://lynxprompt.com/docs/federation Shows the minimal environment variables to enable federation and optionally set a custom registry URL. The first block is the minimal setup for the default public network, the second is for a custom registry. Requires HTTPS with a valid .well-known/lynxprompt.json endpoint. ```bash # Minimal β€” join the default public network ENABLE_FEDERATION=true # Custom registry (only if running your own) ENABLE_FEDERATION=true FEDERATION_REGISTRY_URL=https://lynxprompt.yourcompany.com ``` -------------------------------- ### Cloudflare DNS records and CLI configuration for API subdomain Source: https://lynxprompt.com/docs/self-hosting Shows the recommended DNS setup: a proxied main domain for the web UI and a DNS-only subdomain for API traffic. Includes the CLI command to point LynxPrompt to the custom API URL. ```bash # Cloudflare DNS records: # # lynxprompt.yourcompany.com β†’ A your-ip (Proxied, orange cloud) # api.lynxprompt.yourcompany.com β†’ A your-ip (DNS only, grey cloud) # # Then configure your reverse proxy to serve both domains, # pointing to the same LynxPrompt backend. # # The CLI defaults to https://api.lynxprompt.com for the # public instance. For self-hosted, point the CLI: lynxp config set-url https://api.lynxprompt.yourcompany.com ``` -------------------------------- ### GET /api/v1/blueprints Source: https://lynxprompt.com/docs/api/blueprints List all blueprints you have access to (your own blueprints). Supports filtering by visibility and platform. ```APIDOC ## GET /api/v1/blueprints ### Description List all blueprints you have access to (your own blueprints). ### Method GET ### Endpoint /api/v1/blueprints ### Parameters #### Query Parameters - **visibility** (string) - Optional - Filter by visibility: private, public, or unlisted - **platform** (string) - Optional - Filter by platform: cursor, claude, copilot, windsurf, agentsmd ### Request Example ``` curl -H "Authorization: Bearer lp_your_token" \ "https://lynxprompt.com/api/v1/blueprints?visibility=private" ``` ### Response #### Success Response (200) - **blueprints** (array) - List of blueprint objects - **total** (number) - Total number of blueprints #### Response Example ``` { "blueprints": [ { "id": "bp_clw2m8k0x0001", "name": "My React Config", "description": "Custom rules for React projects", "visibility": "private", "platform": "cursor", "createdAt": "2025-01-15T10:30:00.000Z", "updatedAt": "2025-01-20T14:45:00.000Z" } ], "total": 1 } ``` ``` -------------------------------- ### Detect all commands in a project Source: https://lynxprompt.com/docs/blueprints/commands Scans the project for all configuration files and commands. ```bash lynxp detect ``` -------------------------------- ### Make Your First Request with curl Source: https://lynxprompt.com/docs/api Use curl with Bearer authentication to make a request to the blueprints endpoint. Replace lp_your_token_here with your actual API token. ```bash curl -H "Authorization: Bearer lp_your_token_here" \ https://lynxprompt.com/api/v1/blueprints ``` -------------------------------- ### Delete blueprint response Source: https://lynxprompt.com/docs/api/blueprints Example JSON response for the DELETE /api/v1/blueprints/:id endpoint. Returns a success flag. ```json { "success": true } ``` -------------------------------- ### Login command Source: https://lynxprompt.com/docs/cli/authentication Opens the browser for OAuth authentication and stores the token securely in the config directory. ```bash $ lynxprompt login πŸ” Opening browser to authenticate... https://lynxprompt.com/auth/signin?cli_session=abc123 Waiting for authentication... βœ“ βœ… Logged in as [emailΒ protected] Token stored securely in config You're ready to use LynxPrompt CLI! ```