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", "安装")
generate_toc("文件.md") 生成/更新目录 generate_toc("README.md")
move_block("源ID", "目标ID", "after") 移动章节(含子章节) move_block("id1", "id2", "after")
adjust_level("块ID", -1) 升级/降级标题(子标题同步) adjust_level("id1", -1)
md_edit("文件.md", "指令") 自然语言一步编辑 md_edit("README.md", "把 Python 3.10 改为 3.12")

何时 TokSlash 生效:

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

何时用原生 Edit:

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

CLI 命令

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

新增功能(V0.4.0)

功能 说明 免费版
md_generate_toc 自动生成/更新目录(<!-- toc --> 标记)
md_move_block 移动章节,含所有子章节(4 种位置模式) 🔒 Pro
md_adjust_level 升级/降级标题,子标题自动同步
Aha Moment 每次编辑显示 token + 金额节省
Python 3.13 兼容 cibuildwheel 自动检测 Python 版本

Free vs Pro

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

免费版让你体验全部功能,50次/天对大多数用户足够。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.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

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

tokslash-0.4.1-cp314-cp314-macosx_11_0_arm64.whl (725.3 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

tokslash-0.4.1-cp313-cp313-win_amd64.whl (628.5 kB view details)

Uploaded CPython 3.13Windows x86-64

tokslash-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

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

tokslash-0.4.1-cp313-cp313-macosx_11_0_arm64.whl (720.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

tokslash-0.4.1-cp312-cp312-win_amd64.whl (636.2 kB view details)

Uploaded CPython 3.12Windows x86-64

tokslash-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.7 MB view details)

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

tokslash-0.4.1-cp312-cp312-macosx_11_0_arm64.whl (726.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

tokslash-0.4.1-cp311-cp311-win_amd64.whl (645.4 kB view details)

Uploaded CPython 3.11Windows x86-64

tokslash-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.7 MB view details)

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

tokslash-0.4.1-cp311-cp311-macosx_11_0_arm64.whl (722.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

tokslash-0.4.1-cp310-cp310-win_amd64.whl (643.7 kB view details)

Uploaded CPython 3.10Windows x86-64

tokslash-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.4 MB view details)

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

tokslash-0.4.1-cp310-cp310-macosx_11_0_arm64.whl (727.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file tokslash-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7fa396b4009d603af628bb99fe344e81cd75933f25d469ca00e0ac4c09474299
MD5 3f203feff7eafa93a918596b25a9a7cc
BLAKE2b-256 c07ae2e4b88371995f2364bfa025a859ebf0195907d80a2073a2065056530806

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.1-cp314-cp314-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.4.1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b213fd3a0566750d96e8f718569204379681b740275856a32dcfad9606ef1f0b
MD5 a2a81b0f083f9b19d1e455ad2e17824a
BLAKE2b-256 4e1390782094ed170209cf26fd7c4d8112f19dbe8c252f275778768299abf30d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.1-cp314-cp314-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.4.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: tokslash-0.4.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 628.5 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tokslash-0.4.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 199ee4877519a473f5f1ef134faa1f91c1a04b7f332ea30ae25a3958cf03b2f3
MD5 fc90a6053e13eab982c9143dc19fafe6
BLAKE2b-256 ab44e60234aee4b0aa3fac1432a0121bec4d915938fa73a8b5489fb8667e814a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.1-cp313-cp313-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.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c1b77059587535d42a100e6d05a72994aec0beddb96099417fa2ed901e1e034c
MD5 341a1e7819a3cf578e2fd153f742f9a4
BLAKE2b-256 8908f6d51f1201b93392e01c9d4f84df787a6c96f8d972f032cbfb36edf87554

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.1-cp313-cp313-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.4.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 34be71357c3fd385b0252fcf17ba40637a97aa46c2f42928fb2eed682761d1d3
MD5 8c0cf3caeaebef250ef840dd3a7e9eb5
BLAKE2b-256 1bf17c2d28ac2c549fcc12227e1837aa4a6959ec4943271a8fa9db8536578e8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.1-cp313-cp313-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.4.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: tokslash-0.4.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 636.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.4.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 45336889f3ff96bdcb3a7a9cea9f154dec6d224c19f3f861acfc9b85f6179ffa
MD5 53dc52f0df26531c686ea354bf08edc0
BLAKE2b-256 6dfedfa4f278860fb9ace7ed51b5ab3d7125de0d373ff4be97b3a9fedc63393d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.1-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.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 890d5b1a14395cf267ca504087d1959de4b861df20946c62d3864c418774c592
MD5 c2debdb053eb075f0b3e585c628b8c08
BLAKE2b-256 877b068f7ea31bfdf6965f1789dd023ae33ceafb05fdb4c3d295528e1ec5375d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.1-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.4.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7fcd9df3512a8c5f29f09e933ba93a45e4be2e49ffec6f4db8394ff8609ae876
MD5 f5454c5b93e890560b501dc3e1fcbb24
BLAKE2b-256 0953580b19dd6fb4032a53a2e8915212e4c0297f412b68e716b4ff1d52a2e0c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.1-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.4.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: tokslash-0.4.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 645.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.4.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c4b0a4d6c3b6c2b42755c74d33baf4c6feb9379f298766618ff1c7bf5d7e5caa
MD5 333b77c73404882abefc7deee9ebab58
BLAKE2b-256 83b0ed48f0ef6eb37ab93644b540fc882cfe784f2adc5ea043e239eee3700a47

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.1-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.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cada709e82c99f26d6e9ac34f2bdc8d86d56445068545164269fd25440cfdafc
MD5 d56fdf404b1c944c1c9aee1dcb9d8c97
BLAKE2b-256 e737691e93cbee71dbb810857288882c508bf442d7f820bb3e52a6d68d8bb0db

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.1-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.4.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 42f94ba62a9a1a34db3e3181ad1405a1fb0ee0ec6c58a42b4c8fec5c00457d9d
MD5 c1397e6f4246fcd1e768520c378da575
BLAKE2b-256 7f8f910f04a2c348383abb554296afd8d4b59956d4e996073c8b59dac42bde49

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.1-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.4.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: tokslash-0.4.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 643.7 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.4.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ec771bb8bf64d11b4b9a76571c6ff181f24fedb793bc9d254ee6d19c416ea4cb
MD5 5c4020c5d953ba6f42fbb8575006343d
BLAKE2b-256 efe11eaade39c36119d53cc4ee97022a9978ef6abfeceff847303363ed6ce28f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.1-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.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 322ce2a6fac7c0b6e4a132b13b91b5ec3aea05c86cc6f9e1bba31ea27a5977ea
MD5 9607535d87930d15b5a1f5475f6d81af
BLAKE2b-256 ca51ae4e53e12629c6331b4e1808a751cfd8a00f2400742e4dcdeb414736d22c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.1-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.4.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3fd023720b2e3b63cfc2d001c717cd750dbfeed85d0da1da2ae143d29bf15678
MD5 68ea8882a1a284ccd1b9d4fba12bce34
BLAKE2b-256 a5f0abe22466f2aeee0f0d3caa49d6c9a8ebce791033097febba1108139dfc64

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.1-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