Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changeset/soft-beds-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"agents": patch
---

Add CLI entry point and tests for agents package

Introduces a new CLI for the agents package using yargs with the following commands (currently stubs, not yet implemented):

- `init` / `create` - Initialize an agents project
- `dev` - Start development server
- `deploy` - Deploy agents to Cloudflare
- `mcp` - The agents mcp server

Adds CLI test suite with comprehensive coverage for all commands and configurations. Updates package.json to register the CLI binary, adds test scripts for CLI testing, and includes yargs dependencies.
142 changes: 141 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions packages/agents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"nanoid": "^5.1.6",
"partyserver": "^0.0.75",
"partysocket": "1.1.6",
"yargs": "^18.0.0",
"zod": "^3.25.76",
"zod-to-ts": "^1.2.0"
},
Expand All @@ -23,6 +24,7 @@
"description": "A home for your AI agents",
"devDependencies": {
"@cloudflare/workers-oauth-provider": "^0.0.12",
"@types/yargs": "^17.0.34",
"react": "*",
"vitest-browser-react": "^1.0.1"
},
Expand Down Expand Up @@ -123,13 +125,18 @@
"type": "git",
"url": "git+https://github.com/cloudflare/agents.git"
},
"bin": {
"agents": "dist/cli.js"
},
"scripts": {
"build": "tsx ./scripts/build.ts",
"check:test": "npm run check:test:workers && npm run check:test:react",
"check:test": "npm run check:test:workers && npm run check:test:react && npm run check:test:cli",
"check:test:cli": "vitest -r src/cli-tests --watch false",
"check:test:react": "vitest -r src/react-tests --watch false",
"check:test:workers": "vitest -r src/tests --watch false",
"evals": "(cd evals; evalite)",
"test": "npm run test:workers && npm run test:react",
"test": "npm run test:workers && npm run test:react && npm run test:cli",
"test:cli": "vitest -r src/cli-tests",
"test:react": "vitest -r src/react-tests",
"test:e2e": "vitest run src/e2e/e2e.test.ts --sequence.concurrent",
"test:workers": "vitest -r src/tests"
Expand Down
Loading
Loading