Skip to main content

๐Ÿ‘ค Accounts

Accounts let you persist authentication across script runs โ€” ideal for tasks like logging into dashboards, managing user sessions, or scraping behind login walls.

Fuyu lets you securely store and inject account data into your scripts at runtime.


๐Ÿงพ What Is an Account?โ€‹

An account is a saved login identity that includes:

  • Username, email, or other identifiers
  • Cookies saved during previous runs
  • Optionally, extra metadata

You can manage accounts from the Accounts tab in your dashboard.


โš™๏ธ Using Accounts in Scriptsโ€‹

If your script uses the account variable, Fuyu will prompt the user to select or provide an account before the script runs.

Example:

visit("https://example.com/login")
username_element = find_element("#username")
username_element.input(account.username)

Once an account is selected, it becomes available inside the script as a global account object, and can be used to:

  • Access saved fields
  • Load saved cookies
  • Persist login state across runs

๐Ÿ’พ Saving and Loading Sessionsโ€‹

Use these commands inside your script:

  • load_cookies() โ€” loads previously saved cookies for the selected account
  • save_cookies() โ€” updates the saved cookies after a successful login

This allows your scripts to bypass login steps if sessions are still valid.


๐Ÿ” Security and Isolationโ€‹

  • Accounts are private to your user โ€” other users cannot access them.
  • All cookies and identifiers are stored securely and injected only at runtime.