{"id":45591759,"url":"https://github.com/openjobspec/ojs-cli","last_synced_at":"2026-02-23T12:42:16.747Z","repository":{"id":338789507,"uuid":"1158762463","full_name":"openjobspec/ojs-cli","owner":"openjobspec","description":"Command-line interface for backends implementing Open Job Spec","archived":false,"fork":false,"pushed_at":"2026-02-16T13:33:22.000Z","size":98,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-16T20:50:52.079Z","etag":null,"topics":["background-jobs","cli","command-line","go","golang","ojs","openjobspec"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openjobspec.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-15T21:51:14.000Z","updated_at":"2026-02-16T15:02:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/openjobspec/ojs-cli","commit_stats":null,"previous_names":["openjobspec/ojs-cli"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/openjobspec/ojs-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openjobspec%2Fojs-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openjobspec%2Fojs-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openjobspec%2Fojs-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openjobspec%2Fojs-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openjobspec","download_url":"https://codeload.github.com/openjobspec/ojs-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openjobspec%2Fojs-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29743034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["background-jobs","cli","command-line","go","golang","ojs","openjobspec"],"created_at":"2026-02-23T12:42:14.967Z","updated_at":"2026-02-23T12:42:16.739Z","avatar_url":"https://github.com/openjobspec.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ojs-cli\n\n[![CI](https://github.com/openjobspec/ojs-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/openjobspec/ojs-cli/actions/workflows/ci.yml)\n[![Go Version](https://img.shields.io/github/go-mod/go-version/openjobspec/ojs-cli)](https://go.dev/)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n\nCommand-line interface for [Open Job Spec](https://openjobspec.org) servers.\n\n## Installation\n\n```bash\ngo install github.com/openjobspec/ojs-cli/cmd/ojs@latest\n```\n\nOr build from source:\n\n```bash\nmake build\n```\n\n## Quick Start\n\n```bash\n# Check server health\nojs health\n\n# Enqueue a job\nojs enqueue --type email.send --args '[\"user@example.com\", \"Welcome!\"]'\n\n# Check job status\nojs status \u003cjob-id\u003e\n\n# Cancel a job\nojs cancel \u003cjob-id\u003e\n\n# List queues with stats\nojs queues\nojs queues --stats default\n\n# Manage queues\nojs queues --pause critical\nojs queues --resume critical\n\n# List workers\nojs workers\n\n# Signal workers to stop fetching (graceful quiet)\nojs workers --quiet\n\n# Resume worker fetching\nojs workers --resume\n\n# Dead letter management\nojs dead-letter\nojs dead-letter --retry \u003cjob-id\u003e\nojs dead-letter --delete \u003cjob-id\u003e\n\n# Cron jobs\nojs cron\nojs cron --register --name daily-report --expression '0 9 * * *' --type report.generate\nojs cron --delete daily-report\n\n# Workflow management\nojs workflow create --name order-pipeline --steps '[{\"id\":\"validate\",\"type\":\"order.validate\",\"args\":[\"order-123\"]},{\"id\":\"charge\",\"type\":\"payment.charge\",\"args\":[\"order-123\"],\"depends_on\":[\"validate\"]}]'\nojs workflow status \u003cworkflow-id\u003e\nojs workflow cancel \u003cworkflow-id\u003e\nojs workflow list\nojs workflow list --state running\n\n# Live monitoring dashboard\nojs monitor\nojs monitor --interval 5s\n\n# --- New Commands ---\n\n# List and search jobs\nojs jobs --state active --queue billing --type email.send --limit 50\n\n# Get job result (with optional wait)\nojs result \u003cjob-id\u003e\nojs result \u003cjob-id\u003e --wait --timeout 30\n\n# View retry history\nojs retries \u003cjob-id\u003e\n\n# Update job priority\nojs priority \u003cjob-id\u003e --set 5\n\n# Bulk operations\nojs bulk cancel --ids job-1,job-2,job-3\nojs bulk retry --ids job-1,job-2\nojs bulk cancel --state available --queue old-queue\n\n# Enqueue with unique constraint\nojs enqueue --type email.send --args '[\"user@example.com\"]' --unique-key user-123 --unique-within 1h\n\n# Bulk enqueue from NDJSON file\nojs enqueue --batch jobs.ndjson\n\n# Dead letter purge and stats\nojs dead-letter --stats\nojs dead-letter --purge\nojs dead-letter --purge --older-than 7d\n\n# Cron trigger, history, pause/resume\nojs cron --trigger daily-report\nojs cron --history daily-report --history-limit 20\nojs cron --pause daily-report\nojs cron --resume daily-report\n\n# Queue create, delete, purge\nojs queues --create billing --concurrency 5 --max-size 1000\nojs queues --delete old-queue\nojs queues --purge default --states completed,discarded\n\n# Rate limits\nojs rate-limits\nojs rate-limits --inspect email\nojs rate-limits --override email --concurrency 20\nojs rate-limits --override email --clear\n\n# Server metrics\nojs metrics\nojs metrics --format prometheus\nojs metrics --format json\n\n# Event streaming (SSE)\nojs events --types job.completed,job.failed --queue billing\n\n# System maintenance\nojs system maintenance\nojs system maintenance --enable --reason \"scheduled upgrade\"\nojs system maintenance --disable\nojs system config\n\n# --- Round 2 Commands ---\n\n# Retry a job\nojs retry \u003cjob-id\u003e\n\n# Bulk delete terminal jobs\nojs bulk delete --ids job-1,job-2\nojs bulk delete --state completed --older-than 7d\n\n# Webhook subscriptions\nojs webhooks list\nojs webhooks create --url https://example.com/hooks --events job.completed,job.failed --secret mysecret\nojs webhooks get \u003csubscription-id\u003e\nojs webhooks delete \u003csubscription-id\u003e\nojs webhooks test \u003csubscription-id\u003e\nojs webhooks rotate-secret \u003csubscription-id\u003e\n\n# System statistics\nojs stats\nojs stats --queue billing\nojs stats --history --period 5m --since 24h\n\n# Worker management (per-worker)\nojs workers --detail \u003cworker-id\u003e\nojs workers --quiet-worker \u003cworker-id\u003e\nojs workers --deregister \u003cworker-id\u003e\n\n# Cron detail and update\nojs cron --detail daily-report\nojs cron --update daily-report --expression '0 10 * * *'\nojs cron --enabled true\n\n# Queue configuration\nojs queues --config default --concurrency 10 --retention 7d\n\n# Job detail view (full envelope)\nojs status \u003cjob-id\u003e --detail\n\n# Shell completions\nojs completion bash   # Add to ~/.bashrc: eval \"$(ojs completion bash)\"\nojs completion zsh    # Add to ~/.zshrc: eval \"$(ojs completion zsh)\"\nojs completion fish   # Save to ~/.config/fish/completions/ojs.fish\n```\n\n## Migration\n\nMigrate jobs from existing job systems to OJS:\n\n```bash\n# Analyze a Sidekiq installation\nojs migrate analyze sidekiq --redis redis://localhost:6379\n\n# Analyze a BullMQ installation\nojs migrate analyze bullmq --redis redis://localhost:6379\n\n# Analyze a Celery installation\nojs migrate analyze celery --redis redis://localhost:6379\n\n# Export jobs to NDJSON format\nojs migrate export sidekiq --redis redis://localhost:6379 --output jobs.ndjson\n\n# Import into an OJS server\nojs migrate import --file jobs.ndjson\n```\n\nSupported sources: `sidekiq`, `bullmq`, `celery`. The `analyze` subcommand provides a\nnon-destructive report of queue names, job counts, and types. The `export` subcommand\nextracts jobs to a portable NDJSON file. The `import` subcommand batch-enqueues jobs\ninto the target OJS server.\n\n## Configuration\n\n| Environment Variable | Description | Default |\n|---------------------|-------------|---------|\n| `OJS_URL` | Server URL | `http://localhost:8080` |\n| `OJS_AUTH_TOKEN` | Authentication token | (none) |\n| `OJS_OUTPUT` | Output format (`table`/`json`) | `table` |\n\n### Global Flags\n\n```\n--url \u003curl\u003e   Override server URL\n--json        Output as JSON\n--version     Show version\n--help        Show help\n```\n\n## Output Formats\n\nTable format (default):\n```\nNAME      STATUS\n────────────────────────────────\ndefault   active\npriority  paused\n```\n\nJSON format (`--json` or `OJS_OUTPUT=json`):\n```json\n{\n  \"queues\": [\n    {\"name\": \"default\", \"status\": \"active\"},\n    {\"name\": \"priority\", \"status\": \"paused\"}\n  ]\n}\n```\n\n## Development\n\n```bash\nmake build    # Build binary to bin/ojs\nmake test     # Run tests\nmake lint     # Run go vet\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenjobspec%2Fojs-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenjobspec%2Fojs-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenjobspec%2Fojs-cli/lists"}