Skip to content
English
AccountSign in
Account

AyselAI CLI

Write lessons on your computer, try them exactly like AyselAI runs them, upload them as drafts and send courses for review — from the terminal or CI.

It can do exactly what your AI app can do through AyselAI's connection, nothing more: drafts only, publishing happens in AyselAI.

  1. Download (Node 20 or newer)

    One file. The second line checks it is exactly the file we published.

    curl -fsSL https://aysel.ai/cli/ayselai.mjs -o ayselai.mjs
    curl -fsSL https://aysel.ai/cli/ayselai.mjs.sha256 | shasum -a 256 -c -
    node ayselai.mjs --version

    To type just ayselai (macOS, Linux):

    mkdir -p ~/.local/bin && mv ayselai.mjs ~/.local/bin/ayselai && chmod +x ~/.local/bin/ayselai

    npm (npm install -g) comes later.

  2. Sign in

    Your browser opens the AyselAI permission screen; allow "AyselAI CLI". You can remove it any time under Connected apps.

    ayselai login
    ayselai courses list

    No browser on that machine (SSH)? ayselai login --manual shows a link to open anywhere and asks for the code.

  3. Your first lesson

    ayselai lesson init my-lesson
    ayselai lesson preview my-lesson
    ayselai lesson push my-lesson --section <section-id>
  4. Tab completion, checks, updates

    doctor checks your setup; update tells you when a newer version is out.

    ayselai completion bash > ~/.local/share/bash-completion/completions/ayselai
    ayselai completion fish > ~/.config/fish/completions/ayselai.fish
    ayselai doctor
    ayselai update
  5. Automatic uploads (CI)

    Create an upload key for one course and put it in your CI as AYSELAI_TOKEN. The first upload of a new lesson is done once from your computer (it remembers the lesson in .ayselai-lesson.json; commit that file).

    Anyone who has the key can upload drafts to that course until it expires or you revoke it. Put it only in your CI's secret settings (never in code, a chat or an e-mail). We show it once.

    GitHub Actions example
    name: AyselAI lessons
    on:
      push:
        branches: [main]
      pull_request:
    
    jobs:
      lessons:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-node@v4
            with:
              node-version: 22
          - name: Download the AyselAI CLI (checksum verified)
            run: |
              curl -fsSL https://aysel.ai/cli/ayselai.mjs -o ayselai.mjs
              curl -fsSL https://aysel.ai/cli/ayselai.mjs.sha256 | shasum -a 256 -c -
          - name: Check the lesson
            run: node ayselai.mjs lesson validate lessons/my-lesson
          - name: Upload a new draft version
            if: github.event_name == 'push'
            env:
              AYSELAI_TOKEN: ${{ secrets.AYSELAI_TOKEN }}
              AYSELAI_SERVER: https://aysel.ai
            run: node ayselai.mjs lesson push lessons/my-lesson
    

    Create an upload key →

Your sign-in stays in your system keychain (or a file only you can read) and is never printed. The CLI never sees learners' data.

Developer Terms

Permission to share with AI

To do this, AyselAI sends the content you share (the text you type, notes, photos, files, questions and lesson text) to third-party AI model providers. It is processed only to carry out your request.

AI notice

You can withdraw it at any time in Account → Privacy. A withdrawal applies from the next AyselAI action; an action already started is completed. Courses and lessons made before stay as they are.