CLI for interacting with the Andamio Protocol.
brew install Andamio-Platform/tap/andamio-cliPrebuilt binaries for macOS, Linux, and Windows are available on the Releases page.
Download the archive for your platform, extract it, and move the binary to your PATH:
# Example: macOS Apple Silicon — replace VERSION with the latest release
VERSION=0.3.0
curl -sLO "https://github.com/Andamio-Platform/andamio-cli/releases/download/v${VERSION}/andamio_${VERSION}_darwin_arm64.tar.gz"
curl -sLO "https://github.com/Andamio-Platform/andamio-cli/releases/download/v${VERSION}/checksums.txt"
shasum -a 256 --check --ignore-missing checksums.txt
tar xzf "andamio_${VERSION}_darwin_arm64.tar.gz"
sudo mv andamio /usr/local/bin/Available platforms: darwin_arm64, darwin_amd64, linux_amd64, linux_arm64, windows_amd64, windows_arm64.
Requires Go 1.21+.
go install github.com/Andamio-Platform/andamio-cli/cmd/andamio@latestandamio --version
andamio --help# 1. Install the CLI
go install github.com/Andamio-Platform/andamio-cli/cmd/andamio@latest
# 2. Configure your API key (get one from your Andamio dashboard)
andamio auth login --api-key <your-api-key>
# 3. Authenticate with your wallet (for editing courses/projects)
andamio user login
# Or authenticate headlessly with a .skey file (for CI/CD and scripting)
andamio user login --skey ./payment.skey --alias myalias
# 4. Verify everything works
andamio user status
andamio course listThe CLI supports two authentication methods:
| Method | Use Case | How to Set Up |
|---|---|---|
| API Key | Read-only access to public endpoints | andamio auth login --api-key <key> |
| User JWT | Edit courses/projects you own | andamio user login |
To edit courses or projects, authenticate with your Cardano wallet:
andamio user loginThis will:
- Open your browser to the Andamio app
- Prompt you to connect your wallet (Nami, Eternl, Lace, etc.)
- Sign a message to prove ownership of your Access Token
- Automatically store the JWT for future CLI commands
Check your auth status:
andamio user statusLog out when done:
andamio user logoutAll commands support multiple output formats via the -o flag:
andamio course list # Default text
andamio course list -o json # JSON for scripting
andamio course list -o csv # CSV for spreadsheets
andamio course list -o markdown # Markdown tablesconfig show— Show current configurationconfig set-url <url>— Set the API base URL (preprod or mainnet)
auth login --api-key <key>— Store your API keyauth status— Check API key authentication status
spec fetch— Fetch OpenAPI spec from the API and save toopenapi.jsonspec paths [--filter <pattern>]— List available API paths
course list— List available coursescourse get <course-id>— Get course detailscourse modules <course-id>— List modules for a coursecourse slts <course-id> <module-code>— List SLTs for a modulecourse lesson <course-id> <module-code> <slt-index>— Get lesson contentcourse assignment <course-id> <module-code>— Get assignmentcourse intro <course-id> <module-code>— Get module introductioncourse export <course-id> <module-code>— Export module to local directorycourse import <path> --course-id <id>— Import module from local directory
project list— List available projectsproject get <project-id>— Get project detailsproject task list <project-id>— List tasks (manager only)project task get <index> --project-id <id>— Get a task by indexproject task create <project-id>— Create a task (--title,--lovelace,--expirationrequired;--github-issueoptional)project task update <index> --project-id <id>— Update task fieldsproject task delete <index> --project-id <id>— Delete a DRAFT taskproject task export <project-id>— Export tasks totasks/<slug>/as Markdown filesproject task import <project-id>— Import tasks from Markdown files (--dry-runsupported)
user login— Authenticate via browser wallet signing (get JWT)user logout— Clear stored user authenticationuser status— Show authentication status (API key + JWT)user me— Get current user infouser usage— Get user usage statsuser exists <alias>— Check if user exists
tx pending— List pending transactionstx types— List transaction typestx status <tx-hash>— Get transaction status
apikey usage— Get API key usage statsapikey profile— Get API key profile
Export and import course modules for local editing. The format is compatible with andamio-lesson-coach.
# Export a module to ./compiled/<course-slug>/<module-code>/
andamio course export <course-id> <module-code>
# Export to a custom directory
andamio course export <course-id> <module-code> --output-dir ./my-courses
# Force overwrite existing export
andamio course export <course-id> <module-code> --force
# JSON output (for scripting)
andamio course export <course-id> <module-code> --output jsonExport works for modules in any status (DRAFT, APPROVED, ON_CHAIN).
# Import a locally-edited module back to the platform
andamio course import ./compiled/my-course/101 --course-id <course-id>
# JSON output
andamio course import ./compiled/my-course/101 --course-id <id> --output jsonImport automatically:
- Extracts
# H1headings as titles for lessons, introduction, and assignment - Uploads new images to the CDN (PNG, JPG, GIF, WebP — max 5MB each)
- Preserves existing CDN image URLs via the image manifest
- Preserves existing metadata (description, image_url, video_url) not present in markdown
- Skips SLT updates for approved/published modules (SLTs are locked after approval)
Both commands use this structure (compatible with lesson-coach /compile skill):
compiled/<course-slug>/<module-code>/
├── outline.md # YAML frontmatter (title, code) + SLT list
├── introduction.md # Module introduction (optional)
├── lesson-1.md # Lesson for SLT 1
├── lesson-2.md # Lesson for SLT 2
├── ...
├── assignment.md # Module assignment (optional)
└── assets/ # Images referenced in content
├── *.png
└── .image-manifest.json # Maps filenames to CDN URLs
outline.md — YAML frontmatter with title and code, plus numbered SLT list:
---
title: "Introduction to Cardano"
code: "101"
---
# Introduction to Cardano
## SLTs
1. Understand blockchain fundamentals
2. Set up a Cardano walletlesson-N.md — First # H1 becomes the lesson title, rest is content:
# Understanding Blockchain
A blockchain is a distributed ledger...
## Key Concepts
- Decentralization
- Immutabilityintroduction.md / assignment.md — Same format as lessons (H1 = title).
Exported images: Downloaded to assets/ with a .image-manifest.json mapping filenames to their original CDN URLs. On re-import, the manifest restores the original URLs — no re-upload needed.
New images: Place new images in assets/ and reference them in markdown as . On import, new images (not in the manifest) are automatically uploaded to the CDN via the app server. The manifest is updated on disk so future imports don't re-upload.
Supported formats: PNG, JPEG, GIF, WebP (max 5MB per image).
# 1. Export
andamio course export <course-id> <module-code>
# 2. Edit locally
vim compiled/my-course/101/lesson-1.md
# 3. Add new images (optional)
cp diagram.png compiled/my-course/101/assets/
# 4. Import back
andamio course import compiled/my-course/101 --course-id <course-id>- Local editing: Edit course content in your preferred editor
- Version control: Track course materials in git
- Round-trip editing: Export → modify → import
- Lesson coach integration: Import modules compiled by lesson-coach
- Bulk content updates: Edit multiple lessons at once, import all changes atomically
The full workflow for creating a course from scratch. Each step builds on the previous one.
andamio tx run /v2/tx/instance/owner/course/create \
--body '{"alias":"my-alias","teachers":["my-alias"],"initiator_data":{"change_address":"addr_test1...","used_addresses":["addr_test1..."]}}' \
--skey ./payment.skey \
--tx-type course_createThis creates the course on-chain and auto-registers it in the DB. The response includes the course_id.
andamio course owner update --course-id <id> --title "My Course" --description "..." --publicUse update, not create or register — the course was already registered by the TX in step 1.
Use andamio-lesson-coach to create and compile modules, or write markdown files manually following the directory structure in Course Import/Export.
andamio course import-all ./compiled/my-course --course-id <id> --createCreates DRAFT modules with content. The --create flag creates new modules (omit it when updating existing ones).
andamio tx run /v2/tx/course/teacher/modules/manage \
--body-file manage-modules.json \
--skey ./payment.skey \
--tx-type modules_manage \
--instance-id <course-id>For each module, link the on-chain module (identified by slt_hash) to the DB module:
andamio course teacher register-module \
--course-id <id> --module-code 101 --slt-hash <hash>Get slt_hashes from the TX response or by inspecting the on-chain state.
register-module sets the module status to APPROVED, but content import requires DRAFT status:
andamio course teacher update-module-status \
--course-id <id> --module-code 101 --status DRAFTandamio course import-all ./compiled/my-course --course-id <id>This time without --create — the modules already exist. Content (lessons, intro, assignment, SLTs) is imported into the linked modules.
register-modulesets APPROVED: You must set status back to DRAFT before importing content (step 7). Import skips SLT updates for non-DRAFT modules.- Module hash ordering is non-deterministic: On-chain token names (slt_hashes) don't sort in the same order as your module codes. Check the register response to map hashes to codes.
publish-moduleis for DB→chain linking, not on-chain publishing: To publish modules on-chain, usetx runwithmodules_manage. Thepublish-modulecommand links an existing on-chain module to a DB record.course owner createvsupdate: Aftertx runwithcourse_create, the course is auto-registered. Useupdateto set metadata.createis only needed when auto-registration failed.
Project tasks are on-chain bounties that project managers create to reward contributors. All task commands require wallet authentication (andamio user login) and manager access on the project.
# Find your project ID once, use it everywhere
export PROJECT_ID=$(andamio project list --output json | jq -r '.data[0].project_id')# List tasks
andamio project task list "$PROJECT_ID"
# Create a task
andamio project task create "$PROJECT_ID" \
--title "Implement wallet connect" \
--lovelace 5000000 \
--expiration 2026-06-01
# Get a task by index
andamio project task get 1 --project-id "$PROJECT_ID"
# Update fields on a DRAFT task
andamio project task update 1 --project-id "$PROJECT_ID" --lovelace 7000000
# Delete a DRAFT task
andamio project task delete 1 --project-id "$PROJECT_ID"Use --github-issue to prefix the title with the issue reference:
andamio project task create "$PROJECT_ID" \
--title "Add dark mode toggle" \
--github-issue "Andamio-Platform/andamio-cli#42" \
--lovelace 5000000 \
--expiration 2026-06-01The stored title becomes [Andamio-Platform/andamio-cli#42] Add dark mode toggle.
All task commands work without a TTY — they compose cleanly with gh in scripts and CI:
# Create one andamio task per open GitHub issue
gh issue list --repo org/repo --json number,title --jq '.[]' | \
while IFS= read -r issue; do
NUMBER=$(echo "$issue" | jq -r '.number')
TITLE=$(echo "$issue" | jq -r '.title')
andamio project task create "$PROJECT_ID" \
--title "$TITLE" \
--github-issue "org/repo#$NUMBER" \
--lovelace 5000000 \
--expiration 2026-06-01
doneExport all tasks to Markdown, edit locally, and reimport:
# Export
andamio project task export "$PROJECT_ID"
# Creates: tasks/<project-slug>/001-task-title.md, 002-...
# Edit tasks/<project-slug>/*.md in your editor
# Dry run
andamio project task import "$PROJECT_ID" --dry-run
# Import
andamio project task import "$PROJECT_ID"Each exported file has YAML frontmatter (title, lovelace, expiration_time, index, project_id) and a Markdown body. Files without an index field create new tasks on import.
Only DRAFT tasks can be updated or deleted. ACTIVE and COMPLETED tasks are skipped during import.
The CLI works with two Cardano networks. Start on preprod for development.
| Preprod (default) | Mainnet | |
|---|---|---|
| API | https://preprod.api.andamio.io |
https://mainnet.api.andamio.io |
| App | preprod.app.andamio.io | app.andamio.io |
| API key | preprod.app.andamio.io/api-setup | app.andamio.io/api-setup |
| Access Token | Free (test ADA) | Requires real ADA |
Switch networks:
andamio config set-url https://mainnet.api.andamio.ioImportant:
- API keys are network-specific — a preprod key won't work on mainnet
- Wallet auth (
user login) connects to the app matching your current network - You need a separate Access Token on each network
- When switching networks, re-authenticate:
andamio auth login --api-key <mainnet-key>
All commands support --output (-o) flag:
andamio course list # Default text output
andamio course list -o json # JSON (for scripting/piping)
andamio course list -o csv # CSV
andamio course list -o markdown # Markdown tableConfig is stored at ~/.andamio/config.json:
{
"api_key": "your-api-key",
"base_url": "https://preprod.api.andamio.io",
"user_jwt": "eyJ...",
"jwt_expires_at": "2026-03-14T12:00:00Z",
"user_alias": "your-alias",
"user_id": "user-uuid"
}The user_* fields are populated automatically by andamio user login.
Available environments:
https://preprod.api.andamio.io(default)https://mainnet.api.andamio.io
# Build
go build -o andamio ./cmd/andamio
# Build with version info
go build -ldflags "-X main.version=0.1.0 -X main.commit=$(git rev-parse --short HEAD) -X main.date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" -o andamio ./cmd/andamio
# Fetch latest API spec
./andamio spec fetch
# Run locally
./andamio --help
./andamio --version./scripts/release.sh # Auto-bump patch version
./scripts/release.sh 0.2.0 # Specific versionSee CLAUDE.md for architecture details, command patterns, and how to add new endpoints.
Full documentation: docs.andamio.io/docs/guides/developers/cli
MIT