Closed
Conversation
feat: add console-based CLI authentication
…flag - Add --file-storage flag to sessions start command - Export GetCurrentSessionID() and RequireSessionID() for reuse - Update files commands to use shared sessionID variable and --id flag - Remove required --session flag from files commands - Files commands now use same session resolution as sessions commands (flag > env var > current session file) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
GetClient() is called before RequireSessionID(), so the test needs an API key to pass GetClient() and then fail on RequireSessionID(). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
feat: unify files command session ID resolution and add file-storage …
Add comprehensive integration tests for all API endpoints: - sessions: lifecycle, cookies, observe, scrape, network - agents: list, start, status, stop - env: observe, execute, scrape flows - personas: CRUD, emails, SMS - profiles: CRUD with name options - vaults: CRUD, credentials lifecycle with MFA - storage: upload, download, list - functions: CRUD, schedule, fork, runs Add GitHub workflow (.github/workflows/integration-tests.yml): - Runs on push/PR to main + manual trigger - Uses NOTTE_API_KEY secret with staging API - 30-minute timeout for full test suite Update Makefile with new commands: - make setup: install dev dependencies (golangci-lint, goimports, gofumpt) - make test-integration: run integration tests - make test-coverage: run tests with HTML coverage report - make lint-fix: run linters with auto-fix - make help: show all available commands Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The workflow now shows a warning and exits successfully if NOTTE_API_KEY secret is not configured, instead of failing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add FlexibleTime type to handle API timestamps without timezone info - Update generate.sh to replace time.Time with FlexibleTime in struct fields - Fix action JSON format in tests, docs, and examples (use "type" not "action") - Rename env_test.go to page_test.go and TestEnv* to TestPage* Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove functions and function_runs tests (API not stable) - Remove agents tests that don't work without session - Fix storage tests to use --id flag instead of --session - Keep only stable, working tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sessions need --file-storage flag to access the downloads endpoint. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
feat: add integration tests and GitHub workflow
…ponse body'
The generated oapi-codegen client reads the response body into resp.Body ([]byte),
but ParseAPIError was trying to read from resp.HTTPResponse.Body which was already
consumed. This caused all API errors to show "failed to read response body".
Changes:
- Update ParseAPIError to accept body bytes as parameter instead of reading from response
- Update HandleAPIResponse to pass the already-read body bytes
- Update all command files to pass resp.Body to HandleAPIResponse
- Support both nested {"error": {"message": "..."}} and flat {"message": "..."} API error formats
- Add integration tests for error parsing
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
fix: display actual API error messages instead of 'failed to read res…
Add syntactic sugar for page actions with a new `notte page <action>` command structure. Instead of verbose JSON, users can now write: notte page click "#btn" notte page click @b3 # @-prefixed = element ID notte page fill @input "hello" notte page goto "https://example.com" Commands added (21 total): - Element actions: click, fill, check, select, download, upload - Navigation: goto, new-tab, back, forward, reload - Scrolling: scroll-down, scroll-up - Keyboard: press - Tab management: switch-tab, close-tab - Utility: wait, scrape, captcha-solve, complete, form-fill Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive integration tests covering: - Navigation: goto, new-tab, back, forward, reload - Scrolling: scroll-down, scroll-up - Keyboard: press, wait - Tab management: switch-tab, close-tab - Form interactions: fill, check, select, form-fill - Data extraction: scrape with --main-only flag - Workflow tests combining multiple commands - Error handling tests - Current session usage without --id flag Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The API expects 'type' field instead of 'action' for specifying the action type. Also fix TestPageFormFill to use valid field names from the API schema (first_name, last_name, email, phone instead of arbitrary field names). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove unused pageSessionID variable and use the global sessionID directly so the --id flag works correctly with RequireSessionID(). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Return error for empty selectors or bare '@' to prevent sending invalid requests to the API. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update to match new HandleAPIResponse signature that requires body bytes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
feat: add notte page commands for simplified page actions
Add comprehensive documentation and templates for AI agents using the notte CLI: - SKILL.md: Main skill documentation with command reference - references/session-management.md: Browser session lifecycle guide - references/function-management.md: Workflow functions guide - references/account-management.md: Personas and vaults guide - templates/form-automation.sh: Form filling template - templates/authenticated-session.sh: Login with vault credentials - templates/data-extraction.sh: Web scraping template - .github/workflows/test-skills.yml: CI for shell script validation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add guidance for using notte CLI with AI coding assistants: - Simple prompt-based approach - MCP skill installation for Claude Code, Cursor, Windsurf - AGENTS.md/CLAUDE.md instructions template - Link to skills documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fix shellcheck SC2034 warning about unused variable by using MFA_SELECTOR in the handle_mfa function log messages. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Feature/skills documentation
Add NOTTE_FUNCTION_ID env var and current_function file support to functions commands, mirroring the existing session ID pattern. Resolution priority: --id flag > NOTTE_FUNCTION_ID env > current_function file Changes: - Add CurrentFunctionFile and EnvFunctionID constants to config - Add GetCurrentFunctionID, RequireFunctionID, setCurrentFunction, clearCurrentFunction functions - Update all function commands to use RequireFunctionID - Create command saves function ID to current_function file - Delete command clears current_function if matching - Add comprehensive unit tests for function ID resolution - Add integration tests for functions including ID resolution Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add `notte sessions code` command that calls the /{session_id}/workflow/code
endpoint and outputs only the python_script field from the response.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add notte.Session() to function content (required by API validation) - Handle both array and paginated response formats in TestFunctionsList Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update installation references from salmonumbrella to nottelabs - Fix command consistency (session → sessions, agent → agents, etc.) - Add Formula/notte.rb for Homebrew tap - Add brews section to goreleaser for auto-updating formula on release Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
fix: set KeychainName to display proper name in macOS keychain prompt
…rnings fix: remove redundant cleanup operations in integration tests
- Filter out nil fields globally in text formatter instead of showing <nil> - Add custom formatters for page execute responses (hide Session field) - Add `page observe` command that returns page description - Make `page scrape` instruction argument optional - Add shared PrintScrapeResponse helper for consistent scrape output - Update all scrape commands to use the shared helper Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…mprovements feat: improve CLI output formatting
update path
Move the default configuration directory to ~/.notte/cli/ for a cleaner home directory structure that allows other notte tools to share the ~/.notte/ parent directory.
iteration on skills
refactor: change config path from ~/.config/notte to ~/.notte/cli
* Hide sessions observe/execute/scrape in favor of page commands - Set Hidden: true on sessionsObserveCmd, sessionsExecuteCmd, sessionsScrapeCmd - Update README.md to document page commands as the primary interface - Update skills documentation (SKILL.md, session-management.md) - Update shell templates to use notte page commands The hidden commands still work for backward compatibility but are no longer shown in --help output, encouraging users to use the cleaner page interface. * hide other cmd as well * fix some formatting issues * Refactor page commands to be true proxies for sessions commands Eliminates code duplication by making page observe/scrape directly call their sessions counterparts. Unifies command-line interface to use consistent flag names across both command groups. Key changes: - Remove duplicate runPageObserve and runPageScrape functions (~70 lines) - Unify flag variables: use sessionObserveURL and sessionScrapeOnlyMain - Standardize interface: page scrape now uses --instructions flag instead of positional arg - Update runSessionObserve to print only description in text mode for consistency - Add 4 comprehensive unit tests for scrape argument combinations - Update all documentation and templates to use unified interface * Fix duplicate step numbering in README workflow * address reviewer feedback * address reviewer feedback
* fix: keyring auth * fix: greptile * fix: lint * fix: linting
* Document session context and function development workflow Part 1: Session Context-Driven Documentation - Rework README.md and SKILL.md to emphasize automatic session tracking - Remove --id flags from default examples to show typical usage - Add notes explaining sessions are auto-tracked, --id is for advanced use Part 2: Function Development Workflow - Add comprehensive "Development Workflow" section to function-management.md - Document iterative process: build → export → create → test → iterate → schedule - Include complete end-to-end example with bash commands - Enhance "Function File Format" section with detailed variable and return value docs - Add examples showing type hints, parameters, and how to access results * Apply context-driven approach to functions documentation - Remove --id flags from default function command examples - Show that functions auto-track like sessions (current function concept) - Update run-metadata to show --run-id (required) without --id - Add explanatory notes about automatic function tracking - Updated both README.md and SKILL.md for consistency * add other doc * Apply context-driven approach to function-management.md (reapply) All function commands now use current function approach: - Removed --id flags from default examples throughout - Added explanatory note about automatic function tracking - Updated all code examples and workflows to be context-driven - Consistent with README.md and SKILL.md
* error log * fix: asserts
* feat: add screenshot * add pre commit * fix: lint
* fix: generate client from staging spec with endpoint exclusions - Update generate.sh to use NOTTE_API_URL env var, defaulting to https://us-staging.notte.cc to get latest API features including viewer_url - Exclude global scrape endpoints (/scrape, /scrape_from_html) from generation - Exclude vault credit card endpoints (/vaults/{vault_id}/card) from generation - Remove global scrape CLI commands (scrape, scrape-html) - Remove vault credit card CLI commands (card, card-set, card-delete) - Hide sessions debug command from help (still functional) - Update documentation to remove references to excluded features Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: remove usage logs command, move usage to utilities - Remove `notte usage logs` subcommand - Move `notte usage` documentation to Utilities section in README Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: use cross-platform sed syntax in generate.sh Use sed -i.bak instead of sed -i '' for Linux compatibility, then clean up backup files afterward. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: verify generated code is up to date with staging OpenAPI spec Add CI step that regenerates the API client from us-staging.notte.cc and fails if there are any differences, ensuring committed code stays in sync with the latest OpenAPI spec. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* fix: error messages * nicer outputs
* fix: use stored viewer URL instead of debug endpoint - Store viewer_url from session start response in local state file - Read stored viewer URL directly in viewer command (no API call needed) - Fall back to session status API if stored URL not available - Clear viewer URL file when session is stopped - Remove unused constructViewerURL function and debug endpoint call Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: make clearCurrentViewerURL error handling consistent Match clearCurrentSession pattern by returning errors instead of silently ignoring them. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat: auto-generate CLI flags from OpenAPI spec
Add a Go-based flag generator tool that parses the OpenAPI spec and
automatically generates Cobra flag definitions for CLI commands.
Key features:
- Simple scalar types (string, int, bool) become direct flags
- Enum types become string flags with values listed in description
- Nested objects are flattened (e.g., profile.id -> --profile-id)
- Primitive arrays become repeatable flags (e.g., --chrome-arg)
- Union types (string | enum) are handled via From*1 methods
- JSON file input for complex types (--response-format-json @file.json)
- Configurable skip list (notifier_config omitted)
- Build fails on unsupported field types to prompt manual handling
Generated files:
- scripts/gen-flags/{main,types,parser,codegen}.go - Generator tool
- internal/cmd/*_flags.gen.go - Generated flag definitions
The generator is integrated into generate.sh and runs automatically
after oapi-codegen. Commands still need to be updated to use the
generated Register*Flags() and Build*Request() functions.
* feat: integrate generated flags into command files
- Update sessions.go to use RegisterSessionStartFlags() and
BuildSessionStartRequest(), keeping manual proxies handling
- Update agents.go to use RegisterAgentStartFlags() and
BuildAgentStartRequest()
- Update personas.go, profiles.go, vaults.go to use generated flags
- Fix generated flag files for correct API type compatibility:
- Use direct enum casts instead of union methods for simple enums
- Fix SessionId/Task as required string fields (not pointers)
- Fix Profile as pointer type
- Fix ChromeArgs as *[]string
- Update output_helpers.go to handle new StructuredDataBaseModel type
- Update all test files to use new generated variable names
New flags now available:
- sessions start: --profile-id, --profile-persist, --chrome-args,
--screenshot-type
- agents start: --url, --use-vision, --response-format-json,
--session-offset (plus renamed --vault-id, --persona-id, --session-id)
* feat: add FlattenWithoutPrefix for clean credential flags
- Add FlattenWithoutPrefix map in types.go for command-scoped fields
that should flatten without parent prefix
- VaultCredentialsAdd.credentials now generates --email, --password,
--url, --username, --mfa-secret (not --credentials-*)
- Update isFlattenableObject to support force-flattening via config
- Fix struct type name conversion (handle hyphenated schema names)
- Fix required field assignment (use value not pointer)
- Update vaults.go to use generated credentials flags
- Update vaults_test.go for new variable names
* style: fix linting issues in gen-flags
- Apply gofumpt formatting
- Replace WriteString(fmt.Sprintf(...)) with fmt.Fprintf(...)
- Use switch statements instead of if-else chains
* fix: update integration tests for new flag names
Update flag names to match auto-generated flags:
- --session → --session-id
- --browser → --browser-type
- --idle-timeout → --idle-timeout-minutes
- --max-duration → --max-duration-minutes
- --file-storage → --use-file-storage
* fix: correct generator for enum types, pointers, and slices
- Add IsUnionType flag to Field struct to properly distinguish
union types (anyOf enum+string) from simple enums
- Simple enums now generate correct type names without underscore
(e.g., ApiSessionStartRequestBrowserType)
- Union types still use underscore naming convention
- Only include fmt/json/os/strings imports when actually needed
- Flattened optional structs now correctly use pointer assignment
- Repeated fields (slices) now pass directly instead of converting
to []interface{}
* docs: update flag names in README and skills
Update documentation to reflect new auto-generated flag names:
- --browser → --browser-type
- --idle-timeout → --idle-timeout-minutes
- --max-duration → --max-duration-minutes
- --file-storage → --use-file-storage
Updated files:
- README.md
- skills/notte-browser/SKILL.md
- skills/notte-browser/references/session-management.md
* fix: validate required string fields are not empty
Required string fields now check that the value is not empty when
the flag is explicitly set (e.g., --url ""). This prevents sending
empty strings for required API fields.
* fix: validate flattened objects have required fields
When optional fields of a flattened object are provided without the
required fields, the generator now emits an error instead of silently
not creating the struct.
Example: `--profile-persist` without `--profile-id` now errors:
"profile requires --profile-id to be set"
* fix: remove unused variable in codegen
* fix: only set optional flattened fields when non-empty
API rejects empty strings for mutually exclusive fields like
email/username. Now optional string fields in flattened objects
are only included when they have a value.
* fix: standardize notte-browser skill templates and references - Update selectors from bare IDs (B3, I1, L5) to @-prefixed format (@b3, @i1, @l5) - Add version 1.0.0 and frontmatter to SKILL.md - Fix command name: notte sessions code → notte sessions workflow-code - Change observe --url to separate goto + observe commands in templates - Uncomment screenshot functionality in form-automation.sh - Add frontmatter with name/description to all reference files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * docs: update README with new commands and formatting - Remove emoji from title - Add new session commands: viewer, code - Add new session start options: profile-id, profile-persist, screenshot-type, chrome-args - Expand page actions with scroll-up, screenshot, select, check, upload, download, tabs, reload, wait, captcha-solve - Add Profiles section for browser profile management - Add --yes flag to global options - Fix various formatting and capitalization Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.