{"id":29121388,"url":"https://github.com/grottopress/lena","last_synced_at":"2025-10-12T02:43:45.525Z","repository":{"id":300955062,"uuid":"1007141834","full_name":"GrottoPress/lena","owner":"GrottoPress","description":"A low-level API client for Anthropic (Claude AI)","archived":false,"fork":false,"pushed_at":"2025-06-24T11:39:01.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-24T12:43:48.361Z","etag":null,"topics":["ai","anthropic","api","claude","crystal","http-client"],"latest_commit_sha":null,"homepage":"","language":"Crystal","has_issues":true,"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/GrottoPress.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2025-06-23T14:22:46.000Z","updated_at":"2025-06-24T11:39:05.000Z","dependencies_parsed_at":"2025-06-24T12:43:54.851Z","dependency_job_id":"13a2a739-0b20-4446-87e1-b8ab5a9263e2","html_url":"https://github.com/GrottoPress/lena","commit_stats":null,"previous_names":["grottopress/lena"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GrottoPress/lena","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrottoPress%2Flena","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrottoPress%2Flena/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrottoPress%2Flena/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrottoPress%2Flena/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GrottoPress","download_url":"https://codeload.github.com/GrottoPress/lena/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrottoPress%2Flena/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279009967,"owners_count":26084671,"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-10-12T02:00:06.719Z","response_time":53,"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":["ai","anthropic","api","claude","crystal","http-client"],"created_at":"2025-06-29T16:05:52.124Z","updated_at":"2025-10-12T02:43:45.499Z","avatar_url":"https://github.com/GrottoPress.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lena\n\n*Lena* is a low-level API client for *Anthropic (Claude AI)*. It features an intuitive interface that maps directly to the *Anthropic* API.\n\n### Usage Examples\n\n```crystal\n# Create a new client\nclient = Lena.new(api_key: \"anthropic-api-key\")\n```\n\n1. Send messages:\n\n   ```crystal\n   response = client.messages.create(\n     model: \"claude-3-7-sonnet-20250219\",\n     max_tokens: 1024,\n     messages: [{role: \"user\", content: \"Hello, world\"}]\n   )\n\n   if response.error\n     response.error.try do |error|\n       puts error.type\n       puts error.message\n       # ...\n     end\n   else\n     puts response.container.try(\u0026.id)\n     puts response.id\n\n     response.content.try \u0026.each do |content|\n       puts content.data\n       puts content.text\n       puts content.type\n       # ...\n     end\n\n     # ...\n   end\n   ```\n\n1. List models:\n\n   ```crystal\n   response = client.models.list(limit: 10)\n\n   if response.error\n     response.error.try do |error|\n       puts error.type\n       puts error.message\n       # ...\n     end\n   else\n     response.data.try \u0026.each do |model|\n       puts model.created_at\n       puts model.display_name\n       puts model.id\n       # ...\n     end\n   end\n   ```\n\n## Documentation\n\nFind the complete documentation in the `docs/` directory of this repository.\n\n## Development\n\nGenerate an API key from your Anthropic [account](https://console.anthropic.com).\n\nCreate a `.env.sh` file:\n\n```bash\n#!/usr/bin/env bash\n#\nexport ANTHROPIC_API_KEY='your-anthropic-api-key-here'\n```\n\nUpdate the file with your own details. Then run tests with `source .env.sh \u0026\u0026 crystal spec`.\n\n**IMPORTANT**: Remember to set permissions for your env file to `0600` or stricter: `chmod 0600 .env*`.\n\n## Contributing\n\n1. [Fork it](https://github.com/GrottoPress/lena/fork)\n1. Switch to the `master` branch: `git checkout master`\n1. Create your feature branch: `git checkout -b my-new-feature`\n1. Make your changes, updating changelog and documentation as appropriate.\n1. Commit your changes: `git commit`\n1. Push to the branch: `git push origin my-new-feature`\n1. Submit a new *Pull Request* against the `GrottoPress:master` branch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrottopress%2Flena","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrottopress%2Flena","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrottopress%2Flena/lists"}