Skip to main content

Tokenless Quick Start

Install Tokenless, connect it to Claude Code, run one real task, and verify a before/after Token record in about three minutes. Tokenless works in the background, so your prompts and normal Agent workflow do not change.

Savings vary by workload. Tool-heavy tasks usually show the clearest result; short or conversation-only tasks may show little change.

1. Install Tokenless and connect Claude Code

Choose an installation method based on your use case:

MethodUse caseDescription
anolisa CLIFull ANOLISA component managementUnified management of all components and adapters
RPMAlinux with the YUM repository configuredManaged package through yum, then adopted into anolisa system state
npmStandalone CLI and adapter installPrebuilt binaries + adapter resources for developers
curlOne-liner on Linux or macOSUses npm when available (needs Node.js 16.7+), otherwise builds from source (needs a Rust toolchain)
SkillAgent-driven installSkill-based installation for agent frameworks

This quick path uses Claude Code as the example Agent:

curl -fsSL https://get.agentic-os.sh | bash
export PATH="$HOME/.local/bin:$PATH"
anolisa install tokenless
anolisa adapter enable tokenless claude-code

If the anolisa CLI is already installed, start with anolisa install tokenless. The PATH line is needed only when a fresh installation reports that ~/.local/bin is not available in the current Shell.

Using another Agent? Follow the matching setup path in Use another Agent; the remaining steps stay the same. The Agents listed below use anolisa adapter enable, including OpenCode. OpenCode also provides a bundled lifecycle script for npm or manual installations.

RPM (Alinux)

Alinux users with the YUM repository configured may install the managed RPM instead of running the CLI installer:

sudo yum install anolisa tokenless
sudo anolisa --install-mode system adopt tokenless

adopt records the directly installed RPM in system state, so the adapter commands can use its component contract. Upgrades and removal go through yum; see Troubleshooting · YUM/RPM installation.

The methods below install the CLI on their own and create no anolisa component record, so anolisa adapter enable does not apply to them.

Method B: npm

Requires Node.js 16.7+ — that is the release fs.cpSync arrived in, and the package postinstall uses it to place the adapter resources. Automatically installs the prebuilt binaries (tokenless, rtk) and the framework adapter resources for your platform:

npm install -g anolisa-tokenless
tokenless --version

After installation, the adapter resources are located at ~/.local/share/anolisa/adapters/tokenless/. An npm install creates no anolisa component record, so anolisa adapter enable does not apply to it — enable adapters as described in Enable the adapter for your install method.

That directory is shared with the anolisa CLI. When it already belongs to a managed component install, the package postinstall keeps it unchanged and says so instead of replacing resources a component record still refers to; pass ANOLISA_TOKENLESS_FORCE_ADAPTERS=1 to take it over anyway. This protection ships in the first npm release built from the change described on this page: published packages up to and including 0.8.2 predate it and replace that directory unconditionally, so back up a managed adapter tree before installing one of them (check with npm view anolisa-tokenless version).

The postinstall also enables the claude-code adapter: it runs that adapter's own install.sh, which registers the plugin with the Claude CLI when one is reachable (CLAUDE_BIN selects which). With no Claude CLI it skips registration and says so rather than failing the install. That registration lives in Claude's own configuration — outside the npm prefix and outside the adapter directory — so removing the package does not by itself remove it.

Uninstalling a direct npm install (Method B) has its own entry point, and it is not scripts/uninstall.sh. Deregister first, then remove the package:

# 1. every adapter you enabled, e.g. claude-code
bash ~/.local/share/anolisa/adapters/tokenless/claude-code/scripts/uninstall.sh
# 2. then the package itself
npm uninstall -g anolisa-tokenless

scripts/uninstall.sh is the curl installer's uninstaller (Method C). It is driven by the receipt at ~/.local/share/tokenless/install-receipt, which only that installer writes, so on a direct npm install it stops immediately with No install receipt found and changes nothing. Use it only for a curl install.

Supported platforms:

PlatformArchitecturenpm package
Linux (glibc)x86_64@anolisa/tokenless-linux-x64
Linux (glibc)aarch64@anolisa/tokenless-linux-arm64
macOSx86_64 (Intel)@anolisa/tokenless-darwin-x64 — declared build target, not published yet
macOSaarch64 (Apple Silicon)@anolisa/tokenless-darwin-arm64

@anolisa/tokenless-darwin-x64 is a release build target only: it is not on the registry, so the npm route cannot deliver an Intel macOS binary. Method C cannot either — its source-build fallback is Linux-only, and scripts/install.sh exits with an error on macOS instead of running cargo. Until that package is published, Intel macOS has no supported install route; see Platform support.

Method C: curl standalone install

A one-liner install script that prefers npm and builds from source instead. The choice between the two is made before npm runs — when npm is missing, the platform is musl Linux, or you set TOKENLESS_FORCE_BUILD=1. Once npm install has been invoked the installer does not switch method automatically: npm's exit status cannot prove that its postinstall left no framework registration behind, so a failure at that stage is reported as an incomplete installation — keeping and naming whatever could not be rolled back — rather than as a successful source build. Re-run it, or build from source explicitly with TOKENLESS_FORCE_BUILD=1:

curl -fsSL https://raw.githubusercontent.com/alibaba/anolisa/main/src/tokenless/scripts/install.sh | bash

Prerequisites depend on which path the script takes:

PathTaken whenRequiresInstalls
npmnpm is present and the platform is glibc Linux or macOScurl, tar, Node.js 16.7+ with npmtokenless, rtk, and the adapter resources
Source build (Linux only)chosen before npm runs: npm is missing, the platform is musl Linux, or TOKENLESS_FORCE_BUILD=1. Not selected automatically once npm install has been invoked — see the failure note abovecurl, tar, a Rust toolchain (cargo)the tokenless CLI only — no rtk and no adapters

The script supports Linux and macOS only; on Windows it exits with an error, so use WSL2 there. Its source-build path is Linux-only as well: on macOS the installer either takes the npm path or exits with an error, and never invokes cargo.

Pin a version or set a custom install directory. Pass the variables to bash, not to curl:

curl -fsSL https://raw.githubusercontent.com/alibaba/anolisa/main/src/tokenless/scripts/install.sh | TOKENLESS_VERSION=0.7.4 bash
curl -fsSL https://raw.githubusercontent.com/alibaba/anolisa/main/src/tokenless/scripts/install.sh | TOKENLESS_INSTALL_DIR=/usr/local/bin bash

A pinned version is a hard pin: the source build downloads only the matching tokenless/v<VERSION> tag. If that tag does not exist the installer fails instead of silently building main.

The installer records what it created in ~/.local/share/tokenless/install-receipt. To remove exactly those paths later:

curl -fsSL https://raw.githubusercontent.com/alibaba/anolisa/main/src/tokenless/scripts/uninstall.sh | bash

Method D: Skill (for agents)

When an agent framework (cosh, OpenClaw, Hermes, etc.) needs to install and manage Tokenless on its own, use the Skill method.

The Skill file is at src/os-skills/ai/install-tokenless/SKILL.md in the repository. An agent that loads this file can complete installation and configuration automatically.

It is declared in the os-skills component manifest (src/os-skills/component.toml), so the next os-skills release ships it to /usr/share/anolisa/skills/install-tokenless/ and anolisa adapter enable os-skills openclaw (or the hermes adapter) deploys it into that framework's skill directory. The distribution contract for the currently published os-skills artifact does not list it yet, and deliberately so: that contract is pinned by index.toml to one immutable artifact with a fixed sha256, so declaring a skill the artifact does not contain would make the bundle copy fail at enable time. It gains the skill together with the next version bump. Until then, load the Skill from its repository path.

To use it, point your agent framework at the Skill file path, or pass its contents directly to the agent. The Skill contains complete installation, verification, and framework integration guidance.

After installing Tokenless, enable the adapter for the target agent framework. The Skill guides this step automatically and follows whichever method it used, so apply the matching row of Enable the adapter for your install method.

Enable the adapter for your install method

Installation only places files on disk; it does not register Tokenless with an agent. How you enable it depends on how you installed it:

Install methodAdapter resourcesHow to enable
anolisa CLI (Method A)installed with the componentanolisa adapter scan, then anolisa adapter enable tokenless <framework>
npm (Method B), or curl (Method C) through its npm pathcopied by the package postinstall to ~/.local/share/anolisa/adapters/tokenless/run the framework's bundled script, for example bash ~/.local/share/anolisa/adapters/tokenless/claude-code/scripts/install.sh. anolisa adapter enable is unavailable here because an npm install creates no anolisa component record
curl (Method C) through its source-build pathnonenot applicable — this is a CLI-only install. Use the tokenless subcommands directly, or reinstall through Method A or B for agent integration
Skill (Method D)whichever method the Skill ranfollow that method's row

Restart the agent CLI, IDE, or gateway after enabling.

2. Run one real task

Restart Claude Code so it loads the adapter, then start a new session and run a tool-heavy task. For example:

Run the full test suite for this repository and summarize only the failures.

You do not need to mention Tokenless in the prompt.

3. Verify the saving

After Claude Code uses a Shell, API, or another supported tool, run:

tokenless stats list --limit 5
tokenless stats summary

Example output (values vary by workload):

Showing 1 record(s):
================================================================================
[ID:42] 2026-08-12 10:20:30 | claude-code | Session:- | Tool:- | Chars:5120→2880(-2240) | Tokens:1280→720(-44%)

Tokenless Statistics Summary
============================================================
Total Records: 1

Character Savings:
Before: 5120 chars
After: 2880 chars
Saved: 2240 chars (43.8%)

Token Savings:
Before: 1280 tokens
After: 720 tokens
Saved: 560 tokens (43.8%)

Breakdown by Operation:
----------------------------------------
compress-response: 1 records
Chars: 5120 -> 2880 (-43.8%)
Tokens: 1280 -> 720 (-43.8%)

You are done when stats list contains a record whose estimated Token count decreases from before to after. To inspect exactly what changed, copy its ID:

tokenless stats diff <record-id>

For a visual view of savings over time, follow the AgentSight guide. When Tokenless and AgentSight run as the same user, the Dashboard reads local Tokenless statistics without requiring SLS.

If no record appears, the content may not have passed through Tokenless or may not have become shorter. Check the adapter and component health:

anolisa adapter status tokenless
anolisa doctor tokenless

Then see No statistics appear after setup.

Token counts are estimates for content processed by Tokenless, not a direct measurement of the model bill. Statistics and diffs may contain original tool content; avoid sharing their output when it contains sensitive data. See Measuring savings and Configuration and data privacy for details.

Use another Agent

Scan the machine, then enable only the Agent you use:

anolisa adapter scan
AgentSetup
cosh / Copilot Shellanolisa adapter enable tokenless cosh
OpenClawanolisa adapter enable tokenless openclaw
Hermesanolisa adapter enable tokenless hermes
Qoderanolisa adapter enable tokenless qoder
Claude Codeanolisa adapter enable tokenless claude-code
Codexanolisa adapter enable tokenless codex
DeepSeek Harness (dsh)anolisa adapter enable tokenless dsh --profile <profile>
OpenCodeanolisa adapter enable tokenless opencode
Qwen Codeanolisa adapter enable tokenless qwencode
QwenPawanolisa adapter enable tokenless qwenpaw

Restart the Agent CLI or IDE after setting it up. OpenClaw also requires openclaw gateway restart; if its security check rejects the plugin, follow the OpenClaw integration instructions. For DeepSeek Harness, <profile> is required and must match the name used by dsh --profile <profile>; restart that profile after enabling the bundle. To enable more than one profile, repeat --profile in the same command:

anolisa adapter enable tokenless dsh \
--profile web \
--profile headless

Every later enable or re-enable replaces the entire recorded profile set. Include every profile that should retain Tokenless each time.

OpenCode is available through the same adapter command. The bundled lifecycle script remains an alternative for npm installations that have no ANOLISA component record.

Optional: test compression without an Agent

Use this deterministic check when you want to confirm the standalone CLI before enabling an adapter:

printf '%s\n' \
'{"status":"ok","data":{"name":"demo","items":[1,2,3]},"debug":{"trace":"verbose"},"metadata":null}' \
| tokenless compress-response

tokenless stats list --limit 1

The command returns valid JSON with debug and metadata omitted. Content without removable fields is returned unchanged and is not recorded.

Platform support

Platformanolisa CLInpmcurlSkill
Linux x86_64/aarch64 (glibc)SupportedSupportedSupported (npm path)Supported (follows curl)
Linux with musl, such as AlpineNot currently supportedNot currently supportedSource build only, needs a Rust toolchainSource build only, needs a Rust toolchain
macOS Apple SiliconSupportedSupportedSupported (npm path)Supported (follows curl)
macOS x86_64Not currently supportedNot currently supportedNot currently supportedNot currently supported
WindowsNot currently supportedNot currently supportedNot supported, use WSL2Not supported, use WSL2

Notes on the boundaries above:

  • macOS x86_64 has no supported route in this release. @anolisa/tokenless-darwin-x64 is a release build target that is not on the registry, so neither npm nor the curl npm path can deliver a binary there, and the curl source-build fallback is refused on macOS — scripts/install.sh exits with an error instead of running cargo. Use Linux or Apple Silicon macOS until that package is published.
  • curl on macOS relies on its npm path. Its source-build fallback is validated on Linux only, and the installer refuses to run it on macOS, so a macOS machine without npm has no supported curl path.
  • The npm package declares os: linux, darwin, so Windows is unsupported by every method here. Inside WSL2 the Linux rows apply.
  • The Skill method delegates to the anolisa CLI, npm, or curl, so its support follows the method it selects.

To build the standalone CLI from source, see User manual · Build the standalone CLI from source.

Next steps