Skip to main content

Markdown and text file editor for Claude Code — saves 80-90% of tokens

Project description

TokSlash

Edit Markdown by section, not by file.

TokSlash brings structure-level editing to Claude Code. Instead of reading and rewriting entire files or using string-based Edit, it lets you read and modify specific sections by block ID — saving tokens and avoiding format corruption.


Quick Start — 5 步上手

1. 安装

pip install tokslash

2. 配置 Claude Code

tokslash install     # ← 注册 MCP 服务器 + 自动放行 hooks(只需一次)

3. 初始化项目

cd 你的项目/
tokslash init        # ← 把编辑规则写入 CLAUDE.md(每个项目运行一次)
tokslash reindex     # ← 建立 Markdown 文件索引

4. 验证安装

tokslash doctor      # ← 全绿表示一切正常

5. 激活 Pro(可选,免费版跳过)

tokslash activate --key YOUR-LICENSE-KEY

Buy Pro — ¥199 终身版 / $49 终身版

6. 重启 Claude Code

# 关闭当前 Claude Code 会话
# 重新进入项目目录,打开 Claude Code

TokSlash 会作为 MCP 工具自动出现。在 Claude Code 中说"改 README"它就会自动用 TokSlash。


在 Claude Code 中使用

Claude Code 会自动调用 TokSlash。你不需要记命令——正常说话就行:

用户:"更新 README 的安装步骤,添加 Python 3.12 支持"

Claude Code 自动:
  → list_blocks("README.md")        查看所有章节
  → read_block("<id>")              读取目标章节
  → replace_block("<id>", "...")    只替换目标章节

你也可以主动使用:

命令 用途 示例
list_blocks("文件.md") 查看文件有哪些章节 list_blocks("README.md")
read_block("块ID") 读一个章节 read_block("abc-123...")
replace_block("块ID", "新内容") 改一个章节 replace_block("abc-123...", "## 安装\n\n新内容")
find_blocks("文件.md", "关键词") 按标题搜索章节 find_blocks("README.md", "安装")

何时 TokSlash 生效:

  • 文件超过 100 行
  • 文件有标题结构(# ## ### 等)
  • 你只需要修改一个或几个章节

何时用原生 Edit:

  • 文件小于 100 行
  • 改动只有 1-3 行
  • 文件没有标题结构

CLI 命令

命令 用途
tokslash install 注册 MCP 服务器 + hooks(全局,只需一次)
tokslash init 把编辑规则写入 CLAUDE.md(每个项目运行一次)
tokslash reindex 建立/刷新当前项目的索引
tokslash doctor 诊断所有配置问题
tokslash blocks README.md 查看文件的章节结构
tokslash status 查看索引状态 + 今日配额
tokslash stats 查看 token 节省统计
tokslash activate --key <key> 激活 Pro 许可证
tokslash --version 查看版本号

Free vs Pro

功能 免费版 Pro 版
结构化编辑 ✅ 7次/天 ✅ 无限
块级关键词搜索
安全引擎 + 自动备份
跨文件语义搜索
优先支持
终身更新

免费版让你体验全部功能,7次/天对大多数用户足够。Pro 适合重度用户。


支付方式

方式 适用 链接
微信支付 中国大陆 tokslash.stratsapien.com/pay
Creem 海外用户 Creem 支付链接

支付成功后,许可证密钥会显示在页面上,并发送到你的邮箱。


常见问题

安装后 Claude Code 看不到 TokSlash?

  1. 确认安装成功:tokslash --version
  2. 运行诊断:tokslash doctor(看哪里标红)
  3. 重新注册:tokslash install
  4. 在 Claude Code 输入 /mcp 查看是否有 tokslash

升级版本后工具失效?

pip install tokslash --upgrade
tokslash           # 会提示需要重启 Claude Code
# 重启 Claude Code

每个项目都要做什么?

cd 新项目/
tokslash init        # 写入 CLAUDE.md(只需一次)
tokslash reindex     # 建立索引
# 然后重启 Claude Code

数据会被上传吗?

不会。 所有索引、缓存、备份都保存在本地 .tokslash/ 目录。 唯一的网络请求是许可证激活验证(可离线使用)。


支持

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tokslash-0.3.12-cp312-cp312-win_amd64.whl (596.2 kB view details)

Uploaded CPython 3.12Windows x86-64

tokslash-0.3.12-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

tokslash-0.3.12-cp312-cp312-macosx_11_0_arm64.whl (679.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

tokslash-0.3.12-cp311-cp311-win_amd64.whl (604.4 kB view details)

Uploaded CPython 3.11Windows x86-64

tokslash-0.3.12-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

tokslash-0.3.12-cp311-cp311-macosx_11_0_arm64.whl (674.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

tokslash-0.3.12-cp310-cp310-win_amd64.whl (602.3 kB view details)

Uploaded CPython 3.10Windows x86-64

tokslash-0.3.12-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

tokslash-0.3.12-cp310-cp310-macosx_11_0_arm64.whl (677.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file tokslash-0.3.12-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: tokslash-0.3.12-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 596.2 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tokslash-0.3.12-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 de8682ceaeb55fa58b3335c0b7a30960d35f2e3b9152520583cc558092b64dcf
MD5 ab6de034f62006ff4115a8c543de2ae5
BLAKE2b-256 045876e5874d57dbc4c221a0381a681d605ebbe9021f75b1f1a458f5d85ab60b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.3.12-cp312-cp312-win_amd64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.3.12-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tokslash-0.3.12-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 93a4e55eee111992c37c283af7d4ccbce01879eec5fd1f4d42ca874183f4ebbd
MD5 dd76cc6724df009b1828c526f760f906
BLAKE2b-256 3215534072efa5c69c76a7272c6f286675418e126572ae12692b20787b56995f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.3.12-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.3.12-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tokslash-0.3.12-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ea8401d31f2b034809ab32567d59fc945f052183cb607441c2d04fac30a8cb17
MD5 ec02f08b0c4e562bf93c233468fdd2ac
BLAKE2b-256 c4f96e47fe99f7affcd4a29d58900ab63feb7f0cdd64fff0ffa66cba4a6966cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.3.12-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.3.12-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: tokslash-0.3.12-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 604.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tokslash-0.3.12-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7ffd129a8dbad79393652d4786f8a0be35819c9fd987a681eb0f657c1ebe50c6
MD5 176952d41836fb182c0973cd2cbb2beb
BLAKE2b-256 8e296f58108b83d60660b65c6a92a355432c75b34ab2876f97b8a02b9ad73a22

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.3.12-cp311-cp311-win_amd64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.3.12-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tokslash-0.3.12-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8a84e72773dccb4e2bfa36b1316c819a4f9efddb37097dc74e87352b600e4019
MD5 18de1a7efb1196e061d66dd1d2f74455
BLAKE2b-256 e83f3bbf40e8fcaa39ccf711192d274c91de85e304b1adbc9dcdcf3161e0a34e

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.3.12-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.3.12-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tokslash-0.3.12-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ed5e76e7c773c9ed87c48adea90cfad746adae3b9a4f4c1fd7ddb96635d1dbc3
MD5 8dcb12c011e37891956f35a62127f857
BLAKE2b-256 6fe79def1779a4a2d3dcfd29bb732f8626ab81ac1adec4d24ccf8fe1915e2dd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.3.12-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.3.12-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: tokslash-0.3.12-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 602.3 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tokslash-0.3.12-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d7aadf37741b3c0b2b919930073ea36fc35bced53c82d9c130398d448bd2da76
MD5 e6c90d66b987ca32ccf234616d82877d
BLAKE2b-256 91824983d969ddc7b0b04253688ebb0d86335165be4f748713be8a36e928f56c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.3.12-cp310-cp310-win_amd64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.3.12-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tokslash-0.3.12-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9f567a08a158d5e8634fd1ec1f8a35bd70f6a3f81e1f7f7e9e1b933aa9acd555
MD5 b1a16f07d7901cddcf4328798b83a5ce
BLAKE2b-256 f77aa8f929b504e2f664ce5c67f7862a2067479b8af11c671eff21641d0a3570

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.3.12-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.3.12-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tokslash-0.3.12-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 03ff7bb71db0d082d2db0f56a1c228ef7f1b047348b7d6395bc71e48af0ad5a6
MD5 3fd21b547782726929d9321b4348de31
BLAKE2b-256 629f674ef119ff36c60e86c005a3e98e02ae47a56e916eeb6a16ef64865e5c4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.3.12-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page