npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lyzr-cortex-cli

v0.1.2

Published

CLI tool for Cortex platform developers - push, query, share documents and manage tools

Downloads

6

Readme

Lyzr Cortex CLI

Command-line tool for Cortex platform developers. Push documents, query the knowledge graph, share with users, and manage tool projects.

Installation

npm install -g lyzr-cortex-cli

Configuration

Set environment variables (or pass --api-url, --api-key, --tool-id to each command):

export CORTEX_API_URL=https://your-cortex-server.com
export CORTEX_API_KEY=your-api-key
export CORTEX_TOOL_ID=your-tool-id

API Commands

These commands map directly to the Python (lyzr-cortex-sdk) and TypeScript (lyzr-cortex-sdk) SDK methods.

| CLI Command | Python SDK | TypeScript SDK | HTTP Endpoint | |-------------|-----------|---------------|---------------| | cortex push | client.push() | client.push() | POST /api/tools/documents | | cortex query | client.query() | client.query() | POST /api/tools/query | | cortex whoami | client.get_user_context() | client.getUserContext() | GET /api/tools/context/{email} | | cortex share | client.share_document() | client.shareDocument() | POST /api/tools/share-document-for-user | | cortex users | client.get_org_users() | client.getOrgUsers() | GET /api/tools/org-users-for-tool |

cortex push

Push a document to the Cortex Knowledge Graph.

# Push a transcript file
cortex push transcript_123 --type meeting_transcript --file ./transcript.txt --name "Product Sync"

# Push with personal scope
cortex push doc_456 --type note --file ./note.md --scope personal

# Push with team scope
cortex push doc_789 --type report --file ./report.txt --scope team --teams "team_eng,team_product"

# Push with metadata
cortex push doc_abc --type doc --file ./doc.txt --metadata '{"author":"[email protected]"}'

Options:

  • <id> - Unique document ID (required)
  • -t, --type <type> - Document type (required)
  • -f, --file <path> - File with document content (required)
  • -n, --name <name> - Display name
  • -u, --url <url> - External URL
  • -s, --scope <scope> - Access scope: global, team, or personal (default: global)
  • --teams <ids> - Comma-separated team IDs (for team scope)
  • --metadata <json> - JSON metadata object

cortex query

Query the Cortex Knowledge Graph.

# Simple query
cortex query "What decisions were made about Q1?"

# Filter by document type
cortex query "Latest meeting notes" --filters '{"type":["meeting_transcript"]}'

# Limit to recent documents
cortex query "Action items this week" --time-range 7

# Get raw JSON output
cortex query "Project status" --json

Options:

  • <question> - Natural language query (required)
  • --filters <json> - JSON filter object
  • --time-range <days> - Limit to recent N days
  • --max-results <n> - Maximum results (default: 10)
  • --user-email <email> - User email for access-scoped queries
  • --json - Output raw JSON

cortex whoami

Get user context (teams, permissions, org info).

cortex whoami [email protected]
cortex whoami [email protected] --json

Options:

  • <email> - User email address (required)
  • --json - Output raw JSON

cortex share

Share a document with another user. The document appears in the recipient's "Shared with Me" at /personal/shared.

cortex share transcript_123 --from [email protected] --to [email protected] --name "Product Sync"

Options:

  • <document-id> - External ID of the document (required)
  • --from <email> - Sharer's email (required)
  • --to <email> - Recipient's email (required)
  • -n, --name <name> - Document display name
  • -c, --content <text> - Document content
  • -u, --url <url> - External URL
  • --metadata <json> - JSON metadata object

cortex users

List organization users.

cortex users
cortex users --exclude [email protected]
cortex users --json

Options:

  • --exclude <email> - Exclude an email from results
  • --json - Output raw JSON

Project Management Commands

cortex init

Initialize a new Cortex tool project.

cortex init
cortex init --name my-tool --description "My awesome tool"
cortex init -y  # Use defaults without prompts

Creates:

  • cortex.yaml - Tool manifest
  • .env.example - Environment variables template
  • Basic directory structure

cortex validate

Validate your cortex.yaml manifest.

cortex validate
cortex validate --file path/to/cortex.yaml

cortex dev

Start local development environment.

cortex dev
cortex dev --port 8080

cortex deploy

Deploy your tool to Cortex platform.

cortex deploy
cortex deploy --api-url https://api.cortex.ai --api-key your-key
cortex deploy --dry-run

cortex status

Check tool registration and health status.

cortex status
cortex status --api-url https://api.cortex.ai --api-key your-key

Access Scopes

| Scope | Who Can See | Cortex UI Location | |-------|-------------|-------------------| | global | Everyone in organization | Organization knowledge base | | team | Specified team members | Team knowledge base | | personal | Only the creator | /personal/transcripts | | Shared via cortex share | Recipient | /personal/shared |

Manifest Format (cortex.yaml)

name: my-tool
display_name: My Tool
description: A tool that does awesome things
version: 1.0.0

documents:
  - my_document_type

icon: puzzle
ui:
  embed_path: /
  menu:
    label: My Tool
    position: tools

build:
  backend:
    dockerfile: backend/Dockerfile
    port: 8000
    health_check: /health
  frontend:
    dockerfile: frontend/Dockerfile
    port: 3000

secrets:
  - MY_API_KEY

License

MIT