///
This document provides instructions for developers interested in building, testing, or contributing to `wacli`, a command-line interface for WhatsApp focusing on message history synchronization, offli
331 views
~331 views from guests
Guest views are estimated from total page views. These include anonymous visitors and users who weren't logged in when they viewed the page.
This document provides instructions for developers interested in building, testing, or contributing to wacli, a command-line interface for WhatsApp focusing on message history synchronization, offline search, and communication features.
Before you begin, ensure you have Go (version 1.20 or later is recommended) and pnpm (or npm/yarn if you prefer) installed on your system.
To build wacli locally, navigate to the project's root directory and use the following Go command:
This command compiles the Go source code and places the executable in the ./dist/ directory as wacli.
sqlite_fts5 Build TagThe -tags sqlite_fts5 flag is crucial. It enables support for SQLite's FTS5 (Full-Text Search) extension.
sqlite_fts5: wacli will utilize FTS5 for much faster and more advanced message searching capabilities (e.g., snippet generation, ranking). This is the recommended build configuration for optimal search performance.sqlite_fts5: If you omit this tag, wacli will still build, but its search functionality will fall back to using standard SQL LIKE queries, which are significantly slower and less powerful for full-text search.After building, you can run the executable to see its available commands:
For convenience, the package.json includes a build script that wraps this command:
And a start script to build and run:
wacli includes a suite of tests to ensure its functionality. There are two primary categories of tests: general Go tests and tests specifically for the FTS5 implementation.
The package.json also provides scripts for running tests:
Maintaining code quality is important for wacli. The project uses standard Go tools for linting and formatting.
This command checks for potential issues in your code. The
package.json provides a shortcut:
This command rewrites all Go source files in the current directory and its subdirectories to use the standard Go format. The
package.json provides a shortcut:
This command lists all files that are not correctly formatted. The
package.json provides a shortcut to check and fail if issues are found:
We welcome contributions to wacli! If you're interested in adding new features, fixing bugs, or improving documentation, please feel free to:
For a deeper understanding of the project's architecture and design choices, please refer to the comprehensive design notes in docs/spec.md (not provided in this response, but referenced as per instructions).