JSPM

  • Created
  • Published
  • Downloads 874
  • Score
    100M100P100Q111920F
  • License SEE LICENSE IN LICENSE

Jelou Functions CLI — deploy serverless TypeScript functions to the edge

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jelou/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @jelou/cli

    Command-line tool for building, deploying, and managing Jelou Functions — serverless TypeScript functions on the edge.

    jelou login
    jelou init
    jelou dev
    jelou deploy

    Install

    # npm (recommended)
    npm install -g @jelou/cli
    
    # npx (no install)
    npx @jelou/cli deploy
    
    # Deno
    deno install -A -n jelou jsr:@jelou/cli

    After installing, the jelou binary is available globally.

    Authentication

    jelou login
    # Paste your access token (starts with jfn_pat_)

    Or set the JELOU_TOKEN environment variable to skip interactive login:

    export JELOU_TOKEN=jfn_pat_your_token_here
    jelou functions list
    Command Description
    jelou login Save access token to ~/.jelou/
    jelou logout Remove stored credentials
    jelou whoami Show current identity and scopes

    Quick Start

    mkdir my-function && cd my-function
    jelou init
    # Creates index.ts, jelou.json, .env, .gitignore
    
    jelou dev
    # Local server at http://localhost:3000 with hot reload
    
    jelou deploy
    # Ships to production

    Commands

    Project

    Command Description
    jelou init Scaffold a new function project
    jelou dev Start local dev server with hot reload

    jelou dev options:

    Flag Default Description
    --port 3000 Port to listen on
    --env .env Path to env file
    --no-watch Disable file watching

    Deploy & Rollback

    Command Description
    jelou deploy Deploy current directory
    jelou rollback [slug] [deploymentId] Rollback to previous deployment

    jelou deploy options:

    Flag Description
    --no-confirm Skip confirmation prompt
    --follow, -f Tail logs after deploy

    Functions

    Command Description
    jelou functions list List all functions
    jelou functions info Show function details
    jelou functions create Create a new function
    jelou functions delete Delete a function

    Secrets

    Command Description
    jelou secrets list [slug] List secret keys
    jelou secrets set [slug] [...KEY=VALUE] Set secrets
    jelou secrets delete <slug> <key> Delete a secret
    # Inline
    jelou secrets set my-fn API_KEY=sk-123 DB_URL=postgres://...
    
    # From file
    jelou secrets set my-fn --from-env .env.production
    
    # Interactive
    jelou secrets set my-fn

    Tokens

    Command Description
    jelou tokens list List all PAT tokens
    jelou tokens create Create a new token (admin required)
    jelou tokens revoke <id> Revoke a token

    Monitoring

    Command Description
    jelou logs [slug] Stream live logs
    jelou logs [slug] --history Fetch historical logs
    jelou cron list [slug] List cron schedules
    jelou analytics View company analytics

    CI / Non-Interactive Mode

    Every command works in CI pipelines without hanging on prompts.

    Global Flags

    Flag Description
    --no-input Disable all interactive prompts
    --json Output structured JSON to stdout

    Non-interactive mode is auto-detected when:

    • CI=true environment variable is set (GitHub Actions, GitLab CI, etc.)
    • JELOU_NO_INPUT=1 is set
    • stdin is not a TTY (piped input)

    JSON Output

    All data commands support --json. Output format: { "ok": true, "data": ... }

    jelou functions list --json | jq '.data[].slug'
    jelou whoami --json | jq '.data.scopes'
    jelou deploy --no-confirm --json | jq '.data.url'

    Per-Command CI Flags

    Command Flags
    login --token <token>
    init --slug, --description, --mode, --force
    functions create --slug, --name, --description
    functions delete --yes, -y
    tokens create --name, --scopes (comma-separated)
    tokens revoke --yes, -y
    deploy --no-confirm

    GitHub Actions Example

    - name: Deploy function
      env:
        JELOU_TOKEN: ${{ secrets.JELOU_TOKEN }}
      run: |
        npx @jelou/cli secrets set my-fn API_KEY=${{ secrets.API_KEY }}
        npx @jelou/cli deploy --no-confirm --json | jq '.data.url'

    Full CI Example

    export JELOU_TOKEN=jfn_pat_...
    
    # Create a token for CI
    jelou tokens create --name ci-deploy --scopes functions:read,functions:deploy --json
    
    # Init without prompts
    jelou init --slug my-fn --mode create --force
    
    # Deploy and capture URL
    DEPLOY_URL=$(jelou deploy --no-confirm --json | jq -r '.data.url')
    echo "Deployed to $DEPLOY_URL"

    Configuration

    Project — jelou.json

    Created by jelou init in your project root:

    {
      "function": "my-function",
      "entrypoint": "index.ts"
    }

    User — ~/.jelou/

    File Purpose
    credentials.json Saved token from jelou login
    config.json API URL override (optional)

    Environment Variables

    Variable Description
    JELOU_TOKEN Access token (overrides saved credentials)
    JELOU_API_URL API base URL override
    CI Auto-enables non-interactive mode when true
    JELOU_NO_INPUT Disables interactive prompts when 1

    License

    Copyright 2026 Jelou Inc. All rights reserved.

    See LICENSE for details.