{"id":31286877,"url":"https://github.com/lig/rapt","last_synced_at":"2026-04-16T01:32:37.954Z","repository":{"id":316383154,"uuid":"1063128743","full_name":"lig/rapt","owner":"lig","description":"CLI tool for defining and running containerized jobs as Kubernetes tools (CRDs), written in Go","archived":false,"fork":false,"pushed_at":"2025-09-24T09:51:19.000Z","size":169787,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-24T10:22:55.424Z","etag":null,"topics":["automation","cli","cluster-tools","custom-resources","devtools","go","go-cli","job-runner","kubernetes","operator","orchestration","task-runner","tooling"],"latest_commit_sha":null,"homepage":"https://codeberg.org/lig/rapt","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-24T07:51:38.000Z","updated_at":"2025-09-24T09:51:03.000Z","dependencies_parsed_at":"2025-09-24T10:34:24.278Z","dependency_job_id":null,"html_url":"https://github.com/lig/rapt","commit_stats":null,"previous_names":["lig/rapt"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lig/rapt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lig%2Frapt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lig%2Frapt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lig%2Frapt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lig%2Frapt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lig","download_url":"https://codeload.github.com/lig/rapt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lig%2Frapt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276737483,"owners_count":25695698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-24T02:00:09.776Z","response_time":97,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["automation","cli","cluster-tools","custom-resources","devtools","go","go-cli","job-runner","kubernetes","operator","orchestration","task-runner","tooling"],"created_at":"2025-09-24T10:47:10.341Z","updated_at":"2026-04-16T01:32:37.939Z","avatar_url":"https://github.com/lig.png","language":"Go","readme":"# Rapt\n\n[![Go Version](https://img.shields.io/badge/go-1.24+-blue.svg)](https://golang.org/dl/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nRapt (from pronunciation of \"wrapped\") is a CLI utility written in Go that orchestrates running predefined jobs (commands or tools) in a Kubernetes environment.\n\n## Overview\n\nRapt enables you to define, manage, and execute jobs in Kubernetes clusters using a simple command-line interface. It is designed to streamline workflows by providing a consistent and extensible way to run and manage containerized tasks.\n\n## Features\n\n- **Kubernetes Integration**: Native support for Kubernetes clusters\n- **Custom Resource Definitions**: Uses CRDs to define and manage tools\n- **Simple CLI Interface**: Easy-to-use command-line interface\n- **Extensible**: Define custom tools with flexible configuration\n- **Namespace Support**: Work with specific Kubernetes namespaces\n\n## Installation\n\n### From Source\n\n```bash\ngit clone https://codeberg.org/lig/rapt.git\ncd rapt\ngo build -o rapt main.go\nsudo mv rapt /usr/local/bin/\n```\n\n### Using Go Install\n\n```bash\ngo install codeberg.org/lig/rapt@latest\n```\n\n## Quick Start\n\n1. **Initialize Rapt in your cluster**:\n   ```bash\n   rapt init\n   ```\n\n2. **Add a tool definition**:\n   ```bash\n   rapt add echo-tool --image alpine:latest --command \"echo Hello from Rapt!\"\n   ```\n\n3. **List available tools**:\n   ```bash\n   rapt list\n   ```\n\n4. **Run the tool**:\n   ```bash\n   rapt run echo-tool\n   ```\n\n5. **View tool details**:\n   ```bash\n   rapt describe echo-tool\n   ```\n\n6. **Clean up**:\n   ```bash\n   rapt purge\n   ```\n\n## Commands\n\n### `rapt init`\nInstall the Rapt CRD in your Kubernetes cluster. This command sets up the necessary CustomResourceDefinition so that Rapt can manage and orchestrate predefined jobs in your cluster.\n\n```bash\nrapt init [--namespace \u003cnamespace\u003e]\n```\n\n### `rapt add`\nAdd a new tool definition to your cluster. Tools are defined using Kubernetes Custom Resources.\n\n```bash\nrapt add \u003ctool-name\u003e [flags]\n```\n\n**Flags:**\n- `-i, --image`: (Required) Container image to run\n- `-c, --command`: Command to execute (overrides ENTRYPOINT). Specify as a single string.\n- `-e, --env`: Environment variables in the form NAME=VALUE. Can be specified multiple times.\n- `--dry-run`: Print the Tool CR YAML without applying it to the cluster\n\n**Examples:**\n```bash\n# Simple tool\nrapt add lstool --image alpine:latest --command \"ls -la\"\n\n# Tool with environment variables\nrapt add echo --image busybox -e FOO=bar -e BAZ=qux --command \"echo \\$FOO \\$BAZ\"\n\n# Preview without creating\nrapt add my-tool --image alpine:latest --command \"whoami\" --dry-run\n```\n\n### `rapt run`\nExecute a tool by creating a Kubernetes Job from the tool definition.\n\n```bash\nrapt run \u003ctool-name\u003e [flags]\n```\n\n**Flags:**\n- `-a, --arg`: Tool argument in the form key=value. Can be specified multiple times.\n- `-e, --env`: Environment variable in the form key=value. Can be specified multiple times.\n- `-m, --mount`: Mount local file into container in the form local-path:container-path. Can be specified multiple times.\n- `-w, --wait`: Wait for the job to complete before exiting\n- `-f, --follow`: Follow job logs in real-time (default behavior)\n- `-t, --timeout`: Timeout in seconds when waiting for job completion (default: 300)\n\n**Examples:**\n```bash\n# Run a simple tool\nrapt run echo-tool\n\n# Run with environment variables\nrapt run my-tool --env DEBUG=true\n\n# Run with file mounts\nrapt run script-runner --mount ./script.sh:/app/script.sh --mount ./config.yaml:/etc/config.yaml\n\n# Run and wait for completion\nrapt run data-processor --wait --timeout 600\n```\n\n**Note**: By default, logs are streamed in real-time, making it feel like running a local command.\n\n### `rapt list`\nList all available tools in the cluster.\n\n```bash\nrapt list [flags]\n```\n\n**Flags:**\n- `-o, --output`: Output format: table, json, yaml (default: table)\n- `-A, --all-namespaces`: List tools from all namespaces\n\n### `rapt describe`\nShow detailed information about a specific tool.\n\n```bash\nrapt describe \u003ctool-name\u003e [flags]\n```\n\n**Flags:**\n- `-o, --output`: Output format: table, json, yaml (default: table)\n\n### `rapt logs`\nView logs from previous job executions.\n\n```bash\nrapt logs \u003ctool-name\u003e [job-name]\n```\n\n### `rapt status`\nCheck the status of jobs created from a tool.\n\n```bash\nrapt status \u003ctool-name\u003e\n```\n\n### `rapt delete`\nDelete a tool definition from the cluster.\n\n```bash\nrapt delete \u003ctool-name\u003e\n```\n\n### `rapt purge`\nRemove the Rapt CRD and all associated resources from your Kubernetes cluster.\n\n```bash\nrapt purge [--namespace \u003cnamespace\u003e]\n```\n\n⚠️ **Warning**: This operation is destructive and cannot be undone.\n\n## Tool Definition Schema\n\n**Note**: The schema below is for direct Kubernetes resource creation using `kubectl` or for understanding the underlying CRD structure. When using `rapt add`, you don't need to write YAML manually - the tool creates it for you. However, `rapt add` currently has limited support for defining tool arguments and help text. For complex tools with arguments, you may need to create the YAML file directly and apply it with `kubectl apply -f tool.yaml`.\n\nTools are defined using Kubernetes Custom Resources with the following schema:\n\n```yaml\napiVersion: rapt.dev/v1alpha1\nkind: Tool\nmetadata:\n  name: my-tool\nspec:\n  help: \"Description of what this tool does\"\n  arguments:\n    - name: \"input\"\n      description: \"Input file path\"\n      required: true\n    - name: \"output\"\n      description: \"Output file path\"\n      required: false\n      default: \"output.txt\"\n  jobTemplate:\n    image: \"alpine:latest\"\n    command: [\"sh\", \"-c\", \"echo 'Hello from my-tool'\"]\n    env:\n      - name: \"ENV_VAR\"\n        value: \"example-value\"\n```\n\n## Examples\n\n### Example 1: Simple Echo Tool\n\n**Step 1: Add the tool**\n```bash\nrapt add echo-tool \\\n  --image alpine:latest \\\n  --command \"echo Hello from echo-tool\"\n```\n\n**Step 2: Run the tool**\n```bash\nrapt run echo-tool\n```\n\n**Step 3: View tool details**\n```bash\nrapt describe echo-tool\n```\n\n### Example 2: Tool with Environment Variables\n\n**Step 1: Add the tool**\n```bash\nrapt add greeter \\\n  --image alpine:latest \\\n  --command \"sh -c 'echo Hello \\$NAME, welcome to \\$PLACE'\" \\\n  --env \"NAME=User\" \\\n  --env \"PLACE=Kubernetes\"\n```\n\n**Step 2: Run with default environment**\n```bash\nrapt run greeter\n```\n\n**Step 3: Run with custom environment variables**\n```bash\nrapt run greeter --env NAME=Alice --env PLACE=Production\n```\n\n### Example 3: File Processing Tool\n\n**Step 1: Add the tool**\n```bash\nrapt add file-processor \\\n  --image alpine:latest \\\n  --command \"sh -c 'cat /data/input.txt \u0026\u0026 echo Processed \u003e /data/output.txt'\"\n```\n\n**Step 2: Run with mounted files**\n```bash\necho \"Sample content\" \u003e input.txt\nrapt run file-processor \\\n  --mount ./input.txt:/data/input.txt \\\n  --mount ./output.txt:/data/output.txt\n```\n\n**Step 3: Check the output**\n```bash\ncat output.txt\n```\n\n### Example 4: Database Tool\n\n**Step 1: Add the tool**\n```bash\nrapt add db-query \\\n  --image postgres:15 \\\n  --command \"psql\" \\\n  --env \"PGHOST=db-service.default.svc.cluster.local\" \\\n  --env \"PGUSER=readonly\" \\\n  --env \"PGDATABASE=mydb\"\n```\n\n**Step 2: Run the tool**\n```bash\nrapt run db-query --env PGPASSWORD=secret\n```\n\nFor more examples, see the [examples/](examples/) directory.\n\n## Development\n\n### Prerequisites\n- Go 1.24 or later\n- Kubernetes cluster (minikube, kind, or cloud provider)\n- kubectl configured to access your cluster\n\n### Building from Source\n```bash\ngit clone https://codeberg.org/lig/rapt.git\ncd rapt\ngo mod download\ngo build -o rapt main.go\n```\n\n### Running Tests\n```bash\ngo test ./...\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.\n\n## Support\n\n- **Issues**: [Report bugs or request features](https://codeberg.org/lig/rapt/issues)\n- **Discussions**: [Join the community](https://codeberg.org/lig/rapt/discussions)\n\n## Roadmap\n\nFor detailed development plans and future features, see our [ROADMAP.md](ROADMAP.md).\n\n**Recent Achievements:**\n- ✅ Complete MVP functionality with all essential commands\n- ✅ Real-time log streaming in `rapt run`\n- ✅ Comprehensive job log management with `rapt logs`\n- ✅ Enhanced job naming with readable timestamps\n\n---\n\n**Author**: Serge Matveenko \u003clig@countzero.co\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flig%2Frapt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flig%2Frapt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flig%2Frapt/lists"}