Help Topics for resolve

cdv · copy

Sample CLI

gway cdv copy

References

Signature

(table_path: str, old_entry: str, new_entry: str, **kwargs) -> bool

Docstring

Copy a record from old_entry to new_entry, optionally updating fields.

cdv · credit

Sample CLI

gway cdv credit

References

Signature

(table_path: str, entry: str, *, field: str = 'balance', **kwargs) -> bool

Docstring

Add 1 (or amount from kwargs) to the given field for a record.

cdv · debit

Sample CLI

gway cdv debit

References

Signature

(table_path: str, entry: str, *, field: str = 'balance', **kwargs) -> bool

Docstring

Subtract 1 (or amount from kwargs) from the given field for a record.

cdv · delete

Sample CLI

gway cdv delete

References

Signature

(table_path: str, entry_id: str)

Docstring

Remove a record by ID from the CDV table.

Sample CLI

gway cdv load-all

References

Signature

(pathlike: str) -> dict[str, dict[str, str]]

Docstring

Load CDV table with ID followed by colon-separated key=value fields.

cdv · move

Sample CLI

gway cdv move

References

Signature

(table_path: str, old_entry: str, new_entry: str, **kwargs) -> bool

Docstring

Move a record from old_entry to new_entry, optionally updating fields.

Sample CLI

gway cdv save-all

Signature

(pathlike: str, all_records: dict[str, dict[str, str]])

Docstring

Replace all records in the CDV file at pathlike with the given dict.

cdv · update

Sample CLI

gway cdv update

References

Signature

(table_path: str, entry_id: str, **fields)

Docstring

Append or update a record in the CDV table, preserving unspecified fields.

Sample CLI

gway cdv validate

References

Signature

(table_path: str, entry: str, *, validator=None) -> bool

Docstring

Validate a CDV entry by ID directly from file. Always reloads the file from disk to avoid stale data.

mail · send

Sample CLI

gway mail send

References

Signature

(subject, body=None, to=None, threaded=None, **kwargs)

Docstring

Send an email with the specified subject and body, using defaults from env if available. Parameters: - subject: the email subject (string) - body: the plain-text body (string). Must be provided. - to: recipient address (string). Defaults to ADMIN_EMAIL from the environment. - threaded: if True, send the email asynchronously; if False, block and send; if None, auto-detect. - **kwargs: reserved for future use. Returns: str ("Email sent successfully to ...") or error message, unless threaded is True (returns immediately).

Sample CLI

gway odoo execute-kw

References

Signature

(*args, model: str, method: str, **kwargs) -> dict

Docstring

A generic function to directly interface with Odoo's execute_kw method. Parameters: model (str): The Odoo model to interact with (e.g., 'sale.order'). method (str): The method to call on the model (e.g., 'read', 'write'). args (list): Positional arguments to pass to the method. kwargs (dict): Keyword arguments to pass to the method. Returns: dict: The result of the execute_kw call.

Sample CLI

gway odoo find-quotes

References

Signature

(*, product, quantity: int = 1, state: str = 'draft', **kwargs)

Docstring

Find all sale quotes that contain a given product (by id or name substring) with at least the given quantity. Parameters: product (str or int): Product ID or partial name. quantity (int): Minimum quantity of the product in the quote. Default is 1. state (str): Odoo sale order state (default: 'draft' for quotations). **kwargs: Additional domain filters for sale.order. Returns: list: List of matching sale orders (quotes) with product line details.

Sample CLI

gway odoo read-chat

References

Signature

(*, unread: bool = True, username: str = '[ODOO_USERNAME]') -> list[dict]

Docstring

Read chat messages from an Odoo user by username. If unread is True, only return unread messages.

Sample CLI

gway odoo setup-chatbot-app

References

Signature

(*, path='/chatbot', username='[ODOO_USERNAME]', alias='Operator', apps=None)

Docstring

Create a FastAPI app (or append to existing ones) serving a chatbot UI and logic.

Sample CLI

gway release build

References

Signature

(*, bump: bool = False, dist: bool = False, twine: bool = False, help_db: bool = True, projects:
bool = False, git: bool = False, all: bool = False, force: bool = False) -> None

Docstring

Build the project and optionally upload to PyPI. Args: bump (bool): Increment patch version if True. dist (bool): Build distribution package if True. twine (bool): Upload to PyPI if True. force (bool): Skip version-exists check on PyPI if True. git (bool): Require a clean git repo and commit/push after release if True. vscode (bool): Build the vscode extension.

Sample CLI

gway release create-shortcut

Signature

(name='Launch GWAY', target='gway.bat', hotkey='Ctrl+Alt+G', output_dir=None, icon=None)



Sample CLI

gway ocpp.evcs simulate

References

Signature

(*, host: str = '[WEBSITE_HOST|127.0.0.1]', ws_port: int = '[WEBSOCKET_PORT|9000]', rfid: str =
'FFFFFFFF', cp_path: str = 'CPX', duration: int = 60, repeat=False, threads: int = None, daemon:
bool = True)

Docstring

Flexible OCPP charger simulator. - daemon=False: blocking, always returns after all runs. - daemon=True: returns a coroutine for orchestration, user is responsible for awaiting/cancelling. - threads: None/1 for one session; >1 to simulate multiple charge points.

Sample CLI

gway web.server is-local

References

Signature

(request=None, host=None)

Docstring

Returns True if the active HTTP request originates from the same machine that the server is running on (i.e., local request). Supports both Bottle and FastAPI (ASGI/WSGI). Args: request: Optionally, the request object (Bottle, Starlette, or FastAPI Request). host: Optionally, the bound host (for override or testing). Returns: bool: True if request is from localhost, else False.

Sample CLI

gway web.server start-app

References

Signature

(*, host='[WEBSITE_HOST|127.0.0.1]', port='[WEBSITE_PORT|8888]', ws_port='[WEBSOCKET_PORT|9000]',
debug=False, proxy=None, app=None, daemon=True, threaded=True, is_worker=False, workers=None)

Docstring

Start an HTTP (WSGI) or ASGI server to host the given application. - If `app` is a FastAPI instance, runs with Uvicorn (optionally on ws_port if set). - If `app` is a WSGI app, uses Paste+ws4py or Bottle. - If `app` is a zero-arg factory, it will be invoked (supporting sync or async factories). - If `app` is a list of apps, each will be run in its own thread (each on an incremented port; FastAPI uses ws_port if set).



Sample CLI

gway resource

References

Signature

(*parts, touch=False, check=False, text=False, dir=False)

Docstring

Locate or create a resource by searching in: 1. Current working directory 2. GWAY_ROOT environment variable 3. User home directory If not found, returns the path in the CWD (which may not exist) unless check=True, in which case aborts. Arguments: - touch: if True, create the file (and parents) if it does not exist. - dir: if True, create the final path as a directory, not a file. - text: if True, return file contents as text, not a Path. - check: if True, abort if resource does not exist.

TODOs

# TODO: Consider if we should also be compatible with BASE_PATH and GWAY_PATH # 2. GWAY_ROOT env

Sample CLI

gway run-recipe

References

Signature

(*script: str, **context)

Docstring

Run commands parsed from a .gwr file, falling back to the 'recipes/' resource bundle. Recipes are gway scripts composed of one command per line with optional comments.