{"id":21994416,"url":"https://github.com/codelibs/recotem-cli","last_synced_at":"2026-04-24T12:32:43.818Z","repository":{"id":57619141,"uuid":"384431526","full_name":"codelibs/recotem-cli","owner":"codelibs","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-15T09:59:47.000Z","size":231,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-15T14:07:53.032Z","etag":null,"topics":[],"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/codelibs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"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":"2021-07-09T12:32:53.000Z","updated_at":"2026-02-15T09:59:52.000Z","dependencies_parsed_at":"2022-09-14T12:41:17.650Z","dependency_job_id":null,"html_url":"https://github.com/codelibs/recotem-cli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/codelibs/recotem-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Frecotem-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Frecotem-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Frecotem-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Frecotem-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codelibs","download_url":"https://codeload.github.com/codelibs/recotem-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Frecotem-cli/sbom","scorecard":{"id":296680,"data":{"date":"2025-08-11","repo":{"name":"github.com/codelibs/recotem-cli","commit":"c3d7b28f733557e8a60ac47f6e895003f4379bc6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T19:42:36.887Z","repository_id":57619141,"created_at":"2025-08-17T19:42:36.887Z","updated_at":"2025-08-17T19:42:36.887Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32223955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T10:26:35.452Z","status":"ssl_error","status_checked_at":"2026-04-24T10:25:27.643Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-11-29T21:08:51.595Z","updated_at":"2026-04-24T12:32:43.812Z","avatar_url":"https://github.com/codelibs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# recotem-cli\n\n[![CI](https://github.com/codelibs/recotem-cli/workflows/CI/badge.svg)](https://github.com/codelibs/recotem-cli/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/codelibs/recotem-cli)](https://goreportcard.com/report/github.com/codelibs/recotem-cli)\n\nA command-line interface for the [Recotem](https://github.com/codelibs/recotem) recommendation system server (v2 API).\n\n## Features\n\n- **Authentication** -- JWT-based login/logout with automatic token refresh, API key support\n- **Project Management** -- Create, list, delete projects and view project summaries\n- **Training Data** -- Upload, list, delete, download, and preview training datasets\n- **Item Metadata** -- Upload, list, delete, and download item metadata\n- **Trained Models** -- Create, list, delete, download models and run recommendations\n- **Model Configuration** -- Create, list, update, and delete model configurations\n- **Evaluation Config** -- Configure evaluation metrics (NDCG, MAP, Recall, Hit)\n- **Split Config** -- Configure train/test data splitting strategies\n- **Parameter Tuning** -- Run hyperparameter optimization jobs\n- **Deployment Slots** -- Manage model deployment slots for production serving\n- **A/B Testing** -- Create, manage, and analyze A/B tests with conversion tracking\n- **Retraining Schedules** -- Schedule automatic model retraining with cron expressions\n- **API Key Management** -- Create, list, revoke, and delete API keys\n- **User Management** -- Create, list, update, activate/deactivate users\n- **Output Formats** -- Text, JSON, and YAML output for all commands\n\n## Installation\n\n### Pre-built Binaries\n\nDownload the latest release from the [releases page](https://github.com/codelibs/recotem-cli/releases).\n\n### From Source\n\n```bash\ngit clone https://github.com/codelibs/recotem-cli.git\ncd recotem-cli\nmake build\n# Binary is at ./bin/recotem\n```\n\nOr install directly to your `$GOPATH/bin`:\n\n```bash\nmake install\n```\n\n**Requires:** Go 1.25 or later.\n\n## Quick Start\n\n### 1. Configure the server URL\n\nCreate `~/.recotem/config.yaml`:\n\n```yaml\nurl: http://localhost:8000\n```\n\n### 2. Authenticate\n\n```bash\n# Interactive login (prompts for credentials)\nrecotem login\n\n# Or provide credentials directly\nrecotem login -u admin -p password\n\n# Or use an API key instead\nrecotem --api-key \"your-api-key\" project list\n```\n\n### 3. Use the CLI\n\n```bash\n# List projects\nrecotem project list\n\n# Create a project\nrecotem project create --name \"my-project\" --user-column user_id --item-column item_id\n\n# Upload training data\nrecotem training-data upload --project-id 1 --file ./interactions.csv\n\n# Get JSON output\nrecotem project list -o json\n\n# Check server health\nrecotem ping\n```\n\n## Commands\n\n| Command | Alias | Description |\n|---------|-------|-------------|\n| `login` | | Authenticate with username/password (JWT) |\n| `logout` | | Clear stored tokens |\n| `ping` | | Check server connectivity |\n| `version` | | Print version information |\n| `completion` | | Generate shell completion (bash/zsh/fish/powershell) |\n| `project` | `p` | Project management (list, create, delete, summary) |\n| `training-data` | `td` | Training data (list, upload, delete, download, preview) |\n| `item-meta-data` | `imd` | Item metadata (list, upload, delete, download) |\n| `trained-model` | `tm` | Trained models (list, create, delete, download, recommend, sample-recommend, recommend-profile) |\n| `model-configuration` | `mc` | Model config (list, create, update, delete) |\n| `evaluation-config` | `ec` | Evaluation config (list, create, update, delete) |\n| `split-config` | `sc` | Split config (list, create, update, delete) |\n| `parameter-tuning-job` | `ptj` | Tuning jobs (list, create, delete) |\n| `api-key` | `ak` | API keys (list, create, get, revoke, delete) |\n| `deployment-slot` | `ds` | Deployment slots (list, create, get, update, delete) |\n| `ab-test` | `ab` | A/B tests (list, create, get, update, delete, start, stop, results, promote-winner) |\n| `conversion-event` | `ce` | Conversion events (list, create, batch-create, get) |\n| `retraining-schedule` | `rs` | Retraining schedules (list, create, get, update, delete, trigger) |\n| `retraining-run` | `rr` | Retraining runs (list, get) |\n| `task-log` | `tl` | Task logs (list) |\n| `user` | `u` | User management (list, create, get, update, deactivate, activate, reset-password) |\n\n### Global Flags\n\n```\n-o, --output string   Output format: text, json, yaml (default \"text\")\n    --api-key string  API key for authentication (overrides stored tokens)\n```\n\n### Shell Completion\n\n```bash\n# Bash\nsource \u003c(recotem completion bash)\n\n# Zsh\nsource \u003c(recotem completion zsh)\n\n# Fish\nrecotem completion fish | source\n```\n\n## Authentication\n\nThe CLI supports three authentication methods (in priority order):\n\n1. **API Key** (`--api-key` flag or `api_key` in config) -- Sent as `X-API-Key` header\n2. **JWT Tokens** (via `recotem login`) -- Access token with automatic refresh\n3. **Legacy Token** (`token` in config) -- Sent as `Token` header (backward compatible)\n\nTokens are stored in `~/.recotem/config.yaml`:\n\n```yaml\nurl: http://localhost:8000\naccess_token: eyJ...\nrefresh_token: eyJ...\nexpires_at: 2025-01-01T00:00:00Z\n```\n\nThe CLI automatically refreshes expired JWT tokens using the stored refresh token.\n\n## Configuration\n\nThe configuration file is located at `~/.recotem/config.yaml`.\n\n| Field | Description |\n|-------|-------------|\n| `url` | Recotem server URL (required) |\n| `access_token` | JWT access token (set by `login`) |\n| `refresh_token` | JWT refresh token (set by `login`) |\n| `expires_at` | Token expiration time (set by `login`) |\n| `api_key` | API key for authentication (optional) |\n| `token` | Legacy token (backward compatible) |\n\n## Development\n\n### Requirements\n\n- Go 1.25 or later\n- [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen) v2 (for code generation)\n- [golangci-lint](https://golangci-lint.run/) (for linting)\n\n### Building and Testing\n\n```bash\nmake build          # Build for current platform\nmake build-all      # Cross-compile for linux/darwin/windows (amd64/arm64)\nmake test           # Run tests with race detector\nmake test-coverage  # Run tests with coverage report\nmake lint           # Run golangci-lint\nmake check          # Run all checks (fmt, vet, lint, test)\n```\n\n### OpenAPI Code Generation\n\nThe API client is generated from the OpenAPI schema using [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen) v2:\n\n```bash\nmake install-tools  # Install oapi-codegen\nmake generate       # Regenerate client from pkg/openapi/recotem.yaml\n```\n\n### Project Structure\n\n```\nrecotem-cli/\n├── main.go                 # Entry point\n├── Makefile                # Build automation\n├── pkg/\n│   ├── api/                # API client (one file per resource)\n│   ├── cfg/                # Configuration management (JWT, load/save)\n│   ├── cmd/                # CLI commands (cobra)\n│   ├── openapi/            # OpenAPI schema and generated client\n│   └── utils/              # Output formatting, string helpers\n├── .github/workflows/      # CI/CD (test on Go 1.25, lint, build)\n└── .golangci.yml           # Linter configuration\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/your-feature`)\n3. Make your changes\n4. Run checks (`make check`)\n5. Commit and push\n6. Open a Pull Request\n\n## License\n\nApache License 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelibs%2Frecotem-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelibs%2Frecotem-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelibs%2Frecotem-cli/lists"}