Vale Server v1.4

Vale Server’s new Studio page

I’m pleased to announce v1.4 of Vale Server today, the fourth major release of Vale’s desktop application. Development for v1.4 was almost entirely focused on improving the Dashboard, including the new Studio page.

Vale Studio [beta]

One of Vale’s most popular features is its support for YAML-based rules, which allow for a high degree of customization and extensibility without requiring any programming experience. The new Studio dashboard page leverages the machine-readable nature of these YAML files to offer a suite of validation and debugging tools.

Validation

At the most basic level, Vale Studio will warn about “malformed” rules — such as those with YAML formatting errors or missing keys.

Vale Studio warning about a rule missing an 'extends' keys.

For each of the supported extension points (currently, existence, substitution, occurrence, and repetition), Vale Studio will check that all required keys are defined and have valid values (where applicable).

Testing

Assuming a rule passes the validation suite, its results will be shown in the right-hand editor panel:

Vale Studio displaying a rule’s in-text alerts.

This allows for rule creation and testing without needing to first configure the required components (StylesPath, .vale.ini, etc). And while only Markdown is currently supported, future releases will introduce support for all of Vale’s supported markup formats.

regex101 Integration

Many of Vale’s extension points are designed to provide a layer of abstraction over raw regular expressions, allowing for less boilerplate and more maintainable patterns. For example, consider the following substitution rule:

extends: substitution
message: "Consider using '%s' instead of '%s'"
level: warning
ignorecase: false
# swap maps tokens in form of bad: good
swap:
abundance: plenty
accelerate: speed up
accompany: go with
address: discuss
allocate: divide

Under the hood, Vale converts this YAML file into the following regular expression:

\b(?:(accompany)|(address)|(allocate)|(abundance)|(accelerate))\b

Where the capture groups are used to associate a token (e.g., accompany) with its replacement (go with).

In general, this significantly improves the readability and maintainability of Vale’s rules. However, it can also make debugging a misbehaving rule more difficult since the actual pattern is a “hidden” implementation detail. Vale Studio attempts to address this issue by providing built-in integration with regex101, an online service for testing regular expression (which, importantly, supports Go’s flavor):

A demonstration of Vale Studio’s regex101 integration.

Clicking the “regex101” button while developing a rule will open a new session with the correct settings and values (from Vale Studio).

Going Forward

Vale Server’s new Studio page* *represents a significant improvement to Vale’s development workflow, but there’s still quite a bit of work to be done—future releases of Vale Server will include the following additions:

  • Support for spelling rules, including regex101 integration for filters and auto-generated ignore files.

  • Support for multi-pattern and exception-based rules (conditional, consistency, and capitalization).

  • Support for importing, exporting, and saving Studio sessions.

Check out the Vale Server website to start your free trial today!

Vale Server v1.3

A demo of Vale Server’s VS Code extension

The past few months have been quite busy in terms of Vale and Vale Server development, I’ve released Vale v2.0.0-beta, Vale Server v1.2, and new versions of the Atom, Sublime Text, and Visual Studio Code clients.

Today I’m here to announce yet another new release, Vale Server 1.3, which builds off of a bunch of work that’s been done with Vale v2.0.0 and the new text editor clients.

LanguageTool Integration

While Vale Server is primarily concerned with enforcing certain *writing styles*, the ability to provide grammar-related suggestions has been a popular feature request. v1.3 addresses this request by integrating with LanguageTool, an open-source grammar checker with over 2,000 rules for English.

The integration is seamless and all of your favorite Vale Server features will still work out-of-the-box: After installing LanguageTool through the dashboard, you’ll have access to a new LanguageTool style that can be used like any other.

A Vale Server project using the new `LanguageTool` style.

This will allow you to receive grammar suggestions across all of Vale Server’s editor clients, while still making use of Vale Server’s sophisticated understanding of markup (which LanguageTool doesn’t support on its own).

Here’s an example document showcasing some of the new rules:

Rule Actions

The second major new feature in v1.3 is the ability to fix style violations from within your favorite text editor (currently, VS Code, Atom, and Sublime Text are supported):

Style support for Rule Actions is still a work in progress, but LanguageTool, Microsoft, Vale, and Google have all been updated to make use of the new feature.

See the Vale Server website for more information. (Note: the latest features in v1.3 aren’t currently available in free trial builds.)

Introducing Vale Server

Vale Server is a desktop application that brings your editorial style guide to life.

A control flow diagram of Vale Server’s functionality

Almost two months ago, I announced that Vale was coming to the desktop. The goal was simple: move away from the command-line environment, while making it easier to manage Vale-related files and folders.

In this post, I’ll discuss the progress I’ve made and the new features (and enhancements) you can make use of in your writing workflow.

Vale Server 101

Vale Server is a cross-platform (currently available for macOS and Windows; Linux is on its way) desktop application that helps you “codify” editorial guidelines.

Vale Server running through its Visual Studio Code client.

For example, as a writer, you probably have certain guidelines that you need to follow—e.g., naming conventions, word usage, and capitalization styles—that allow the company or organization you’re writing for to maintain a consistent voice across all of its media. Vale Server allows you to automate the process of checking for these stylistic aspects of writing.

Styles

Vale Server’s key feature is the notion of styles. Styles are collections of user-created rules that enforce arbitrary guidelines.

Vale Server’s web-based dashboard.

Vale Server comes with a growing selection of open-source, pre-made styles for many popular style guides and writing tools (of course, you can also create your own using the extension system).

The biggest styles-related change is the introduction of the Vale Dashboard (shown above). The Vale Dashboard allows you to browse, install, and update any style that has been submitted to the new style library. This is a significant improvement over the find-download-unzip-copy workflow that Vale currently requires.

That said, Vale Server is still 100% compatible with the old StylesPath workflow—meaning you can still use custom styles that you don’t want to submit to the public library.

Projects

Vale Server (as discussed in the previous post) introduces a new project-management system. Consider the following scenario:

You’re working for an organization that adheres to the Microsoft Writing Style Guide, so you’ve installed the style and added it to your configuration file.

Over time, you add your own organization’s terminology to various rules and exception lists (e.g., Acronyms.yml and Headings.yml).

A few weeks later, a new version of the style is released with a few bug fixes and enhancements. What do you do now? You either have to overwrite your changes altogether or slowly migrate each customized rule individually.

Vale Server’s project-based vocabulary dashboard.

Projects make this process much easier. Each project is a single folder (stored at <StylesPath>/Vocab/<Project name>/) that consists of two text files—accept.txt and reject.txt—that contain one word or phrase per line (similar to how ignore files currently work).

  • All entries in accept.txt are automatically added to a case-insensitive substitution rule (Vocab.Terms), ensuring that any occurrences of these words or phrases exactly match their corresponding entry in accept.txt. Each term is automatically added to every exception list in all inherited styles—meaning that you now only need to update your project’s vocabulary to customize third-party styles.

  • Entries in reject.txt are automatically added to an existence rule (Vocab.Avoid) that will flag all occurrences as errors.

Additionally, instead of having to add your customizations to the text files themselves, you can manage different project-based *vocabularies *through the dashboard (shown above).

Clients

Unlike most writing applications, Vale Server doesn’t include its own editor—its functionality is exposed over a server that communicates with other applications (referred to as “clients”). This allows you to use your preferred tools while still using Vale Server to check your content.

Currently, clients are available for **Sublime Text 3, Atom, Visual Studio Code, and Google Docs** (you can also check content via your clipboard). These clients take full advantage of Vale Server’s integration with the desktop, allowing for better control of and navigation to your Vale-related assets.

Clients (Sublime Text 3 shown above) have rich support for Vale Server and its resources.

Some of the new features you can expect in many of the clients are:

  • Jump to Rule Definition: Access a rule’s definition from its in-text occurrences.

  • Jump to Source: Open the relevant section of a style guide from occurrences of its rules.

  • StylesPath Navigation: Browse and edit your styles from within your editor.

Privacy

Vale Server includes an embedded HTTP server that runs on localhost, meaning that your content never has to be sent to a remote server.

The benefit to this approach (over the CLI) is that Vale Server has the ability to communicate with applications that run in a sandboxed environment (as is the case with the Google Docs add-on) without losing the ability to access your local configuration details.

Vale vs. Vale Server

I don’t view Vale and Vale Server as competing products: Vale excels in CI/CD environments, while Vale Server offers a better overall experience for individual writers through improved (and expanded) plugins for other apps, a GUI, project management, and a web-based dashboard.

I intend to continue developing Vale and aim to keep a high level of compatibility between the two products.

Ideally, I’d say that you should have:

  1. A precise set of guidelines (i.e., error-level, fail-worthy rules) checked through Vale on your CI service; and

  2. an expanded set of guidelines checked (on-the-fly) through Vale Server’s various client integrations.

Going Forward

Vale Server is currently available for a one-off $40 purchase. This includes all platforms (macOS and Windows for now; Linux is on its way!), clients, and future updates. I also offer support through either email (support@errata.ai) or GitHub issues (my response times are typically less than 24 hours).

In future updates of Vale Server, you can expect (in no particular order):

  • Microsoft Word and web browser clients;

  • an interactive Rule Creator for the dashboard;

  • multiple new styles (including a grammar-focused one);

  • support for XML documents; and

  • the ability to sync your projects across multiple computers and users.

If you’d like to learn more, read the documentation, or purchase a license, please visit the Vale Server website.

Vale Comes to the Desktop

Introducing Vale Server, a native desktop app for Vale

Vale Server running on macOS

8 months ago, I released the first stable version of Vale. Since then, I’ve shifted my focus to bringing Vale’s command-line functionality to a native desktop application. This post will discuss some of the enhancements and refinements that have been implemented along the way.

Architecture

Vale Server maintains Vale’s high standards for performance and privacy. It consists of three components:

  • A cross-platform GUI layer written in C++, allowing the app to appear as native as possible without having to maintain multiple codebases;

  • a platform-specific OS interaction layer that makes use of native APIs (e.g., Cocoa on macOS); and

  • an embedded HTTP server for interacting with a custom build of Vale. This server runs locally, meaning that you never have to send your content to a remote destination.

Projects

Project configuration using Vale Server

The biggest core change is the introduction of projects, which address the long-standing issue of style inheritance. To illustrate the purpose of projects, consider the following scenario:

You’re working for an organization that adheres to the Microsoft Writing Style Guide, so you’ve installed the style and added it to your configuration file. Over time, you add your own organization’s terminology to various rules and exception lists (e.g., Acronyms.yml and Headings.yml). A few weeks later, a new version of the style is released with various bug fixes and enhancements. What do you do now? You either have to overwrite your changes altogether or slowly migrate each customized rule individually.

Projects make this process much easier. Each project is a single folder (stored at <StylesPath>/Vocab/<Project name>/) that consists of two text files—accept.txt and reject.txt—that contain one word or phrase per line (similar to how ignore files currently work).

All entries in accept.txt are automatically added to a case-insensitive substitution rule (Vocab.Terms), ensuring that any occurrences of these words or phrases exactly match their corresponding entry in accept.txt. Additionally, each term is automatically added to every exception list in all inherited styles — meaning that you now only need to update your project’s vocabulary to customize third-party styles.

Entries in reject.txt are automatically added to an existence rule (Vocab.Avoid) that will flag all occurrences as errors.

You can associate a project with a particular .vale.ini file via the new Project key, as shown in the screenshot above.

Vale Dashboard

An example of using the new Vale DashboardAn example of using the new Vale Dashboard

The Vale Dashboard represents the future of Vale asset management. It currently allows you to create, delete, and sort vocabulary terms for each of your projects.

In future releases of Vale Server, you can expect to be able to manage all of your Vale-related assets—ignore files, rules, and even entire styles—right from your browser-based dashboard.

Style Management

Vale Server’s style management page

The introduction of projects opens the door to a lot of style-related improvements. Since you can now customize styles without having to actually edit their source files, future releases of Vale Server will have the ability to install, remove, and update styles from within the application itself.

Integrations

Vale Server running on a GitHub text box

One of the most important features of Vale Server is its ability to interact with sandboxed (or otherwise restrictive) applications such as web browsers and email clients. There are two ways to use Vale Server with other applications:

  • By installing one of its official plugins for Google Docs, Microsoft Word, Sublime Text, Atom, or Visual Studio Code (Note: some of these are still in development, but they will all be available by the end of the testing period discussed below); or

  • by using its native clipboard API, allowing you to use it with applications that don’t have an official plugin (as shown in the above screenshot).

Going Forward

Vale Server is currently in a pre-release testing phase.

Once this phase is complete, it will be available as a one-time purchase for macOS, Windows, and Linux. One license key will give you access on multiple platforms and devices.

Stay tuned for updates!