{"_id":"@atezca/core","_rev":"2-cf18003a0df7bddaa0d71cd3a73aa388","name":"@atezca/core","dist-tags":{"latest":"1.1.1"},"versions":{"1.1.0":{"name":"@atezca/core","version":"1.1.0","keywords":["testing","e2e","playwright","ai","claude","natural-language","test-automation"],"author":"","license":"MIT","_id":"@atezca/core@1.1.0","maintainers":[{"name":"maldos23","email":"gino.romero.andriano@gmail.com"}],"bin":{"az":"dist/cli.js"},"dist":{"shasum":"5e46f85ce3c85da36d4b0116a34b19ddae170b6a","tarball":"https://registry.npmjs.org/@atezca/core/-/core-1.1.0.tgz","fileCount":14,"integrity":"sha512-7REeoRHTRC2rjVyrYl1O5fLKpUIcb6Nz0tg/pOVGH1dqqqHMfpN7WyotFpbv2Cnf1/bimQH2TB6TOlO+mECrQQ==","signatures":[{"sig":"MEQCIC9+VM5Bn6odmlzNH2VUshqxV6Y3+HnKXhKGBPYElgnQAiAgwL/cM5/N+SxEZ5O1UtWqFEBBWMplgR8M9ContTdy6A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":329899},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"c401d4e5e4ec6c64799b5f96b0f6ff3395e652b2","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"pnpm build && pnpm test"},"_npmUser":{"name":"maldos23","email":"gino.romero.andriano@gmail.com"},"_npmVersion":"11.6.2","description":"AI-powered E2E testing library with natural language syntax","directories":{},"_nodeVersion":"22.20.0","dependencies":{"zod":"^3.23.8","chalk":"^5.3.0","dotenv":"^16.4.5","playwright":"^1.48.0","@anthropic-ai/sdk":"^0.30.0","@google/generative-ai":"^0.21.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.2","vitest":"^1.3.1","typescript":"^5.3.3","@types/node":"^20.11.19"},"_npmOperationalInternal":{"tmp":"tmp/core_1.1.0_1771054199158_0.5828921468996995","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@atezca/core","version":"1.1.1","description":"AI-powered E2E testing library with natural language syntax","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/maldos23/atezca.git"},"bugs":{"url":"https://github.com/maldos23/atezca/issues"},"bin":{"az":"dist/cli.js"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run","test:watch":"vitest","clean":"rm -rf dist","prepublishOnly":"pnpm build && pnpm test"},"keywords":["testing","e2e","playwright","ai","claude","natural-language","test-automation"],"author":"","license":"MIT","dependencies":{"@anthropic-ai/sdk":"^0.30.0","@google/generative-ai":"^0.21.0","playwright":"^1.48.0","dotenv":"^16.4.5","zod":"^3.23.8","chalk":"^5.3.0"},"devDependencies":{"@types/node":"^20.11.19","tsup":"^8.0.2","typescript":"^5.3.3","vitest":"^1.3.1"},"engines":{"node":">=18.0.0"},"gitHead":"a8e405d610ced273b1dc420884956950dbd34cc7","_id":"@atezca/core@1.1.1","homepage":"https://github.com/maldos23/atezca#readme","_nodeVersion":"22.20.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-EYdk/RGs2GiGXU1iTAeFQPItutjKPdBSlklilEWSZHejR2d3RKm9hhO+qMczB8HGw2fSyIgwdyWJAgptjK+04g==","shasum":"e0beec9b80dd4ea5e1620b0df66fb58fdbe0ae9f","tarball":"https://registry.npmjs.org/@atezca/core/-/core-1.1.1.tgz","fileCount":14,"unpackedSize":337332,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD/0YKbv1dZGmkIHK9An8/HP5Lw/bHlc9r80+etlpOP+AIgB3nKCVBRU+MpwZYX2H7eNWGKaN9MyvGJKBSSnEYGfVA="}]},"_npmUser":{"name":"maldos23","email":"gino.romero.andriano@gmail.com"},"directories":{},"maintainers":[{"name":"maldos23","email":"gino.romero.andriano@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_1.1.1_1771280381416_0.5835157066174441"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-14T07:29:59.048Z","modified":"2026-02-16T22:19:41.704Z","1.1.0":"2026-02-14T07:29:59.315Z","1.1.1":"2026-02-16T22:19:41.565Z"},"license":"MIT","keywords":["testing","e2e","playwright","ai","claude","natural-language","test-automation"],"description":"AI-powered E2E testing library with natural language syntax","maintainers":[{"name":"maldos23","email":"gino.romero.andriano@gmail.com"}],"readme":"# Atezca 🚀\n\nAI-powered E2E testing library with natural language syntax.\n\nWrite tests like humans think, let AI handle the technical details.\n\n## Features\n\n- 🤖 **AI-Powered**: Uses Claude AI or Google Gemini to interpret natural language test commands\n- 🎯 **Simple Syntax**: Intuitive API that reads like plain English\n- 📝 **Code Generation**: Automatically generates reusable Playwright test files\n- 💾 **Smart Caching**: Reduces API costs by caching interpretations\n- ⚡ **Fast Execution**: Built on Playwright for reliable, fast test execution\n- 🔄 **Multi-Browser**: Support for Chromium, Firefox, and WebKit\n- 🔀 **Multi-Provider**: Choose between Claude (Anthropic) or Gemini (Google)\n- 🔒 **SSL Bypass**: Option to disable SSL validation for development environments\n- 🛠️ **Auto-Install**: Automatically installs Playwright browsers on first run\n\n## Installation\n\n```bash\n# Using pnpm (recommended)\npnpm add -D @atezca/core\n\n# Using npm\nnpm install --save-dev @atezca/core\n\n# Using yarn\nyarn add -D @atezca/core\n```\n\n## Quick Start\n\n### 1. Setup API Key\n\nCreate a `.env` file in your project root:\n\n**Option A: Using Claude (Anthropic)**\n```bash\nANTHROPIC_API_KEY=sk-ant-api03-...\nATEZCA_AI_PROVIDER=claude\n```\n\n**Option B: Using Gemini (Google)**\n```bash\nGOOGLE_API_KEY=AIza...\nATEZCA_AI_PROVIDER=gemini\n```\n\nOr create a `.atezcarc` config file:\n\n```bash\naz init\n```\n\n### 2. Write Your First Test\n\nCreate a file `test.spec.js`:\n\n```javascript\nconst { az } = require('@atezca/core');\n\n// Configure the test\naz.setup({\n  url: 'https://example.com',\n  browser: 'chromium',\n  headless: true,\n});\n\n// Write tests in natural language\naz.test('navigate', 'go to login page');\naz.test('interact', \"click button 'Login'\");\naz.test('interact', \"type 'user@example.com' in email field\");\naz.test('interact', \"type 'password123' in password field\");\naz.test('interact', \"click submit button\");\naz.test('expect', 'show success message');\n```\n\n### 3. Run Your Test\n\n```bash\naz run test.spec.js\n```\n\nOr generate Playwright code without execution:\n\n```bash\naz generate test.spec.js\n```\n\n## API Reference\n\n### `az.setup(config)`\n\nInitialize test configuration.\n\n**Parameters:**\n- `url` (required): Base URL of the application\n- `browser`: Browser type (`'chromium'`, `'firefox'`, `'webkit'`) - default: `'chromium'`\n- `headless`: Run in headless mode - default: `true`\n- `timeout`: Default timeout in milliseconds - default: `30000`\n- `outputDir`: Directory for generated test files - default: `'generated-tests'`\n- `aiProvider`: AI provider (`'claude'`, `'gemini'`) - overrides environment config\n- `apiKey`: API key for the selected provider - overrides environment config\n- `disableSSL`: Disable SSL certificate validation (useful for self-signed certificates) - default: `false`\n- `cacheEnabled`: Enable interpretation caching - default: `true`\n- `retries`: Number of retries for failed actions - default: `3`\n\n**Example:**\n```javascript\n// Option 1: Use environment variables (recommended for production)\naz.setup({\n  url: 'https://myapp.com',\n  browser: 'firefox',\n  headless: false,\n  timeout: 60000,\n  outputDir: 'my-tests',\n});\n\n// Option 2: Specify AI provider and API key directly (useful for testing)\naz.setup({\n  url: 'https://myapp.com',\n  browser: 'chromium',\n  headless: true,\n  aiProvider: 'gemini',  // or 'claude'\n  apiKey: 'AIza...your_key_here',\n});\n```\n\n### `az.test(actionType, description)`\n\nDefine a test action using natural language.\n\n**Action Types:**\n- `'navigate'`: Navigate to a page or URL\n- `'interact'`: Click, type, select, or interact with elements\n- `'wait'`: Wait for conditions to be met\n- `'expect'`: Make assertions about the page state\n\n**Examples:**\n\n```javascript\n// Navigation\naz.test('navigate', 'go to dashboard');\naz.test('navigate', 'open settings page');\n\n// Interactions\naz.test('interact', \"click button 'Submit'\");\naz.test('interact', \"type 'hello@example.com' in email field\");\naz.test('interact', \"select 'Premium' from plan dropdown\");\naz.test('interact', \"hover over user menu\");\n\n// Waits\naz.test('wait', 'until loading spinner disappears');\naz.test('wait', 'until submit button is visible');\n\n// Assertions\naz.test('expect', 'show success message');\naz.test('expect', 'display user profile');\naz.test('expect', 'form should have validation errors');\n```\n\n## CLI Commands\n\n### Run Tests\n```bash\naz run <file>\n```\nExecute a test file with browser automation.\n\n### Generate Code\n```bash\naz generate <file>\n```\nGenerate Playwright test code without execution.\n\n### Initialize Config\n```bash\naz init\n```\nCreate a `.atezcarc` configuration file.\n\n### Cache Management\n```bash\n# Clear cache\naz cache clear\n\n# Show cache statistics\naz cache stats\n```\n\n## Configuration\n\nAtezca can be configured via:\n1. Environment variables (`.env` file)\n2. Configuration file (`.atezcarc`)\n3. API call (`az.setup()`)\n\nPriority: API > Environment > Config File > Defaults\n\n### Environment Variables\n\n```bash\n# AI Provider (choose one)\nATEZCA_AI_PROVIDER=claude  # or 'gemini'\n\n# For Claude:\nANTHROPIC_API_KEY=sk-ant-api03-...\n\n# For Gemini:\nGOOGLE_API_KEY=AIza...\n\n# Optional\nATEZCA_CACHE_ENABLED=true\nATEZCA_CACHE_EXPIRY_DAYS=30\nATEZCA_OUTPUT_DIR=generated-tests\nATEZCA_TIMEOUT=30000\nATEZCA_RETRIES=3\nATEZCA_BROWSER=chromium\nATEZCA_HEADLESS=true\n```\n\n### Config File (`.atezcarc`)\n\n```json\n{\n  \"aiProvider\": \"claude\",\n  \"anthropicApiKey\": \"sk-ant-api03-...\",\n  \"googleApiKey\": \"AIza...\",\n  \"cacheEnabled\": true,\n  \"cacheExpiryDays\": 30,\n  \"cacheFile\": \".atezca-cache.json\",\n  \"browser\": \"chromium\",\n  \"headless\": true,\n  \"timeout\": 30000,\n  \"retries\": 3,\n  \"outputDir\": \"generated-tests\"\n}\n```\n\n## How It Works\n\n1. **Write Natural Language**: You write test commands in plain English\n2. **AI Interpretation**: Claude AI or Gemini interprets your commands into Playwright actions\n3. **Smart Caching**: Interpretations are cached to reduce API calls and costs\n4. **Execution**: Playwright executes the actions in a real browser\n5. **Code Generation**: Reusable Playwright test files are generated\n\n```\nYour Test → AI (Claude/Gemini) → Playwright Actions → Browser → Generated Code\n                    ↓\n                 Cache (saves $$)\n```\n\n## Examples\n\nSee the [`examples/`](examples/) directory for more examples:\n- [Basic Login Test](examples/basic/test.spec.js)\n- [E-commerce Checkout](examples/advanced/ecommerce.spec.mjs)\n- [Using Gemini Provider](examples/gemini/test-with-gemini.mjs)\n\n## TypeScript Support\n\nAtezca is written in TypeScript and includes full type definitions:\n\n```typescript\nimport { az, type SetupConfig, type ActionType } from '@atezca/core';\n\nconst config: SetupConfig = {\n  url: 'https://example.com',\n  browser: 'chromium',\n  headless: true,\n};\n\naz.setup(config);\naz.test('interact', 'click login button');\n```\n\n## Cost Optimization\n\nAtezca includes several features to minimize API costs:\n\n- **Aggressive Caching**: Interpretations are cached locally for 30 days (configurable)\n- **Deterministic AI**: Uses temperature=0 for consistent results\n- **Batch Processing**: Multiple commands processed efficiently\n- **Offline Re-runs**: Cached tests can run without API calls\n\n## Troubleshooting\n\n### API Key Issues\n```bash\nError: Invalid Anthropic API key\n```\nMake sure your API key is set correctly in `.env` or `.atezcarc`.\n\n### Cache Issues\n```bash\n# Clear cache if interpretations seem stale\naz cache clear\n```\n\n### Browser Issues\n```bash\n# Install Playwright browsers\nnpx playwright install\n```\n\n## Contributing\n\nContributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n## Support\n\n- 📧 Email: contacto@soygino.com\n- 🐛 Issues: [GitHub Issues](https://github.com/maldos23/atezca/issues)\n- 💬 Discussions: [GitHub Discussions](https://github.com/maldos23/atezca/discussions)\n\n## Roadmap\n\n- [ ] Support for additional AI models (OpenAI, local models)\n- [ ] Visual regression testing\n- [ ] Parallel test execution\n- [ ] Plugin system\n- [ ] CI/CD integrations\n- [ ] Test recorder browser extension\n\n---\n\nMade with ❤️ by maldos23\n","readmeFilename":"README.md","homepage":"https://github.com/maldos23/atezca#readme","repository":{"type":"git","url":"git+https://github.com/maldos23/atezca.git"},"bugs":{"url":"https://github.com/maldos23/atezca/issues"}}