Help us shape the future of Go! Take the 2026 Go Developer Survey

WAProto

command module
v0.0.0-...-e97e7d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

README

WhatsApp Protocol Buffers

Build Status License

Fetch and extract live WhatsApp Web protobuf definitions and generate both monolithic schemas (WAProto.proto) and modular package structures.

Installation & Build

# Build binary
task build

CLI Commands

Usage:
  wa-proto <command> [flags]

Commands:
  split      Split monolithic WAProto.proto into modular wa-core/proto packages
  fetch      Fetch WhatsApp Web scripts and discover bundle URLs
  generate   Generate protobuf files (monolithic or modular wa-core structure)
  compile    Compile .proto files to .pb.go using protoc
  sync       Full end-to-end: split WAProto.proto -> update clientpayload -> compile .pb.go
  version    Show version info
Examples
1. Split monolithic WAProto.proto into wa-core/proto
wa-proto split -proto WAProto.proto -out ../whatsrook/wa-core/proto
2. Fetch live JavaScript bundles and extract schema
wa-proto fetch -out WAProto.proto
3. Compile .proto files to .pb.go
wa-proto compile -dir ../whatsrook/wa-core/proto
4. Full end-to-end synchronization
wa-proto sync -proto WAProto.proto -out ../whatsrook/wa-core/proto -compile

Package Layout

  • pkg/ast: Strongly typed AST representing messages, enums, oneofs, nested types, and field rules.
  • pkg/parser: High-performance recursive descent .proto parser.
  • pkg/extractor: Pure-Go AST analyzer for WhatsApp Web JavaScript module specs (internalSpec).
  • pkg/catalog: Catalog of all 57 standard modular packages in wa-core/proto.
  • pkg/fetcher: HTTP client and script bundle discovery engine.
  • pkg/generator: Monolithic and modular proto generator with automated import resolution.
  • pkg/compiler: Protoc compilation orchestrator.

License

Licensed under the Apache License, Version 2.0.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
ast

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL